/* THE HOROLOGICAL ATLAS — tokens + chrome
   Deep Field — Magnitude Is Influence */

:root {
  /* FIELD */
  --field-0: #06080B;
  --field-vignette: #04050A;
  --surface-1: rgba(13, 17, 23, 0.88);
  --surface-2: rgba(233, 237, 242, 0.04);

  /* TEXT */
  --text-1: #E9EDF2;
  --text-2: #9AA4B2;
  --text-3: #5C6672;

  /* HAIRLINES */
  --line-1: rgba(233, 237, 242, 0.08);
  --line-2: rgba(233, 237, 242, 0.16);

  /* ACCENT — exactly one */
  --lume: #E4D5A8;
  --lume-dim: rgba(228, 213, 168, 0.55);
  --lume-glow: rgba(228, 213, 168, 0.14);

  /* STATES */
  --dim-field: 0.12;
  --dim-chrome: 0.35;
  --hover-scale: 1.06;
  --focus-ring: 0 0 0 1px var(--lume);
  --error: #B2766E;

  /* TYPE */
  --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;

  /* MOTION */
  --ease-glide: cubic-bezier(0.4, 0.0, 0.1, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--field-0);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

::selection { background: color-mix(in srgb, var(--lume) 16%, transparent); color: var(--text-1); }

.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- CANVAS ---------- */

#atlas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: default;
  touch-action: none;
  z-index: 0;
}
#atlas.grabbing { cursor: grabbing; }
#atlas.pointing { cursor: pointer; }

/* ---------- STATUS (loading / error) ---------- */

#status {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}
#status.on { opacity: 1; }
#status-1 { font-size: 11px; font-weight: 400; letter-spacing: 0.02em; color: var(--text-3); line-height: 1.5; }
#status.error #status-1 { font-size: 12px; color: var(--error); }
#status-2 { font-size: 11px; font-weight: 400; letter-spacing: 0.02em; color: var(--text-3); line-height: 1.5; }
#status p:empty { display: none; }
#status[hidden] { display: none; }

/* ---------- CHROME COMMON ---------- */

.chrome {
  transition: opacity 400ms var(--ease-out);
}
body.dim-chrome .chrome { opacity: var(--dim-chrome); transition: opacity 200ms var(--ease-exit); }
body.observatory .chrome,
body.export .chrome {
  opacity: 0;
  pointer-events: none;
  /* invisible chrome leaves the tab order too — visibility flips after the
     fade so keyboard focus can't operate controls the eye can't see */
  visibility: hidden;
  transition: opacity 300ms var(--ease-exit), visibility 0s linear 300ms;
}

/* reveal — chrome enters at 1.5s, 100ms apart (timed from JS by removing .pre-reveal).
   The stagger overrides live only while body.revealing is set (JS removes it when the
   Ignition ends) so they can never contaminate later transitions. */
body.pre-reveal #wordmark,
body.pre-reveal #search,
body.pre-reveal footer { opacity: 0; }
body.revealing #wordmark { transition-duration: 320ms; }
body.revealing #search { transition-duration: 320ms; transition-delay: 100ms; }
body.revealing footer { transition-duration: 320ms; transition-delay: 200ms; }

/* ---------- WORDMARK ---------- */

#wordmark {
  /* "sixty" — same face/size/weight as the descent · sky nav items.
     top 37px ⇒ 18px text centers on the 46px band-line (= search circle center) */
  position: fixed; top: 37px; left: 24px;
  font-size: 18px; font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  color: #F6935D;
  z-index: 2;
  user-select: none;
  /* it is a button now (return to the surface) — strip the UA chrome, keep the mark */
  appearance: none; background: none; border: 0; padding: 0;
  font-family: inherit;
  cursor: pointer;
  transition: filter 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
/* the affordance is a breath of brightness, not a underline or a chevron —
   a wordmark that decorates itself on hover stops being a wordmark */
#wordmark:hover { filter: brightness(1.18); }
#wordmark:active { filter: brightness(0.92); }
#wordmark:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
/* already at 0 M, or in the sky where there is no depth axis: stop offering */
#wordmark.at-surface, #wordmark.inert { cursor: default; }
#wordmark.at-surface:hover, #wordmark.inert:hover { filter: none; }
#wordmark.at-surface:active, #wordmark.inert:active { filter: none; }

/* THE SURFACE BREAK — one lume breath when a real ascent arrives at 0 M.
   Fires once, decays to nothing, and never repeats on a short hop. */
@keyframes wordmark-surfaced {
  0%   { filter: brightness(1); text-shadow: none; }
  22%  { filter: brightness(1.5); text-shadow: 0 0 18px rgba(246, 147, 93, 0.55); }
  100% { filter: brightness(1); text-shadow: none; }
}
#wordmark.surfaced { animation: wordmark-surfaced 1100ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  #wordmark.surfaced { animation: none; }
  #wordmark { transition: none; }
}

/* the mark replaces the wordmark on a phone — "sea time" and "descent · surface"
   were competing for the same line, and the toggle is what a thumb actually needs.
   The text node stays in the DOM: aria-label already carries the accessible name
   ("sea time — return to the surface"), so nothing is lost to a screen reader. */
@media (max-width: 760px) {
  /* OPTICAL, not geometric. Measured on the actual Apple glyph: its ink starts
     0.1625em below the box top and is only 0.8375em tall, and the shape is
     bottom-heavy, so box-centring parks it low. Weighting the centroid by
     contrast-against-ground (what the eye actually reads, since the dark trough
     nearly dissolves into #06080B) puts the perceived centre at 0.6244em from
     the box top = 13.74px at this size. 46 − 13.74 = 32.26, so: */
  #wordmark { font-size: 0; line-height: 1; top: 32px; }
  #wordmark::before {
    content: "\1F30A";                 /* 🌊 */
    font-size: 22px; line-height: 1;
    display: block;
  }
  /* the surface breath can't ride text-shadow here — colour emoji are rendered
     as images and take no text decoration. The arrival gets a swell instead. */
  #wordmark.surfaced { animation: wordmark-surfaced-mark 1100ms var(--ease-out) both; }
}
@keyframes wordmark-surfaced-mark {
  0%   { transform: scale(1); }
  22%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}
body.dim-chrome #wordmark { opacity: var(--dim-chrome); }
body.observatory #wordmark, body.export #wordmark { opacity: 0; }

/* ---------- MODE TOGGLE — SKY · DESCENT ----------
   One world, two projections. Quiet text, top-center; the active word holds
   text-1 with a hairline underline. No lume — lume encodes data, not chrome. */

#mode-toggle {
  position: fixed; top: 37px; left: 50%;   /* band-line centered with wordmark + search */
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  z-index: 4;
  user-select: none;
}
#mode-toggle button {
  padding: 0;
  font-size: 18px; font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text-3);
  transition: color 220ms var(--ease-out);
}
#mode-toggle button:hover { color: var(--text-2); }
#mode-toggle button[aria-pressed="true"] { color: var(--text-1); }
#mode-toggle .mt-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(233, 237, 242, 0.85);
}
body.pre-reveal #mode-toggle { opacity: 0; }
body.revealing #mode-toggle { transition-duration: 320ms; transition-delay: 100ms; }
/* the morph owns the transition — the toggle waits its turn */
body.morphing #mode-toggle { pointer-events: none; }

/* ---------- DESCENT — chrome per mode ----------
   The Ephemeris (time is a sky axis) and the FIT/frame action (a sky-camera
   verb — the helix has no frame to fit) yield in descent. The Lens is
   persistent across both modes — it filters the descent too.
   Same grammar as body.observatory: opacity + pointer-events, never display. */

body.descent #timeline {
  opacity: 0 !important;
  pointer-events: none !important;
  /* out of the tab order once faded — an invisible year slider that still
     scrubs the century is chrome lying about the mode */
  visibility: hidden;
  transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms;
}
/* the Fit verb has no meaning in the descent; it leaves entirely so the Lens
   button falls to the same right edge as Search — corner symmetry holds */
body.descent #fit-chip { display: none; }

/* ---------- SOUNDING LINE — the Descent's depth instrument ----------
   The Ephemeris's vertical sibling: the whole column in miniature. Strata
   as labeled ticks, annotation depths as knots, position as a lume mark.
   Click dives; drag scrubs. Visible only below the surface. */

#sounding {
  position: fixed;
  left: 24px; top: 50%;
  transform: translateY(-50%);
  height: 56vh;
  width: 76px;
  z-index: 3;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms;
}
body.descent:not(.morphing) #sounding {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 400ms var(--ease-out) 160ms, visibility 0s;
}
body.export #sounding, body.observatory #sounding {
  opacity: 0 !important; pointer-events: none !important; visibility: hidden;
}
#sounding[hidden] { display: none; }
#snd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#snd-thumb {
  position: absolute; left: 4px;
  width: 13px; height: 1px;
  background: var(--lume);
  pointer-events: none;
}
#sounding:focus-visible { box-shadow: none; }
#sounding:focus-visible #snd-thumb { height: 3px; margin-top: -1px; box-shadow: var(--focus-ring); }
#snd-readout {
  position: absolute; left: 24px;
  transform: translateY(-50%);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-2);
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 160ms var(--ease-out);
  pointer-events: none;
}
#snd-readout.on { opacity: 1; }

/* strata labels — real buttons over the rail: native hover/focus/click,
   smooth CSS transition; each dives to its depth grade */
