:root {
  --primary: #2563eb;
  --dark: #374d81;
  --aimagelab-red: #a50021;
  --muted: #6b7280;
  --light: #f3f4f6;
  --paper: #ffffff;
  --ink: #172033;
  --clinician: #fac898;
  --machine: #c1e1c1;
  --line: #d8deea;
  --ed: #ef4444;
  --netc: #22c55e;
  --et: #2563eb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 55%, #eef8f1 100%);
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 14px clamp(20px, 5vw, 72px);
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 222, 234, 0.72);
  border-right: 1px solid rgba(216, 222, 234, 0.72);
  border-left: 1px solid rgba(216, 222, 234, 0.72);
  border-radius: 0 0 8px 8px;
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--dark);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.share-button:hover {
  color: var(--primary);
}

.share-button {
  appearance: none;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 72px);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  justify-items: center;
  width: min(1240px, 100%);
  text-align: center;
}

.hero-copy {
  width: min(900px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--dark);
  line-height: 1.12;
}

h1 {
  max-width: 850px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: 1.08rem;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px auto 0;
  color: #40516f;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.landing-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 54px);
}

.landing-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(55, 77, 129, 0.16);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 55px rgba(23, 32, 51, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.landing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.13);
}

.landing-card strong {
  margin-top: 18px;
  color: var(--dark);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.12;
}

.landing-card span:last-child {
  margin-top: auto;
  padding-top: 20px;
  color: #48566f;
  font-size: 0.96rem;
}

.join-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 18px;
  padding: 0 20px;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.join-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.26);
}

.card-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #172033;
  font-size: 0.78rem;
  font-weight: 800;
}

.dataset-card .card-kicker {
  background: #bfdbfe;
}

.clinician-card .card-kicker {
  background: var(--clinician);
}

.english-card .card-kicker {
  background: var(--machine);
}

.powered-by {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid rgba(216, 222, 234, 0.9);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.08);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.powered-by:hover {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.12);
}

.powered-by span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: none;
  white-space: nowrap;
}

.aimagelab-wordmark {
  display: inline-flex;
  align-items: center;
  color: #1f2937;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.35rem, 1.95vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.aimagelab-wordmark .ai-part {
  color: var(--aimagelab-red);
}

.aimagelab-wordmark .mage-part {
  color: #2f3136;
}

.aimagelab-wordmark .lab-part {
  color: var(--aimagelab-red);
}

.section {
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 72px);
}

