/* Studio landing page: the drawing set (spec 2026-10-23). Tokens and base
   first; each component task appends its own section. The newsletter panel
   and the crawler fallback keep their rules in index.html. */
/* The Nexus palette (Tacit Nexus visual language, 00-visual-language): a
   midnight blueprint ground, one grid ink at three depths, off-white text at
   two strengths, sand as the studio accent. Product plates keep their own
   world colours (registry `plate.world`). */
:root {
  --ground-0: #040913; --ground-1: #071020; --ground-2: #0b1729;
  --surface-1: rgba(14, 28, 48, .72); --surface-2: rgba(22, 40, 66, .86);
  --hairline: rgba(150, 182, 218, .14); --hairline-strong: rgba(150, 182, 218, .30);
  --grid-rgb: 132, 166, 204;
  /* Body text is 72%: the specimen's 50% and 32% steps fail 4.5:1 on small
     text, so they are not used for words. */
  --text-1: #EEF3F8; --text-2: rgba(238, 243, 248, .72);
  --sand: #D4A574;
  --state-on-track: #4FD6A0; --state-neutral: #6F86A0; --state-done: #7F93A8;
  --f-display: 'Cabinet Grotesk', 'Inter Tight', system-ui, sans-serif;
  --f-wide: 'Archivo', 'Inter Tight', system-ui, sans-serif;
  --f-body: 'Inter Tight', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: 16px;
}

html { overflow-y: auto; overflow-x: hidden; }
html, body, #root { height: auto; min-height: 100%; }
body {
  margin: 0; color: var(--text-1);
  font-family: var(--f-body); -webkit-font-smoothing: antialiased;
  /* The far plane of the ground, a dot lattice, for the whole page; the cover
     frame adds the nearer planes on top. */
  background-color: var(--ground-1);
  background-image: radial-gradient(circle, rgba(var(--grid-rgb), .16) 1px, transparent 1.3px);
  background-size: 20px 20px;
}
a { color: inherit; }

.studio {
  padding: var(--gutter) var(--gutter) 0;
  overflow-x: clip;
}
.mono { font-family: var(--f-mono); }
.wide { font-family: var(--f-wide); font-weight: 900; font-stretch: 125%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Drafting labels: a hairline frame on the ground. `.ink` is the primary
   action, filled in sand. Lift on hover, settle on press. */
.paper-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  background: transparent; color: var(--text-1); border: 1px solid var(--hairline-strong);
  text-decoration: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em;
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), border-color .18s ease;
}
.paper-btn:hover { transform: translate(-2px, -2px); border-color: var(--sand); }
.paper-btn:active { transform: translate(1px, 1px); }
.paper-btn:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.paper-btn.ink { background: var(--sand); color: var(--ground-1); border-color: var(--sand); font-weight: 500; }

/* Stage dots in the Nexus state colours (stageState in studio-data.mjs).
   Blocked, late and at risk stay internal: a public page doesn't show them. */
.pip {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid currentColor; box-sizing: border-box; flex: none;
}
.pip.state-live { background: var(--state-on-track); border-color: var(--state-on-track); }
.pip.state-beta { background: var(--sand); border-color: var(--sand); }
.pip.state-pre { background: var(--state-neutral); border-color: var(--state-neutral); }
.pip.state-research { background: transparent; border-color: var(--state-done); }

/* ===== Footer ===== */
.studio-footer {
  padding: 64px 40px 40px;
  border-top: 1px solid var(--hairline-strong);
  display: flex; flex-direction: column; gap: 24px;
}
.sf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sf-text-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--sand); font-weight: 600; text-underline-offset: 4px;
}
.sf-company { margin: 0; font-size: 11px; letter-spacing: .12em; line-height: 1.8; color: var(--text-2); }
.sf-company a { color: var(--text-1); }
.sf-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.sf-legal { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 11px; letter-spacing: .16em; }
.sf-legal a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; text-transform: uppercase; }
.sf-legal a:hover { color: var(--sand); }
.sf-socials { display: flex; gap: 14px; }
.sf-socials a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
@media (pointer: coarse), (max-width: 640px) {
  .sf-legal a, .sf-socials a { min-height: 44px; min-width: 44px; }
  .studio-footer { padding: 48px 20px 32px; }
}