.snd-label {
  position: absolute; left: 18px;
  transform: translate(0, -50%);
  padding: 4px 8px 4px 0;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.02em;
  color: var(--text-3);
  white-space: nowrap;
  cursor: pointer;
  transition: color 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.snd-label:hover,
.snd-label:focus-visible { color: var(--text-1); transform: translate(3px, -50%); }
.snd-label:focus-visible { box-shadow: var(--focus-ring); border-radius: 3px; }

@media (max-width: 760px) {
  #sounding { left: 10px; width: 56px; height: 48vh; }
}

/* ---------- SEARCH ---------- */

/* search — the same white action language as the filter and frame buttons:
   a circle at rest, growing into a white pill when it opens */
#search {
  position: fixed; top: 24px; right: 24px;   /* center on the top band-line (46px), mirroring the footer */
  width: 44px; height: 44px;
  border: none;
  border-radius: 999px;
  background: #f4f3ef;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.30);
  z-index: 4;
  transition: width 240ms var(--ease-out), box-shadow 220ms var(--ease-out),
              transform 220ms var(--ease-out), opacity 400ms var(--ease-out);
}
#search:not(.open):hover { transform: translateY(-1.5px); box-shadow: 0 7px 24px rgba(0, 0, 0, 0.40); }
#search.open { width: 320px; }

#search-toggle {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #0b0b0d;
  border-radius: 999px;
}
#search-toggle svg { display: block; }
#search.open #search-toggle { display: none; }

#search-input {
  width: 100%; height: 44px;
  padding: 0 20px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: #0b0b0d;
  caret-color: #0b0b0d;
}
#search-input::placeholder { color: rgba(11, 11, 13, 0.45); }
#search.open #search-input { padding-right: 44px; }   /* room for the close button */

/* the search close (×) — appears only when the field is open */
#search-close {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  display: none; align-items: center; justify-content: center;
  border: none; background: transparent; border-radius: 999px;
  color: #0b0b0d; cursor: pointer;
  transition: background 160ms var(--ease-out), transform 140ms var(--ease-out);
}
#search.open #search-close { display: inline-flex; }
#search-close svg { display: block; }
#search-close:hover { background: rgba(11, 11, 13, 0.08); }
#search-close:active { transform: translateY(-50%) scale(0.9); }
#search-close:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(11, 11, 13, 0.4); }

#search-results {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  list-style: none;
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
}
@supports not (backdrop-filter: blur(24px)) {
  #search-results { background: #0D1117; }
}
#search-results li {
  height: 40px;
  padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
#search-results li .sr-model {
  font-size: 12px; color: var(--text-2);
  letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#search-results li .sr-meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-3);
  white-space: nowrap;
}
#search-results li.active,
#search-results li:hover { background: var(--surface-2); }
#search-results li.active .sr-model { color: var(--text-1); }
#search-results .sr-empty {
  padding: 16px;
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-3);
  line-height: 1.5;
}

/* ---------- DETAIL PANEL ---------- */

#panel {
  position: fixed;
  top: 16px; right: 16px; bottom: 16px;
  width: 360px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 24px;
  z-index: 5;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
}
#panel::-webkit-scrollbar { display: none; }
@supports not (backdrop-filter: blur(24px)) {
  #panel { background: #0D1117; }
}
#panel.open { opacity: 1; transform: none; }
#panel.closing {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 240ms var(--ease-exit), transform 240ms var(--ease-exit);
}

#panel .sec {
  opacity: 0; transform: translateY(8px);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
#panel.open .sec { opacity: 1; transform: none; }
#panel.open .sec:nth-child(1) { transition-delay: 0ms; }
#panel.open .sec:nth-child(2) { transition-delay: 40ms; }
#panel.open .sec:nth-child(3) { transition-delay: 80ms; }
#panel.open .sec:nth-child(4) { transition-delay: 120ms; }
#panel.open .sec:nth-child(5) { transition-delay: 160ms; }
#panel.open .sec:nth-child(6) { transition-delay: 200ms; }
#panel.open .sec:nth-child(7) { transition-delay: 240ms; }

/* full-bleed photography — the image is the plate */
.p-photo img {
  width: 100%; height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  cursor: zoom-in;
}
/* photo credit / license line — recorded in catalog.json, not shown on-site */
.p-credit { display: none; }

#panel-content { transition: opacity 120ms var(--ease-exit); }
#panel-content.swap { opacity: 0; }

#panel .sec + .sec {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-1);
}

#panel-close {
  /* sticky + float: stays visible while the panel content scrolls */
  position: sticky; top: 8px; float: right;
  margin: -8px -8px -24px 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: color 160ms var(--ease-out);
  z-index: 1;
}
#panel-close:hover { color: var(--text-1); }

.p-overline {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.p-title {
  margin-top: 4px;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-1);
}
.p-ref {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  color: var(--text-2);
}
.p-significance {
  font-size: 14px; font-weight: 400;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---- Heritage — the curated, sourced narrative layer --------------------- */
.lore-head {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lume-dim);
}
.lore-lede {
  margin-top: 12px;
  font-size: 15px; font-weight: 450;
  line-height: 1.5;
  letter-spacing: -0.003em;
  color: var(--text-1);
  text-wrap: pretty;
}
.lore-passage { margin-top: 18px; }
.lore-text {
  font-size: 13.5px; font-weight: 400;
  line-height: 1.62;
  color: var(--text-2);
  text-wrap: pretty;
}
.lore-cite {
  display: inline-flex; align-items: baseline; gap: 3px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-3);
  transition: color 140ms var(--ease-out);
}
.lore-cite::before { content: "—"; margin-right: 5px; color: var(--text-3); opacity: 0.6; }
.lore-cite:hover { color: var(--lume); }
.lore-cite-plain { cursor: default; }
.lore-cite-plain:hover { color: var(--text-3); }
.lore-arrow { font-size: 9px; opacity: 0.65; }

.lore-quote {
  margin: 22px 0 4px;
  padding-left: 15px;
  border-left: 1.5px solid var(--lume-dim);
}
.lore-quote blockquote {
  font-size: 15px; font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.003em;
  color: var(--text-1);
  text-wrap: pretty;
}
.lore-quote figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.02em;
  color: var(--text-3);
}
.lore-quote figcaption::before { content: "— "; }

.lore-sources {
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid var(--line-1);
}
.lore-sources-label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3);
}
.lore-sources-rail {
  display: flex; gap: 7px;
  margin: 0 -2px;
  padding: 0 2px 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.lore-sources-rail::-webkit-scrollbar { display: none; }
.lore-src-chip {
  flex: 0 0 auto; scroll-snap-align: start;
  padding: 5px 11px;
  border: 1px solid var(--line-1);
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--text-3);
  text-decoration: none;
  transition: color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.lore-src-chip:hover { color: var(--lume); border-color: var(--lume-dim); }

/* at-a-glance by default; the full narrative expands on demand */
.lore-expand {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 15px;
  font-size: 12px; font-weight: 450; letter-spacing: 0.01em;
  color: var(--lume-dim);
  transition: color 160ms var(--ease-out);
}
.lore-expand:hover { color: var(--lume); }
.lore-expand:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.lore-chev { transition: transform 320ms var(--ease-out); }
.lore.expanded .lore-chev { transform: rotate(180deg); }
.lore-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 360ms var(--ease-out);
}
.lore-body-inner {
  overflow: hidden; min-height: 0;
  opacity: 0; transition: opacity 240ms var(--ease-out);
}
.lore.expanded .lore-body { grid-template-rows: 1fr; }
.lore.expanded .lore-body-inner { opacity: 1; transition-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  .lore-body, .lore-body-inner, .lore-chev { transition: none; }
}

