/* ═══════════════════════════════════════════════════════════════════════════
   AVZERA — gallery interface
   ═══════════════════════════════════════════════════════════════════════════
   Typography and layout anchors are copied from the target stylesheet:
   a small monospace interface with one light serif headline, copy anchored
   bottom-left, a vertical dot rail on the right, a 1px progress line along the
   bottom. The first build used a heavy serif + sans body with a top-centre
   pill rail, which reads as a marketing template rather than a studio
   instrument.

   Colour is AVZERA's own five-colour kit. No gold anywhere.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/IBMPlexMono-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/Fraunces-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --navy:  #08152c;
  --white: #ffffff;
  --blue:  #0066ff;
  --facet: #0080ff;
  --slate: #cbd5e1;

  /* The page sits in the bright gallery, so ink is navy and the quiet voice
     is a slate-derived grey. These are tints of kit colours, not new hues. */
  --bg:   #eef1f5;
  --ink:  #08152c;
  --dim:  #3f4f66;   /* 7.35:1 on the page, 9:1 on the copy wash */
  --rule: rgba(8, 21, 44, .14);
  --pad: 30px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
button:focus-visible, a:focus-visible { outline: 1.5px solid var(--blue); outline-offset: 3px; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 11px/1.6 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* A soft veil of the page colour behind the header so the room's ceiling
   beams never cut through the wordmark or the counter. */
#topfade {
  position: fixed; left: 0; right: 0; top: 0; height: 150px; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity 1.4s cubic-bezier(.16,1,.3,1);
  background: linear-gradient(to bottom,
    rgba(238,241,245,.92) 0, rgba(238,241,245,.62) 42%,
    rgba(238,241,245,.22) 74%, rgba(238,241,245,0) 100%);
}
.ready #topfade { opacity: 1; }

.ui { position: fixed; z-index: 3; pointer-events: none; opacity: 0;
      transition: opacity 1.4s cubic-bezier(.16,1,.3,1); }
.ready .ui { opacity: 1; }

/* ── Wordmark ───────────────────────────────────────────────────────────────
   Geometric uppercase, navy letters, the Z and the A-peaks in blue. Drawn as
   inline SVG so the pyramid A's and the folded Z are exact, not approximated
   with a font. */
#logo { top: 24px; left: var(--pad); display: flex; align-items: center; gap: 11px; pointer-events: auto; }
#logo svg { display: block; height: 26px; width: auto; }
#logo .tag {
  /* The lockup is AVZERA + EXP/LAB. EXP is the name, LAB is the qualifier.
     Set as a solid blue chip rather than loose letterspaced text: at 9px on a
     near-white header, letterspaced blue text is read as a footnote next to the
     wordmark, and the whole point of the tag is to declare the sub-brand. A filled
     chip at the same blue as the primary CTA gives the header a three-tier
     hierarchy (mark, sub-brand, page) and ties the lockup to the action colour,
     so EXP reads as a product of the studio rather than a legal suffix. White on
     #0066ff is 4.83:1 — the chip clears AA even at this size. */
  font-size: 9px; letter-spacing: .16em; color: var(--white);
  background: var(--blue);
  border-radius: 4px;
  padding: 4px 7px 3px;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Top right: counter, sound, CTAs ────────────────────────────────────── */
#topright {
  top: 26px; right: var(--pad); text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
#counter { color: var(--dim); font-size: 10px; letter-spacing: .20em; text-transform: uppercase; }