/* ===== Mark ===== */
.mark-svg { display: block; width: 100%; height: auto; overflow: visible; }
.mark-construction { stroke: rgba(var(--grid-rgb), .32); stroke-width: .5; stroke-dasharray: 2 2.5; }
.mark-shadow { fill: rgba(0, 0, 0, .28); }
.mark-outline { stroke: rgba(238, 243, 248, .6); stroke-width: 1.2; stroke-linejoin: round; }
/* The seams are cut in the ground colour, as the Nexus logo cube draws them. */
.mark-folds { stroke: var(--ground-1); stroke-width: 2.2; }
.mark-dimension { stroke: var(--text-2); stroke-width: .5; }

/* ===== Cover (Sheet 01) ===== */
.cover { position: relative; }
.cover-follow { position: relative; transform-origin: 50% 0%; }
/* The midnight blueprint: a vignette lifted at the centre, a faint sand glow
   behind the mark, and the grid at three depths (96/24px working lines, 120px
   middle lines, the 20px dot lattice). */
/* The cover fills the first screen, inside the page gutter. The mark and the
   tagline scale with that height, and the copy and news card sit just above
   the tagline, so a short laptop screen keeps the same composition. */
.cover {
  --cover-h: max(640px, calc(100svh - 2 * var(--gutter)));
  --mark-w: clamp(340px, calc(var(--cover-h) - 340px), 720px);
  --tag: clamp(104px, calc(var(--cover-h) * .19), 176px);
  --lift: calc(var(--tag) + 76px);
}
.cover-frame {
  position: relative; height: var(--cover-h); border-radius: 28px; overflow: hidden;
  color: var(--text-1); cursor: crosshair; border: 1px solid var(--hairline-strong); box-sizing: border-box;
  background-color: var(--ground-1);
  background-image:
    linear-gradient(rgba(var(--grid-rgb), .15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), .15) 1px, transparent 1px),
    linear-gradient(rgba(var(--grid-rgb), .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), .06) 1px, transparent 1px),
    linear-gradient(rgba(var(--grid-rgb), .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), .055) 1px, transparent 1px),
    radial-gradient(circle, rgba(var(--grid-rgb), .16) 1px, transparent 1.3px),
    radial-gradient(40% 36% at 50% 36%, rgba(212, 165, 116, .10), rgba(212, 165, 116, 0) 72%),
    radial-gradient(120% 95% at 50% 38%, var(--ground-2) 0%, var(--ground-1) 52%, var(--ground-0) 100%);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px, 120px 120px, 120px 120px, 20px 20px, 100% 100%, 100% 100%;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px, 11px 7px, 11px 7px, 5px 3px, 0 0, 0 0;
}
.cover-head {
  /* Above .cover-mark (2): its 300px replay button reaches under the header when the header wraps, and at 900-1440px by a few px. */
  position: absolute; z-index: 3; top: 28px; left: 36px; right: 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: 12px; letter-spacing: .22em;
}
.cover-nav { display: flex; gap: 12px; }
.cover-actions { display: flex; align-items: center; gap: 12px; }
.paper-btn.motion-btn { cursor: pointer; }
/* The label carries the state ("Play motion" while paused), so it is not
   also announced as a pressed toggle. */