/* ---- Heritage filmstrip — Apple Photos gesture language ------------------ */
.lore-media {
  display: flex; gap: 8px;
  margin: 16px 0 2px;
  padding: 2px 0 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;                 /* deference — the images, not the chrome */
}
.lore-media::-webkit-scrollbar { display: none; }
.lm-thumb {
  flex: 0 0 auto;
  width: 128px; height: 90px;
  border-radius: 8px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--line-1);
  background: var(--surface-2);
  cursor: zoom-in;
  position: relative;
  transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.lm-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 360ms var(--ease-out);
}
.lm-thumb:hover {
  border-color: var(--lume-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.lm-thumb:hover img { transform: scale(1.045); }
.lm-thumb:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lm-thumb:active { transform: translateY(-1px) scale(0.99); }
@media (prefers-reduced-motion: reduce) {
  .lm-thumb, .lm-thumb img { transition: border-color 220ms var(--ease-out); }
  .lm-thumb:hover { transform: none; }
  .lm-thumb:hover img { transform: none; }
}

.p-specs { display: block; }
.p-spec-row {
  height: 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.p-spec-row + .p-spec-row { border-top: 1px solid var(--line-1); }
.p-spec-row dt {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.p-spec-row dd {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  line-height: 1.4;
  color: var(--text-2);
  text-align: right;
}

.p-lin-head {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.p-lin-list { list-style: none; margin-top: 4px; }
.p-lin-list + .p-lin-head { margin-top: 16px; }
.p-lin-list button {
  width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  margin: 0 -8px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 12px; font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--text-2);
  text-align: left;
  transition: color 120ms var(--ease-out), background 120ms var(--ease-out);
}
.p-lin-list button:hover { color: var(--text-1); background: var(--surface-2); }
.p-lin-list button .yr {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  color: var(--text-3);
}
.p-lin-one {
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-3);
  line-height: 1.5;
}

/* breadcrumb chip — the instrument uniform (fit chip, NOW) worn by navigation */
.p-crumb {
  height: 24px; padding: 0 10px; margin-bottom: 12px;
  border: 1px solid var(--line-1); border-radius: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.p-crumb:hover { color: var(--text-2); border-color: var(--line-2); }

/* ---------- FAMILY INDEX — a chronology in the panel shell ---------- */

.fi-list { list-style: none; }
.fi-card {
  width: 100%;
  min-height: 64px;
  padding: 12px 8px; margin: 0 -8px;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  transition: background 120ms var(--ease-out);
}
.fi-list li + li .fi-card { border-top: 1px solid var(--line-1); }
.fi-card:hover,
.fi-card:focus-visible { background: var(--surface-2); }
.fi-card:hover .fi-model,
.fi-card:focus-visible .fi-model { color: var(--text-1); }
.fi-glyph { flex: 0 0 28px; width: 28px; height: 28px; }
.fi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fi-side { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; text-align: right; }
.fi-brand {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.fi-model {
  font-size: 13px; font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 120ms var(--ease-out);
}
.fi-meta {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400;
  color: var(--text-3);
}
.fi-year {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  color: var(--text-2);
}
.fi-price {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400;
  color: var(--text-3);
}
/* unborn under the Ephemeris — the dimness is the datum “not yet born”;
   the bright year is the datum “when” */
.fi-card.fi-unborn .fi-glyph,
.fi-card.fi-unborn .fi-main { opacity: 0.35; }
.fi-card.fi-unborn .fi-price { opacity: 0.35; }

/* ---------- LIGHTBOX — the print room ---------- */

#lightbox {
  position: fixed; inset: 0;
  z-index: 7;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 5, 10, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
#lightbox.on { opacity: 1; }
#lightbox[hidden] { display: none; }
#lb-img {
  max-width: min(1100px, calc(100vw - 160px));
  max-height: calc(100vh - 160px);
  border-radius: 8px;
  transform: scale(0.985);
  transition: transform 240ms var(--ease-out), opacity 120ms var(--ease-exit);
}
#lightbox.on #lb-img { transform: none; }
#lb-img.swap { opacity: 0; }
#lb-close {
  position: absolute; top: 24px; right: 24px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--text-2);
  transition: color 160ms var(--ease-out);
}
#lb-close:hover { color: var(--text-1); }
#lb-prev, #lb-next {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: color 160ms var(--ease-out);
}
#lb-prev { left: 24px; }
#lb-next { right: 24px; }
#lb-prev:hover, #lb-next:hover { color: var(--text-1); }
#lb-prev[hidden], #lb-next[hidden] { display: none; }
#lb-caption {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  text-align: center;
  max-width: min(680px, calc(100vw - 48px));
  padding: 11px 18px;
  border-radius: 11px;
  background: rgba(6, 8, 12, 0.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
}
#lb-caption:has(#lb-title:empty):has(#lb-credit:empty) { background: none; padding: 0; }
#lb-title {
  font-size: 13px; font-weight: 450; letter-spacing: 0.002em;
  line-height: 1.45; color: var(--text-1);
  text-wrap: pretty;
}
#lb-credit { font-size: 10.5px; font-weight: 400; letter-spacing: 0.01em; color: var(--text-3); }
#lb-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--text-3); }
#lb-title:empty, #lb-credit:empty, #lb-count:empty { display: none; }
@media (max-width: 760px) {
  #lb-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 168px); }
  #lb-prev { left: 8px; }
  #lb-next { right: 8px; }
  #lb-caption { bottom: 14px; }
}

/* ---------- FAMILY PREVIEW — hover card with media carousel ----------
   Pure preview: pointer-events none, aria-hidden. The label remains the
   control; the family index remains the accessible content. */

#fam-preview {
  position: fixed;
  width: 248px;
  padding: 12px;
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
@supports not (backdrop-filter: blur(24px)) {
  #fam-preview { background: #0D1117; }
}
#fam-preview.on { opacity: 1; transform: none; }
#fam-preview[hidden] { display: none; }

#fp-media {
  position: relative;
  height: 132px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
}
#fp-media img.fp-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}
#fp-media img.fp-slide.on { opacity: 1; }
#fp-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#fp-dots {
  position: absolute; right: 8px; bottom: 8px;
  display: flex; gap: 4px;
}
#fp-dots i {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(233, 237, 242, 0.4);
  box-shadow: 0 0 3px rgba(4, 5, 10, 0.7);
  transition: background 240ms var(--ease-out);
}
#fp-dots i.on { background: rgba(233, 237, 242, 0.95); }

#fp-overline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
#fp-name {
  margin-top: 3px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-1);
}
#fp-line {
  margin-top: 5px;
  font-size: 11px; font-weight: 400;
  line-height: 1.55;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 760px) {
  #fam-preview { display: none; }   /* hover has no meaning on touch */
}

/* ---------- FAMILY HERO (index panel) ---------- */

.fi-hero img {
  width: 100%; height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  cursor: zoom-in;
}
.fi-hero .p-credit { margin-top: 6px; }
canvas.fi-strip {
  width: 100%; height: 96px;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line-1);
  background: var(--surface-2);
}

/* ---------- WATCH PREVIEW — every star answers hover the same way ----------
   Same contract as the family card: pointer-events none, aria-hidden;
   catalog render first, editorial fallback, drawn glyph when neither exists. */

#watch-preview {
  position: fixed;
  width: 232px;
  padding: 12px;
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  z-index: 30;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
@supports not (backdrop-filter: blur(24px)) {
  #watch-preview { background: #0D1117; }
}
#watch-preview.on { opacity: 1; transform: none; }
#watch-preview[hidden] { display: none; }
#wp-media {
  position: relative;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
}
#wp-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
#wp-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#wp-overline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
#wp-name {
  margin-top: 3px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-1);
}
#wp-meta {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
}
@media (max-width: 760px) {
  #watch-preview { display: none; }
}

/* ---------- COUSTEAU — the surfacing, once per session ----------
   Appears only in the idle Observatory drift, when the user has stopped
   doing and is simply beneath the surface. Never during tasks. */

/* ---------- NO-MATCH — the over-filtered dead end, made a destination.
   A Cousteau submersible, engraved in the field's own line grammar, greets
   the empty result and points the way out (HIG: turn an error into guidance,
   Clarity + a designed alternative, never a blank wall). ---------- */
#no-match {
  position: fixed;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 48px));
  display: flex; flex-direction: column; align-items: center; text-align: center;
  z-index: 5;
  user-select: none;
  opacity: 0; transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
#no-match:not(.on) { transform: translate(-50%, calc(-50% + 10px)); }
#no-match.on { opacity: 1; }
#no-match[hidden] { display: none; }
#nm-sub {
  width: 156px; height: auto;
  color: var(--text-2);
  margin-bottom: 30px;
  overflow: visible;
}
.nm-hull { animation: nm-bob 5.2s var(--ease-out) infinite; transform-origin: 50% 50%; }
.nm-dome { stroke: var(--lume); }
.nm-bub { fill: var(--lume-dim); stroke: none; opacity: 0; }
.nm-bub1 { animation: nm-rise 3.4s var(--ease-out) infinite; }
.nm-bub2 { animation: nm-rise 3.4s var(--ease-out) 0.9s infinite; }
.nm-bub3 { animation: nm-rise 3.4s var(--ease-out) 1.7s infinite; }
@keyframes nm-bob {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50%      { transform: translateY(-5px) rotate(0.6deg); }
}
@keyframes nm-rise {
  0%   { opacity: 0; transform: translateY(4px); }
  25%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-22px); }
}
#nm-title {
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
#nm-body {
  margin-top: 10px;
  max-width: 296px;
  font-size: 13px; font-weight: 400;
  line-height: 1.62;
  color: var(--text-3);
  text-wrap: balance;
}
#nm-clear {
  margin-top: 28px;
  height: 34px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-1);
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
#nm-clear:hover { border-color: var(--lume-dim); background: var(--surface-2); }
#nm-clear:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (prefers-reduced-motion: reduce) {
  .nm-hull, .nm-bub1, .nm-bub2, .nm-bub3 { animation: none; }
  .nm-bub { opacity: 0.5; }
  #no-match, #no-match:not(.on) { transition: opacity 200ms var(--ease-out); transform: translate(-50%, -50%); }
}

#cousteau {
  position: fixed;
  left: 50%; bottom: 20vh;
  transform: translateX(-50%);
  max-width: 560px;
  padding: 0 24px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 2400ms var(--ease-out);
}
#cousteau.on { opacity: 1; }
#cousteau.off { opacity: 0; transition: opacity 900ms var(--ease-exit); }
#cousteau[hidden] { display: none; }
#cousteau blockquote {
  font-size: 15px; font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.01em;
  color: var(--text-2);
}
#cousteau figcaption {
  margin-top: 14px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- THE EPHEMERIS — time scrubber ---------- */

#timeline {
  position: fixed; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 480px));
  display: flex; align-items: flex-end; gap: 12px;
  z-index: 3;
  user-select: none;
}
#timeline[hidden] { display: none !important; }

