/* IMedC homepage + shared nav/footer. Based on design variation B: "Plate on the field". Flat blue and white fields, strict 12-column grid, one family.
   Every drawing is line art: white on blue, blue on white. Orange marks the one thing that matters. */
:root {
  --white: #FFFFFF;
  --blue: #1B3A8C;
  --blue-deep: #142C6C;
  --blue-dark: #0F2252;
  --blue-tint: #E9ECF5;
  --red: #D7263D;
  --red-deep: #B81C31;
  /* Clinical red is too dark to read as a thin line on the deep-blue fields, so drawings there use a lighter red. */
  --red-on-blue: #FF6B78;
  --ink: #0D1B2A;
  --text: #1A2735;
  --muted: #4A5868;
  --rule: #D5DADF;
  --on-blue: rgba(255,255,255,.86);
  --on-blue-soft: rgba(255,255,255,.66);
  --font: "Rethink Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(72px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; }
b, strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

/* ---------- Type ---------- */
.h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--text); max-width: 38em; }
.sec { padding-block: var(--sec); }
section[id] { scroll-margin-top: 72px; }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head .h2 { grid-column: 1 / span 6; }
.sec-sub { grid-column: 8 / span 5; color: var(--muted); max-width: 34em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  font: 700 1rem/1.2 var(--font); letter-spacing: -0.005em;
  text-decoration: none; border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1.1rem; }
.btn-orange { background: var(--red); color: #fff; }
.btn-orange:hover { background: var(--red-deep); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1C2E44; }
.btn-line { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-line:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-ghost { border-color: var(--blue); color: var(--blue); }
.btn-ghost:hover { background: rgba(27,58,140,.06); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--blue-tint); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--rule); }
.nav-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; }
.mark img { height: 46px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--blue); text-decoration: underline; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-login { color: var(--text); font-weight: 600; text-decoration: none; }
.nav-login:hover { color: var(--blue); }
.nav-quick { display: none; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: .9rem;
  padding: 6px 10px; border: 1.5px solid var(--rule); border-radius: 6px; color: var(--ink);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-3px) rotate(45deg); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  list-style: none; background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  padding: 6px; width: 220px; box-shadow: 0 12px 30px rgba(13,27,42,.14);
}
.lang a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 5px; text-decoration: none; color: var(--text); font-size: .95rem; }
.lang a b { width: 26px; font-weight: 700; color: var(--blue); font-size: .85rem; padding-top: 1px; }
.lang a:hover, .lang a[aria-current] { background: var(--blue-tint); }

