/* HENHOUSE — shell stylesheet (JOB shell, 02/12/2026).
   Sources: mockup/v1/DESIGN.md §0–§5 + §10, BORDER_TABLE.md, USER_FIXES.md.
   SCALE (LUAT 50): one root unit --u = 100vw / 1920 from 1280 px up (1920 = mockup 1:1). Below 1280 the phone layout:
   --u = 1px-ish design units are NOT used for type; type tokens switch to fixed phone sizes, content column capped at 720 px.
   BORDERS (LUAT 56): every border/outline of the site lives in THIS file, as one .rule-<component> class per DESIGN.md §4b row.
   Route fragments use the classes and declare zero border/outline. */

/* ------------------------------------------------------------------ 1. tokens */
:root {
  --u: calc(100vw / 1920);
  /* colours (DESIGN.md §3) */
  --paper: #D6ECFB;
  --chrome-ground: #E4EFF8;
  --surface: #FFFFFF;
  --surface-sage: #E6F1E0;
  --ink: #0B2141;
  --muted: #506B8C;
  --label-muted: #566C80;
  --hairline: #CCDCE8;
  --sky-hairline: #A3CEF7;
  --input-edge: #ADC6D3;
  --amber: #E59602;
  --amber-press: #D98700;
  --amber-select: #E78C00;
  --amber-light: #FBC559;
  --amber-soft: #FFF3D6;
  --amber-ink: #8F5400;      /* amber as TEXT on light grounds (contrast ≥ 4.5) */
  --coral: #F45A2A;
  --loss: #B00000;
  --gain: #1F9A3A;
  --sky-bar: #6CB8F2;

  /* fonts (DESIGN.md §2) */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-label: "DM Sans", "Lato", system-ui, sans-serif;
  --f-mono: "Inconsolata", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-word: "Corben", "Fraunces", Georgia, serif;

  /* type scale — USER FIX TYPE SCALE (DESIGN.md §2 BUILD @1920); text never below 12 px */
  --fs-hero: calc(72 * var(--u));
  --fs-title: calc(52 * var(--u));
  --fs-section: calc(34 * var(--u));
  --fs-card: calc(28 * var(--u));
  --fs-number: calc(44 * var(--u));
  --fs-body: max(14px, calc(18 * var(--u)));
  --fs-small: max(13px, calc(16 * var(--u)));
  --fs-meta: max(12px, calc(14 * var(--u)));
  --fs-label: max(12px, calc(14 * var(--u)));
  --fs-cell: max(13px, calc(16 * var(--u)));
  --fs-button: max(13px, calc(16 * var(--u)));

  /* rules (BORDER_TABLE → DESIGN.md §4b); hairlines never under 1 px */
  --rule-1: max(1px, calc(1 * var(--u)));
  --rule-2: max(1px, calc(2 * var(--u)));
  --rule-4: max(2px, calc(4 * var(--u)));
  --rule-hair: var(--hairline);
  --rule-sky: var(--sky-hairline);
  /* card frames sit on the sky ground: mockup edges sample #90C2F2–#A6D1F1, #CCDCE8 vanished there (pre_send 02/12) */
  --rule-card: var(--sky-hairline);
  --rule-input: var(--input-edge);
  --rule-select: var(--amber-select);
  --rule-open: var(--amber-light);

  /* radii + shadows (DESIGN.md §4) */
  --r-card: calc(16 * var(--u));
  --r-control: calc(10 * var(--u));
  --r-button: calc(12 * var(--u));
  --r-chip: calc(8 * var(--u));
  --r-pill: calc(14 * var(--u));
  --shadow-card: 0 calc(10 * var(--u)) calc(28 * var(--u)) rgba(22, 43, 68, .10);
  --shadow-pop: 0 calc(16 * var(--u)) calc(40 * var(--u)) rgba(22, 43, 68, .18);

  /* page frame (frame.json / USER FIX ONE PAGE FRAME) */
  --gutter-l: calc(48 * var(--u));
  --gutter-r: calc(48 * var(--u));
  --gap-card: calc(23 * var(--u));
  --gap-section: calc(64 * var(--u));
  --nav-h: calc(183 * var(--u));

  /* motion (DESIGN.md §10) */
  --ease-egg: cubic-bezier(.34, 1.45, .55, 1);   /* an egg that rolls, overshoots a hair and settles */
  --ease-yolk: cubic-bezier(.22, .9, .3, 1);     /* fills that rise like yolk: quick start, soft stop */
  --dur-tap: 160ms;
  --dur-settle: 420ms;
  --dur-fill: 650ms;
  --rt-nudge: calc(24 * var(--u));
  --rt-dur: 260ms;

  color-scheme: light;
  accent-color: var(--amber);
  scrollbar-color: #9DB9D3 var(--chrome-ground);
}