#tl-play {
  width: 24px; height: 24px; flex: 0 0 24px;
  margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  color: var(--text-3);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
#tl-play:hover { color: var(--text-2); border-color: var(--line-2); }

#tl-track {
  position: relative; flex: 1;
  height: 40px;
  cursor: ew-resize;
  touch-action: none;
  border-radius: 4px;
}
#tl-ruler { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#tl-thumb {
  position: absolute; left: 0; top: 0;
  height: 100%; width: 0;
  pointer-events: none;
}
#tl-thumb::after {
  content: ''; position: absolute;
  top: 5px; bottom: 11px; left: -0.5px; width: 1px;
  background: var(--lume);
}
#tl-readout {
  position: absolute; top: -15px; left: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--lume);
  white-space: nowrap;
}
#timeline.at-now #tl-thumb::after { background: rgba(233, 237, 242, 0.28); }
#timeline.at-now #tl-readout { opacity: 0; }

#tl-now {
  height: 24px; flex: 0 0 auto;
  margin-bottom: 6px;
  padding: 0 10px;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-3);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
#timeline.engaged #tl-now { opacity: 1; pointer-events: auto; }
#tl-now:hover { color: var(--text-2); border-color: var(--line-2); }

body.pre-reveal #timeline { opacity: 0; }
body.revealing #timeline { transition-duration: 320ms; transition-delay: 200ms; }

@media (max-width: 900px) {
  #timeline { display: none; }
}

/* ---------- FOOTER ---------- */

footer {
  position: fixed; left: 24px; right: 24px; bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
  z-index: 3;   /* §5 stack: footer < wordmark < fit chip — the chip rides here */
  user-select: none;
}
#footer-left {
  font-size: 11px; color: var(--text-3);
  line-height: 1.5;
  display: flex; align-items: baseline; gap: 12px;
}
/* the bar's own connective between the gauge and the attribution — same "·"
   the gauge already uses internally. Gated on :not(:empty) so it never dangles
   before the gauge first paints, and it dies with the gauge on mobile. */
#footer-gauge:not(:empty)::after { content: "·"; margin-left: 12px; }
/* lowercase, untracked, weight 500 — the same register as the wordmark, the
   projection toggle and the CTA. Tracked uppercase was the odd one out.
   text-transform rather than lowercase in the markup, so the DOM and the
   accessible name keep the real casing of a person's name. */
#colophon-open {
  pointer-events: auto;
  background: none; border: 0; padding: 0;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500; letter-spacing: 0;
  text-transform: lowercase;
  color: var(--text-3); cursor: pointer;
  transition: color 160ms var(--ease-out);
}
#colophon-open:hover { color: var(--text-1); }
#colophon-open:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 3px; }
#footer-right { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
/* Action buttons, bottom-right — the pacomepertant "sound" / "menu" language:
   a white circle for the Fit action, a white pill for the labeled Lens. Both
   persist across sky and descent. */
#fit-chip {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: #f4f3ef;
  color: #0b0b0d;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.30);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out),
              opacity 400ms var(--ease-out);
}
#fit-chip svg { display: block; }
#fit-chip:hover { transform: translateY(-1.5px); box-shadow: 0 7px 24px rgba(0, 0, 0, 0.40); }
#fit-chip:active { transform: translateY(0) scale(0.97); }

#lens-chip {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: #f4f3ef;
  color: #0b0b0d;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.30);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out),
              background 200ms var(--ease-out), color 200ms var(--ease-out),
              opacity 400ms var(--ease-out);
}
#lens-chip svg { display: block; }
#lens-chip:hover { transform: translateY(-1.5px); box-shadow: 0 7px 24px rgba(0, 0, 0, 0.40); }
#lens-chip:active { transform: translateY(0) scale(0.97); }
#lens-chip { position: relative; }             /* anchors the gleam count badge */
/* the gleam — a lume count badge, top-right of the filter button. The active
   signal is the badge itself, so the button stays in the white action family
   (no dark inversion competing with search/fit). */
.lens-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #F6935D;
  color: #0b0b0d;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  font-variant-numeric: tabular-nums; line-height: 1;
  box-shadow: 0 0 0 2px #07090d, 0 0 10px rgba(246, 147, 93, 0.75);   /* ring + the gleam glow */
  opacity: 0; transform: scale(0.4);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
  pointer-events: none;
}
#lens-chip.has-count .lens-count { opacity: 1; transform: scale(1); }
.lens-count.gleam { animation: lens-gleam 620ms var(--ease-out); }
@keyframes lens-gleam {
  0%   { box-shadow: 0 0 0 2px #07090d, 0 0 0 rgba(246, 147, 93, 0); }
  35%  { box-shadow: 0 0 0 2px #07090d, 0 0 16px 3px rgba(246, 147, 93, 0.95); transform: scale(1.18); }
  100% { box-shadow: 0 0 0 2px #07090d, 0 0 10px rgba(246, 147, 93, 0.75); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .lens-count.gleam { animation: none; } }
#fit-chip:focus-visible, #lens-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--lume), 0 2px 16px rgba(0, 0, 0, 0.30);
}

/* ---------- THE LENS — attribute lenses on the field ---------- */

#lens-panel {
  position: fixed; right: 24px; bottom: 82px;
  width: 304px;
  padding: 16px;
  background: var(--surface-1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  z-index: 4;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
@supports not (backdrop-filter: blur(24px)) {
  #lens-panel { background: #0D1117; }
}
#lens-panel.on { opacity: 1; transform: none; }
#lens-panel[hidden] { display: none; }
.lens-head {
  display: flex; align-items: center; justify-content: space-between;
}
.lens-head span {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-3);
}
#lens-clear {
  height: 20px; padding: 0 8px;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-3);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
#lens-clear:hover { color: var(--text-1); border-color: var(--line-2); }
#lens-clear[hidden] { display: none; }
.lens-group { margin-top: 14px; }
.lens-label {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
.lens-row { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.lens-opt {
  height: 24px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  font-size: 11px; font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--text-2);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.lens-opt:hover { color: var(--text-1); border-color: var(--line-2); }
.lens-opt.on { color: var(--text-1); border-color: var(--lume-dim); background: var(--surface-2); }
.lens-opt i {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(233, 237, 242, 0.18);
}

/* price range — histogram over a log dual slider, typed fields beneath */
#lens-price { margin-top: 8px; }
#lp-hist { width: 100%; height: 28px; display: block; }
#lp-track {
  position: relative;
  height: 16px;
  cursor: ew-resize;
  touch-action: none;
}
#lp-track::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 7.5px;
  height: 1px;
  background: var(--line-1);
}
#lp-fill {
  position: absolute; top: 7.5px;
  height: 1px;
  background: rgba(246, 147, 93, 0.65);   /* sea-time orange */
}
.lp-thumb {
  position: absolute; top: 50%;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--field-0);
  border: 1px solid rgba(246, 147, 93, 0.6);   /* sea-time orange */
  cursor: ew-resize;
  transition: border-color 160ms var(--ease-out);
}
.lp-thumb:hover, .lp-thumb:focus-visible { border-color: #F6935D; }
#lp-fields {
  margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
}
#lp-fields input {
  width: 88px; height: 24px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  caret-color: var(--lume);
}
#lp-fields input:focus { color: var(--text-1); border-color: var(--line-2); }
.lp-dash { font-size: 11px; color: var(--text-3); }
/* On a phone the popover becomes a SHEET — the platform's own pattern for a
   tall control surface on compact width (Maps, Find My). The full filter
   vocabulary stays visible and SCROLLS; compressing the language to fit a
   fixed box would trade meaning for geometry. Grabber, rounded top, internal
   momentum scroll, safe-area floor. Desktop popover untouched. */
@media (max-width: 760px) {
  #lens-panel {
    left: 0; right: 0; bottom: 0; width: auto;
    /* ONE detent for every sheet in the app — the detail panel set it at 92,
       and two sheets with two heights read as two different components */
    max-height: 92vh; max-height: 92dvh;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(14px);
  }
  #lens-panel.on { transform: none; }
  /* the grabber — the sheet says what it is */
  #lens-panel::before {
    content: "";
    display: block;
    width: 36px; height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: var(--line-2);
  }
  /* the head rides the scroll — FILTERS + CLEAR always in reach */
  #lens-panel .lens-head {
    position: sticky; top: -10px;               /* cancels the panel's top padding */
    z-index: 1;
    background: var(--surface-1);
    margin: 0 -16px; padding: 8px 16px 10px;
  }
}

/* ---------- EXPORT CARTOUCHE ---------- */

