/* Dr Syed Junaid, Consultant Radiologist. Site styles. Mobile first. */
@layer reset, base, layout, components, motion;

@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/libre-franklin-latin-wght-normal.woff2") format("woff2");
}
/* Metric-matched fallbacks keep the layout still while the web fonts load */
@font-face {
  font-family: "Caslon Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 83.3%; ascent-override: 116.4%; descent-override: 31.9%; line-gap-override: 0%;
}
@font-face {
  font-family: "Franklin Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 101.7%; ascent-override: 95.0%; descent-override: 24.2%; line-gap-override: 0%;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
  body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
  ul[class], ol[class], nav ul, nav ol { list-style: none; padding: 0; }
  img, svg { display: block; max-width: 100%; }
  img { height: auto; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; }
  address, em, i, cite, dfn, var { font-style: normal; }
  summary { cursor: pointer; list-style: none; }
  summary::-webkit-details-marker { display: none; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    color-scheme: light;
    --film-950: #071319;
    --film-900: #0d212b;
    --film-800: #162f3b;
    --film-700: #21414f;
    --ink: #152731;
    --slate: #4a5f6a;
    --rule: #cdd8de;
    --tint: #e7eef1;
    --lightbox: #f5f8f9;
    --caliper: #f0b849;
    --caliper-deep: #dba02a;
    --signal: #155a79;
    --on-film: #edf2f4;
    --on-film-muted: #a8b9c2;
    --rule-film: rgba(237, 242, 244, .16);
    --serif: "Libre Caslon Display", "Caslon Fallback", Georgia, "Times New Roman", serif;
    --sans: "Libre Franklin", "Franklin Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 4rem;
  }
  @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
  body {
    font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
    color: var(--ink); background: var(--lightbox);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility; overflow-x: clip;
  }
  @media (min-width: 48rem) { body { font-size: 1.125rem; } }
  h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; text-wrap: balance; }
  h1 { font-size: clamp(2.6rem, 1.7rem + 4.4vw, 4.9rem); line-height: 1.03; }
  h2 { font-size: clamp(1.95rem, 1.4rem + 2.5vw, 3.05rem); line-height: 1.1; }
  h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 620; letter-spacing: -.005em; }
  h4 { font-size: 1.0625rem; line-height: 1.35; font-weight: 650; }
  p, li, dd { text-wrap: pretty; }
  a { text-decoration-thickness: .07em; text-underline-offset: .2em; }
  strong, b { font-weight: 650; }
  :focus-visible { outline: 2px solid var(--focus, var(--signal)); outline-offset: 3px; border-radius: 2px; }
  ::selection { background: var(--caliper); color: var(--film-900); }
  .nw { white-space: nowrap; }
  .vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip {
    position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--caliper); color: var(--film-900);
    padding: .7rem 1rem; border-radius: 4px; font-weight: 600; text-decoration: none; transition: top .2s;
  }
  .skip:focus { top: 1rem; }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), 75rem); margin-inline: auto; }
  .band { padding-block: clamp(3.5rem, 9vw, 7.25rem); }
  .band--film { background: var(--film-900); color: var(--on-film); --focus: var(--caliper); }
  .band--tint { background: var(--tint); }
  .band--white { background: #fff; }
  .band--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
  .section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
  .section-head p { margin-top: 1rem; color: var(--slate); font-size: 1.125rem; }
  .band--film .section-head p { color: var(--on-film-muted); }
  .split { display: grid; gap: clamp(2rem, 5vw, 4rem); }
  @media (min-width: 60rem) {
    .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; column-gap: clamp(3rem, 7vw, 6.5rem); }
  }
  .stack > * + * { margin-top: 1.1em; }
}

