@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #f1f3f7;
  --band: #e9ecf2;    /* the overview band and the footer, slightly darker than the page */
  --card: #ffffff;
  --ink: #0e1626;
  --ink-2: #2c3648;
  --muted: #5d6779;
  --line: #e3e7ee;
  --accent: #2f6bff;
  --accent-soft: #e9efff;
  /* who supplies what: numbers (morphometry), ranges (guidelines), the radiologist */
  --num: #2f6bff;
  --rng: #7a5cff;
  --person: #e8920c;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(14, 22, 38, .05), 0 14px 28px -16px rgba(14, 22, 38, .16), 0 48px 96px -48px rgba(14, 22, 38, .42);
  --wide: 1160px;
  --text: 720px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(47, 107, 255, .45); outline-offset: 3px; border-radius: 8px; }

.wide { width: min(var(--wide), calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(var(--text), calc(100% - 32px)); margin: 0 auto; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(241, 243, 247, .72);
  border-bottom: 1px solid rgba(14, 22, 38, .06);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.lab { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; font-weight: 560; line-height: 1.2; }
.lab:hover { text-decoration: none; color: var(--ink); }
.lab img { width: 30px; height: 30px; }
.bar nav { display: flex; gap: 6px; align-items: center; }
.bar nav a.link { color: var(--muted); font-size: 14px; font-weight: 520; padding: 8px 10px; border-radius: 10px; }
.bar nav a.link:hover { color: var(--ink); background: rgba(14, 22, 38, .05); text-decoration: none; }
@media (max-width: 760px) { .bar nav a.link { display: none; } .lab span { max-width: 170px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600; line-height: 1;
  color: var(--ink); background: var(--card);
  box-shadow: 0 1px 2px rgba(14, 22, 38, .06), 0 6px 16px -8px rgba(14, 22, 38, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 1px 2px rgba(14, 22, 38, .06), 0 12px 24px -10px rgba(14, 22, 38, .3); }
.btn svg { width: 18px; height: 18px; }
.btn.small { padding: 8px 14px; font-size: 14px; }

/* ---------- hero: plain, like the title block of a paper ---------- */
.hero { text-align: center; padding: 64px 0 32px; }
.hero h1 {
  max-width: 900px; margin: 0 auto 12px; text-wrap: balance;
  font-size: clamp(28px, 3.6vw, 42px); line-height: 1.18; letter-spacing: -.025em; font-weight: 450; color: var(--ink-2);
}
.hero h1 .name { display: block; font-weight: 720; color: var(--ink); }
.hero h1 .sub { display: block; font-size: .72em; letter-spacing: -.015em; margin-top: 6px; color: var(--muted); }
.authors { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px; margin: 22px 0 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.byline { margin: 6px 0 0; font-size: 15px; color: var(--muted); text-wrap: balance; }
.byline a { color: var(--ink-2); }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .authors, .hero .byline, .hero .links { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .authors { animation-delay: .06s; }
  .hero .byline { animation-delay: .1s; }
  .hero .links { animation-delay: .14s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- floating media cards ---------- */
.float {
  position: relative; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; isolation: isolate;
  outline: 1px solid rgba(14, 22, 38, .04);
}
.float video, .float > img { width: 100%; height: auto; background: #fff; }

.teaser { margin: 40px 0 0; }
.teaser .float { aspect-ratio: 16 / 9; }
.teaser video { width: 100%; height: 100%; object-fit: cover; }
.teaser figcaption { margin-top: 12px; }
.chapters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; padding: 0; list-style: none; }
.chapters button {
  position: relative; overflow: hidden;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  border: 0; cursor: pointer; padding: 8px 14px 9px; border-radius: 999px; background: rgba(14, 22, 38, .05);
  transition: color .25s, background .25s;
}
.chapters button .n { color: var(--accent); margin-right: 6px; opacity: .7; }
.chapters button.on { color: var(--ink); background: var(--card); box-shadow: 0 6px 16px -8px rgba(14, 22, 38, .3); }
.chapters button .fill { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }

/* scroll-linked: media cards settle into place as they come into view (where supported) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .settle { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    @keyframes settle { from { transform: scale(.96) translateY(20px); opacity: .7; } to { transform: none; opacity: 1; } }
  }
}

/* ---------- sections ---------- */
section { padding: 88px 0 0; }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -.03em; font-weight: 720; margin: 0 0 14px; }
.explain { margin: 6px 0 0; font-size: 17px; line-height: 1.7; color: var(--ink-2); text-align: justify; hyphens: manual; }
.explain.center-text { text-align: center; }
@media (max-width: 640px) { .explain { font-size: 16px; text-align: left; } }
.center { text-align: center; }
.head { margin-bottom: 34px; }
.note { font-size: 14px; color: var(--muted); }

/* the overview (abstract and method) on a slightly darker band */
.band { margin-top: 64px; padding: 0 0 80px; background: var(--band);
  border-top: 1px solid rgba(14, 22, 38, .05); border-bottom: 1px solid rgba(14, 22, 38, .05); }
.band > .abstract { padding-top: 64px; }
.abstract + section { padding-top: 72px; }
h2.small { font-size: 22px; letter-spacing: -.01em; margin: 0 0 10px; text-align: center; }
.abstract .narrow p { margin: 0; font-size: 17.5px; line-height: 1.7; color: var(--ink-2); text-align: justify; hyphens: manual; }
@media (max-width: 640px) { .abstract .narrow p { font-size: 16.5px; text-align: left; } }

/* ---------- method: four steps, two by two ---------- */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.step { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.step .pic { aspect-ratio: 16 / 10; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.step .pic img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
/* a shade that rises from the tile's text and fades out upwards, so a bright picture keeps an edge against the card */
.step .pic { position: relative; }
.step .pic::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(14, 22, 38, .17) 0%, rgba(14, 22, 38, .07) 38%, rgba(14, 22, 38, 0) 78%); }
.step .txt { padding: 18px 22px 22px; }
.step h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; display: flex; gap: 10px; align-items: baseline; }
.step h3 span { font-size: 13px; color: var(--accent); font-weight: 700; }
.step p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
/* a step that is not there yet: muted, dashed, full width under the tiles */
.step-next { display: flex; align-items: baseline; gap: 6px 28px; margin-top: 20px; padding: 18px 22px; border-radius: var(--radius);
  border: 1.5px dashed #c6cedb; background: rgba(255, 255, 255, .45); }
.step-next h3 { flex: none; margin: 0; font-size: 18px; letter-spacing: -.01em; display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.step-next h3 em { font-style: normal; font-size: 12px; font-weight: 650; color: var(--muted); background: rgba(14, 22, 38, .06); padding: 3px 8px; border-radius: 6px; }
.step-next p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
@media (max-width: 760px) { .step-next { flex-direction: column; } }

/* ---------- who supplies what: the animated diagram ---------- */
.flow { margin: 0; padding: 26px 26px 0; background: linear-gradient(180deg, #fbfcfe 0%, #f4f6fa 100%); }
.flow-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flow svg { width: 100%; min-width: 760px; height: auto; font-family: inherit; }
.flow .wires path { fill: none; stroke: #cdd4e0; stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.flow .card { fill: #fff; stroke: rgba(14, 22, 38, .06); stroke-width: 1; transition: stroke .35s, stroke-width .35s; }
.flow .title { font-size: 16px; font-weight: 650; fill: var(--ink); letter-spacing: -.01em; }
.flow .title.big { font-size: 19px; }
.flow .sub { font-size: 13.5px; fill: var(--muted); }
.flow .label { font-size: 14px; font-weight: 600; fill: var(--ink-2); }
.flow .morpho .dot { fill: var(--num); }
.flow .guide .dot { fill: var(--rng); }
.flow .node.on .card { stroke-width: 2.5; }
.flow .morpho.on .card { stroke: var(--num); }
.flow .guide.on .card { stroke: var(--rng); }
.flow .agent.on .card { stroke: var(--ink-2); }
.flow .report.on .card { stroke: #9aa6b8; }
.flow .person.on .card { stroke: var(--person); }
.flow .person .face { fill: #fff4e3; }
.flow .person .glyph { fill: none; stroke: var(--person); stroke-width: 1.6; stroke-linecap: round; }
.flow .person .act { fill: var(--person); font-weight: 600; opacity: 0; }
/* landmarks and the one construction on the radiograph, drawn like the app draws them */
.flow .lm { fill: #f5a11e; stroke: #fff; stroke-width: 1.2; transition: fill .4s, r .4s; }
.flow #marks.dim .lm:not(.on) { fill: #8f9aab; }
.flow #marks.dim .lm.on { r: 4.6; }
.flow .cl { fill: none; stroke: #22c3dd; stroke-width: 1.8; stroke-linecap: round; }
.flow .cl.dash { stroke-dasharray: 3 3; stroke-width: 1.4; }
.flow .cl-label { font-size: 11.5px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: #10151c; stroke-width: 3px; stroke-linejoin: round; }
.flow .report .ed { fill: var(--person); font-weight: 600; }
.flow .caret { fill: var(--person); opacity: 0; }
.flow .report text { font-size: 15px; }
.flow .report .w { fill: var(--ink-2); }
.flow .report .num { fill: var(--num); font-weight: 650; }
.flow .report .rng { fill: var(--rng); font-weight: 550; }
.flow .report .cap { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; fill: #8a94a6; }
.flow .report .hl { fill: #fff4e3; opacity: 0; }
.flow .chip { opacity: 0; }
.flow .chip rect { fill: var(--ink); }
.flow .chip text { font-size: 13px; font-weight: 600; fill: #fff; }
.flow .chip.num rect { fill: var(--num); }
.flow .chip.rng rect { fill: var(--rng); }
.flow .pkt { fill: var(--ink); opacity: 0; }
.flow-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; padding: 18px 0 22px; font-size: 13.5px; color: var(--muted); }
.flow-foot i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.flow-foot i.num { background: var(--num); }
.flow-foot i.rng { background: var(--rng); }
.flow-foot i.w { background: var(--ink-2); }
.flow-foot i.ed { background: var(--person); }
.flow-hint { display: none; margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .flow-hint { display: block; } }
@media (max-width: 640px) { .flow { padding: 16px 0 0; } .flow-scroll { padding: 0 12px; } }
/* without animation: the finished state (set by site.js), chips hidden */
.flow.still .chip, .flow.still .pkt { display: none; }

/* ---------- supported views ---------- */
.views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.view { background: var(--card); border-radius: var(--radius-sm); box-shadow: 0 1px 2px rgba(14, 22, 38, .05), 0 12px 26px -18px rgba(14, 22, 38, .3); padding: 18px 20px 20px; }
.view h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.01em; }
.view h3 span { font-weight: 550; color: var(--muted); margin-left: 4px; }
.view p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 900px) { .views { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .views { grid-template-columns: 1fr; } }

/* ---------- citation ---------- */
.bib { position: relative; max-width: 900px; margin: 0 auto; }
.bib pre { margin: 0; padding: 22px 24px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.6 ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; color: var(--ink-2); }
.copy { position: absolute; top: 12px; right: 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.copy:hover { background: #f6f8fc; }

/* ---------- footer ---------- */
footer { margin-top: 96px; padding: 34px 0 48px; border-top: 1px solid rgba(14, 22, 38, .05); font-size: 14px; color: var(--muted); background: var(--band); }
footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 48px; }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr; } }
footer p { margin: 0 0 6px; }
footer a { color: var(--ink-2); font-weight: 550; }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
  .js .reveal.in { opacity: 1; transform: none; }
}