#cartouche {
  position: fixed; right: 24px; bottom: 24px;
  border: 1px solid var(--line-1);
  padding: 12px;
  z-index: 6;   /* above chrome — export hides chrome anyway */
  text-align: left;
  user-select: none;
  pointer-events: none;
}
#cart-1 {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-1);
  opacity: 0.92;
}
#cart-2 {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px; color: var(--text-3);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 760px) {
  #panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto;
    height: 92vh; max-height: 92vh;          /* full-detent bottom sheet */
    height: 92dvh; max-height: 92dvh;        /* dvh so mobile browser chrome doesn't clip it */
    border-radius: 16px 16px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    padding: 14px 20px 24px;                 /* tighter top — room for the grabber */
    transform: translateY(24px);
  }
  /* the grabber — signals a dismissible bottom sheet (Apple HIG) */
  #panel::before {
    content: ""; position: sticky; top: 0; z-index: 2;
    display: block; width: 36px; height: 4px; margin: 2px auto 12px;
    border-radius: 999px; background: var(--line-2);
  }
  #panel.open { transform: none; }
  #panel.closing { transform: translateY(12px); }

  /* MOBILE SEARCH — open to a full-width bar anchored by BOTH edges (left+right),
     so it can never overflow the viewport regardless of iOS keyboard/viewport
     quirks. The magnifier stays as a left affordance → reads as a search bar. */
  #search.open {
    left: 16px; right: 16px; width: auto;
    transition: box-shadow 220ms var(--ease-out), opacity 400ms var(--ease-out);
  }
  #search.open #search-toggle {
    display: inline-flex;
    position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
    color: rgba(11, 11, 13, 0.55); pointer-events: none;
  }
  #search.open #search-input { padding-left: 46px; }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  .chrome, #panel, #panel .sec, #search, #status, #panel-content,
  #fam-preview, #fp-media img.fp-slide, #lightbox, #lb-img, #lens-panel, #watch-preview,
  #sounding, #snd-readout {
    transition-duration: 80ms !important;
    transition-delay: 0ms !important;
    transition-property: opacity, background, color, border-color !important;
  }
  #panel, #panel .sec, #fam-preview, #lb-img { transform: none !important; }
}

/* ======================================================================
   THE FITTING — quiz + reveal
   A DOM overlay above the canvas (mirrors #no-match / #lens-panel toggling
   via .on + [hidden]). Deep-field ground, one accent (lume), system font.
   ====================================================================== */

/* ---------- ENTRY CHIP — the pacomepertant "menu" pill, 1:1 with the
   white search (top) and Lens/filter (bottom-right) action language ---------- */
#fitting-chip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 20px;
  flex: 0 0 auto; white-space: nowrap;
  border: none;
  border-radius: 999px;
  background: #f4f3ef;
  color: #0b0b0d;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.30);
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em;
  pointer-events: auto;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out),
              opacity 400ms var(--ease-out);
}
#fitting-chip .fic-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #0b0b0d;
}
#fitting-chip:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.40);
}
#fitting-chip:active { transform: translateY(0) scale(0.97); }
#fitting-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(11, 11, 13, 0.60), 0 2px 16px rgba(0, 0, 0, 0.30); }
body.pre-reveal #fitting-chip, body.observatory #fitting-chip, body.export #fitting-chip { display: none; }
/* mobile: yield the secondary date label; center the "find your watch" CTA and
   keep the frame/filter circles right-aligned */
@media (max-width: 620px) {
  /* the gauge goes, the attribution stays — the name is the one thing that
     must survive the small breakpoint. Lowercase and untracked it runs ~77px
     against a centred CTA that starts near 111px even at 360, so it needs no
     shrinking; the max-width is only a hard stop against font metrics I
     cannot measure here. */
  #footer-gauge { display: none; }
  #footer-left { pointer-events: none; }
  #colophon-open {
    /* hard stop = half the VIEWPORT minus the centred CTA's half-width and
       breathing room. vw, NOT % — a percentage here resolves against
       #footer-left (a shrink-to-fit flex item ~81px wide), so calc(50% - 101px)
       went NEGATIVE, clamped to 0, and overflow:hidden ate the whole label.
       That was the invisible-attribution bug: present, visible, 0px wide. */
    max-width: calc(50vw - 101px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* footer keeps space-between: the name holds the LEFT corner. The old
     flex-end here predated the trigger — it pushed #footer-left to the right,
     where the absolutely-positioned CTA pill (positioned = paints above
     in-flow siblings) sat directly on top of it. The name was invisible not
     because it was hidden but because it was UNDERNEATH the white pill. */
  #footer-right { gap: 10px; }
  #fitting-chip {                          /* the CTA, dead-centered; sized to clear the circles */
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    font-size: 12px; padding: 0 15px; gap: 6px;
  }
}
/* "© simon leyton" (~76px at 11px) fits the 360px cap (~79px) that the longer
   "by" form did not — the 10px step it needed came back out with it. */

/* ---------- OVERLAY SHELL ---------- */
#fitting {
  position: fixed; inset: 0;
  z-index: 20;                       /* above canvas + all chrome, below nothing */
  display: flex; align-items: stretch; justify-content: center;
  background:
    radial-gradient(150% 130% at 50% 50%, #06080B 52%, #04050A 100%);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#fitting.on { opacity: 1; }
#fitting[hidden] { display: none; }

/* ====================================================================
   THE QUIZ
   ==================================================================== */
#fitting { --fq-accent: #F6935D; }   /* per-question accent; renderFitStep overrides */
#fit-quiz {
  width: 100%; max-width: 720px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 28px max(40px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
}
#fitting.reveal-mode #fit-quiz { display: none; }

/* the orange seatime masthead, carried into the questionnaire (matches #wordmark
   position/face); hidden on the reveal, which carries its own signature */
#fq-mark {
  position: fixed; top: 37px; left: 24px;
  font-family: var(--font-ui);
  font-size: 18px; font-weight: 500;
  line-height: 1; letter-spacing: 0;
  color: #F6935D;
  z-index: 21;
  user-select: none; pointer-events: none;
}
#fitting.reveal-mode #fq-mark { display: none; }

/* the orange seatime mark on the reveal — top-right, shown only on the reveal */
#fr-brandmark {
  position: fixed; top: 37px; left: 24px;
  font-family: var(--font-ui);
  font-size: 18px; font-weight: 500;
  line-height: 1; letter-spacing: 0;
  color: #F6935D;
  background: none; border: none; padding: 0;
  z-index: 21;
  user-select: none; cursor: pointer;
  transition: opacity 160ms var(--ease-out);
  display: none;
}
#fitting.reveal-mode #fr-brandmark { display: block; }
#fr-brandmark:hover { opacity: 0.72; }
#fr-brandmark:focus-visible { outline: none; box-shadow: 0 0 0 2px #F6935D; border-radius: 4px; }
/* on narrow screens the quiz column runs full-width; drop it below the mark */
@media (max-width: 760px) { #fit-quiz { padding-top: max(62px, env(safe-area-inset-top)); } }

/* --- top: progress + eyebrow + nav --- */
#fq-top { flex: 0 0 auto; padding-top: 14px; }
#fq-progress {
  height: 3px; border-radius: 3px;
  background: var(--line-1);
  overflow: hidden;
}
#fq-fill {
  height: 100%; width: 20%;
  background: #ffffff;
  border-radius: 3px;
  transform-origin: left center;
  transition: width 420ms var(--ease-glide);
}
#fq-topline {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px;
}
.fq-eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-2);
}
#fq-nav { display: flex; align-items: center; gap: 6px; }
#fq-back, #fq-close {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  border-radius: 50%;
  transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
#fq-back:hover, #fq-close:hover { color: var(--text-1); background: var(--surface-2); }
#fq-back:focus-visible, #fq-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }
#fq-back[hidden] { display: none; }

/* --- stage: headline + cards --- */
#fq-stage {
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 0;
}
#fq-headline {
  font-size: clamp(26px, 5.6vw, 36px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--text-1);
  text-align: center;
  text-wrap: balance;
  margin-bottom: 30px;
}

/* --- VS cards (binary screens) --- */
#fq-cards {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
}
#fq-cards.multi { gap: 10px; }

.fq-card {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  padding: 22px 24px;
  text-align: left;
  border: 1px solid var(--line-1);
  border-radius: 16px;
  background: var(--surface-1);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out),
              transform 180ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.fq-card::before {          /* whisper-alpha background motif slot */
  content: ""; position: absolute; inset: 0;
  background: var(--surface-2);
  opacity: 0; transition: opacity 200ms var(--ease-out);
  pointer-events: none;
}
.fq-card:hover { border-color: var(--line-2); }
.fq-card:hover::before { opacity: 0.5; }
/* press / focus correlate with the answer's own colour — never the browser blue */
.fq-card { -webkit-tap-highlight-color: transparent; }
.fq-card:focus { outline: none; }
.fq-card:active { border-color: var(--fq-accent); }
.fq-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--fq-accent); }
.fq-card.chosen {
  border-color: var(--fq-accent);
  background: color-mix(in srgb, var(--fq-accent) 9%, var(--surface-1));
  box-shadow: inset 0 0 0 1px var(--fq-accent);
  transform: scale(1.01);
}
.fq-card-glyph {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fq-accent);
}
.fq-card-glyph svg { display: block; width: 100%; height: 100%; }
.fq-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fq-card-title {
  display: block;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.fq-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px; font-weight: 400;
  line-height: 1.45;
  color: var(--text-2);
}
.fq-card-check {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  align-self: flex-start;
  color: var(--fq-accent);
  opacity: 0; transform: scale(0.6);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.fq-card.chosen .fq-card-check { opacity: 1; transform: scale(1); }

/* the "vs" pill between the two binary cards */
#fq-vs {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--field-0);
  border: 1px solid var(--line-2);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  z-index: 2;
  pointer-events: none;
}
#fq-cards.multi #fq-vs { display: none; }