.paper-btn.motion-btn.is-paused { background: rgba(238, 243, 248, .12); }
/* Reduced motion: the tagline, circle and alert are already still. */
@media (prefers-reduced-motion: reduce) { .motion-btn { display: none; } }
.cover-mark { position: absolute; z-index: 2; left: 50%; top: 64px; width: var(--mark-w); margin: 0 0 0 calc(var(--mark-w) / -2); }
.mark-btn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.mark-static { cursor: default; }
.mark-btn:focus-visible { outline: 2px solid var(--sand); outline-offset: 8px; border-radius: 50%; }
.cover-copy {
  position: absolute; z-index: 2; left: 40px; bottom: var(--lift); width: min(540px, 34vw);
  display: flex; flex-direction: column; gap: 14px;
}
.cover-copy p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text-2); }
.cover-wordmark {
  margin: 0; font-family: var(--f-display); font-weight: 500;
  font-size: 88px; line-height: .9; letter-spacing: -.035em;
}
.wm-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wm-letter { display: inline-block; }
.wm-space { display: inline-block; width: .24em; }
.cover-tagline { position: absolute; z-index: 1; left: 0; bottom: 30px; pointer-events: none; }
.cover-tagline p {
  margin: 0; white-space: nowrap; font-size: var(--tag); line-height: 1;
  letter-spacing: -.03em; color: var(--text-1);
}
/* Reduced motion: the whole line, once, inside the frame (about 16em wide). */
.cover-tagline.still { left: 0; right: 0; bottom: 36px; text-align: center; }
.cover-tagline.still p { font-size: calc((100vw - 32px) * .054); letter-spacing: -.02em; }
.news-card {
  position: absolute; z-index: 3; right: 36px; bottom: var(--lift); width: 310px;
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  /* Solid: --surface-2 as it lands on the ground. Translucent, it let the
     cover trace that ends under it show through. */
  background: #14253D; color: var(--text-1); text-decoration: none;
  border: 1px solid var(--hairline-strong);
}
.news-card:hover { border-color: var(--sand); }
.news-card:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.nc-label { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .2em; color: var(--text-2); }
.nc-title { font-family: var(--f-display); font-weight: 500; font-size: 26px; line-height: 1.05; }
.nc-body { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.nc-cta { font-size: 14px; font-weight: 600; color: var(--sand); }
/* A neon trace along the 24px lattice, from the mark's lower right vertex
   (SVG 69.3, 40 of the 280 viewBox) out to the news card, ending under it.
   The straight runs are 2px borders (whole pixels, so the browser doesn't
   round them thinner than the SVG); the 45° turn is a 24px SVG between them,
   drawn from the horizontal's centre line to the vertical's. */
.cover-trace {
  position: absolute; z-index: 1; pointer-events: none;
  left: calc(50% + var(--mark-w) * .2475); top: calc(64px + var(--mark-w) * .643);
  right: 191px; bottom: calc(var(--lift) + 40px);
  filter: drop-shadow(0 0 3px rgba(212, 165, 116, .9)) drop-shadow(0 0 10px rgba(212, 165, 116, .4));
}
.ct-h { position: absolute; left: 0; right: 24px; top: 0; border-top: 2px solid var(--sand); }
.ct-d { position: absolute; right: 0; top: 0; width: 24px; height: 24px; overflow: visible; }
.ct-d path { fill: none; stroke: var(--sand); stroke-width: 2; stroke-linecap: square; }
.ct-v { position: absolute; right: 0; top: 24px; bottom: 0; border-right: 2px solid var(--sand); }
.ct-node {
  position: absolute; left: -6px; top: -6px; width: 10px; height: 10px; box-sizing: border-box;
  background: var(--ground-1); border: 1.75px solid var(--sand); transform: rotate(45deg);
}
.crosshair { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.crosshair.on { opacity: 1; }
.ch-v { position: absolute; top: 0; bottom: 0; left: 0; border-left: 1px solid rgba(var(--grid-rgb), .42); }
.ch-h { position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid rgba(var(--grid-rgb), .42); }
.ch-readout {
  position: absolute; left: 0; top: 0; padding: 3px 6px; white-space: nowrap;
  background: var(--ground-1); border: 1px solid var(--hairline-strong);
  color: var(--text-2); font-size: 10px; letter-spacing: .14em;
}

@media (max-width: 879px) {
  .cover-frame { height: max(560px, calc(100svh - 20px)); border-radius: 22px; cursor: auto; }
  .cover-head { top: 16px; left: 18px; right: 16px; font-size: 10px; letter-spacing: .2em; }
  .cover-head .mono, .cover-nav .paper-btn { white-space: nowrap; }
  .cover-nav .paper-btn, .paper-btn.motion-btn { padding: 0 12px; font-size: 10px; letter-spacing: .1em; }
  /* The header label and RFI button share the first row; the pause control
     takes the second, under the label, clear of the mark. */
  .cover-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; align-items: start; }
  .cover-actions { display: contents; }
  .cover-nav { grid-column: 2; grid-row: 1; }
  .cover-head > .mono { grid-row: 1; align-self: center; }
  .paper-btn.motion-btn { grid-column: 1; grid-row: 2; justify-self: start; }
  .cover-nav .ghost-on-dusk { display: none; }
  .cover-trace { display: none; }
  .cover-mark { width: 300px; margin-left: -150px; top: 76px; }
  .cover-copy { left: 20px; right: 20px; width: auto; bottom: 120px; }
  .cover-copy p { font-size: 16px; }
  .cover-wordmark { font-size: 56px; }
  .cover-tagline { bottom: 18px; }
  .cover-tagline p { font-size: 84px; }
  .news-card { position: relative; right: auto; bottom: auto; width: auto; margin: 10px 6px 0; }
}

/* ===== Studio note, figures, press, grant mark ===== */
.studio-note {
  padding: 112px 24px 40px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 24px;
}
.sn-label { font-size: 12px; letter-spacing: .26em; color: var(--sand); }
.sn-heading {
  margin: 0; max-width: 900px; font-family: var(--f-display); font-weight: 500;
  font-size: 64px; line-height: 1; letter-spacing: -.03em; text-wrap: balance;
}
.sn-body { margin: 0; max-width: 680px; font-size: 21px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  max-width: 1200px; margin: 0 auto; padding: 40px 48px 56px;
}
.fig { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.fig-n { font-size: 120px; line-height: .9; letter-spacing: -.04em; color: var(--sand); font-variant-numeric: tabular-nums; }
.fig-label { font-size: 16px; color: var(--text-2); }
/* Press: the outlets' names set in a masthead serif rather than their logos,
   each linking to the article so the claim can be checked. */
.press { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: 0 auto 48px; padding: 0 24px; }
.press-label { margin: 0; font-size: 11px; font-weight: 400; letter-spacing: .26em; color: var(--text-2); }
.press-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 56px; margin: 0; padding: 0; list-style: none; }
.press-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 4px 8px;
  text-decoration: none; color: var(--text-1);
}
.press-outlet { font-family: 'Caudex', Georgia, serif; font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.press-meta { font-size: 10px; letter-spacing: .18em; color: var(--text-2); }
.press-item:hover .press-outlet { color: var(--sand); }
.press-item:focus-visible { outline: 2px solid var(--sand); outline-offset: 4px; }
.grant-mark { display: flex; justify-content: center; align-items: center; gap: 28px; margin: 0 auto 80px; padding: 0 24px; }
.grant-mark a { display: flex; align-items: center; min-height: 44px; }
.grant-mark img { display: block; width: 150px; height: auto; }
.gm-rule { display: block; width: 96px; border-top: 1px solid var(--hairline-strong); }

@media (max-width: 879px) {
  .studio-note { padding: 56px 12px 24px; gap: 16px; }
  .sn-heading { font-size: 38px; line-height: 1.02; }
  .sn-body { font-size: 17px; }
  .figures { gap: 8px; padding: 24px 4px 48px; }
  .fig-n { font-size: 56px; }
  .fig-label { font-size: 13px; line-height: 1.3; }
  .gm-rule { width: 48px; }
}

/* ===== Plates ===== */
.plate { padding: 72px 0 64px; }
.plate-head {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 0 20px 18px; font-size: 12px; letter-spacing: .22em; color: var(--text-2);
}
.plate-status {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px;
  border: 1px solid var(--hairline-strong); border-radius: 999px;
}
.plate-window {
  position: relative; border-radius: 28px; overflow: hidden; color: var(--w-text);
  border: 1px solid var(--w-stroke, var(--hairline)); box-sizing: border-box;
  background-color: var(--w-ink);
  background-image:
    radial-gradient(48% 55% at 80% 16%, var(--w-glow-a), transparent 70%),
    radial-gradient(40% 50% at 8% 96%, var(--w-glow-b), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  /* The window stays full-bleed; its content is centred so wide screens don't
     leave the right third empty, and the columns, the screen and the headline
     grow a little between 1440px and ~2200px to use the room. --content is
     the composition's own width (left column, gap, the screen's inset, the
     screen, then the leader tail and label that hang off its right edge), so
     the margins either side come out equal at any width. */
  --col-l: clamp(440px, calc(440px + (100vw - 1440px) * .1), 520px);
  --pr-pad: clamp(56px, calc(56px + (100vw - 1240px) * .32), 120px);
  --screen-w: clamp(340px, calc(340px + (100vw - 1440px) * .1), 410px);
  --tail: clamp(24px, calc(24px + (100vw - 1240px) * .17), 58px);
  --label-w: clamp(170px, calc(170px + (100vw - 1240px) * .2), 210px);
  --content: calc(var(--col-l) + 40px + var(--pr-pad) + 10px + var(--screen-w) + var(--tail) + 17px + var(--label-w));
  --pad-x: max(56px, calc((100% - var(--content)) / 2));
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, var(--col-l)) minmax(0, 1fr);
  min-height: 1040px; padding: 104px var(--pad-x) 200px; box-sizing: border-box;
}
.plate-ghost {
  position: absolute; left: calc(var(--pad-x) - 12px); top: 24px; margin: 0; pointer-events: none;
  display: flex; flex-direction: column; font-size: 196px; line-height: .92;
  letter-spacing: -.04em; color: var(--w-ghost); white-space: nowrap;
}
.plate-left, .plate-right { position: relative; z-index: 1; }
.plate-left { display: flex; flex-direction: column; gap: 48px; }
.plate-headline { display: flex; flex-direction: column; gap: 12px; }
.ph-figure, .ph-promise { font-size: clamp(120px, calc(120px + (100vw - 1440px) * .04), 148px); line-height: .88; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ph-promise { font-size: 72px; color: var(--w-accent); }
.ph-label { font-size: 11px; letter-spacing: .2em; opacity: .78; }
/* The title block is drawn in the product's own palette (plate.world): its
   surface, stroke, muted text and accent, so RefundMyRail's sheet reads as
   RefundMyRail. The fallbacks are the studio's Nexus surfaces. */
.title-block {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
  background: var(--w-surface, var(--surface-2)); color: var(--w-text);
  border: 1px solid var(--w-stroke, var(--hairline-strong)); border-radius: 22px;
}
.tb-name { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: 60px; line-height: .92; letter-spacing: -.03em; }
.tb-pitch { margin: 0; font-size: 17px; line-height: 1.5; color: var(--w-muted, var(--text-2)); }
.tb-pitch b { color: var(--w-text); }
.tb-notes { display: none; }
.tb-meta { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); border-top: 1px solid var(--w-stroke, var(--hairline-strong)); font-size: 14px; }
.tb-meta dt, .tb-meta dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--w-stroke, var(--hairline)); }
.tb-meta dt { font-size: 10px; letter-spacing: .16em; color: var(--w-muted, var(--text-2)); }
.tb-cta {
  justify-content: center; min-height: 48px; font-family: var(--f-body); font-size: 16px; font-weight: 600; letter-spacing: 0;
}
.paper-btn.ink.tb-cta {
  background: var(--w-accent); color: var(--w-on-accent, var(--ground-1)); border-color: var(--w-accent); border-radius: 999px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--w-accent) 28%, transparent);
}
.paper-btn.ink.tb-cta:focus-visible { outline-color: var(--w-accent); }