/* Nav dropdowns (Log in, More): hover opens them on desktop, a click or tap toggles them (footer.php) */
.nav-row { position: relative; }
.drop { position: relative; }
.drop-more { position: static; }
.drop-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 0; background: none; border: 0; cursor: pointer;
  font: 500 .98rem/1.55 var(--font); color: var(--text);
}
.drop-btn.nav-login { font-weight: 600; }
.drop-btn::after { content: ""; width: 6px; height: 6px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.drop-btn:hover, .drop.open > .drop-btn { color: var(--blue); }
.drop.open > .drop-btn::after { transform: translateY(1px) rotate(-135deg); }
.drop-panel {
  display: none; position: absolute; top: calc(100% + 14px); right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 6px;
  min-width: 210px; box-shadow: 0 12px 30px rgba(13,27,42,.14);
}
.drop-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.drop-panel ul { list-style: none; }
.drop-panel a { display: block; padding: 7px 10px; border-radius: 5px; text-decoration: none; color: var(--text); font-size: .95rem; white-space: nowrap; }
.drop-panel a:hover { background: var(--blue-tint); color: var(--blue); text-decoration: none; }
.mega { top: 100%; right: var(--gutter); grid-template-columns: repeat(4, minmax(0, auto)); gap: 4px 20px; padding: 16px; }
.mega::before { top: -30px; height: 30px; }
.drop-h { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 6px; }
.drop.open > .drop-panel { display: block; }
.drop.open > .mega { display: grid; }
@media (hover: hover) and (min-width: 1181px) {
  .drop:hover > .drop-panel { display: block; }
  .drop:hover > .mega { display: grid; }
}

/* ---------- Hero: the plate printed on the blue field ---------- */
.hero { background: var(--blue); color: #fff; }
.hero :focus-visible { outline-color: #fff; }
.hero-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding-block: clamp(40px, 5vw, 64px) clamp(36px, 4vw, 56px);
}
.hero-text { grid-column: 1 / span 4; grid-row: 1; align-self: center; }
.hero-maker { font-size: clamp(1rem, 1.25vw, 1.15rem); font-weight: 600; letter-spacing: -0.01em; }
.hero-name {
  font-size: clamp(5rem, 9.6vw, 8.6rem);
  line-height: .86; font-weight: 800; letter-spacing: -0.06em;
  margin: 12px 0 26px -0.06em;
}
.hero-lead { font-size: 1.08rem; line-height: 1.55; color: var(--on-blue); max-width: 26em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-data { margin-top: 34px; border-top: 2px solid #fff; max-width: 26em; }
.hero-data > div { padding-top: 10px; }
.hero-data dt { font-size: .85rem; color: var(--on-blue-soft); }
.hero-data dd { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.015em; }

.hero-note { margin-top: 18px; padding: 10px 14px; border-left: 3px solid var(--red-on-blue); background: rgba(255,255,255,.08); max-width: 26em; }
.hero-note a, .cta-text a:not(.btn), .ages-intro a, .news a { color: #fff; }

.plate { grid-column: 6 / span 7; grid-row: 1; align-self: center; padding-left: clamp(0px, 1vw, 16px); }
.plate-head {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 12px;
}
.flow-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px;
  font: 700 .95rem/1 var(--font); color: #fff; background: transparent;
  border: 2px solid #fff; border-radius: 999px; padding: 8px 16px 8px 12px;
}
.flow-btn svg { color: var(--red-on-blue); }
.flow-btn:hover { background: rgba(255,255,255,.12); }
.flow-btn[aria-pressed="true"] { background: #fff; color: var(--blue); }


/* Plate I drawing */
.heart { display: block; width: 100%; height: auto; margin-top: 4px; overflow: visible; touch-action: manipulation; }
.heart .part { cursor: pointer; transition: opacity .25s ease; }
.heart.has-active .anat .part:not(.is-active) { opacity: .3; }
.heart.has-active .fat { opacity: .1; }
.heart .m { fill: #0A50C2; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.heart .m.aur { fill: #1159C8; }
.heart .hatch { fill: url(#hatch); opacity: .38; pointer-events: none; }
.heart .a { fill: #0A50C2; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.heart .v { fill: var(--blue-deep); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.heart .lumen { fill: var(--blue-dark); stroke: #fff; stroke-width: 1.3; }
.heart .hl { fill: none; stroke: #fff; stroke-opacity: .32; stroke-width: 4; stroke-linecap: round; pointer-events: none; }
.heart .crease { fill: none; stroke: #fff; stroke-opacity: .45; stroke-width: 1.1; stroke-linecap: round; pointer-events: none; }
.heart .fat { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: .1 7; opacity: .55; pointer-events: none; transition: opacity .25s; }
.heart .cor-o { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.heart .cor { fill: none; stroke: #0A50C2; stroke-width: 3.6; stroke-linecap: round; }
.heart .cor-o.thin { stroke-width: 5; }
.heart .cor.thin { stroke-width: 2.2; }
.heart .vein { fill: none; stroke: #fff; stroke-width: 1.4; stroke-dasharray: 7 4; stroke-linecap: round; opacity: .8; }
.heart .lig-o { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; }
.heart .lig { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.heart .hidden-line path { fill: none; stroke: #fff; stroke-opacity: .7; stroke-width: 1.3; stroke-dasharray: 6 5; }
.heart .valve ellipse { fill: rgba(255,255,255,.1); stroke: #fff; stroke-width: 1.5; stroke-dasharray: 5 4; }
.heart .valve, .heart .hidden-line { pointer-events: visiblePainted; }

/* active structure: the accent */
.heart .part.is-active .m, .heart .part.is-active .a, .heart .part.is-active .v { stroke: var(--red-on-blue); stroke-width: 3; }
.heart .part.is-active .lumen { stroke: var(--red-on-blue); stroke-width: 2.4; }
.heart .valve.is-active ellipse { fill: rgba(255,107,120,.45); stroke: var(--red-on-blue); stroke-width: 2.4; stroke-dasharray: none; }
.heart .hidden-line.is-active path { stroke: var(--red-on-blue); stroke-opacity: 1; stroke-width: 2.6; fill: rgba(255,107,120,.16); }
.heart .part.is-active .cor-o, .heart .part.is-active .lig-o { stroke: var(--red-on-blue); }

/* labels */
.heart .lbl { cursor: pointer; outline: none; }
.heart .lbl .hit { fill: transparent; stroke: none; }
.heart .lbl:focus-visible .hit { fill: rgba(255,255,255,.1); stroke: #fff; stroke-width: 2; }
.heart .lbl line { stroke: #fff; stroke-width: .9; opacity: .7; transition: opacity .2s; }
.heart .lbl .tip { fill: #fff; }
.heart .lbl .en { font: 500 19px var(--font); fill: #fff; letter-spacing: -0.005em; }
.heart .lbl .la { font: italic 400 15.5px var(--font); fill: #fff; fill-opacity: .66; }
.heart .lbl .num { display: none; }
.heart .lbl .num circle { fill: var(--blue); stroke: #fff; stroke-width: 1.6; }
.heart .lbl .num text { font: 700 17px var(--font); fill: #fff; }
.heart.has-active .lbl:not(.is-active) { opacity: .4; }
.heart .lbl.is-active line { stroke: var(--red-on-blue); stroke-width: 2; opacity: 1; }
.heart .lbl.is-active .tip { fill: var(--red-on-blue); r: 5; }
.heart .lbl.is-active .en { font-weight: 800; }
.heart .lbl.is-active .num circle { fill: var(--red-on-blue); stroke: var(--red-on-blue); }
.heart .lbl.is-active .num text { fill: var(--ink); }
.heart .lbl:hover .en { text-decoration: underline; }

/* lungs and the blood-flow trace */
.heart .lungs { opacity: 0; transition: opacity .4s; pointer-events: none; }
.heart .lungs-t { font: 700 18px var(--font); fill: #fff; }
.heart .lungs-t.la { font: italic 400 15.5px var(--font); fill-opacity: .7; }
.heart.at-lungs .lungs { opacity: 1; }
.heart .flow { pointer-events: none; }
.heart .flow-path { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.heart .flow-path.is-arterial { stroke: var(--red-on-blue); stroke-width: 7; }
.heart .flow-path.is-venous { stroke: var(--red-on-blue); stroke-width: 10; }
.heart .flow-path.core { stroke: var(--blue); stroke-width: 4.4; }
.heart .flow-path.is-lungs { stroke-dasharray: 2 9; stroke: #fff; stroke-width: 3; }
.heart .flow-dot { fill: var(--red-on-blue); stroke: #fff; stroke-width: 2.5; opacity: 0; }
.heart .flow-dot.is-venous { fill: var(--blue); stroke: var(--red-on-blue); stroke-width: 3.5; }
.heart.is-flowing .flow-path, .heart.flow-done .flow-path { opacity: 1; }
.heart.is-flowing .labels { opacity: .25; transition: opacity .3s; }
.heart.is-flowing .lbl.is-active { opacity: 1; }

.key { display: none; }

/* ---------- About ---------- */
.about-h { grid-column: 1 / span 5; align-self: start; }
.about-body { grid-column: 7 / span 6; }
.points { margin-top: 36px; border-top: 2px solid var(--ink); }
.points > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.points dt { font-weight: 700; color: var(--ink); line-height: 1.35; }
.points dd { color: var(--muted); }

/* ---------- Topics: the set of plates on the blue field ---------- */
.topics { background: var(--blue); color: #fff; }
.topics .h2 { color: #fff; }
.plates {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid #fff;
}
.pl {
  padding: 28px 28px 32px 0; border-bottom: 1px solid rgba(255,255,255,.3);
  display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0;
}
.pl:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.3); }
.motif { width: 100%; max-width: 300px; height: auto; margin-bottom: 18px; overflow: visible; }
.pl-no { font-size: .85rem; color: var(--on-blue-soft); }
.pl h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; margin: 2px 0 8px; }
.pl-covers { color: var(--on-blue); font-size: .97rem; max-width: 30em; }
.pl-q { align-self: start; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.3); font-weight: 600; font-size: 1rem; line-height: 1.45; max-width: 30em; }

/* motif line style (white on blue) */
.motif path, .motif circle, .motif rect { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.motif .thin { stroke-width: 1; opacity: .75; }
.motif .soft { opacity: .6; }
.motif .w15 { stroke-width: 1.5; }
.motif .w2 { stroke-width: 2.2; }
.motif .w3 { stroke-width: 3.2; }
.motif .fill { fill: #fff; stroke: none; }
.motif .acc, .motif .acc path, .motif path.acc { stroke: var(--red-on-blue); }
.motif .acc-fill { fill: var(--red-on-blue); stroke: var(--red-on-blue); }
.motif .cleft { stroke: var(--blue); stroke-width: 1.6; }
.motif .tube { stroke: #fff; stroke-width: 9; }
.motif .tube-in { stroke: var(--blue); stroke-width: 5; }
.motif .media { stroke-width: 8; stroke-dasharray: 3 2.4; opacity: .4; }
.motif .dots circle { fill: #fff; stroke: none; }
.motif text { font: 600 11px var(--font); fill: #fff; fill-opacity: .8; }
.motif text.soft { fill-opacity: .6; }
.motif .mem circle { stroke-width: 1; fill: var(--blue); }
.motif .hel rect { fill: var(--blue); stroke-width: 1.8; }
.motif .hexa { fill: var(--red-on-blue); stroke-width: 2; }
.motif .myelin rect { fill: var(--blue); stroke-width: 1.6; }
.motif .dot { fill: #fff; stroke: none; opacity: .55; }
.motif .dot-hot { fill: var(--red-on-blue); stroke: none; }
.motif .ring { stroke-width: 1.3; }

/* ---------- Rounds ---------- */
.schedule { list-style: none; border-top: 3px solid var(--ink); }
.step {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.step-n { grid-column: 1 / span 2; font-size: clamp(5rem, 9vw, 8.5rem); font-weight: 800; line-height: .78; letter-spacing: -0.06em; color: var(--blue); font-variant-numeric: tabular-nums; }
.step-main { grid-column: 3 / span 5; }
.step-main h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.025em; color: var(--ink); line-height: 1.1; margin-bottom: 10px; }
.step-main p { color: var(--text); max-width: 34em; }
.step-data { grid-column: 9 / span 4; border-top: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.step-data > div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .97rem; }
.step-data dt { color: var(--muted); }
.step-data dd { font-weight: 700; color: var(--ink); }
.step-data .hl { background: var(--blue-tint); padding-inline: 10px; margin-inline: -10px; }

/* ---------- Ages: blue field ---------- */
.ages { background: var(--blue); color: #fff; }
.ages .h2 { color: #fff; }
.ages-intro { grid-column: 1 / span 4; }
.ages-intro p { margin-top: 18px; color: var(--on-blue); max-width: 26em; }
.ages-table { grid-column: 6 / span 7; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rx-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.rx-table thead th { text-align: left; font-weight: 600; font-size: .88rem; color: var(--on-blue); padding: 0 16px 12px 0; border-bottom: 3px solid #fff; vertical-align: bottom; }
.rx-table tbody th, .rx-table td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid rgba(255,255,255,.35); }
.rx-table tbody th { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; width: 18%; }
.rx-table td { color: var(--on-blue); }
.rx-table thead th:nth-child(n+3) { width: 22%; }
.rx-num .num { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Awards ---------- */
.awards-head { grid-column: 1 / span 5; }
.prize { margin-top: 28px; display: grid; gap: 6px; }
.prize-num { font-size: clamp(4.2rem, 9vw, 8rem); font-weight: 800; letter-spacing: -0.055em; line-height: .9; color: var(--blue); font-variant-numeric: tabular-nums; }
.prize-unit { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.awards-lead { margin: 24px 0 26px; color: var(--muted); max-width: 32em; }
.awards-cols { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; align-content: start; border-top: 3px solid var(--ink); }
.awards-cols > div { padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
.awards-cols h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 6px; color: var(--ink); }
.awards-cols p { color: var(--muted); }

/* ---------- Deadline: blue field ---------- */
.cta { background: var(--blue); color: #fff; }
.cta .h2 { color: #fff; }
.cta :focus-visible { outline-color: #fff; }
.cta-text { grid-column: 1 / span 6; }
.cta-text p { margin: 20px 0 30px; max-width: 30em; color: var(--on-blue); font-size: 1.1rem; }
.clockbox { grid-column: 8 / span 5; align-self: center; background: #fff; color: var(--ink); padding: 20px 24px 24px; }
.clock-top { font-size: .92rem; font-weight: 600; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.clock > div { display: grid; }
.cd { font-size: clamp(2.6rem, 4.4vw, 3.8rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--blue); font-variant-numeric: tabular-nums; }
.cd-u { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.clock-done { margin-top: 14px; font-weight: 700; }
.cta-text .hero-ctas { margin-top: 0; }
.qr-paper { grid-column: 8 / span 5; margin: 40px 0 0 -8%; width: 116%; aspect-ratio: 210 / 297; border: 0; }
.qr-arrow { grid-column: 1 / span 7; align-self: start; margin-top: 36px; width: 100%; height: auto; overflow: visible; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Teachers, ambassadors ---------- */
.teachers-h { grid-column: 1 / span 5; }
.teachers-body { grid-column: 7 / span 6; }
.row-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
/* a white section after a white section: no top padding, a rule instead */
.amb-h { grid-column: 1 / span 5; }
.amb-body { grid-column: 7 / span 6; display: grid; gap: 16px; justify-items: start; max-width: 38em; }
.amb-body .btn { margin-top: 10px; }


/* ---------- Materials ---------- */
.materials { background: var(--blue-tint); }
.mat-intro { grid-column: 1 / span 4; }
.mat-intro p { margin-top: 18px; color: var(--muted); max-width: 26em; }
.mat-list { grid-column: 6 / span 7; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-content: start; border-top: 3px solid var(--ink); }
.mat-list a { display: flex; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(13,27,42,.2); font-weight: 700; color: var(--ink); text-decoration: none; }
.mat-list a::after { content: "\2192"; margin-left: auto; color: var(--blue); }
.mat-list a:hover { color: var(--blue); }
.mat-list span { font-size: .78rem; font-weight: 700; color: var(--red); letter-spacing: .04em; }
.mat-docs { grid-column: 6 / span 7; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 16px; margin-top: 32px; }
.mat-docs a { display: block; font-size: .9rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.mat-docs a:hover { color: var(--blue); }
.mat-docs img { display: block; width: 100%; height: auto; margin-bottom: 8px; border: 1px solid var(--rule); }
.mat-docs a:hover img { border-color: var(--blue); }

/* ---------- Newsletter: blue field ---------- */
.news { background: var(--blue); color: #fff; }
.news .h2 { color: #fff; }
.news-intro { grid-column: 1 / span 5; }
.news-intro p { margin-top: 18px; color: var(--on-blue); max-width: 30em; }
.news .sub-form { grid-column: 7 / span 6; align-self: center; }
.sub-form { display: flex; flex-wrap: wrap; gap: 12px; }
.sub-form input {
  flex: 1 1 260px; min-height: 48px; padding: 10px 18px; font: 500 1rem var(--font); color: var(--ink);
  background: #fff; border: 2px solid #fff; border-radius: 999px;
}
.sub-form input:focus-visible { outline: 3px solid var(--red-on-blue); outline-offset: 2px; }
.sub-form.sub-error input { border-color: var(--red-on-blue); }
.sub-msg { flex-basis: 100%; font-weight: 700; color: #fff; }
.sub-msg[hidden] { display: none; }

/* ---------- FAQ ---------- */
.faq-sec { background: var(--blue-tint); }
.faq-intro { grid-column: 1 / span 4; }
.faq-intro p { margin-top: 18px; color: var(--muted); }
.faq { grid-column: 6 / span 7; border-top: 3px solid var(--ink); }
.faq details { border-bottom: 1px solid rgba(13,27,42,.2); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 44px 18px 0; font-size: clamp(1.08rem, 1.6vw, 1.25rem); font-weight: 700; color: var(--ink); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background:
    linear-gradient(var(--blue), var(--blue)) center / 18px 2.5px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center / 2.5px 18px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--blue); }
.faq-a { padding: 0 0 20px; max-width: 40em; color: var(--text); }
.faq-a ul, .faq-a ol { padding-left: 1.4em; }
.faq-cat > details { margin-left: 20px; }
.faq-cat > details:last-child { border-bottom: 0; }
.faq-cat > details > summary { font-size: 1rem; padding-block: 14px; }

/* ---------- Footer (shared by all pages) ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,.8); padding-block: 56px 32px; font-size: .95rem; }
.foot a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 36px; }
.foot-brand { grid-column: 1 / span 4; display: grid; gap: 4px; align-content: start; }
.foot-mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 8px; justify-self: start; }
.foot-mark img { width: 44px; height: 44px; }
.foot-name { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; color: #fff; line-height: 1; }
.foot-social { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.foot-cols { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.foot-h { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 10px; }
.foot-links { list-style: none; display: grid; gap: 8px; }
.foot-links a, .foot-social a { text-decoration: none; font-weight: 600; }
.foot-links a:hover, .foot-social a:hover { text-decoration: underline; }
.foot-social i, .foot-contact i { width: 1.1em; text-align: center; margin-right: 6px; color: rgba(255,255,255,.55); }
.foot-contact { list-style: none; display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; }
.foot-partners { grid-column: 1 / -1; text-align: right; }
.foot-partners ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.foot-partners img { display: block; width: 24px; height: 24px; border-radius: 4px; background: #fff; }
.foot-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .85rem; color: rgba(255,255,255,.55); padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav-quick { display: inline-flex; margin-left: auto; }
  .nav-actions .btn { display: none; }
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 18px;
    padding: 18px var(--gutter) 24px;
    box-shadow: 0 16px 30px -18px rgba(13,27,42,.3);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 10px 0; font-size: 1.1rem; border-bottom: 1px solid var(--rule); }
  .nav-actions { flex-wrap: wrap; }
  .lang ul { left: 0; right: auto; }
  .nav-menu { max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav-links { align-items: stretch; }
  .nav-links .drop-btn { width: 100%; justify-content: space-between; padding: 10px 0; font-size: 1.1rem; border-bottom: 1px solid var(--rule); }
  .drop-panel, .mega { position: static; box-shadow: none; border: 0; border-radius: 0; min-width: 0; padding: 4px 0 10px 12px; }
  .drop-panel::before { display: none; }
  .mega { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links .drop-panel a { padding: 8px 10px; font-size: 1rem; border-bottom: 0; white-space: normal; }
  .nav-actions .drop-login .drop-panel { position: absolute; top: calc(100% + 8px); left: 0; right: auto; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 30px rgba(13,27,42,.14); padding: 6px; z-index: 60; }
}

@media (max-width: 1100px) {
  .hero-text { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .hero-maker, .hero-name { grid-column: 1 / -1; }
  .hero-lead { grid-column: 1 / span 6; }
  .hero-ctas, .hero-note { grid-column: 1 / span 6; }
  .hero-data { grid-column: 8 / span 5; grid-row: 3 / span 3; align-self: start; margin-top: 0; }
  .plate { grid-column: 1 / -1; grid-row: auto; padding-left: 0; margin-top: 40px; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .pl:nth-child(2n) { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.3); }
}

@media (max-width: 960px) {
  .qr-paper, .qr-arrow { display: none; }
  .sec-head .h2, .sec-sub { grid-column: 1 / -1; }
  .sec-sub { margin-top: 14px; }
  .about-h, .about-body, .ages-intro, .ages-table,
  .awards-head, .awards-cols, .cta-text, .clockbox, .teachers-h, .teachers-body, .amb-h, .amb-body,
  .faq-intro, .faq, .foot-brand, .foot-cols, .mat-intro, .mat-list, .mat-docs, .news-intro, .news .sub-form { grid-column: 1 / -1; }
  .about-body, .ages-table, .awards-cols, .clockbox, .teachers-body, .amb-body, .faq, .mat-list, .news .sub-form { margin-top: 32px; }
  .step-main { grid-column: 3 / -1; }
  .step-data { grid-column: 3 / -1; margin-top: 20px; }
}

@media (max-width: 760px) {
  .hero-text { display: block; }
  .hero-data { margin-top: 30px; }
  .heart .lbl text.en, .heart .lbl text.la, .heart .lbl .hit { display: none; }
  .heart .lbl .num { display: inline; }
  .heart .lbl { pointer-events: none; }
  .heart .lungs { display: none; }
  .heart.is-flowing .labels { opacity: .5; }
  .key {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px;
    list-style: none; margin: 14px 0 0; border-top: 2px solid #fff; grid-column: 1 / -1;
  }
  .key button {
    display: flex; gap: 8px; align-items: baseline; width: 100%; min-height: 42px; text-align: left;
    background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.3); padding: 10px 4px; cursor: pointer;
    font: 500 .9rem/1.3 var(--font); color: #fff;
  }
  .key button[aria-pressed="true"] { background: rgba(255,107,120,.28); box-shadow: inset 3px 0 0 var(--red-on-blue); }
  .key-n { font-weight: 800; min-width: 1.5em; color: var(--on-blue-soft); }
  .plates { grid-template-columns: 1fr; }
  .pl, .pl:nth-child(2n) { padding: 24px 0 26px; border-left: 0; }
  .motif { max-width: 260px; }
  .mega { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-name { font-size: clamp(5rem, 28vw, 7rem); margin-bottom: 18px; }
  .flow-btn { font-size: .9rem; }
  .step { padding: 26px 0; }
  .step-n { grid-column: 1 / -1; font-size: 4.6rem; margin-bottom: 10px; }
  .step-main, .step-data { grid-column: 1 / -1; }
  .step-data > div { grid-template-columns: 92px 1fr; }
  .points > div { grid-template-columns: 1fr; gap: 4px; }
  .awards-cols { grid-template-columns: 1fr; }
  .clock { gap: 4px; }
  .cd { font-size: 2.3rem; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .mat-list { grid-template-columns: 1fr; }
  .rx-table { font-size: .92rem; }
  .rx-table tbody th { font-size: 1.05rem; }
  .rx-num .num { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Focus ring on the deep-blue fields: white reads, red does not. */
.hero :focus-visible, .topics :focus-visible, .ages :focus-visible, .cta :focus-visible, .news :focus-visible { outline-color: #fff; }

/* ---------- Language notice (translation_indication.php) ---------- */
.translation-notice { background: var(--blue-tint); color: var(--ink); font-size: .88rem; line-height: 1.45; }
.translation-notice .content-wrapper { display: block; width: auto; max-width: 1320px; margin-inline: auto; padding: 8px var(--gutter); font-size: inherit; line-height: inherit; }
.translation-notice p { margin: 0; }
.translation-notice a { font-weight: 700; border: 0; }
/* English pages get a row of every language; the nav already has a language menu, so that row is hidden. */
.translation-notice:has(.all-languages), .extra_space_because_of_language { display: none; }