/* --- multi-select rows --- */
.fq-chip {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 15px 20px;
  text-align: left;
  border: 1px solid var(--line-1);
  border-radius: 13px;
  background: var(--surface-1);
  cursor: pointer; color: inherit;
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.fq-chip:hover { border-color: var(--line-2); }
.fq-chip { -webkit-tap-highlight-color: transparent; }
.fq-chip:focus { outline: none; }
.fq-chip:active { border-color: var(--fq-accent); }
.fq-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--fq-accent); }
.fq-chip.chosen {
  border-color: var(--fq-accent);
  background: color-mix(in srgb, var(--fq-accent) 8%, var(--surface-1));
}
.fq-chip-box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--field-0);
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.fq-chip.chosen .fq-chip-box { background: var(--fq-accent); border-color: var(--fq-accent); }
.fq-chip-box svg { opacity: 0; transition: opacity 140ms var(--ease-out); }
.fq-chip.chosen .fq-chip-box svg { opacity: 1; }
.fq-chip-title { display: block; font-size: 16px; font-weight: 600; color: var(--text-1); }
.fq-chip-sub { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.fq-chip-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fq-chip-glyph {
  flex: 0 0 auto; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fq-accent);
}
.fq-chip-glyph svg { display: block; width: 100%; height: 100%; }

/* --- actions (multi screen) --- */
#fq-actions {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 30px;
}
#fq-actions[hidden] { display: none; }
#fq-continue {
  height: 42px; padding: 0 30px;
  border-radius: 999px;
  background: var(--text-1);
  color: var(--field-0);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out), opacity 160ms var(--ease-out);
}
#fq-continue:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(0,0,0,0.4); }
#fq-continue:active { transform: translateY(0) scale(0.98); }
#fq-continue:focus-visible { outline: none; box-shadow: var(--focus-ring); }
#fq-skip {
  height: 42px; padding: 0 8px;
  font-size: 13px; font-weight: 400;
  color: var(--text-3);
  transition: color 180ms var(--ease-out);
}
#fq-skip:hover { color: var(--text-2); }
#fq-skip:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }

/* screen transition — content cross-fade/slide */
#fq-stage.turning #fq-headline,
#fq-stage.turning #fq-cards { opacity: 0; transform: translateY(8px); }
#fq-headline, #fq-cards {
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

/* ====================================================================
   THE REVEAL — the museum-plate poster
   Authored at 1080×1350; scaled to fit the viewport. The poster DOM is
   what the 2× offscreen export mirrors.
   ==================================================================== */
#fit-reveal {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px 40px;
  gap: 20px;
}
#fit-reveal[hidden] { display: none; }

/* the poster: fixed authored size, scaled down responsively via a CSS var.
   THE SPECIMEN PLATE — a framed museum object.
   Layers (outer→in): field ground → passe-partout mat + hairline + corner ticks
   → plate (top serial · rectangular portrait hero · engraved ledger caption ·
   single quiet brand signature). */
#fr-poster {
  --poster-scale: 1;
  position: relative;
  width: 1080px; height: 1350px;
  flex: 0 0 auto;
  transform: scale(var(--poster-scale));
  transform-origin: top center;
  /* the reveal ground = the poster ground; the poster carries its own so
     the exported PNG matches exactly */
  background: radial-gradient(150% 130% at 50% 50%, #06080B 52%, #04050A 100%);
  box-sizing: border-box;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
/* scaled poster occupies scaled height so the flow below doesn't overlap */
#fr-poster-wrap { position: relative; }

/* ---- PASSE-PARTOUT / MAT ---- outer margin, then a framed mat plate ---- */
#fr-mat {
  position: absolute; left: 56px; top: 56px; right: 56px; bottom: 56px;
  background: linear-gradient(180deg, rgba(16,21,28,0.55) 0%, rgba(9,12,17,0.80) 100%);
  border: 1.5px solid rgba(233,237,242,0.30);
  pointer-events: none;
}
/* inner brightened hairline — survives 2160×2700 downscale (must-fix #4) */
#fr-mat-hair {
  position: absolute; left: 74px; top: 74px; right: 74px; bottom: 74px;
  border: 1px solid rgba(233,237,242,0.20);
  pointer-events: none;
}
/* four corner registration ticks (graft B) sitting on the mat frame corners */
#fr-ticks { position: absolute; inset: 0; pointer-events: none; }
#fr-ticks .fr-tick { position: absolute; background: rgba(233,237,242,0.34); }
/* each tick = an L made from one 20px arm; drawn as a small plus via ::before */
#fr-ticks .fr-tick { width: 22px; height: 1.5px; }
#fr-ticks .fr-tick::before {
  content: ""; position: absolute; left: 10.25px; top: -10.25px;
  width: 1.5px; height: 22px; background: rgba(233,237,242,0.34);
}
#fr-ticks .fr-tick-tl { left: 45px; top: 56px; }
#fr-ticks .fr-tick-tr { right: 45px; top: 56px; }
#fr-ticks .fr-tick-bl { left: 45px; bottom: 56px; }
#fr-ticks .fr-tick-br { right: 45px; bottom: 56px; }

/* ---- PLATE — the content column inside the mat ---- */
#fr-plate {
  position: absolute; left: 74px; top: 74px; right: 74px; bottom: 74px;
  display: flex; flex-direction: column;
  padding: 40px 52px 34px;
  box-sizing: border-box;
}

#fr-plate-top {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-1);
}
#fr-serial { font-size: 13px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--text-3); }

/* ---- PLATE FOOT — the return path. Set in the ledger-label style so it reads
   as part of the plate's typography rather than a watermark laid over it.
   Geometry mirrors buildPoster()'s footer exactly. ---- */
#fr-plate-foot {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 22px;
  border-top: 1px solid var(--line-1);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-3);
}
/* the "sea time" wordmark — poster masthead, top-left */
#fr-brandline {
  font-family: var(--font-ui);
  font-size: 17px; font-weight: 500; letter-spacing: 0;
  color: #F6935D;
}

/* ---- HERO — rectangular PORTRAIT window; strap bleeds off top & bottom ---- */
#fr-stage {
  position: relative;
  flex: 0 0 auto;
  margin-top: 26px;
  height: 760px;                 /* ~56% of poster height */
  border: 1px solid var(--line-2);
  background: #04050A;
  overflow: hidden;
}
#fr-watch {
  position: absolute; inset: 0;
}
#fr-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
/* faint lume light bloom, top-centre — as if the dial lume catches light
   (must-fix #3: nudged up one notch so the accent reads as intentional light) */
#fr-lumepool {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(40% 32% at 50% 44%, rgba(228,213,168,0.16) 0%, rgba(228,213,168,0) 70%);
}
/* rim-lit emergence vignette (graft C): darken the mat-side corners of the
   window ~12% for depth — strap stays fully intact */
#fr-herofade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 118% at 50% 50%, rgba(4,5,10,0) 58%, rgba(4,5,10,0.42) 100%);
}

/* ---- CAPTION — engraved plate voice ---- */
#fr-caption { flex: 1 1 auto; display: flex; flex-direction: column; text-align: center; }
/* engraved archetype: light weight, wide tracking — plate-engraving voice
   (replaces the off-brand 56/600 bold) */
#fr-archetype {
  margin-top: 30px;
  font-size: 47px; font-weight: 400;
  line-height: 1.0; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--text-1);
  padding-left: 0.28em;
}
/* engraved ledger (graft B): left labels, values flushed right, ledger align */
#fr-ledger {
  width: 100%; max-width: 470px; margin: 34px auto 0;
  display: flex; flex-direction: column; gap: 12px;
  font-variant-numeric: tabular-nums;
}
#fr-ledger .fr-lrow {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line-1);
}
/* the rule under the last VISIBLE row is the one that has to go. :last-child is
   structural — it still matches the inscription row while it is hidden — so the
   border is assigned explicitly per state instead. */
#fr-ledger .fr-lrow[hidden] { display: none; }
#fr-ledger .fr-lrow:nth-child(2) { border-bottom: none; }
#fr-ledger.has-inscription .fr-lrow:nth-child(2) { border-bottom: 1px solid var(--line-1); }
#fr-ledger.has-inscription .fr-lrow:nth-child(3) { border-bottom: none; }
#fr-ledger dt {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-3); font-weight: 500;
  text-align: left;
}
#fr-ledger dd {
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-1); font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#fr-name { font-size: 15px !important; letter-spacing: 0.14em !important; }
/* the insight — "why this watch, right now"; same ledger format as the rows
   above (left-aligned, 470px column), label in the sea-time orange */
#fr-why {
  width: 100%; max-width: 470px; margin: 18px auto 0;
  text-align: left;
}
#fr-why-label {
  display: block;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #F6935D;
  font-weight: 500;
  margin-bottom: 9px;
}
#fr-why-text {
  font-size: 14px; line-height: 1.55; letter-spacing: 0.01em;
  color: var(--text-1);
  margin: 0;
  /* mirrors the PNG's line budget (buildPoster) — the plate is a fixed height
     and the prose is what yields, so the foot rule is never crossed */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
}
#fr-ledger.has-inscription ~ #fr-why #fr-why-text { -webkit-line-clamp: 5; }

/* the caption fills the freed space between the hero window and the plate foot.
   (was margin-bottom:auto, which anchored a bottomless plate — with the foot
   added that auto margin pushed it straight out through the frame.) */
#fr-caption { margin-bottom: 0; }