/* Two columns from 1240px up. Between 1240 and 1440 the room beside the screen
   shrinks, so its padding, the leader's tail and the label column ease down
   together; at 1440 and above they are the original 120 / 58 / 210. */
.plate-right { display: flex; justify-content: flex-start; padding-left: var(--pr-pad); }
.plate-figure { position: relative; }
.pf-frame { position: relative; width: calc(var(--screen-w) + 23px); }
/* The device (outline + screen) tilts on its own layer; the annotations sit on
   a flat overlay of the same size above it, so the labels never slant. */
.pf-device { position: relative; padding: 10px; box-sizing: border-box; }
.pf-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pf-notes {
  position: absolute; left: 10px; top: 10px; pointer-events: none;
  width: var(--screen-w); height: calc(var(--screen-w) * var(--ar));
}
.pf-notes .note { pointer-events: auto; }
.pf-spot-layer { position: absolute; inset: 0; border-radius: 46px; overflow: hidden; pointer-events: none; }
.pf-spot {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; border-radius: 16px;
  box-shadow: 0 0 0 2px var(--w-accent), 0 0 0 999px rgba(6, 7, 10, .6);
}
.pf-outline rect { fill: none; stroke: color-mix(in srgb, var(--w-text) 70%, transparent); stroke-width: 1.5; }
.pf-screen { position: relative; width: var(--screen-w); }
.pf-screen img { display: block; width: 100%; height: auto; border-radius: 46px; }
.pf-dim {
  position: absolute; left: -24px; top: 0; bottom: 0; width: 12px; box-sizing: border-box;
  border-top: 1px solid color-mix(in srgb, var(--w-text) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--w-text) 55%, transparent);
  background: linear-gradient(90deg, transparent 5px, color-mix(in srgb, var(--w-text) 55%, transparent) 5px 6px, transparent 6px);
}
.pf-fig {
  /* Left-anchored so the long caption stays inside the window as it narrows: 311px
     from the frame at 1440 and up (where it sat before), 100px at 1240. */
  position: absolute; left: clamp(100px, calc(100px + (100vw - 1240px) * 1.06), 311px); top: -60px; font-size: 11px; letter-spacing: .22em; opacity: .7; white-space: nowrap; }