/* ------------------------------------------------------------------ 2. base */
*, *::before, *::after { box-sizing: border-box; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; background: none; }
:where(button) { cursor: pointer; padding: 0; }
:where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(ul, ol) { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber-light); color: var(--ink); }
:focus-visible { outline: max(2px, calc(3 * var(--u))) solid var(--amber-ink); outline-offset: 2px; border-radius: 4px; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  font: 400 var(--fs-body)/1.45 var(--f-body);
  color: var(--ink);
  overflow-x: clip;
  /* PAGE ATMOSPHERE (DESIGN.md §3b, look 1) — shared by every route: haze glow over a per-screen sky gradient on paper */
  background-color: var(--paper);
  background-image:
    radial-gradient(calc(1100 * var(--u)) calc(700 * var(--u)) at 74% calc(520 * var(--u)), rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #D8EBFA 0%, #CFE9FC 55%, #D6EDFD 100%);
  background-repeat: no-repeat, repeat-y;
  background-size: 100% calc(1400 * var(--u)), 100% calc(1080 * var(--u));
  background-position: 0 0, 0 var(--nav-h);
}
.mono, .tnum { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; font: 700 14px/1 var(--f-label); }
.skip:focus-visible { top: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ 3. type roles (routes use these, never their own sizes for these roles) */
.t-hero { font: 900 var(--fs-hero)/1.02 var(--f-display); letter-spacing: -.01em; }
.t-title { font: 900 var(--fs-title)/1.05 var(--f-display); letter-spacing: -.01em; }
.t-section { font: 900 var(--fs-section)/1.1 var(--f-display); letter-spacing: -.005em; }
.t-card { font: 900 var(--fs-card)/1.1 var(--f-display); }
.t-number { font: 700 var(--fs-number)/1 var(--f-display); letter-spacing: -.016em; font-variant-numeric: tabular-nums; }
.t-label { font: 900 var(--fs-label)/1.2 var(--f-label); letter-spacing: .04em; text-transform: uppercase; }
.t-body { font: 400 var(--fs-body)/1.45 var(--f-body); text-wrap: pretty; }
.t-small { font: 400 var(--fs-small)/1.4 var(--f-body); }
.t-meta { font: 400 var(--fs-meta)/1.35 var(--f-body); color: var(--muted); }
.t-cell { font: 500 var(--fs-cell)/1.3 var(--f-mono); font-variant-numeric: tabular-nums; }
.t-muted { color: var(--muted); }
.c-coral { color: var(--coral); } .c-loss { color: var(--loss); } .c-gain { color: var(--gain); } .c-amber { color: var(--amber-ink); }

/* ------------------------------------------------------------------ 4. ONE PAGE FRAME — every route body sits in .page > .frame */
.page { flex: 1 0 auto; display: block; width: 100%; }
.frame, .page > section, .page > .route {
  width: 100%;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.page > .route > section, .page > .route > .frame { padding-left: 0; padding-right: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap-section); }
.route { display: flex; flex-direction: column; gap: var(--gap-section); padding-top: calc(36 * var(--u)); padding-bottom: calc(56 * var(--u)); }

/* ------------------------------------------------------------------ 5. masthead N2 (mockup B1: 0–179 @1920 + 1 px rule at y 183) */
.masthead {
  position: relative; z-index: 20;
  height: var(--nav-h);
  background: linear-gradient(180deg, #DCEAF6 0%, var(--chrome-ground) 100%);
  display: grid; grid-template-rows: calc(122 * var(--u)) 1fr;
  padding: 0 var(--gutter-r) 0 var(--gutter-l);
}
.masthead__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.masthead__social { display: flex; align-items: center; gap: calc(16 * var(--u)); justify-self: start; }
.masthead__soc { font: 700 max(13px, calc(17 * var(--u)))/1 var(--f-label); color: var(--ink); padding: calc(6 * var(--u)) 0; }
.masthead__soc.is-soon, .colophon a.is-soon { cursor: default; }
a[data-launch-done].masthead__soc:hover { color: var(--amber-ink); }
.brand { display: inline-flex; align-items: center; gap: calc(21 * var(--u)); justify-self: center; }
.brand__mark { height: calc(46 * var(--u)); min-height: 36px; width: auto; }
.brand__word { font: 700 calc(38 * var(--u))/1 var(--f-word); letter-spacing: .03em; color: var(--ink); }
.masthead__buy { justify-self: end; }
.nav-buy {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: calc(94 * var(--u)); height: calc(42 * var(--u)); padding: 0 calc(22 * var(--u));
  border-radius: var(--r-pill);
  background: #FFFDF6;
  font: 700 max(13px, calc(17 * var(--u)))/1 var(--f-label); color: var(--amber-ink); letter-spacing: .02em;
  white-space: nowrap;
}
.nav-buy.is-soon { cursor: default; }
.nav-buy[data-launch-done] { background: var(--amber); color: #fff; box-shadow: 0 calc(3 * var(--u)) 0 var(--amber-press); cursor: pointer; transition: transform var(--dur-tap) var(--ease-egg); }
.nav-buy[data-launch-done]:hover { transform: translateY(-1px); }
.nav-buy[data-launch-done]:active { transform: translateY(1px) scale(.98); }
.routes { display: flex; justify-content: center; align-items: flex-start; gap: calc(85 * var(--u)); padding-top: calc(10 * var(--u)); }
.routes a {
  position: relative; font: 700 max(13px, calc(17 * var(--u)))/1 var(--f-body); color: var(--ink);
  padding: calc(6 * var(--u)) 0 calc(10 * var(--u)); white-space: nowrap;
  transition: color var(--dur-tap) ease;
}
.routes a::after { /* the active egg-yolk bar */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: max(2px, calc(3 * var(--u)));
  border-radius: 3px; background: var(--amber); transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform var(--dur-settle) var(--ease-egg);
}
.routes a:hover { color: var(--amber-ink); }
.routes a.is-active { color: var(--amber-ink); }
.routes a.is-active::after { transform: scaleX(1); }

/* ------------------------------------------------------------------ 6. colophon F2 (mockup B9: 1992–2117 @1920, 4 columns with hairline dividers) */
.colophon { background: #E6F0F8; margin-top: auto; padding: calc(23 * var(--u)) var(--gutter-r) calc(26 * var(--u)) var(--gutter-l); }
.colophon__grid { display: grid; grid-template-columns: 570fr 502fr 296fr 456fr; }
.colophon__col { padding: calc(6 * var(--u)) calc(30 * var(--u)) calc(4 * var(--u)) calc(31 * var(--u)); min-width: 0; }
.colophon__head { font: 900 max(12px, calc(13 * var(--u)))/1.2 var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-bottom: calc(10 * var(--u)); }
.colophon__text { font: 400 max(12px, calc(15 * var(--u)))/1.4 var(--f-body); color: var(--label-muted); }
.colophon__text a:hover { color: var(--ink); }
.colophon__ca { margin-top: calc(6 * var(--u)); }
.colophon__col--brand { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(16 * var(--u)); }
.colophon__mark { height: calc(48 * var(--u)); min-height: 36px; width: auto; flex: none; }

/* ------------------------------------------------------------------ 7. shared components (DESIGN.md §5) — look only; routes compose them */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.card--sage { background: var(--surface-sage); border-radius: var(--r-card); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: calc(60 * var(--u)); padding: 0 calc(28 * var(--u));
  border-radius: var(--r-button); font: 700 var(--fs-button)/1 var(--f-label); white-space: nowrap;
  transition: transform var(--dur-tap) var(--ease-egg), background-color var(--dur-tap) ease;
}
.btn--primary { background: var(--amber); color: #fff; box-shadow: 0 calc(3 * var(--u)) 0 var(--amber-press); }
.btn--primary:hover { background: #EDA011; transform: translateY(-1px); }
.btn--primary:active { transform: translateY(1px) scale(.98); }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { background: #DCE6EF; color: #7D93AA; box-shadow: none; cursor: not-allowed; transform: none; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: var(--r-control); overflow: hidden; background: var(--surface); }
.seg > button, .seg > [role="tab"] {
  min-height: calc(50 * var(--u)); padding: 0 calc(18 * var(--u));
  font: 700 var(--fs-button)/1 var(--f-label); color: var(--ink); white-space: nowrap;
  transition: background-color var(--dur-tap) ease, color var(--dur-tap) ease;
}
.seg > [aria-pressed="true"], .seg > [aria-selected="true"], .seg > .is-on { background: var(--amber); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: .4em; padding: calc(4 * var(--u)) calc(10 * var(--u)); border-radius: var(--r-chip); font: 700 var(--fs-meta)/1.2 var(--f-label); background: var(--amber-soft); color: var(--amber-ink); }
.chip--sage { background: var(--surface-sage); color: #2F5B3A; }
.status { display: inline-flex; align-items: center; gap: .45em; font: 400 var(--fs-meta)/1.3 var(--f-body); color: var(--muted); }
.status::before { content: ""; width: max(7px, calc(8 * var(--u))); height: max(7px, calc(8 * var(--u))); border-radius: 50%; background: var(--muted); flex: none; }
.status[data-state="fresh"]::before { background: var(--gain); }
.status[data-state="error"]::before { background: var(--loss); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; background: var(--surface); border-radius: var(--r-card); }
.strip > * { padding: calc(20 * var(--u)) calc(28 * var(--u)); min-width: 0; }
.copy-field { display: flex; align-items: center; gap: calc(10 * var(--u)); padding: calc(8 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u)) calc(16 * var(--u)); border-radius: var(--r-control); background: var(--surface); min-width: 0; }
.copy-field > .mono { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-cell); }
.copy-field > button { flex: none; padding: calc(8 * var(--u)) calc(14 * var(--u)); border-radius: var(--r-chip); background: var(--amber-soft); color: var(--amber-ink); font: 700 var(--fs-meta)/1 var(--f-label); }
.atm-haze { background-image: radial-gradient(closest-side, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0)); }
.art { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.art-box { position: relative; pointer-events: none; }
.art-box > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ------------------------------------------------------------------ 8. BORDER CLASSES — one per framed component of DESIGN.md §4b (widths from BORDER_TABLE) */
/* chrome */
.rule-nav { border-bottom: var(--rule-1) solid var(--rule-hair); }
.rule-footer { border-top: var(--rule-1) solid var(--rule-hair); }
.rule-col { border-left: var(--rule-1) solid var(--rule-hair); }
.rule-nav-buy { border: max(1px, calc(1.5 * var(--u))) solid var(--amber); }
.rule-nav-buy[data-launch-done] { border-color: var(--amber-press); }
/* generic families (use the named component class below when one exists) */
.rule-panel, .rule-book-panel, .rule-risk-strip, .rule-hero-card, .rule-continued-table, .rule-shelf-card, .rule-plan-card, .rule-card-thin
  { border: var(--rule-1) solid var(--rule-card); border-radius: var(--r-card); }
.rule-card, .rule-replay-controls, .rule-replay-card, .rule-summary-card, .rule-pick-card, .rule-stall-summary, .rule-stall-table,
.rule-position-card, .rule-market-source, .rule-hen-card, .rule-settings-card, .rule-rate-strip, .rule-preview-card, .rule-receipt-card,
.rule-lifecycle-card, .rule-steps-strip, .rule-metric-strip, .rule-montra-card, .rule-note-strip, .rule-buy-card, .rule-network-card,
.rule-share-card, .rule-launch-note
  { border: var(--rule-2) solid var(--rule-card); border-radius: var(--r-card); }
.rule-bottom-card, .rule-source-strip { border: var(--rule-2) solid var(--rule-sky); border-radius: var(--r-card); }
/* home */
.rule-book-card { border: var(--rule-2) solid var(--rule-hair); border-radius: var(--r-button); }
.rule-book-card--selected, .rule-book-card.is-selected, .rule-book-card[aria-pressed="true"], .rule-book-card[aria-selected="true"]
  { border: var(--rule-4) solid var(--rule-select); border-radius: var(--r-button); }
.rule-egg-divider, .rule-detail-row { border-bottom: var(--rule-2) solid var(--rule-hair); }
.rule-detail-divider { border-left: var(--rule-2) solid var(--rule-hair); }
/* controls */
.rule-segmented, .rule-tabs, .rule-volume-seg, .rule-fee-bar, .rule-metric-row, .rule-pick-field, .rule-copy-field
  { border: var(--rule-2) solid var(--rule-hair); border-radius: var(--r-control); }
.rule-sort, .rule-worst-pill, .rule-wallet-pill, .rule-input
  { border: var(--rule-1) solid var(--rule-hair); border-radius: var(--r-control); }
.rule-seg-cell + .rule-seg-cell { border-left: var(--rule-1) solid var(--rule-hair); }
.rule-hen-input { border: var(--rule-2) solid var(--rule-input); border-radius: var(--r-control); }
.rule-rpc-field { border: var(--rule-2) solid var(--rule-input); border-radius: var(--r-control); }
.rule-receipt-button, .rule-button-ghost { border: var(--rule-2) solid #ABC4E4; border-radius: var(--r-button); }
.rule-chip { border: var(--rule-1) solid var(--rule-hair); border-radius: var(--r-chip); }
/* tables + rows: rows draw ONLY their bottom rule; framed rows each own a full frame with a gap (never a shared edge) */
.rule-row, .rule-ledger-row, .rule-continued-row, .rule-receipt-row, .rule-share-row, .rule-wallet-row, .rule-chart-grid
  { border-bottom: var(--rule-1) solid var(--rule-hair); }
.rule-row:last-child, .rule-ledger-row:last-child, .rule-continued-row:last-child, .rule-receipt-row:last-child,
.rule-share-row:last-child, .rule-wallet-row:last-child { border-bottom-color: transparent; }
.rule-ledger-row--open, .rule-ledger-row.is-open { border: var(--rule-2) solid var(--rule-open); border-radius: var(--r-control); background: var(--amber-soft); }
.rule-continued-row--open, .rule-continued-row.is-open { border: var(--rule-2) solid #FDA829; border-radius: var(--r-control); background: var(--amber-soft); }
.rule-shelf-row, .rule-stall-row, .rule-acc-step, .rule-buy-step
  { border: var(--rule-2) solid var(--rule-hair); border-radius: var(--r-control); }
.rule-buy-step { border-radius: var(--r-button); }
.rule-shelf-row--selected, .rule-shelf-row.is-selected, .rule-shelf-row[aria-selected="true"], .rule-shelf-row[aria-pressed="true"],
.rule-stall-row--selected, .rule-stall-row.is-selected, .rule-stall-row[aria-selected="true"], .rule-stall-row[aria-pressed="true"]
  { border: var(--rule-4) solid var(--rule-select); border-radius: var(--r-control); }
.rule-acc-step.is-open, .rule-acc-step[open], .rule-buy-step.is-open, .rule-buy-step[open] { background: var(--surface-sage); }
/* popover (wallet list) */
/* deploy fix 02/12: open ledger row = row frame + detail frame sharing one amber edge (BORDER_TABLE ledger-row--open) */
.rule-ledger-row--open > [data-ledger-detail], .rule-ledger-row.is-open > [data-ledger-detail] { border-top: var(--rule-2) solid var(--rule-open); }
/* deploy fix 02/12: shelf rows are stacked T/B rows — adjacent rows share one edge (never both draw it) */
@media (min-width: 1280px) { .rule-shelf-row + .rule-shelf-row:not(.is-selected):not([aria-selected="true"]):not([aria-pressed="true"]) { border-top-width: 0; } }
.rule-popover { border: var(--rule-1) solid var(--rule-hair); border-radius: var(--r-button); box-shadow: var(--shadow-pop); }

/* ------------------------------------------------------------------ 9. MOTION (DESIGN.md §10) — the hen never moves; eggs roll, settle and fill */
.egg-in { opacity: 0; transform: translateY(calc(14 * var(--u))) rotate(-2.5deg); transform-origin: 50% 100%; }
.egg-in.is-in { opacity: 1; transform: none; transition: opacity 260ms ease-out, transform var(--dur-settle) var(--ease-egg); transition-delay: calc(var(--egg-i, 0) * 55ms); }
.egg-wobble { animation: hh-wobble 520ms var(--ease-egg) 1; transform-origin: 50% 90%; }
@keyframes hh-wobble { 0% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 55% { transform: rotate(3deg); } 80% { transform: rotate(-1deg); } 100% { transform: rotate(0); } }
.fresh-tick { animation: hh-fresh 900ms ease-out 1; }
@keyframes hh-fresh { 0% { background-color: var(--amber-soft); } 100% { background-color: transparent; } }
.grow-x { transform-origin: 0 50%; transform: scaleX(0); }
.grow-x.is-in { transform: scaleX(1); transition: transform var(--dur-fill) var(--ease-yolk); transition-delay: calc(var(--egg-i, 0) * 70ms); }
.grow-y { transform-origin: 50% 100%; transform: scaleY(0); }
.grow-y.is-in { transform: scaleY(1); transition: transform var(--dur-fill) var(--ease-yolk); transition-delay: calc(var(--egg-i, 0) * 70ms); }
.lift { transition: transform var(--dur-tap) var(--ease-egg), box-shadow var(--dur-tap) ease; }
.lift:hover { transform: translateY(calc(-3 * var(--u))); box-shadow: 0 calc(14 * var(--u)) calc(32 * var(--u)) rgba(22, 43, 68, .14); }
/* rolling egg: decoration that rolls along a path (art layer only) */
.egg-roll { animation: hh-roll 6s var(--ease-egg) infinite; }
@keyframes hh-roll { 0%, 12% { transform: translate(0, 0) rotate(0); } 40% { transform: translate(var(--roll-x, 60px), var(--roll-y, 40px)) rotate(240deg); } 48% { transform: translate(var(--roll-x, 60px), var(--roll-y, 40px)) rotate(225deg); } 88%, 100% { transform: translate(0, 0) rotate(0); opacity: 1; } }
/* art parallax ≤ 20 px, art only (MODERN_WEB rule 1) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .art-drift { animation: hh-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes hh-drift { from { transform: translateY(calc(20 * var(--u))); } to { transform: translateY(calc(-20 * var(--u))); } }
  }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--rt-dur); }
@media (prefers-reduced-motion: reduce) {
  .egg-in, .egg-in.is-in, .grow-x, .grow-x.is-in, .grow-y, .grow-y.is-in { opacity: 1; transform: none; transition: none; }
  .egg-wobble, .fresh-tick, .egg-roll, .art-drift { animation: none !important; }
  .lift, .lift:hover, .btn, .routes a::after { transition: none; transform: none; }
  .routes a.is-active::after { transform: scaleX(1); }
}

/* ------------------------------------------------------------------ 10. wide screens (1280–2560 keep the 1920 proportions via --u; nothing to cap) */
@media (min-width: 2561px) { :root { --u: calc(2560px / 1920); } .page, .masthead, .colophon { max-width: none; } }

/* ------------------------------------------------------------------ 11. PHONE LAYOUT 360–1279 (LUAT 71): one column capped at 720 px, centred; ground fills the screen */
@media (max-width: 1279.98px) {
  :root {
    --u: 1px;
    --fs-hero: 40px; --fs-title: 34px; --fs-section: 26px; --fs-card: 22px; --fs-number: 32px;
    --fs-body: 16px; --fs-small: 15px; --fs-meta: 13px; --fs-label: 12px; --fs-cell: 14px; --fs-button: 15px;
    --gutter-l: 16px; --gutter-r: 16px; --gap-card: 16px; --gap-section: 40px; --nav-h: auto;
    --r-card: 14px; --r-control: 10px; --r-button: 12px;
    --rt-nudge: 16px;
  }
  body { background-size: 100% 900px, 100% 900px; background-position: 0 0, 0 0; }
  .frame, .page > section, .page > .route { max-width: 752px; margin-left: auto; margin-right: auto; }
  .page > .route { padding-top: 24px; padding-bottom: 40px; }
  .masthead { height: auto; grid-template-rows: auto auto; padding: 12px 16px 0; }
  .masthead__top { grid-template-columns: auto 1fr auto; grid-template-areas: "brand social buy"; gap: 10px; max-width: 720px; width: 100%; margin: 0 auto; }
  .brand { grid-area: brand; justify-self: start; gap: 8px; }
  .brand__mark { height: 36px; }
  .brand__word { font-size: 19px; letter-spacing: .02em; }
  .masthead__social { grid-area: social; justify-self: end; gap: 12px; }
  .masthead__soc { font-size: 14px; padding: 8px 0; }
  .masthead__buy { grid-area: buy; }
  .nav-buy { height: 36px; min-width: 56px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
  .routes {
    justify-content: flex-start; gap: 22px; padding: 10px 2px 0; margin: 0 auto; width: 100%; max-width: 720px;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .routes::-webkit-scrollbar { display: none; }
  .routes a { font-size: 15px; padding: 8px 0 12px; scroll-snap-align: start; flex: none; }
  .colophon { padding: 20px 16px 28px; }
  .colophon__grid { grid-template-columns: 1fr 1fr; row-gap: 18px; max-width: 720px; margin: 0 auto; }
  .colophon__col { padding: 2px 12px 2px 14px; }
  .colophon__head { font-size: 12px; margin-bottom: 6px; }
  .colophon__text { font-size: 13px; overflow-wrap: anywhere; }
  .colophon__mark { height: 36px; }
  .strip { grid-auto-flow: row; }
  .btn { min-height: 48px; padding: 0 20px; }
  .seg > button, .seg > [role="tab"] { min-height: 44px; padding: 0 12px; }
}
@media (max-width: 560px) {
  .colophon__grid { grid-template-columns: 1fr; }
  .masthead__social { gap: 10px; }
}
@media (max-width: 380px) {
  .brand__word { font-size: 17px; }
  .masthead__top { gap: 8px; }
  .masthead__soc { font-size: 13px; }
}