/* the "in another life" line, below the poster (not part of the print) */
#fr-alt {
  font-size: 13px; color: var(--text-3);
  text-align: center; letter-spacing: 0.01em;
  margin: 4px 0 0;
}
#fr-alt em { color: var(--text-2); font-style: normal; }
/* the runner-up archetype is a live preview trigger */
#fr-alt em.fr-alt-link {
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
#fr-alt em.fr-alt-link:hover,
#fr-alt em.fr-alt-link:focus-visible {
  color: var(--text-1); border-color: var(--lume-dim); outline: none;
}

/* reveal actions */
/* explicit rows — primary, sheet, alternatives. Not flex-wrap: a wrapped row
   let Save slide up beside the primary as soon as it became visible, which
   flattened the hierarchy the whole layout exists to state. */
#fr-actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
#fr-act-primary { display: flex; justify-content: center; gap: 12px; }
#fr-act-quiet {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px;
}
/* scoped to the two pill rows, NOT to every button inside #fr-actions — the
   share sheet lives here too, and these rules were quietly repainting its
   channel rows (a background wash on hover, a scale on press, a forced 40px
   height) straight through the tile treatment below. */
#fr-act-primary button, #fr-act-quiet button {
  height: 40px; padding: 0 20px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-2);
  color: var(--text-1);
  background: transparent;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out),
              color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
#fr-act-primary button:hover, #fr-act-quiet button:hover { border-color: var(--lume-dim); background: var(--surface-2); }
#fr-act-primary button:active, #fr-act-quiet button:active { transform: scale(0.98); }
#fr-act-primary button:focus-visible, #fr-act-quiet button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ONE primary, on its own line — sharing the plate is the whole point of the
   reveal. The rest sit under it as quiet alternatives, not as peers; four
   equal pills meant nothing was actually being recommended. */
#fr-share, #fr-take {
  min-width: 320px;              /* the sheet below is cut to the same measure */
  background: var(--text-1) !important;
  color: var(--field-0) !important;
  border-color: var(--text-1) !important;
}
#fr-share:hover, #fr-take:hover { background: #fff !important; }
#fr-save, #fr-see { color: var(--text-2) !important; }
#fr-restart { color: var(--text-3) !important; border-color: transparent !important; }
#fr-restart:hover { color: var(--text-2) !important; background: transparent !important; }

/* ---- THE ENGRAVING CONTROL ----
   One quiet line until it is taken up. The field, when it opens, is a ruled
   line and a caret — no box, no chrome. You are engraving, not filling a form. */
#fr-inscribe { margin: 0 0 18px; text-align: center; }
#fr-inscribe-toggle {
  background: none; border: 0; padding: 4px 6px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  transition: color 160ms var(--ease-out);
}
#fr-inscribe-toggle:hover { color: var(--text-2); }
#fr-inscribe-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
#fr-inscribe-row {
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
  margin-top: 10px;
}
/* display:flex outranks the hidden attribute's UA display:none — without this
   the field is open on arrival, which is the one thing the design refuses */
#fr-inscribe-row[hidden] { display: none; }
#fr-inscribe-input {
  width: 260px;
  background: none; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 4px 2px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-1);
  text-align: center;
  transition: border-color 200ms var(--ease-out);
}
#fr-inscribe-input::placeholder { color: var(--text-3); letter-spacing: 0.16em; }
#fr-inscribe-input:focus { outline: none; border-bottom-color: #F6935D; }
#fr-inscribe-count {
  font-size: 11px; letter-spacing: 0.2em; color: var(--text-3);
  font-variant-numeric: tabular-nums; min-width: 2ch;
}
#fr-inscribe-done {
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-2);
}
#fr-inscribe-done:hover { color: var(--text-1); }
#fr-inscribe-done:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* ---- THE SHEET — named channels, set as words ----
   No brand glyphs, no colour: four foreign logos would be the loudest thing on
   a page built to feel like a museum plate. The panel borrows the plate's own
   materials — mat gradient, hairline, ruled rows. */
#fr-sheet {
  width: 320px;                  /* flush with the primary above it */
  padding: 6px;                  /* the tiles inset from the panel edge */
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(16,21,28,0.55), rgba(9,12,17,0.80));
  text-align: left;
}
/* Apple's buy-flow option tiles separate their states with BORDER alone — the
   fill never changes, there is no shadow and nothing moves (measured on the
   HomePod mini page: 12px radius, 1px #86868b at rest, 2px #0071e3 selected,
   rgba(255,255,255,0.8) throughout). The previous grey background wash was the
   one gesture that page never makes, and on a near-black ground it read as a
   smudge across the ruled rows. So: no fill, no separators — the tile is drawn
   by its own edge, and only when you are on it. */
#fr-sheet .fr-ch {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  width: 100%; padding: 12px 14px;
  background: none;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: border-color 200ms var(--ease-out);
}
#fr-sheet .fr-ch:hover { border-color: rgba(233, 237, 242, 0.28); }
#fr-sheet .fr-ch:active { border-color: rgba(233, 237, 242, 0.44); }
/* focus takes the sea-time orange where Apple takes blue — a different state,
   not a louder one, and it finally agrees with the tile's own radius */
#fr-sheet .fr-ch:focus-visible { outline: none; box-shadow: none; border-color: #F6935D; }
.fr-ch-name {
  font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-1);
}
/* the honest small print — Instagram cannot take a post from the web, and the
   row says so rather than looking identical to the ones that can */
.fr-ch-note {
  font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-3); text-align: right;
}

/* "A fitting, shared with you" — the received plate says whose it is before
   the viewer mistakes the result for their own */
#fr-received {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-3);
}

/* cinematic bloom-in for the poster (REDUCED = simple fade handled by #fitting.on) */
#fit-reveal .fr-bloom #fr-watch { animation: fr-bloom-watch 700ms var(--ease-out) both; }
#fit-reveal .fr-bloom #fr-lumepool { animation: fr-bloom-pool 900ms var(--ease-out) both; }
#fit-reveal .fr-bloom #fr-caption { animation: fr-bloom-up 640ms var(--ease-out) 180ms both; }
#fit-reveal .fr-bloom #fr-plate-top { animation: fr-bloom-up 640ms var(--ease-out) 300ms both; }
@keyframes fr-bloom-watch {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fr-bloom-pool { from { opacity: 0; } to { opacity: 1; } }
@keyframes fr-bloom-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 460px) {
  .fq-card { padding: 18px 18px; gap: 14px; }
  .fq-card-glyph { width: 38px; height: 38px; }
  .fq-card-title { font-size: 16px; }
  #fq-vs { width: 30px; height: 30px; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  #fitting { transition-duration: 1ms !important; }
  #fq-fill { transition-duration: 1ms !important; }
  #fq-headline, #fq-cards { transition-duration: 1ms !important; transform: none !important; }
  #fq-stage.turning #fq-headline, #fq-stage.turning #fq-cards { transform: none !important; }
  .fq-card.chosen { transform: none !important; }
  #fit-reveal .fr-bloom #fr-watch,
  #fit-reveal .fr-bloom #fr-lumepool,
  #fit-reveal .fr-bloom #fr-caption,
  #fit-reveal .fr-bloom #fr-plate-top { animation: none !important; }
}

/* ======================================================================
   THE SURFACE — the landing hero (0 M). Scroll or tap dives into the descent.
   ====================================================================== */
html.no-hero #hero { display: none; }
#hero {
  position: fixed; inset: 0; z-index: 40;
  background: #0A1C26;
  display: grid; grid-template-columns: 44% 56%;   /* content | watch */
  overflow: hidden;
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out),
              background 900ms var(--ease-out);
}
#hero-content { order: 1; position: relative; z-index: 4; }   /* left, above the light */
#hero-media { order: 2; z-index: 1; }                         /* right — the watch */
/* depth wash: surface-lit at the top, the deep gathering below */
#hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(32,78,100,0.40) 0%, rgba(10,28,38,0) 40%, rgba(3,11,17,0.55) 100%);
  transition: opacity 900ms var(--ease-out);
}
/* the underwater light — shafts, caustic dapple, bubbles (canvas), over the whole scene */
#hero-fx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none;
  transition: opacity 700ms var(--ease-out);
}
/* the lume-breath — the watch keeps sea time by its own light (placed over the dial by JS) */
#hero-lume {
  position: absolute; z-index: 2; pointer-events: none; border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(228,213,168,0.55) 0%, rgba(228,213,168,0.14) 42%, rgba(228,213,168,0) 68%);
  animation: hero-lume-breath 5.5s ease-in-out infinite;
}
@keyframes hero-lume-breath { 0%,100% { opacity: 0.28; } 50% { opacity: 0.9; } }

#hero.diving {                 /* the dive — sink up, darken to the deep, fade */
  opacity: 0; transform: translateY(-5%);
  background: #06080B; pointer-events: none;
}
/* the dive choreography — light recedes, the watch sinks and blurs into the deep */
#hero.diving::before, #hero.diving #hero-fx, #hero.diving #hero-lume { opacity: 0; }
#hero.diving #hero-watch { transform: scale(0.94) translateY(2.5%); filter: blur(2px); }
#hero.gone { display: none; }

#hero-media { position: relative; height: 100%; overflow: hidden; }
#hero-watch {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  padding: clamp(24px, 5vh, 72px) clamp(16px, 3vw, 56px);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55));   /* the watch casts into the water */
  user-select: none; -webkit-user-drag: none;
  transition: transform 900ms var(--ease-out), filter 900ms var(--ease-out);
}