@layer components {
  /* Buttons and links */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 3rem; padding: .7rem 1.35rem; border-radius: 4px;
    font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
    background: var(--film-900); color: #fff; border: 1.5px solid var(--film-900);
    transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
  }
  .btn:hover { background: var(--film-700); border-color: var(--film-700); }
  .btn:active { transform: translateY(1px); }
  .btn--ghost { background: transparent; color: var(--film-900); }
  .btn--ghost:hover { background: var(--film-900); color: #fff; }
  .band--film .btn, .site-header .btn, .menu .btn, .dock .btn { background: var(--caliper); color: var(--film-900); border-color: var(--caliper); }
  .band--film .btn:hover, .site-header .btn:hover, .menu .btn:hover, .dock .btn:hover { background: #f6c968; border-color: #f6c968; }
  .band--film .btn--ghost, .menu .btn--ghost, .dock .btn--ghost { background: transparent; color: var(--on-film); border-color: rgba(237, 242, 244, .5); }
  .band--film .btn--ghost:hover, .menu .btn--ghost:hover, .dock .btn--ghost:hover { background: var(--on-film); color: var(--film-900); border-color: var(--on-film); }
  .btn--sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .9375rem; }
  .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
  .text-link { color: var(--signal); font-weight: 600; }
  .band--film .text-link { color: var(--on-film); }
  .text-link:hover { text-decoration-thickness: .12em; }

  /* Header */
  .site-header {
    position: absolute; inset: 0 0 auto 0; z-index: 50; color: var(--on-film); --focus: var(--caliper);
    transition: transform .4s var(--ease), background-color .25s;
  }
  .js .site-header { position: fixed; view-transition-name: site-header; }
  .site-header.is-stuck { background: rgba(13, 33, 43, .92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); box-shadow: 0 1px 0 var(--rule-film); }
  .site-header.is-hidden { transform: translateY(-102%); }
  .site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
  .brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: auto; padding-block: .4rem; }
  .brand { transition: opacity .35s, visibility .35s; }
  .home .site-header:not(.is-stuck) .brand { opacity: 0; visibility: hidden; }
  .brand__name { font-family: var(--serif); font-size: 1.4rem; letter-spacing: -.01em; }
  .brand__role { font-size: .75rem; color: var(--on-film-muted); margin-top: .15rem; }
  .primary-nav { display: none; }
  .primary-nav ul { display: flex; gap: clamp(1rem, 1.6vw, 1.65rem); }
  .primary-nav a { position: relative; display: block; padding: .6rem 0; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
  .primary-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .3rem; height: 1.5px; background: var(--caliper);
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .primary-nav a:hover::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .header-book { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .2rem 0 .6rem;
    font-size: .9375rem; font-weight: 600; text-decoration: none;
  }
  .menu-toggle__bars { position: relative; width: 1.5rem; height: .75rem; }
  .menu-toggle__bars::before, .menu-toggle__bars::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease);
  }
  .menu-toggle__bars::before { top: 0; }
  .menu-toggle__bars::after { bottom: 0; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(.33rem) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-.33rem) rotate(-45deg); }
  @media (min-width: 26rem) { .header-book { display: inline-flex; } }
  @media (min-width: 75rem) {
    .primary-nav { display: block; }
    .menu-toggle { display: none; }
    .brand { margin-right: clamp(1.5rem, 3vw, 3rem); }
    .primary-nav { margin-right: auto; }
  }

  /* Full screen menu */
  .menu {
    position: fixed; inset: 0; z-index: 40; background: var(--film-900); color: var(--on-film); --focus: var(--caliper);
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px));
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
  }
  .menu.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
  .menu__list { margin-bottom: 2rem; }
  .menu__list li + li { border-top: 1px solid var(--rule-film); }
  .menu__list a {
    display: block; padding: .62rem 0; font-family: var(--serif); font-size: clamp(1.6rem, 6.4vw, 2.3rem); line-height: 1.15;
    text-decoration: none; opacity: 0; transform: translateY(14px);
    transition: transform .55s var(--ease), opacity .4s; transition-delay: calc(var(--i, 0) * 32ms + 60ms);
  }
  .menu.is-open .menu__list a { opacity: 1; transform: none; }
  .menu__list a[aria-current="page"] { color: var(--caliper); }
  .menu__foot { margin-top: auto; display: grid; gap: .75rem; }
  .menu__foot p { color: var(--on-film-muted); font-size: .9375rem; }
  @media (min-width: 75rem) { .menu { display: none; } }
  body.menu-open { overflow: hidden; }

  /* Home hero */
  .hero { padding-top: calc(var(--header-h) + clamp(1.75rem, 6vw, 4.5rem)); padding-bottom: clamp(2.75rem, 6vw, 5rem); }
  .hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
  .hero h1 { display: flex; flex-direction: column-reverse; gap: clamp(.7rem, 1.6vw, 1.1rem); font-size: inherit; line-height: inherit; letter-spacing: 0; }
  .hero__name { display: block; font-family: var(--serif); font-size: clamp(3.5rem, 1.9rem + 8.6vw, 7.75rem); line-height: .93; letter-spacing: -.022em; }
  .hero__role { display: block; font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--on-film-muted); }
  .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
  .line > span { display: block; }
  .lede { font-size: clamp(1.125rem, 1rem + .65vw, 1.375rem); line-height: 1.5; max-width: 36rem; }
  .hero .lede { margin-top: clamp(1.25rem, 3vw, 2rem); }
  .hero .actions .btn { flex: 1 1 auto; padding-inline: .85rem; font-size: .9375rem; }
  @media (min-width: 30rem) { .hero .actions .btn { flex: 0 1 auto; padding-inline: 1.35rem; font-size: 1rem; } }
  @media (min-width: 62rem) {
    .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: end; }
  }

  /* Plates */
  .plate__screen {
    position: relative; aspect-ratio: 3 / 2; background: #000; border-radius: 6px; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(237, 242, 244, .09), 0 34px 70px -34px rgba(0, 0, 0, .75);
  }
  .plate__art, .plate__overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
  .plate__art { object-fit: cover; }
  .plate__label {
    position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
    font-size: .6875rem; font-weight: 550; line-height: 1; white-space: nowrap;
    padding: .32rem .45rem; border-radius: 3px; background: rgba(7, 19, 25, .8); color: var(--on-film);
  }
  .plate__note { position: absolute; right: 3.5%; bottom: 5%; font-size: .6875rem; color: var(--on-film-muted); }
  @media (min-width: 30rem) { .plate__label, .plate__note { font-size: .8125rem; } }
  .plate figcaption {
    display: flex; gap: 1.25rem; align-items: flex-start; justify-content: space-between;
    margin-top: .85rem; font-size: .9375rem; line-height: 1.45; color: var(--on-film-muted);
  }
  .plate__replay { flex: none; font-size: .9375rem; font-weight: 600; color: var(--on-film); text-decoration: underline; text-underline-offset: .2em; min-height: 1.5rem; }
  .plate__sweep {
    position: absolute; left: 0; right: 0; top: 0; height: 24%; pointer-events: none; opacity: 0;
    background: linear-gradient(to bottom, transparent, rgba(237, 242, 244, .13), transparent);
  }
  .ov-trace { fill: none; stroke: var(--caliper); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1; opacity: 0; }
  .ov-target, .ov-pulse { fill: none; stroke: var(--caliper); stroke-width: 3.4; transform-box: fill-box; transform-origin: center; }
  .ov-pulse { opacity: 0; }
  .ov-leader { fill: none; stroke: var(--on-film); stroke-opacity: .8; stroke-width: 2.2; }

  /* Service plates */
  .mini {
    position: relative; aspect-ratio: 1; background: var(--film-950); border-radius: 6px; overflow: hidden; color: var(--on-film);
    box-shadow: 0 0 0 1px rgba(237, 242, 244, .08);
  }
  .mp { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; --sw: 3; }
  .mini--lg .mp { --sw: 2; }
  .mp .s { stroke: currentColor; stroke-width: var(--sw); }
  .mp .a { stroke: var(--caliper); stroke-width: var(--sw); }
  .mp .dim { stroke-opacity: .55; }
  .mp .faint { stroke-opacity: .3; }
  .mp .heavy { stroke-width: calc(var(--sw) * 1.5); }
  .mp .afill { fill: var(--caliper); stroke: none; }
  .mp .d { stroke-dasharray: 1; stroke-dashoffset: 0; }
  .mp-target { fill: rgba(240, 184, 73, .2); }
  .mp-blood { fill: currentColor; opacity: 0; }
  .mp-plasma { fill: var(--caliper); opacity: .92; transform-box: fill-box; transform-origin: 50% 0; }
  .mp-cells { fill: currentColor; opacity: .32; }
  .mp-buffy { fill: #fff; opacity: .95; }
  .mp-orbit { stroke-dasharray: 10 14; opacity: 0; }
  .mp-gate { fill: var(--caliper); opacity: .3; }
  .mp-gantry { transform-origin: 120px 88px; }
  .mp-field { transform-origin: 120px 112px; }

  /* Scans and photographs */
  .scan { margin: 1.75rem 0 0; }
  .scan__frame { position: relative; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(13, 33, 43, .12); }
  .scan__frame img { width: 100%; height: auto; }
  .scan__frame .plate__overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
  .scan figcaption { margin-top: .7rem; font-size: .9375rem; line-height: 1.45; color: var(--slate); }
  .scan--narrow { max-width: 30rem; }
  .scan--photo .scan__frame { background: var(--tint); }
  .prose .scan + p, .prose .scan + .groups, .prose .scan + ul { margin-top: 1.5rem; }
  /* Small originals are shown small, with the caption beside them where there is room */
  .scan--w12 { --scan-w: 12rem; }
  .scan--w16 { --scan-w: 16rem; }
  .scan--w20 { --scan-w: 20rem; }
  .scan--side .scan__frame { max-width: var(--scan-w, 16rem); }
  .scan--product .scan__frame { background: #fff; }
  @media (min-width: 40rem) {
    .scan--side { display: grid; grid-template-columns: var(--scan-w, 16rem) minmax(0, 1fr); column-gap: 1.5rem; align-items: end; }
    .scan--side figcaption { margin-top: 0; max-width: 21rem; padding-bottom: .15rem; }
  }

  .gallery {
    display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 1rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery li { scroll-snap-align: start; min-width: 0; }
  .gallery a { display: block; text-decoration: none; }
  .gallery__frame { display: block; aspect-ratio: 4 / 3; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(237, 242, 244, .1); }
  .gallery__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
  .gallery a:hover .gallery__frame img, .gallery a:focus-visible .gallery__frame img { transform: scale(1.045); }
  .gallery__title { display: block; margin-top: .9rem; font-family: var(--serif); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem); line-height: 1.15; letter-spacing: -.01em; }
  .gallery a:hover .gallery__title { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .16em; }
  .gallery__text { display: block; margin-top: .3rem; color: var(--on-film-muted); font-size: .9375rem; line-height: 1.45; }
  @media (min-width: 48rem) {
    .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; overflow: visible; margin-inline: 0; padding-inline: 0; }
  }

  .portrait { margin: 0; }
  .portrait img { width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 0; border-radius: 6px; background: var(--tint); }
  .about { display: grid; gap: 2rem; }
  .about .portrait { width: min(15rem, 62vw); }
  @media (min-width: 60rem) {
    .about { grid-template-columns: 17rem minmax(0, 1.05fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
    .about .portrait { width: auto; }
  }
  .page-hero__portrait { width: min(14rem, 58vw); }
  .page-hero__portrait img { box-shadow: 0 0 0 1px rgba(237, 242, 244, .12), 0 30px 60px -30px rgba(0, 0, 0, .7); }
  @media (min-width: 60rem) { .page-hero__portrait { width: clamp(15rem, 23vw, 20rem); } }

  /* Home: about and credentials */
  .facts { display: grid; gap: 0; }
  .facts > div { padding: 1rem 0; border-top: 1px solid var(--rule); }
  .facts > div:last-child { border-bottom: 1px solid var(--rule); }
  .facts dt { font-size: .875rem; color: var(--slate); margin-bottom: .2rem; }
  .facts dd { font-weight: 550; line-height: 1.4; }
  .band--film .facts > div { border-color: var(--rule-film); }
  .band--film .facts dt { color: var(--on-film-muted); }

  .creds { margin-top: .5rem; }
  .creds h3 { font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--slate); margin-bottom: 1.4rem; }
  .creds__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.25rem; }
  .creds__list strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 1.05rem + .75vw, 1.55rem); line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
  .creds__list span { display: block; margin-top: .4rem; font-size: .875rem; line-height: 1.4; color: var(--slate); text-wrap: pretty; }
  .creds p { margin-top: 1.1rem; }
  .creds p a { display: inline-block; padding-block: .5rem; }
  @media (min-width: 48rem) { .creds__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 2.5rem; } }
  @media (min-width: 60rem) { .creds { grid-column: 1 / -1; margin-top: 1.5rem; padding-top: 2.75rem; border-top: 1px solid var(--rule); } }

  /* Services list */
  .services { border-top: 1px solid var(--rule); }
  .service {
    position: relative; display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); gap: .3rem 1.1rem;
    padding: 1.35rem 0; border-bottom: 1px solid var(--rule); align-items: start;
    transition: background-color .3s;
  }
  .service__plate { grid-row: span 2; }
  .service h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.3rem); line-height: 1.1; letter-spacing: -.012em; align-self: end; }
  .service h3 a { text-decoration: none; }
  .service h3 a::after { content: ""; position: absolute; inset: 0; }
  .service p { color: var(--slate); font-size: 1rem; line-height: 1.5; }
  .service:hover h3 a, .service h3 a:focus-visible { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .16em; }
  @media (min-width: 48rem) {
    .service { grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem clamp(1.5rem, 4vw, 3.5rem); padding: 1.6rem 0; align-items: center; }
    .service__plate { grid-row: auto; }
    .service h3 { align-self: center; }
    .service p { font-size: 1.0625rem; }
    .service:hover { background: linear-gradient(to right, transparent, rgba(21, 90, 121, .05) 30%, transparent); }
  }

  /* Steps */
  .steps { display: grid; gap: 0; counter-reset: step; }
  .steps li { counter-increment: step; position: relative; padding: 1.4rem 0 1.4rem 3.6rem; border-top: 1px solid var(--rule); }
  .steps li::before {
    content: counter(step); position: absolute; left: 0; top: 1.05rem;
    font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--signal);
  }
  .steps h3 { margin-bottom: .35rem; }
  .steps p { color: var(--slate); font-size: 1rem; }
  .band--film .steps li { border-color: var(--rule-film); }
  .band--film .steps li::before { color: var(--caliper); }
  .band--film .steps p { color: var(--on-film-muted); }
  @media (min-width: 62rem) {
    .steps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.25rem; }
    .steps--row li { padding: 4.4rem 0 0; }
    .steps--row li::before { top: 1.25rem; font-size: 2.8rem; }
  }

  /* Locations */
  .places { display: grid; gap: 1.25rem; }
  @media (min-width: 56rem) { .places { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; align-items: start; } }
  .place { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: clamp(1.4rem, 4vw, 2.25rem); display: flex; flex-direction: column; }
  .band--film .place { background: var(--film-800); border-color: var(--rule-film); }
  .place__kind { align-self: flex-start; font-size: .8125rem; font-weight: 600; padding: .3rem .6rem; border-radius: 3px; background: var(--tint); color: var(--film-700); margin-bottom: 1.1rem; }
  .band--film .place__kind { background: rgba(240, 184, 73, .16); color: var(--caliper); }
  .place h2, .place h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); line-height: 1.12; letter-spacing: -.012em; margin-bottom: .75rem; }
  .place p { color: var(--slate); }
  .band--film .place p { color: var(--on-film-muted); }
  .sites { margin: 1.25rem 0 0; border-top: 1px solid var(--rule); }
  .band--film .sites { border-color: var(--rule-film); }
  .sites li { padding: .85rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: .15rem; }
  .band--film .sites li { border-color: var(--rule-film); }
  .sites strong { font-weight: 620; }
  .sites address, .sites span { font-size: .9375rem; color: var(--slate); line-height: 1.45; }
  .band--film .sites address, .band--film .sites span { color: var(--on-film-muted); }
  .sites a { font-size: .9375rem; font-weight: 600; color: var(--signal); justify-self: start; }
  .band--film .sites a { color: var(--on-film); }
  .place .actions { margin-top: auto; padding-top: 1.5rem; }

  /* FAQ */
  .faq { border-top: 1px solid var(--rule); max-width: 52rem; }
  .faq details { border-bottom: 1px solid var(--rule); }
  .faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; padding: 1.2rem 0; }
  .faq summary h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
  .faq summary::after {
    content: ""; flex: none; width: 1.1rem; height: 1.1rem; margin-top: .22rem;
    background:
      linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
      linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
    transition: transform .3s var(--ease); color: var(--signal);
  }
  .faq details[open] > summary::after { transform: rotate(45deg); }
  .faq__a { padding: 0 2.25rem 1.4rem 0; color: var(--slate); }
  .faq__a p + p { margin-top: .8em; }
  .faq__a a { color: var(--signal); }
  @media (min-width: 48rem) { .faq summary h3 { font-size: 1.25rem; } }

  /* Call to action band and footer */
  .cta h2 { max-width: 18ch; }
  .cta p { margin-top: 1rem; color: var(--on-film-muted); max-width: 34rem; }
  .cta__grid { display: grid; gap: 2rem; }
  @media (min-width: 60rem) { .cta__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; } .cta .actions { margin-top: 0; justify-content: flex-end; } }
  .site-footer { background: var(--film-950); color: var(--on-film-muted); --focus: var(--caliper); padding: clamp(3rem, 7vw, 5rem) 0 calc(6.5rem + env(safe-area-inset-bottom, 0px)); font-size: .9375rem; }
  .site-footer a { color: var(--on-film); text-decoration: none; }
  .site-footer a:hover { text-decoration: underline; }
  .footer__grid { display: grid; gap: 2.25rem; }
  .footer__brand .brand__name { color: var(--on-film); font-size: 1.75rem; display: block; }
  .footer__brand p { margin-top: .75rem; max-width: 26rem; }
  .site-footer h2 { font-family: var(--sans); font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--on-film); margin-bottom: .7rem; line-height: 1.3; }
  .site-footer ul { list-style: none; padding: 0; }
  .site-footer li { padding: 0; }
  .site-footer li a { display: inline-block; padding: .38rem 0; }
  .site-footer li:not(:has(a)) { padding: .38rem 0; }
  .footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-film); display: grid; gap: .6rem; font-size: .875rem; line-height: 1.55; }
  @media (min-width: 48rem) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 3rem; } .site-footer { padding-bottom: clamp(3rem, 6vw, 4rem); } }

  /* Sticky mobile dock */
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom, 0px));
    background: rgba(7, 19, 25, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -1px 0 var(--rule-film); --focus: var(--caliper);
    transform: translateY(110%); transition: transform .45s var(--ease);
  }
  .dock.is-visible { transform: none; }
  .dock .btn { min-height: 2.9rem; padding-inline: .6rem; }
  @media (min-width: 48rem) { .dock { display: none; } }

  /* Inner page hero */
  .page-hero { padding-top: calc(var(--header-h) + clamp(1.5rem, 5vw, 3.5rem)); padding-bottom: 0; }
  .page-hero--plain { padding-bottom: clamp(2.75rem, 6vw, 4.75rem); }
  .page-hero__grid { display: grid; gap: 2rem; align-items: end; }
  .page-hero__facts { margin-top: .5rem; }
  .page-hero .lede { margin-top: 1.25rem; max-width: 40rem; color: var(--on-film); font-size: clamp(1.0625rem, .96rem + .55vw, 1.3rem); }
  .page-hero__plate { width: min(13rem, 56vw); }
  @media (min-width: 60rem) {
    .page-hero__grid { grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(3rem, 7vw, 6rem); }
    .page-hero__plate { width: clamp(15rem, 24vw, 21rem); }
    .page-hero__facts { width: clamp(17rem, 27vw, 23rem); margin-top: 0; }
  }
  .crumbs { font-size: .875rem; color: var(--on-film-muted); margin-bottom: 1.1rem; }
  .crumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
  .crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .6; }
  .crumbs a { text-decoration: none; }
  .crumbs a:hover { text-decoration: underline; }
  .page-facts { margin-top: clamp(2.25rem, 5vw, 3.5rem); border-top: 1px solid var(--rule-film); display: grid; }
  .page-facts > div { padding: 1.05rem 0; border-bottom: 1px solid var(--rule-film); }
  .page-facts dt { font-size: .8125rem; color: var(--on-film-muted); margin-bottom: .2rem; }
  .page-facts dd { font-size: 1rem; font-weight: 550; line-height: 1.4; }
  @media (min-width: 40rem) { .page-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
  @media (min-width: 62rem) {
    .page-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .page-facts > div { border-bottom: 0; padding: 1.4rem 0 1.75rem; }
  }

  /* Article */
  .article { display: grid; gap: 2.5rem; }
  .toc { display: none; }
  @media (min-width: 64rem) {
    .article { grid-template-columns: 13.5rem minmax(0, 44rem); column-gap: clamp(3rem, 7vw, 6.5rem); }
    .toc { display: block; position: sticky; top: 6.5rem; align-self: start; font-size: .9375rem; }
    .toc h2 { font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--slate); margin-bottom: .8rem; line-height: 1.3; }
    .toc li { border-left: 1.5px solid var(--rule); }
    .toc a { display: block; padding: .38rem 0 .38rem 1rem; margin-left: -1.5px; border-left: 1.5px solid transparent; text-decoration: none; color: var(--slate); line-height: 1.35; }
    .toc a:hover { color: var(--ink); }
    .toc a.is-current { color: var(--ink); border-left-color: var(--signal); font-weight: 600; }
  }
  .prose > section + section { margin-top: clamp(3rem, 7vw, 4.75rem); }
  .prose h2 { margin-bottom: 1.1rem; }
  .prose h3 { margin: 2rem 0 .5rem; }
  .prose p + p, .prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p { margin-top: 1em; }
  .prose ul:not([class]), .prose ol:not([class]) { padding-left: 1.2rem; }
  .prose li + li { margin-top: .45em; }
  .prose li::marker { color: var(--signal); }
  .prose a:not(.btn) { color: var(--signal); }
  .prose .steps { margin-top: 1.5rem; }
  .prose .faq { margin-top: 1.5rem; }
  .groups { display: grid; gap: 0; margin-top: 1.5rem; border-top: 1px solid var(--rule); }
  .groups > div { padding: 1rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: .25rem; }
  .groups dt { font-weight: 620; }
  .groups dd { color: var(--slate); }
  @media (min-width: 40rem) { .groups > div { grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1.5rem; } }
  .register { margin-top: 1.5rem; border-top: 1px solid var(--rule); }
  .register > div { padding: 1.35rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: .5rem; }
  .register dt { font-family: var(--serif); font-size: clamp(1.4rem, 1.25rem + .7vw, 1.6rem); line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
  .register dd { color: var(--slate); }
  .register dd a { display: block; width: fit-content; margin-top: .25rem; padding-block: .3rem; font-weight: 600; }
  @media (min-width: 40rem) { .register > div { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 2rem; } }
  .proc { padding: 1.5rem 0; border-top: 1px solid var(--rule); }
  .proc:last-of-type { border-bottom: 1px solid var(--rule); }
  .prose .proc h3 { margin: 0 0 .3rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.45rem, 1.25rem + .9vw, 1.8rem); letter-spacing: -.01em; line-height: 1.15; }
  .proc__meta { font-size: .9375rem; color: var(--slate); margin-bottom: .7rem; }
  .procs { margin-top: 1.75rem; }
  .callout { margin-top: 1.75rem; background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--caliper); border-radius: 0 6px 6px 0; padding: 1.25rem 1.4rem; }
  .callout h3 { margin: 0 0 .4rem; }
  .sources { font-size: .9375rem; color: var(--slate); }
  .sources ul { padding-left: 1.2rem; margin-top: .6rem; }
  .reviewed { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .9375rem; color: var(--slate); }
  .related { display: grid; gap: 1rem; }
  @media (min-width: 48rem) { .related { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
  .related li { position: relative; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem; background: #fff; border: 1px solid var(--rule); border-radius: 6px; transition: border-color .2s; }
  .related li:hover { border-color: var(--signal); }
  .related a { font-weight: 620; text-decoration: none; line-height: 1.3; }
  .related a::after { content: ""; position: absolute; inset: 0; }
  .timeline { margin-top: 1.5rem; border-left: 1.5px solid var(--rule); }
  .timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::before { content: ""; position: absolute; left: -5.5px; top: .5rem; width: 9.5px; height: 9.5px; border-radius: 50%; background: var(--lightbox); border: 1.5px solid var(--signal); }
  .timeline strong { display: block; font-weight: 620; }
  .timeline span { color: var(--slate); font-size: 1rem; }
  .notfound { min-height: 70vh; display: grid; align-content: center; }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) { animation: vt-out .22s ease both; }
    ::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
    @keyframes vt-out { to { opacity: 0; } }
    @keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

    /* Page load: name rises line by line, the rest follows */
    .line > span { animation: rise 1s var(--ease) both; }
    .line:nth-child(2) > span { animation-delay: .09s; }
    .hero__role, .hero .lede, .hero .actions, .page-hero .crumbs, .page-hero .lede, .page-hero .actions, .page-hero__plate, .page-hero__portrait, .page-facts { animation: settle .8s var(--ease) both; }
    .hero__role { animation-delay: .25s; }
    .hero .lede { animation-delay: .38s; }
    .hero .actions { animation-delay: .48s; }
    .hero .plate { animation: lift 1s .1s var(--ease) both; }
    .page-hero h1 { animation: settle .8s .05s var(--ease) both; }
    .page-hero .lede { animation-delay: .16s; }
    .page-hero .actions { animation-delay: .24s; }
    .page-hero__plate, .page-hero__portrait { animation-delay: .2s; }
    .page-facts { animation-delay: .32s; }
    @keyframes rise { from { transform: translateY(108%); } }
    @keyframes settle { from { opacity: 0; transform: translateY(16px); } }
    @keyframes lift { from { transform: translateY(18px); } }

    /* Hero plate sequence. Plays once on load without script; Replay restarts it. */
    .plate--auto .plate__art { animation: gain 1.5s .15s ease both; }
    .plate--auto .plate__sweep { animation: sweep 1.5s .7s cubic-bezier(.4, 0, .2, 1) both; }
    .plate--auto .plate__label { animation: label .5s ease both; animation-delay: calc(1.7s + var(--n, 0) * .3s); }
    .plate--auto .plate__note { animation: fade .6s 2.7s ease both; }
    .plate--auto .ov-leader { stroke-dasharray: 70; animation: leader .5s ease both; animation-delay: calc(1.8s + var(--n, 0) * .3s); }
    .plate--auto .ov-leader--3 { --n: 2; } .plate--auto .ov-leader--5 { --n: 5.2; }
    .plate--auto .ov-trace { animation: trace 3.4s 2.9s cubic-bezier(.35, 0, .2, 1) both; }
    .plate--auto .ov-target { animation: target .6s 4.5s var(--ease) both; }
    .plate--auto .ov-pulse { animation: pulse 1.4s 4.8s ease-out both; }
    .plate--auto.is-waiting .plate__screen > :not(.plate__art), .plate--auto.is-waiting .plate__overlay * { animation-play-state: paused !important; }
    .plate--auto.is-replay { animation: none; }
    @keyframes gain { from { filter: brightness(.3) contrast(.85); } }
    @keyframes sweep { 0% { transform: translateY(-100%); opacity: 1; } 100% { transform: translateY(430%); opacity: 0; } }
    @keyframes label { from { opacity: 0; transform: translate(-50%, calc(-50% + 6px)); } }
    @keyframes leader { from { stroke-dashoffset: 70; opacity: 0; } to { stroke-dashoffset: 0; } }
    @keyframes trace { 0% { stroke-dashoffset: 1; opacity: 1; } 50% { stroke-dashoffset: 0; opacity: 1; } 76% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
    @keyframes target { from { opacity: 0; transform: scale(1.9); } }
    @keyframes pulse { 0% { opacity: 0; transform: scale(1); } 12% { opacity: .9; } 100% { opacity: 0; transform: scale(2.5); } }

    /* Service plates draw themselves when they come into view */
    .is-armed .mp .d { stroke-dashoffset: 1; }
    .is-armed .mp .f, .is-armed .mp-plasma, .is-armed .mp-cells, .is-armed .mp-buffy { opacity: 0; }
    .is-playing .mp .d { animation: draw .95s cubic-bezier(.4, 0, .2, 1) both; animation-delay: calc(var(--k, 0) * .17s); }
    .is-playing .mp .f { animation: fade .5s ease both; animation-delay: calc(var(--k, 0) * .17s); }
    .mp .d1 { --k: 0; } .mp .d2 { --k: 1; } .mp .d3 { --k: 2; } .mp .d4 { --k: 3.4; } .mp .d5 { --k: 4.6; } .mp .d6 { --k: 9; }
    .is-playing .mp-target { animation: fade .5s .6s ease both, fill 1s 1.9s ease both; }
    .is-playing .mp-blood { animation: blood 2.2s ease both; }
    .is-playing .mp-plasma { animation: plasma 1.5s .7s var(--ease) both; }
    .is-playing .mp-cells { animation: fade-to 1.2s .9s ease both; --to: .32; }
    .is-playing .mp-buffy { animation: fade-to .6s 1.9s ease both; --to: .95; }
    .is-playing .mp-orbit { animation: orbit 1.9s linear both; }
    .is-playing .mp-gantry { animation: spin 2.6s .5s cubic-bezier(.45, 0, .2, 1) both; }
    .is-playing .mp-field { animation: spin 5s linear both; }
    .is-playing .mp-wave { animation: wave 1.5s ease both; }
    .is-playing .mp-wave--1 { animation-delay: .35s; } .is-playing .mp-wave--2 { animation-delay: .5s; } .is-playing .mp-wave--3 { animation-delay: .65s; }
    @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
    @keyframes fade { from { opacity: 0; } }
    @keyframes fade-to { from { opacity: 0; } to { opacity: var(--to, 1); } }
    @keyframes fill { from { fill: rgba(240, 184, 73, 0); } }
    @keyframes blood { 0% { opacity: .2; } 55% { opacity: .2; } 100% { opacity: 0; } }
    @keyframes plasma { from { transform: scaleY(0); } }
    @keyframes orbit { 0% { opacity: 0; stroke-dashoffset: 0; } 15% { opacity: .4; } 70% { opacity: .4; } 100% { opacity: 0; stroke-dashoffset: -260; } }
    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes wave { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 1; } }

    /* Quiet reveal for content below the fold (class added by script) */
    .will-reveal { opacity: 0; transform: translateY(14px); }
    .will-reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s var(--ease); transition-delay: calc(var(--stagger, 0) * 70ms); }
    h2.will-reveal, h2.will-reveal.is-in { opacity: 1; transform: none; transition: none; }
    h2.will-reveal .reveal-mask { display: block; clip-path: inset(0 0 100% 0); transform: translateY(.3em); }
    h2.will-reveal.is-in .reveal-mask { clip-path: inset(-.15em -.1em -.3em -.1em); transform: none; transition: clip-path .95s var(--ease), transform .95s var(--ease); }
  }
}

@media print {
  .site-header, .menu, .dock, .skip, .toc, .plate__replay { display: none !important; }
  .will-reveal, .reveal-mask { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .band--film, .site-footer { background: #fff !important; color: #000 !important; }
  body { background: #fff; }
}