#audioBtn {
  pointer-events: auto; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  /* The bars + label only came to 21px of height, which is well under the 44px
     touch floor. min-height pads the button without moving the icon off centre. */
  min-height: 44px; min-width: 44px;
  color: var(--dim); font: inherit; letter-spacing: inherit; padding: 4px 6px;
}
#audioBtn:hover, #audioBtn.on { color: var(--ink); }
#audioBtn i { display: flex; align-items: center; gap: 2.5px; height: 18px; }
#audioBtn i b {
  width: 3px; height: 18px; border-radius: 2px; background: currentColor;
  transform: scaleY(.15); transition: transform .4s;
}
#audioBtn.on i b { animation: eqw 1s ease-in-out infinite alternate; }
#audioBtn.on i b:nth-child(1) { animation-duration: .9s; }
#audioBtn.on i b:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
#audioBtn.on i b:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
#audioBtn.on i b:nth-child(4) { animation-duration: .8s; animation-delay: -.2s; }
#audioBtn.on i b:nth-child(5) { animation-duration: 1s; animation-delay: -.5s; }
@keyframes eqw { 0% { transform: scaleY(.22); } 50% { transform: scaleY(1); } 100% { transform: scaleY(.45); } }
#audioBtn span { font-size: 8.5px; letter-spacing: .22em; line-height: 1; }
@media (prefers-reduced-motion: reduce) { #audioBtn.on i b { animation: none; transform: scaleY(.7); } }

.top-ctas { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.pill {
  pointer-events: auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; text-decoration: none;
  padding: 11px 18px; border-radius: 999px;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase;
  background: var(--blue); color: var(--white);
  box-shadow: 0 4px 14px rgba(0,102,255,.26);
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
/* Same reasoning as the CTA: --facet hover would drop the white label to 3.8:1. */
.pill:hover { background: #0052cc; box-shadow: 0 6px 18px rgba(0, 82, 204, .32); }
.pill:active { transform: scale(.97); }

/* Ghost pills measured 30px tall with a rgba(8,21,44,.14) border — 1.34:1 against
   the page, well under the 3:1 WCAG 1.4.11 floor for a control boundary. At that
   contrast they read as text labels, not buttons, which is why the header actions
   looked decorative next to the real CTA. A solid surface plus a #6b7a8f border
   (3.86:1) makes them legible controls at rest; the blue hover/focus then confirms
   interactivity instead of being the only cue. 40px keeps them clearly secondary
   to the 50px primary while staying above the desktop pointer minimum. */
.pill.ghost {
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  /* #556478, not #6b7a8f. #6b7a8f measured 3.86:1 against the page token, which
     looked like a pass — but the pills sit over the rendered gallery floor, and
     sampling the actual screenshot pixels showed a backdrop of rgb(210,213,214),
     darker than the token. Against the real backdrop #6b7a8f drops to 2.96:1,
     under the 3:1 floor. #556478 holds 4.09:1 there and 5.33:1 against the page.
     2px, not 1px: at this 40px height a hairline reads as an edge highlight, and
     Chrome rounds a fractional 1.5px down to 1px at DPR 1, so 2px is the first
     width that actually paints heavier. */
  border: 2px solid #556478;
  box-shadow: 0 2px 8px rgba(8, 21, 44, .07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pill.ghost:hover {
  border-color: var(--blue); color: var(--blue);
  background: #ffffff; box-shadow: 0 6px 18px rgba(0, 102, 255, .16);
}
.pill.ghost:focus-visible { border-color: var(--blue); color: var(--blue); }

/* Two secondary buttons side by side with identical weight leave the visitor
   without an answer to "which one do you want me to press?". CALL NOW is the
   highest-intent action in the header — a phone call closes a local-service deal
   far faster than a gallery scroll — so it gets the accent outline and accent
   label while OUR BUILDS stays neutral. Blue on white is 4.83:1, and the blue
   border clears 3.18:1 against the rendered gallery floor, so this is a real
   rank difference rather than a decorative tint. */
.pill.ghost.pill-call {
  border-color: var(--blue);
  color: #0047b8;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 102, 255, .14);
}
.pill.ghost.pill-call:hover {
  background: var(--blue); border-color: var(--blue); color: var(--white);
  box-shadow: 0 6px 18px rgba(0, 102, 255, .30);
}

/* ── Copy, bottom left ──────────────────────────────────────────────────── */
/* A soft white wash behind the copy. The gallery floor is bright but not
   pure white, and Core Electric Blue only reaches 4.83:1 on white — below that
   it fails AA at 13px. The wash guarantees the backdrop the contrast was
   measured against, and it separates the type from the grid behind it. */
#copy::before {
  content: ''; position: absolute; z-index: -1;
  left: calc(var(--pad) * -2); right: -150px; top: -50px; bottom: -46px;
  /* The wash used to end at -40px with a 100%-opacity core, and on a bright floor
     that boundary read as a hard vertical seam slicing straight through the plinth.
     A much wider box with the opaque core pulled in leaves no visible edge. */
  background: radial-gradient(88% 120% at 4% 100%,
    rgba(255,255,255,.94) 0%, rgba(255,255,255,.90) 26%,
    rgba(255,255,255,.66) 52%, rgba(255,255,255,.24) 76%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
}
#copy { left: var(--pad); bottom: 76px; max-width: 460px; }
#copy .swap { transition: opacity .6s, transform .8s cubic-bezier(.16,1,.3,1); }
#copy.out .swap { opacity: 0; transform: translateY(10px); }

#kicker {
  display: flex; align-items: center; gap: 10px;
  color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: .16em;
  margin-bottom: 12px; text-transform: uppercase;
}
#kicker::before { content: ''; width: 22px; height: 1.5px; background: currentColor; flex: none; }

#title {
  font: 300 clamp(26px, 3.4vw, 46px)/1.08 'Fraunces', Georgia, serif;
  letter-spacing: -.02em; color: var(--ink);
}
#title em { font-style: italic; color: var(--blue); }

#body { color: var(--dim); margin-top: 12px; max-width: 360px; font-size: 11px; line-height: 1.75; }

#ctaRow { margin-top: 22px; display: flex; gap: 10px; align-items: center; }

/* The primary action is the one thing on the hero a visitor must find, and it
   measured 35px tall with a 0.26-alpha shadow — smaller and quieter than the
   decorative chrome around it. A primary button carries the page's whole
   argument, so it now gets: 50px height (above the 44px touch minimum at every
   breakpoint), 12px type, a solid #0066ff fill (4.83:1 with white), a second
   accent ring to detach it from the near-white gallery floor, and a two-stop
   shadow that reads as elevation rather than a smudge. Hover lifts it 1px and
   brightens; active compresses. */
.cta {
  pointer-events: auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; text-decoration: none;
  padding: 16px 26px; border-radius: 999px;
  font: 600 12px/1 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase;
  background: var(--blue); color: var(--white);
  border: 1px solid var(--blue);
  box-shadow:
    0 0 0 4px rgba(0, 102, 255, .13),
    0 10px 26px rgba(0, 102, 255, .34),
    0 2px 6px rgba(8, 21, 44, .16);
  transition: transform .2s, background .2s, box-shadow .2s;
}
/* Hover darkens, it does not lighten. Brightening the fill to --facet (#0080ff)
   put white labels at 3.8:1 — under the 4.5:1 minimum — so the button got harder
   to read exactly when the cursor was on it. #0052cc keeps the label at 6.82:1
   while still reading as a clear, deliberate state change. */
.cta:hover {
  background: #0052cc; border-color: #0052cc;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 5px rgba(0, 82, 204, .16),
    0 14px 32px rgba(0, 82, 204, .38),
    0 2px 6px rgba(8, 21, 44, .18);
}
.cta:active { transform: translateY(0) scale(.985); }
.cta:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
/* WhatsApp keeps its own green: it is a third-party mark, not a brand colour. */
.cta-wa { background: #25d366; box-shadow: 0 6px 18px rgba(37,211,102,.3); }
.cta-wa:hover { background: #1fbb59; }

/* ── Rail: right edge, vertical ─────────────────────────────────────────── */
#rail {
  right: var(--pad); top: 50%; transform: translateY(-50%);
  pointer-events: auto;
}
#rail ol { list-style: none; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.rail-btn {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
  /* WCAG 2.5.8 asks for a 24x24 CSS px target. The label is 9.5px type in a
     23px-tall row, one pixel short, and the 14px gaps are under the 24px
     spacing exception. min-height lifts the hit area without moving the dot:
     the row grows downward from its centred position, and the label pill
     already carries its own padding. */
  min-height: 24px;
  color: var(--dim); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase;
}
.rail-btn span {
  opacity: 0; transform: translateX(6px); white-space: nowrap;
  transition: opacity .3s, transform .3s, color .3s;
  /* The rail floats over live 3D, and on stop 03 a pale monitor sits directly
     behind the active label — 9.5px grey type on a light wireframe is unreadable.
     A translucent pill keeps the label legible over any subject without hiding
     the scene behind it. Light surface, not dark: the scene is near-white and a
     navy slab became the heaviest element in the frame, competing with the brain.
     Navy text on this surface measures 7.35:1; blue would only reach 4.27:1 at
     9.5px, so the dot carries the accent and the label stays legible. */
  background: rgba(238, 241, 245, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 9px;
  border-radius: 5px;
}
.rail-btn.on span { color: var(--navy, #08152c); }
#rail:hover .rail-btn span, .rail-btn.on span { opacity: 1; transform: none; }
.rail-btn i {
  width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor;
  transition: background .3s, transform .3s, border-color .3s;
}
.rail-btn.on { color: var(--blue); }
.rail-btn.on i { background: var(--blue); border-color: var(--blue); transform: scale(1.35); }
.rail-btn.done i { background: currentColor; }
.rail-btn:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; border-radius: 4px; }

/* ── Progress: bottom, 1px, full width ──────────────────────────────────── */
#progress {
  left: var(--pad); right: var(--pad); bottom: 30px; height: 1px;
  /* The track carried the same rgba(8,21,44,.14) that made the ghost pills
     invisible — 1.34:1 against the page. A progress track is a control boundary,
     so it owes 3:1 too: on a near-white floor the unfilled remainder simply was
     not there, which made the blue fill look like a floating dash with no
     destination. #556478 holds 5.33:1 against the page. The fill stays blue so the
     travelled portion still reads as the accent. */
  background: #556478;
}
#progFill { position: absolute; left: 0; top: 0; height: 1px; background: var(--blue); width: 0; }
#progLabel {
  /* -50% centred the label on the bar's 0% edge, so at "000" it hung off the left
     gutter (x 5 instead of the 16px page margin) and read as clipped. Pinning it
     to the bar's left edge keeps it inside the margin at every value. */
  position: absolute; top: -18px; left: 0; color: var(--dim); font-size: 9px; letter-spacing: .2em;
}

/* ── Scroll cue and interaction hint ────────────────────────────────────── */
#scrollcue {
  /* Measured at 1440x900: the plinth spans x 306–942, y 584–848, and the centred
     cue landed at 696–744 x, 806–856 y — sitting on the plinth's lower body, so it
     read as part of the 3D object instead of page chrome. Pushing it to 70% clears
     the plinth's right edge (942) while staying inside the frame. */
  left: 70%; bottom: 44px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--dim); font-size: 9px; letter-spacing: .3em;
  transition: opacity .6s;
}
body[data-stop]:not([data-stop="0"]) #scrollcue { opacity: 0; }
#scrollcue i {
  width: 18px; height: 28px; border-radius: 10px; border: 1.5px solid currentColor; position: relative;
}
#scrollcue i::after {
  content: ''; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px;
  margin-left: -1.5px; border-radius: 2px; background: currentColor;
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }

#hint { right: var(--pad); bottom: 44px; color: var(--dim); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; }

/* ── FAQ panel ──────────────────────────────────────────────────────────── */
.faq-box {
  position: fixed; right: var(--pad); bottom: 96px; z-index: 6;
  width: min(372px, calc(100vw - var(--pad) * 2));
  padding: 18px 22px 20px;
  border: 1px solid rgba(0,102,255,.42); border-radius: 14px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 22px 60px rgba(8,21,44,.18);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .3s, transform .4s cubic-bezier(.16,1,.3,1);
}
.faq-box.on { opacity: 1; transform: none; }
.faq-eyebrow { font-size: 9px; letter-spacing: .22em; color: var(--blue); margin-bottom: 9px; }
.faq-q { font: 500 15px/1.35 'Fraunces', Georgia, serif; color: var(--ink); margin-bottom: 8px; letter-spacing: -.01em; }
.faq-a { font-size: 11px; line-height: 1.75; color: var(--dim); }
body.faq-hover #copy { opacity: .22; transition: opacity .3s; }

/* ── Subject hover card ─────────────────────────────────────────────────────
   Sits opposite the FAQ box so the two never stack. The card is interactive
   (its CTA is a real link), so unlike the FAQ it takes pointer events. */
/* Anchored top-left. The bottom-right corner is where the laptop, the phone and
   the screen wall all sit, and a 390px card there covered the very screen the
   visitor is hovering to inspect (measured 177x242px of overlap on the laptop
   stop). The upper-left quadrant is empty on every stop: the logo ends at y=50
   and the copy starts at y=569. */