#hero-content {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(28px, 5vw, 72px) clamp(48px, 8vh, 96px);
  color: var(--text-1);
}
#hero-wordmark {
  font-family: var(--font-ui);
  font-size: clamp(56px, 9vw, 124px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 0.9;
  color: #FFFFFF; margin: 0 0 clamp(28px, 5vh, 56px);
}
#hero-meta {
  display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 44px);
  margin-bottom: clamp(40px, 7vh, 84px);
}
#hero-eyebrow {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 500; line-height: 1.25; color: var(--text-2);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
}
#hero-body {
  margin: 0; max-width: 42ch;
  font-size: clamp(14px, 1.15vw, 16px); line-height: 1.6; color: var(--text-1);
}
#hero-descend {
  align-self: flex-start; background: none; border: none; padding: 0;
  font-family: var(--font-ui); font-size: 15px; font-weight: 500; color: var(--text-1);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
  transition: opacity 160ms var(--ease-out);
}
#hero-descend:hover { opacity: 0.72; }
#hero-descend:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--text-1); border-radius: 3px; }
#hero-descend .hd-caret { animation: hd-bob 1.8s var(--ease-out) infinite; }
@keyframes hd-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

@media (max-width: 760px) {
  #hero { grid-template-columns: 1fr; grid-template-rows: 44% 56%; }
  #hero-watch { object-position: center 38%; }
  #hero-content { justify-content: flex-start; padding-top: clamp(20px, 3vh, 36px); }
  #hero-meta { flex-direction: column; gap: 12px; margin-bottom: clamp(28px, 5vh, 56px); }
}
@media (prefers-reduced-motion: reduce) {
  #hero { transition: opacity 300ms linear; }
  #hero.diving { transform: none; }
  #hero.diving #hero-watch { transform: none; }
  #hero-descend .hd-caret { animation: none; }
  #hero-lume { animation: none; opacity: 0.5; }
}

/* ======================================================================
   THE COLOPHON — the site footer, ported 1:1 in structure from
   simonleyton.com and rebranded to sea time.

   Source measurements kept verbatim: 64px clock square, 64px time chip with
   a 10px radius and 10px/6px padding, a 64px-tall made-block whose rule sits
   between two lines, 34px lockup gap, 14px nav gap.

   Rebranded: #faf5f0 ground -> the atlas field, #777270 ink -> --text-3,
   #ece6df hairline -> --line-1, the name takes the sea-time orange at the
   wordmark's own weight rather than the source's 700/-0.02em.
   ====================================================================== */
/* an explicit display OVERRIDES the hidden attribute, so this guard is not
   optional: without it the overlay sits fixed over the whole viewport at
   opacity 0 and eats every event bound to the canvas — the descent's wheel
   listener is on `canvas`, the hero's is on `window`, which is exactly why
   the hero still scrolled and the descent did not. */
#colophon[hidden] { display: none; }
#colophon {
  position: fixed; inset: 0; z-index: 60;
  background: var(--field-0);
  display: flex; flex-direction: column; justify-content: center;
  padding: 72px 0;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 260ms var(--ease-out);
}
#colophon.on { opacity: 1; }
#cph-close {
  position: absolute; top: 24px; right: 24px;
  width: 32px; height: 32px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-2); color: var(--text-2);
  cursor: pointer;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
#cph-close:hover { color: var(--text-1); border-color: var(--lume-dim); }
#cph-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.cph-wrap {
  max-width: 1180px; width: 100%; box-sizing: border-box;
  margin: 0 auto; padding: 0 30px;
  display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap;
}
.cph-left { display: flex; flex-direction: column; gap: 34px; flex: 1; min-width: 0; }
.cph-name {
  font-family: var(--font-ui);
  font-size: 26px; font-weight: 500; letter-spacing: 0;
  color: #F6935D;                       /* the wordmark's own colour and weight */
}

.clock-widget { display: flex; align-items: stretch; gap: 10px; }
.mono-clock { display: block; flex: 0 0 auto; width: 64px; height: 64px; }
.time-chip {
  box-sizing: border-box; flex: 0 0 auto;
  width: 64px; height: 64px;
  border: 1px solid var(--line-2); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 10px 6px;
}
.time-chip span {
  font-family: var(--font-ui); color: var(--text-3);
  line-height: 1; letter-spacing: 0; white-space: nowrap;
}
.chip-loc { font-size: 9px; }
.chip-time { font-size: 11px; }
.chip-temp { font-size: 9px; }
/* the source's staccato blink — holds, then snaps, on a 1.4s cadence */
.chip-time .colon { display: inline-block; animation: colonBlink 1.4s linear infinite; }
@keyframes colonBlink { 0%, 62% { opacity: 1; } 63%, 100% { opacity: 0.15; } }

.made-block {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 64px; min-width: 0; margin-left: 15px; align-self: center;
}
.made-line { display: block; font-size: 14px; color: var(--text-3); line-height: 1.35; }
.made-block .foot-rule { display: block; height: 1px; width: 100%; background: var(--line-1); }
.copy { display: block; font-size: 14px; color: var(--text-3); line-height: 1; }
.copy a {
  color: var(--text-2); text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.copy a:hover { color: var(--text-1); border-bottom-color: var(--lume-dim); }
.copy a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 2px; }

.cph-col { display: flex; flex-direction: column; gap: 14px; min-width: 170px; }
.cph-col a {
  font-size: 17px; color: var(--text-2); text-decoration: none;
  width: fit-content;
  transition: color 160ms var(--ease-out);
}
.cph-col a:hover { color: var(--text-1); }
.cph-col a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 3px; }

@media (max-width: 760px) {
  #colophon { padding: 88px 0 48px; }
  .cph-wrap { gap: 36px; padding: 0 24px; }
  .made-block { margin-left: 0; height: auto; gap: 10px; align-self: stretch; }
  .clock-widget { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  #colophon { transition: none; }
  .chip-time .colon { animation: none; }
}


/* ---- THE SHEET'S SCRIM, GRABBER AND FOOTER ---- */

/* scrim — phone only; on desktop the popover coexists with the live field */
#lens-scrim {
  position: fixed; inset: 0; z-index: 4;
  background: rgba(4, 5, 10, 0.5);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
#lens-scrim.on { opacity: 1; }
#lens-scrim[hidden] { display: none; }
@media (min-width: 761px) { #lens-scrim { display: none; } }

/* the grabber — desktop hides it; the sheet's ::before nub is replaced by
   this real control so it can take a tap and a drag */
#lens-grab { display: none; }
@media (max-width: 760px) {
  #lens-panel::before { content: none; }
  #lens-grab {
    display: block;
    width: 100%; height: 28px;                 /* generous touch target */
    margin: -4px 0 4px;
    background: none; border: 0; padding: 0;
    cursor: grab;
    touch-action: none;                        /* the drag owns the gesture */
  }
  #lens-grab span {
    display: block;
    width: 36px; height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--line-2);
  }
  #lens-grab:focus-visible { outline: none; }
  #lens-grab:focus-visible span { box-shadow: var(--focus-ring); }
}

/* the footer — Reset undoes, the primary answers "then what?" with a number */
#lens-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
}
#lens-clear {
  flex: 0 0 auto;
  background: none; border: 0; padding: 8px 4px;
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  transition: color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
#lens-clear:hover { color: var(--text-1); }
#lens-clear:disabled { opacity: 0.35; cursor: default; }
#lens-clear:disabled:hover { color: var(--text-2); }
#lens-clear:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
#lens-see {
  flex: 1 1 auto;
  height: 40px; border-radius: 999px;
  border: 1px solid var(--text-1);
  background: var(--text-1); color: var(--field-0);
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background 160ms var(--ease-out);
}
#lens-see:hover { background: #fff; }
#lens-see:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (max-width: 760px) {
  /* pinned inside the scroll, always reachable — the sheet's decision bar */
  #lens-foot {
    position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom, 0px));
    z-index: 1;
    background: var(--surface-1);
    margin: 14px -16px 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line-1);
  }
}

/* ---- THE DETAIL SHEET'S SCRIM AND GRABBER — same grammar as the filters ---- */

#panel-scrim {
  position: fixed; inset: 0; z-index: 5;      /* panel's own z; DOM order layers it beneath */
  background: rgba(4, 5, 10, 0.5);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
#panel-scrim.on { opacity: 1; }
#panel-scrim[hidden] { display: none; }
@media (min-width: 761px) { #panel-scrim { display: none; } }

#panel-grab { display: none; }
@media (max-width: 760px) {
  #panel::before { content: none; }           /* the decorative nub yields to the control */
  #panel-grab {
    display: block;
    position: sticky; top: -14px;             /* cancels the panel's top padding */
    z-index: 2;
    width: 100%; height: 30px;
    margin: -8px 0 2px;
    background: none; border: 0; padding: 0;
    cursor: grab;
    touch-action: none;
  }
  #panel-grab span {
    display: block;
    width: 36px; height: 4px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: var(--line-2);
  }
  #panel-grab:focus-visible { outline: none; }
  #panel-grab:focus-visible span { box-shadow: var(--focus-ring); }
}
@media (prefers-reduced-motion: reduce) {
  #panel-scrim { transition: none; }
}

/* the eyebrow stacks beside the body copy on desktop; on a phone the columns
   are gone and the stack reads as a typo — one line there */
@media (max-width: 760px) {
  #hero-eyebrow br { display: none; }
}