.section > * {
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.section.alt {
  background: var(--light);
}

body.home main,
body.page-dataset .hero,
body.page-clinicians .hero,
body.page-clinicians .dataset-content,
body.page-dataset .clinicians-it-content,
body.page-dataset .clinicians-en-content,
body.page-dataset .language-panel {
  display: none;
}

.language-panel {
  padding-bottom: 20px;
  text-align: center;
}

.language-panel h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.language-panel .section-heading {
  margin-right: auto;
  margin-left: auto;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  margin-right: auto;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.lang-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.language-switch label {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

#lang-it:checked + label,
#lang-en:checked + label {
  color: #ffffff;
  background: var(--dark);
}

body.page-clinicians[data-lang="it"] .clinicians-en-content,
body.page-clinicians[data-lang="en"] .clinicians-it-content {
  display: none;
}

body.page-clinicians[data-lang="it"] .lang-copy-en,
body.page-clinicians[data-lang="en"] .lang-copy-it {
  display: none;
}

.section-heading {
  max-width: 940px;
  margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
  max-width: 840px;
  margin: 14px 0 0;
  color: #48566f;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.wide-table table {
  min-width: 980px;
}

.compact-guide {
  margin-top: 26px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: #ffffff;
  background: var(--dark);
  font-size: 0.9rem;
}

tbody tr:nth-child(even) {
  background: var(--light);
}

td:first-child {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 4px 4px 0;
  padding: 3px 8px;
  border-radius: 999px;
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.machine {
  background: var(--machine);
}

.badge.clinician {
  background: var(--clinician);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.field-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 28%);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.field-id {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-item p {
  margin: 10px 0 0;
  color: #48566f;
  font-size: 0.95rem;
}

.image-placeholder {
  display: grid;
  place-items: center;
  min-height: 142px;
  padding: 12px;
  border: 1px dashed #9aa7bd;
  border-radius: 6px;
  color: #667085;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(34, 197, 94, 0.08)),
    #f8fafc;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  text-align: center;
  word-break: break-word;
}

.prose {
  max-width: 940px;
  color: #354159;
  font-size: 1.05rem;
}

.prose p {
  margin: 0 0 16px;
}

.feedback-note {
  max-width: 940px;
  margin: 22px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #354159;
  background: #ffffff;
  font-weight: 700;
}

.feedback-note a {
  color: var(--primary);
}

.join-section {
  min-height: calc(100vh - 180px);
  display: grid;
  align-items: center;
}

.join-panel {
  max-width: 760px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(23, 32, 51, 0.1);
  text-align: center;
}

.join-panel p:not(.eyebrow) {
  margin: 18px auto 0;
  max-width: 600px;
  color: #48566f;
  font-size: 1.1rem;
}

.join-mail {
  display: inline-flex;
  margin-top: 24px;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.tumor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  margin-top: 12px;
  color: var(--dark);
  font-weight: 800;
}

.tumor-diagram {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid var(--dark);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, rgba(55, 77, 129, 0.12) 0 28%, transparent 29%),
    #f8fafc;
}

.tumor-diagram span {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.tumor-diagram .ed {
  background: color-mix(in srgb, var(--ed) 78%, white);
}

.tumor-diagram .netc {
  background: color-mix(in srgb, var(--et) 76%, white);
}

.tumor-diagram .et {
  background: color-mix(in srgb, var(--netc) 76%, white);
}

.single .ed {
  inset: 22% 20% 20% 18%;
}

.single .netc {
  inset: 36% 34% 32% 32%;
}

.single .et {
  inset: 43% 42% 42% 43%;
}

.multicentric .ed.one {
  width: 32%;
  height: 32%;
  left: 18%;
  top: 26%;
}

.multicentric .ed.two {
  width: 34%;
  height: 34%;
  right: 15%;
  bottom: 22%;
}

.multicentric .netc.one,
.multicentric .et.one {
  width: 14%;
  height: 14%;
  left: 27%;
  top: 35%;
}

.multicentric .netc.two,
.multicentric .et.two {
  width: 14%;
  height: 14%;
  right: 25%;
  bottom: 32%;
}

.multicentric .et.one,
.multicentric .et.two {
  transform: scale(0.55);
}

.multifocal .ed {
  inset: 22% 13% 22% 15%;
}

.multifocal .netc.one {
  width: 18%;
  height: 18%;
  left: 31%;
  top: 36%;
}

.multifocal .netc.two {
  width: 18%;
  height: 18%;
  right: 26%;
  bottom: 35%;
}

.multifocal .et.one,
.multifocal .et.two {
  width: 10%;
  height: 10%;
}

.multifocal .et.one {
  left: 35%;
  top: 40%;
}

.multifocal .et.two {
  right: 30%;
  bottom: 39%;
}

.mixed .ed.one {
  width: 30%;
  height: 30%;
  left: 14%;
  top: 30%;
}

.mixed .ed.two {
  width: 42%;
  height: 42%;
  right: 11%;
  bottom: 20%;
}

.mixed .netc.one {
  width: 13%;
  height: 13%;
  left: 23%;
  top: 39%;
}

.mixed .netc.two {
  width: 14%;
  height: 14%;
  right: 28%;
  bottom: 37%;
}

.mixed .netc.three {
  width: 13%;
  height: 13%;
  right: 18%;
  bottom: 26%;
}

.mixed .et {
  width: 8%;
  height: 8%;
}

.mixed .et.one {
  left: 26%;
  top: 42%;
}

.mixed .et.two {
  right: 31%;
  bottom: 40%;
}

.mixed .et.three {
  right: 21%;
  bottom: 29%;
}

.legend-note {
  max-width: 850px;
  margin: 24px auto 0;
  color: #48566f;
  text-align: center;
}

.example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.scan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scan-grid figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(23, 32, 51, 0.08);
}

.scan-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0b1020;
}

.scan-grid figcaption {
  margin: 0;
  padding: 9px 10px;
  color: var(--dark);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.report {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--dark);
  border-radius: 8px;
  color: #26334c;
  background: #ffffff;
}

.section > .language-switch {
  margin-right: auto;
  margin-left: auto;
}

.report p {
  margin: 0 0 16px;
}

.report p:last-child {
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(clamp(20px, 5vw, 72px), calc((100vw - 1120px) / 2));
  color: #ffffff;
  background: var(--dark);
}

.footer p {
  margin: 0;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .landing-links,
  .tumor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .example-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .landing-links,
  .tumor-grid {
    grid-template-columns: 1fr;
  }

  .field-item {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