.subj-card {
  position: fixed; left: var(--pad); top: 96px; z-index: 7;
  width: min(392px, calc(100vw - var(--pad) * 2));
  padding: 20px 24px 22px;
  border: 1px solid rgba(0,102,255,.42); border-radius: 14px;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 22px 60px rgba(8,21,44,.20);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .28s, transform .4s cubic-bezier(.16,1,.3,1);
}
.subj-card.on { opacity: 1; transform: none; pointer-events: auto; }
.subj-eyebrow { font-size: 9px; letter-spacing: .22em; color: var(--blue); margin-bottom: 10px; }
.subj-name { font: 500 19px/1.25 'Fraunces', Georgia, serif; color: var(--ink); margin-bottom: 9px; letter-spacing: -.01em; }
.subj-line { font-size: 11.5px; line-height: 1.7; color: var(--dim); margin-bottom: 14px; }
.subj-stat { display: flex; align-items: baseline; gap: 9px; margin-bottom: 15px; }
.subj-stat b { font: 600 24px/1 'JetBrains Mono', ui-monospace, monospace; color: var(--blue); }
.subj-stat span { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.subj-cta {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.subj-cta:hover { background: var(--navy); }
body.subj-hover { cursor: pointer; }
body.subj-hover #copy { opacity: .3; transition: opacity .3s; }
@media (max-width: 760px) {
  /* On phones the copy owns the bottom third, so the card takes the space
     between the header and the subject instead. */
  /* Measured on 390x844: subject occupied y 70–468, and the old top:100px card
     landed at y 100–356 — straight across the phone's screen. Anchoring the card
     to the bottom puts its top at ~512, i.e. 44 px below the subject, and the
     copy steps aside because the card now carries the same payload. */
  .subj-card {
    top: auto; bottom: 76px; left: 12px; right: 12px; width: auto;
    padding: 16px 18px 18px; max-height: 46vh; overflow-y: auto;
  }
  .subj-name { font-size: 17px; }
  .subj-line { font-size: 11px; line-height: 1.6; margin-bottom: 11px; }
  .subj-stat b { font-size: 20px; }
  body.subj-hover #copy { opacity: 0; pointer-events: none; }
}

/* ── Skip link + no-JS fallback ────────────────────────────────────────────
   The 3D page is a canvas over DOM copy. A keyboard user landing on it should be
   able to jump the decorative layers, and a visitor with JS off must still get a
   readable page instead of a blank canvas. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--navy); color: #fff; text-decoration: none;
  font-size: 12px; letter-spacing: .06em;
  transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus-visible { transform: none; outline: 2px solid var(--blue); outline-offset: 2px; }

.noscript {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 32px; background: var(--page); color: var(--ink);
}
.noscript h2 { font: 500 clamp(24px, 4vw, 40px)/1.2 'Fraunces', Georgia, serif; }
.noscript p { max-width: 46ch; font-size: 13px; line-height: 1.7; color: var(--dim); }
.noscript a { color: var(--blue); }

/* ── Loader ─────────────────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9; display: grid; place-items: center;
  background: var(--bg); transition: opacity 1.2s;
}
#loader.done { opacity: 0; pointer-events: none; }
#loader > div { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ld-bar {
  width: 190px; height: 1px;
  /* Same control-boundary rule as #progress: the rgba(.14) track measured
     1.34:1 against the page, so the unfilled remainder was invisible and the
     blue fill read as a dash with no destination. #556478 holds 5.33:1. */
  background: #556478;
  position: relative;
}
#ldFill { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--blue); transition: width .3s; }
#ldText { font-size: 9px; letter-spacing: .3em; color: var(--dim); text-transform: uppercase; }

.fallback {
  position: fixed; inset: auto 0 0 0; z-index: 10; padding: 20px var(--pad);
  background: var(--white); border-top: 1px solid var(--rule); color: var(--dim);
}
.fallback a { color: var(--blue); }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { --pad: 16px; }
  #topfade { height: 128px; }
  /* Logo is a home link; give the whole lockup a 44px tall hit area without
     changing the mark's rendered size. */
  #logo { display: inline-flex; align-items: center; min-height: 44px; }
  #logo svg { height: 21px; }
  #logo .tag { display: none; }
  #counter { font-size: 9px; }
  .top-ctas { flex-direction: row; }
  /* 34px pills sat under the 44px touch minimum. Vertical padding grows the hit
     box without making the pill look oversized. */
  .pill { padding: 12px 15px; font-size: 10px; min-height: 44px; }
  /* On phones the pills sit at y 104–148 while the brain's silhouette starts at
     y 116, so transparent ghost buttons put 10px letterforms straight on top of
     the darkest part of the render. A solid surface plus a hairline keeps the
     labels legible no matter what scrolls under them.

     The border used to be rgba(8,21,44,.22), which composites to roughly 1.6:1
     against this surface — the same invisible-boundary problem as desktop, only
     worse. #556478 matches the desktop value so the control edge survives both the
     pale gallery floor and the dark render behind it. */
  .pill.ghost {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #556478;
    color: var(--ink);
  }
  /* The neutral mobile border above would flatten the header's rank difference on
     phones, which is exactly where the two pills sit closest together and where a
     thumb is choosing between them. Re-assert the accent on the call pill. */
  .pill.ghost.pill-call { border-color: var(--blue); color: #0047b8; }
  #rail { display: none; }

  /* The base .cta is already 50px, taller than this 44px floor; leaving the rule
     at 44px let a later declaration shrink the primary action on phones, which is
     the one place it matters most. Keep phones at 50px and let secondary pills
     settle at 44px. */
  #ctaRow a.cta { min-height: 50px; }
  #copy a.btn { min-height: 44px; display: inline-flex; align-items: center; }
  #copy {
    left: var(--pad); right: var(--pad); bottom: calc(60px + env(safe-area-inset-bottom));
    max-width: none;
  }
  #kicker { font-size: 11.5px; letter-spacing: .14em; gap: 8px; }
  #kicker::before { width: 16px; }
  #body { max-width: none; }
  #hint { display: none; }
  /* The sticky bottom bar occupies y 791–844 on a 390x844 screen, so a 18px
     progress line sat underneath it — invisible and untappable. Park it just
     above the bar instead. */
  #progress { bottom: calc(62px + env(safe-area-inset-bottom)); }
  /* At 390x844 the copy block ends at y 784 and the sticky bar starts at 791 —
     there is no free band left for a scroll cue, so it overlapped both. On phones
     the copy already ends with a CTA and the rail is hidden; the cue adds noise
     without adding an affordance. */
  #scrollcue { display: none; }

  .faq-box { left: var(--pad); right: var(--pad); width: auto; bottom: auto; top: 84px; padding: 16px 18px; }

  /* The copy owns the lower band; the subject sits above it. A bottom wash
     protects the type without dimming the object. */
  body::after {
    content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg,
      rgba(238,241,245,0) 44%, rgba(238,241,245,.34) 58%,
      rgba(238,241,245,.80) 70%, rgba(238,241,245,.96) 84%,
      rgba(238,241,245,.99) 100%);
  }

  .sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 42;
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--rule);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .sticky a {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 52px; padding: 8px 4px; color: var(--dim);
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
    border-right: 1px solid rgba(8,21,44,.08);
  }
  .sticky a:last-child { border-right: 0; }
  .sticky a:first-child { color: var(--blue); }
  #audioBtn { min-width: 44px; min-height: 44px; justify-content: center; }
  /* 44px is the touch target floor; 34px read as a hit-the-word lottery. */
  .pill { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (min-width: 761px) { .sticky { display: none; } }

@media (max-height: 620px) and (orientation: landscape) {
  #copy { bottom: 46px; }
  #body { display: none; }
  #title { font-size: clamp(20px, 3vw, 28px); }
  #scrollcue { display: none; }
}