.note { position: absolute; display: flex; align-items: center; transform: translate(-5px, -50%); }
.note-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--w-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--w-accent) 22%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.note-num { display: none; }
.note-line {
  /* The first --over pixels lie across the product's screen: dashed and faint so
     they do not strike through its UI. The rest, outside the screen, is solid. */
  --over: calc((1 - var(--fx)) * var(--screen-w) - 5px);
  display: block; transform-origin: left center; height: 1px;
  width: calc((1 - var(--fx)) * var(--screen-w) + var(--tail));
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--w-text) 38%, transparent) 0 4px, transparent 4px 8px),
    linear-gradient(color-mix(in srgb, var(--w-text) 80%, transparent), color-mix(in srgb, var(--w-text) 80%, transparent));
  background-repeat: no-repeat;
  background-position: left center, right center;
  background-size: var(--over) 1px, calc(100% - var(--over)) 1px;
}
.note-label { margin-left: 12px; width: var(--label-w); font-size: 15px; line-height: 1.35; }
.note-label b { display: block; font-weight: 500; font-size: 11px; letter-spacing: .14em; color: var(--w-accent); }
/* In the label column, above note 01: 16px clear of the device outline on the
   left, out into the window's side padding on the right, and its foot 30px
   above note 01's dot (10px + 25% of the screen's height, which is about
   1.98 × its width). Nothing on the app screen is covered. Plate-right's right
   edge is the label column's, so `right` needs no derived padding. */
.moment {
  position: absolute; z-index: 3;
  left: calc(var(--pr-pad) + var(--screen-w) + 39px); right: -40px;
  bottom: calc(100% - var(--screen-w) * .495 + 20px);
}
@media (min-width: 1240px) { .moment .rmr-alert { width: auto; } }
.plate-next { display: flex; justify-content: flex-end; padding: 18px 20px 0; font-size: 12px; letter-spacing: .22em; color: var(--text-2); }

/* RefundMyRail moment */
.rmr-alert {
  position: relative; width: 334px; display: flex; gap: 12px; padding: 14px; border-radius: 18px;
  background: #1E2127; border: 1px solid #2D3036; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.ra-glow {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 1px rgba(245, 197, 24, .7), 0 0 34px rgba(245, 197, 24, .45);
}
.ra-icon {
  width: 40px; height: 40px; flex: none; border-radius: 11px; background: #F5C518; color: #1A1400;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
}
.ra-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ra-meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .62; }
.ra-title { font-weight: 700; font-size: 15px; color: #F5F6F8; }
.ra-body { font-size: 13px; line-height: 1.4; opacity: .72; }

/* RefundMyRail signature */
.signature { position: absolute; z-index: 1; left: var(--pad-x, 56px); right: var(--pad-x, 56px); bottom: 64px; height: 84px; }
.rl-track { position: absolute; left: 0; right: 0; top: 10px; border-top: 2px solid rgba(233, 231, 225, .22); transform-origin: left center; }
.rl-delay { position: absolute; top: 9px; border-top: 4px solid #F5C518; border-radius: 2px; transform-origin: left center; }
.rl-stop {
  position: absolute; top: 4px; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid rgba(233, 231, 225, .6); background: var(--w-ink);
}
.rl-label { position: absolute; top: 34px; transform: translateX(-50%); font-size: 10px; letter-spacing: .16em; opacity: .72; white-space: nowrap; }
.rl-label.first { transform: none; }
.rl-label.last { transform: translateX(-100%); }
.rl-train-run { position: absolute; left: 0; right: 0; top: 0; height: 24px; }
.rl-train {
  position: absolute; left: -10px; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #F5C518;
  box-shadow: 0 0 0 6px rgba(245, 197, 24, .2), 0 0 28px rgba(245, 197, 24, .6);
}
.rl-train-ring {
  position: absolute; left: -10px; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #F5C518; opacity: 0; pointer-events: none;
}
.rl-tag-text { display: inline-block; }
.rl-tag-pos { position: absolute; top: -40px; transform: translateX(-50%); }
.rl-tag {
  display: block; padding: 4px 10px; white-space: nowrap;
  border: 1px solid rgba(245, 197, 24, .55); border-radius: 999px; font-size: 11px; letter-spacing: .16em; color: #F5C518;
}

.page-exit { position: fixed; inset: 0; z-index: 100; }

/* The two-column plate needs 1240px (the leader labels reach ~540px right of the
   screen's left edge there); below that it stacks. */
@media (max-width: 1239px) {
  .plate-window { display: flex; flex-direction: column; min-height: 0; padding: 64px 24px 200px; gap: 32px; }
  .plate-ghost { font-size: 120px; }
  /* Stacked order (spec section 8): headline, then the screen with its moment
     card, then the title block. plate-left stops being a box so its two
     children can be ordered against plate-right; the DOM order is unchanged. */
  .plate-left { display: contents; }
  .plate-headline, .title-block { position: relative; z-index: 1; }
  .plate-headline { order: 1; }
  .plate-right { order: 2; }
  .title-block { order: 3; width: 100%; max-width: 560px; margin-inline: auto; box-sizing: border-box; }
  .plate-right { padding-left: 0; flex-direction: column; align-items: center; gap: 24px; }
  .plate-figure { --screen-w: 260px; }
  .pf-fig { position: static; display: block; margin-top: 12px; text-align: center; white-space: normal; }
  .pf-frame { margin: 0 auto; }
  .note-line, .note-label { display: none; }
  /* Markers sit on the screen's right edge at the feature's height, clear of its UI text. */
  .note { left: 100% !important; transform: translate(-50%, -50%); }
  .note-dot { width: 22px; height: 22px; color: var(--w-on-accent, var(--ground-1)); font-family: var(--f-mono); font-size: 11px; }
  .note-num { display: block; }
  .tb-notes {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px;
    margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35;
  }
  .tb-notes b { display: block; font-weight: 500; font-size: 10px; color: var(--w-accent); }
  .moment { position: static; }
  .signature { left: 24px; right: 24px; bottom: 40px; }
}
@media (max-width: 879px) {
  .plate { padding: 48px 0 0; }
  .plate-head { font-size: 10px; letter-spacing: .18em; padding: 0 8px 12px; }
  .plate-next { font-size: 10px; letter-spacing: .18em; padding: 14px 8px 0; }
  .plate-window { border-radius: 22px; padding: 40px 16px 190px; }
  .plate-ghost { font-size: 78px; left: 16px; top: 18px; }
  .ph-figure { font-size: 72px; }
  .ph-promise { font-size: 44px; }
  .title-block { padding: 22px 20px; }
  .tb-name { font-size: 42px; }
  .rmr-alert { width: auto; max-width: 334px; }
  .rl-label.mid { display: none; }
  /* East Croydon and London Victoria collide on one row at phone width. */
  .rl-label.last { top: 56px; }
  .rl-tag { font-size: 10px; }
  .rl-tag-pos { left: auto !important; right: 0; transform: none; }
}

/* ===== Index of sheets (plates in preparation) ===== */
.sheet-index { max-width: 1100px; margin: 24px auto 96px; border: 1px solid var(--hairline-strong); background: var(--surface-1); }
.si-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--hairline-strong); font-size: 11px; letter-spacing: .2em; }
.si-head h2 { margin: 0; font-size: inherit; font-weight: 400; }
.si-head span { color: var(--text-2); }
.si-row {
  display: grid; grid-template-columns: 48px minmax(0, 200px) minmax(0, 1fr) auto; align-items: center; gap: 16px;
  min-height: 56px; padding: 0 18px; border-bottom: 1px solid var(--hairline); text-decoration: none;
}
.si-row:last-child { border-bottom: 0; }
.si-row:hover { background: rgba(212, 165, 116, .08); }
.si-row:focus-visible { outline: 2px solid var(--sand); outline-offset: -2px; }
.si-n { font-size: 12px; color: var(--text-2); }
.si-name { font-weight: 600; font-size: 17px; }
.si-desc { font-size: 15px; color: var(--text-2); }
.si-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; color: var(--text-2); }
@media (max-width: 879px) {
  .sheet-index { margin: 24px 0 56px; }
  .si-row { grid-template-columns: 32px minmax(0, 1fr); row-gap: 4px; padding: 10px 14px; }
  .si-desc { display: none; }
  .si-status { grid-column: 2; }
}
