/* =============================================================================
   APTAVIA 2.0 · spine kit · SHELL SHEET · wave 1b, builder B (5 Oct 2026)
   Port of walk/shared/spine.css (kit 2.3): tokens, light-mode law classes, the header
   row, the chip, plaques, the clock hide. Names: --spn-*, .spn-*, data-spn-* (--sec-*
   keep the design's spelling). Served as a static link (spec 2.4); public/spine/v2/ is
   the byte-identical copy and lib/spine/v2/css-shell.ts its hash. Every rule is scoped
   under [data-liquid]; dark first (html.dark), then light; no looping animation, no
   backdrop-filter, no blur over 8 px. The long-form reasons live in
   docs/APTAVIA2_SPINE_SHARED_2026-10-05.md section 4 and wave1/W1B-SHELL.md.
   ============================================================================= */


/* 1 · tokens */
[data-liquid] {
  /* shell inks and glass (light, the default) */
  --spn-page: #F7F5FC; --spn-card: #FFFFFF; --spn-raised: #EEE8F6; --spn-wash: #EDE4FF;
  --spn-ink: #211B37; --spn-body: #4A4560; --spn-muted: #655E79; --spn-line: #DDD5E8;
  --spn-primary: #6824C7; --spn-sign: #211B37; --spn-lit: #211B37; --spn-focus: #6824C7;
  --spn-well: #FFFFFF; --spn-opaque: #F4EFF9; --spn-edge: #D1CBE5;
  /* the ONE ground: every world stands on it by day (near-white, a 2 % violet tint) */
  --spn-ground: #F7F5FC;
  /* the Colonnade's light */
  --spn-door-light: #211B37; --spn-door-soft: #CBC7D3; --spn-door-pale: #E7E4EC;
  --spn-font: var(--font-ui, 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif);
  --spn-pill-bg: rgba(255, 255, 255, .94);
  --spn-spec: rgba(255, 255, 255, 1);               /* glass reads by its edges */
  --spn-shade: rgba(34, 20, 70, .14);               /* … and a darker edge bottom-right */
  --spn-contact: 0 1px 1px rgba(34, 20, 70, .10), 0 2px 5px -2px rgba(34, 20, 70, .22);
  --spn-gutter: 48px;
  --spn-hgap: 12px;                                 /* the gap between the row's pieces */
  --spn-th-h: 56px;                                 /* pages pad their first words below this */

  /* section colours (SPINE §4) */
  --sec-1: #A8338E;    /* Section I · the Gallery (orchid) */
  --sec-2: #6824C7;    /* Section II · the Studio (violet = --primary) */
  --sec-3: #2F6ABF;    /* Section III · the Lab (cobalt) */
  --sec-on: #FFFFFF;   /* numerals on a filled section body */
  --sec-wash-mix: 12%;
  --sec-room-mix: 16%;

  /* gold is EARNED ONLY: light is ink on a paper plate, never a glow */
  --spn-gold: #85601F; --spn-gold-plate: #FFF5DC; --spn-gold-edge: #C9A55A;

  /* the derived tokens resolve where they are declared */
  --sec-1-wash: color-mix(in oklch, var(--sec-1) var(--sec-wash-mix), transparent);
  --sec-2-wash: color-mix(in oklch, var(--sec-2) var(--sec-wash-mix), transparent);
  --sec-3-wash: color-mix(in oklch, var(--sec-3) var(--sec-wash-mix), transparent);
  --sec-1-room: color-mix(in oklch, var(--sec-1) var(--sec-room-mix), transparent);
  --sec-2-room: color-mix(in oklch, var(--sec-2) var(--sec-room-mix), transparent);
  --sec-3-room: color-mix(in oklch, var(--sec-3) var(--sec-room-mix), transparent);
  --sec-1-rim: var(--sec-1); --sec-2-rim: var(--sec-2); --sec-3-rim: var(--sec-3);
  --sec-1-deep: color-mix(in oklch, var(--sec-1) 35%, #08070C);
  --sec-2-deep: color-mix(in oklch, var(--sec-2) 35%, #08070C);
  --sec-3-deep: color-mix(in oklch, var(--sec-3) 35%, #08070C);
  /* I·III: two-tone, a hard stop, never a smeared gradient */
  --sec-13: linear-gradient(90deg, var(--sec-1) 0 50%, var(--sec-3) 50% 100%);
}
html.dark [data-liquid] {
  --spn-page: #08070C; --spn-card: #17131F; --spn-raised: #231A30; --spn-wash: #31203F;
  --spn-ink: #F5F1FA; --spn-body: #DDD5E7; --spn-muted: #B6ABC6; --spn-line: #40324F;
  --spn-primary: #BC94FF; --spn-sign: oklch(0.80 0.09 84); --spn-lit: oklch(0.80 0.09 84); --spn-focus: #CCACFF;
  --spn-well: #100D17; --spn-opaque: #1D1527; --spn-edge: #564366;
  --spn-ground: #08070C;
  --spn-door-light: #F2EEF8; --spn-door-soft: #D9D5E0; --spn-door-pale: #ECE8F1;
  --spn-pill-bg: rgba(23, 19, 31, .90);
  --spn-spec: rgba(230, 206, 255, .20);
  --spn-shade: rgba(0, 0, 0, .55);
  --spn-contact: 0 1px 0 rgba(0, 0, 0, .5), 0 6px 16px -8px rgba(0, 0, 0, .8);

  --sec-1: #DC73C1;    /* dark: light, not ink */
  --sec-2: #BC94FF;
  --sec-3: #A2C7F8;
  --sec-on: #120E1A;
  --sec-wash-mix: 22%;
  --sec-room-mix: 38%; /* rooms, floors and buildings at rest read in their own hue */

  --spn-gold: #EAC862; --spn-gold-plate: transparent; --spn-gold-edge: #EAC862;
}
/* per-element section shorthands */
[data-liquid] [data-sec="1"] { --sec: var(--sec-1); --sec-wash: var(--sec-1-wash); --sec-room: var(--sec-1-room); --sec-deep: var(--sec-1-deep); }
[data-liquid] [data-sec="2"] { --sec: var(--sec-2); --sec-wash: var(--sec-2-wash); --sec-room: var(--sec-2-room); --sec-deep: var(--sec-2-deep); }
[data-liquid] [data-sec="3"] { --sec: var(--sec-3); --sec-wash: var(--sec-3-wash); --sec-room: var(--sec-3-room); --sec-deep: var(--sec-3-deep); }

/* gold: EARNED ONLY (streak 30/100, a target met on an ACER-reported result, "Highest of N", best mock per Q1). */
[data-liquid] .spn-gold { color: var(--spn-gold); }
[data-liquid] .spn-gold-plate {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px;
  color: var(--spn-gold); background: var(--spn-gold-plate); border: 1px solid var(--spn-gold-edge);
  font: 600 12px/1.4 var(--spn-font);
}
html.dark [data-liquid] .spn-gold-plate { background: linear-gradient(180deg, rgba(234, 200, 98, .16), rgba(234, 200, 98, .06)); }


/* 2 · light-mode law classes (SPINE §5.1) */
/* Glass reads by its edges */
[data-liquid] .spn-glass {
  border: 1px solid var(--spn-line);
  background: color-mix(in srgb, var(--spn-card) 88%, transparent);
  box-shadow: inset 1px 1px 0 var(--spn-spec), inset -1px -1px 0 var(--spn-shade), var(--spn-contact);
}
[data-liquid] .spn-contact { box-shadow: var(--spn-contact); }
/* A room, floor or building body in its section hue: a wash in dark, stained glass and an ink rim in light. */
[data-liquid] .spn-room[data-sec] { background-color: var(--sec-room); border-color: var(--sec); }
[data-liquid] .spn-stained[data-sec] { background-color: var(--sec-wash); border: 1px solid var(--sec); }
/* An emissive light: a halo in dark (at most 40 %), a hard core with no halo in light. */
[data-liquid] .spn-halo { box-shadow: 0 0 14px 2px color-mix(in srgb, var(--sec, var(--sec-2)) 36%, transparent); }
html:not(.dark) [data-liquid] .spn-halo { box-shadow: 0 1px 2px rgba(34, 20, 70, .28); filter: none; }
/* The light under a door: a crisp threshold line, never a cloud. */
[data-liquid] .spn-line-light { height: 1.5px; background: #FFFFFF; box-shadow: 0 0 6px rgba(255, 255, 255, .55); }
html:not(.dark) [data-liquid] .spn-line-light { background: var(--spn-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
/* The ONE light ground */
html:not(.dark) [data-liquid] [data-spn-ground] { background: var(--spn-ground) !important; }
/* Smoke switch: tag motes, haze, bloom, fog and particle layers data-spn-smoke */
html:not(.dark) [data-liquid] [data-spn-smoke] { display: none !important; }
/* A ruled dark island in light mode (Results Day): a framed window with a crisp edge and the DARK inks inside. */
html:not(.dark) [data-liquid] .spn-dark-island {
  color-scheme: dark; border-radius: 16px; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1px var(--spn-ink), var(--spn-contact);
}
[data-liquid] .spn-dark-island {
  --sec-1: #DC73C1; --sec-2: #BC94FF; --sec-3: #A2C7F8; --sec-on: #120E1A; --sec-wash-mix: 22%; --sec-room-mix: 38%;
  --sec-1-wash: color-mix(in oklch, var(--sec-1) var(--sec-wash-mix), transparent);
  --sec-2-wash: color-mix(in oklch, var(--sec-2) var(--sec-wash-mix), transparent);
  --sec-3-wash: color-mix(in oklch, var(--sec-3) var(--sec-wash-mix), transparent);
  --sec-1-room: color-mix(in oklch, var(--sec-1) var(--sec-room-mix), transparent);
  --sec-2-room: color-mix(in oklch, var(--sec-2) var(--sec-room-mix), transparent);
  --sec-3-room: color-mix(in oklch, var(--sec-3) var(--sec-room-mix), transparent);
  --sec-1-rim: var(--sec-1); --sec-2-rim: var(--sec-2); --sec-3-rim: var(--sec-3);
  --sec-1-deep: color-mix(in oklch, var(--sec-1) 35%, #08070C);
  --sec-2-deep: color-mix(in oklch, var(--sec-2) 35%, #08070C);
  --sec-3-deep: color-mix(in oklch, var(--sec-3) 35%, #08070C);
  --sec-13: linear-gradient(90deg, var(--sec-1) 0 50%, var(--sec-3) 50% 100%);
  --spn-gold: #EAC862; --spn-gold-plate: transparent; --spn-gold-edge: #EAC862;
}
[data-liquid] .spn-dark-island .spn-gold-plate { background: linear-gradient(180deg, rgba(234, 200, 98, .16), rgba(234, 200, 98, .06)); }


/* 3 · scene plaques and hit areas (SPINE §5.3): hover lifts 4 px once, no scale; 44 px hit areas; focus ring always visible */
/* Every clickable scene object: a pointer, an opacity-only glow, one plaque button. */
[data-liquid] .spn-plaque {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 12px; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--spn-primary) 46%, var(--spn-line));
  background: var(--spn-pill-bg); color: var(--spn-ink); font: 600 14px/1.15 var(--spn-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: inset 1px 1px 0 var(--spn-spec), inset -1px -1px 0 var(--spn-shade), var(--spn-contact);
  transition: transform .24s cubic-bezier(.3, .6, .2, 1), border-color .24s linear;
}
[data-liquid] .spn-plaque .spn-sec {
  display: inline-grid; place-items: center; width: 26px; height: 26px; aspect-ratio: 1; flex: none; border-radius: 50%;
  border: 1.5px solid currentColor; color: var(--spn-ink); font: 800 11px/1 var(--spn-font);
}
[data-liquid] .spn-plaque[data-sec] .spn-sec { color: var(--sec); }
[data-liquid] .spn-plaque .spn-arrow { display: block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-liquid] .spn-plaque:hover, [data-liquid] .spn-plaque.is-lit,
[data-liquid] [data-spn-object]:hover .spn-plaque, [data-liquid] [data-spn-object]:focus-within .spn-plaque { transform: translateY(-4px); border-color: var(--spn-primary); }
[data-liquid] .spn-plaque:focus-visible, [data-liquid] .spn-hit:focus-visible { outline: 3px solid var(--spn-focus); outline-offset: 3px; }
[data-liquid] .spn-hit { position: absolute; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 12px; }
[data-liquid] [data-spn-object] { cursor: pointer; }
[data-liquid] [data-spn-object] [data-spn-glow] { opacity: .55; transition: opacity .24s linear; }
[data-liquid] [data-spn-object]:is(:hover, :focus-within) [data-spn-glow] { opacity: 1; }
@media (prefers-reduced-motion: reduce) { [data-liquid] .spn-plaque { transition: none; } }
[data-liquid][data-paused="true"] .spn-plaque, html[data-spn-paused="true"] [data-liquid] .spn-plaque { transition: none; }


/* 4 · the header row: 56 px on desktop, 92 px on phones, first child of <main>, in normal flow (never fixed). */
[data-liquid] .spn-header, [data-liquid] .spn-header-ph { box-sizing: border-box; }
[data-liquid] .spn-header * { box-sizing: border-box; }
[data-liquid] .spn-header-ph { height: var(--spn-th-h); flex: none; }
[data-liquid] .spn-header {
  flex: none;
  position: relative; z-index: 40; width: 100%;
  height: var(--spn-th-h); padding: 0 var(--spn-gutter);
  container: spn-row / inline-size;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "back place chip pause";
  align-items: center; column-gap: var(--spn-hgap);
  font: 500 13px/1 var(--spn-font); color: var(--spn-body); -webkit-font-smoothing: antialiased;
}
/* inside the frame's padded <main class="workspace"> the row sits on the page's own content edge */
[data-liquid] .workspace > .spn-header { padding-inline: 0; }
/* the design's overlay mode, opt-in per page */
[data-liquid] main:has([data-spn-overlay]) { position: relative; }
[data-liquid] main:has([data-spn-overlay]) .spn-header { position: absolute; top: 0; left: 0; right: 0; max-width: none; padding-inline: var(--spn-gutter); pointer-events: none; }
[data-liquid] main:has([data-spn-overlay]) .spn-header > * { pointer-events: auto; }
/* ... and so does the row's placeholder while the lazy header loads (a cold load), so an overlay scene never starts one
   row lower and jumps up when the header resolves (integrator, wave 2) */
[data-liquid] main:has([data-spn-overlay]) .spn-header-ph { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }

/* the place (kit 2.1): the sign and the strip never run under the chip and never scroll silently. */
[data-liquid] .spn-place {
  grid-area: place; container: spn-place / inline-size;
  display: flex; flex-flow: row-reverse wrap; justify-content: flex-end; align-items: center; align-content: flex-start;
  column-gap: 14px; row-gap: 24px; min-width: 0; height: calc(var(--spn-strip-h, 44px) + 8px); margin: -4px; padding: 4px; overflow: hidden;
}
[data-liquid] .spn-place > .spn-strip { order: -1; }
/* glass pills: no backdrop-filter (a named snapshot drops it, so the row would change look mid-move) */
[data-liquid] :is(.spn-back, .spn-strip, .spn-chip, .spn-pause, .spn-theme, .spn-menu) {
  border: 1px solid var(--spn-line);
  background: var(--spn-pill-bg);
  box-shadow: inset 1px 1px 0 var(--spn-spec), inset -1px -1px 0 var(--spn-shade), var(--spn-contact);
}
[data-liquid] .spn-back {
  grid-area: back; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  color: var(--spn-ink); text-decoration: none; font: 600 14px/1 var(--spn-font); white-space: nowrap; cursor: pointer;
}
[data-liquid] .spn-back[hidden] { display: none; }
[data-liquid] .spn-back svg { display: block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-liquid] .spn-back .spn-back-s { display: none; }
[data-liquid] .spn-back:hover { border-color: color-mix(in srgb, var(--spn-primary) 55%, var(--spn-line)); }
[data-liquid] .spn-sign {
  margin: 0; flex: none; font: 600 12px/1.3 var(--spn-font); letter-spacing: .14em; text-transform: uppercase; color: var(--spn-sign); white-space: nowrap;
}
/* Round 19 · contrast: the Real look is a white workspace in both themes, and on a phone the overlay header's sign lies over its nav (#f4f4f4): the sign takes the day's ink there (1.8 in the night's brass); wave 19 (sign-ink): ink, never violet */
[data-liquid] main:has(.mock-real-review) .spn-sign { color: #211B37; }
[data-liquid] .spn-strip {
  flex: none; display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 3px; border-radius: 999px;
  max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
}
[data-liquid] .spn-strip::-webkit-scrollbar { display: none; }
[data-liquid] .spn-strip a, [data-liquid] .spn-strip > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; min-width: 56px; padding: 0 10px; border-radius: 999px; flex: none;
  color: var(--spn-muted); font: 600 13px/1 var(--spn-font); text-decoration: none; white-space: nowrap;
}
[data-liquid] .spn-strip a:focus-visible { outline-offset: -3px; }   /* inside the pill, so the strip's own clip never cuts the ring */
[data-liquid] .spn-strip a { cursor: pointer; }
[data-liquid] .spn-strip a:hover { color: var(--spn-ink); }
[data-liquid] .spn-strip > span.spn-crumb-sep { padding: 0 2px; min-height: 0; min-width: 0; color: var(--spn-muted); }
/* a step is a pill, never a near-circle */
[data-liquid] .spn-strip i { display: block; width: 6px; height: 6px; aspect-ratio: 1; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }
[data-liquid] .spn-strip [aria-current] { color: var(--spn-ink); background: var(--spn-well); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--spn-lit) 62%, var(--spn-line)); }
[data-liquid] .spn-strip [aria-current] i { opacity: 1; background: var(--spn-lit); }
/* 2 · a narrow place tightens the strip (desktop strips are about 300–345 px, phone strips about 285–330 px) */
@media (min-width: 768px) { @container spn-place (max-width: 345px) {
  [data-liquid] .spn-strip a, [data-liquid] .spn-strip > span { padding: 0 8px; }
  [data-liquid] .spn-strip > :not([aria-current]) > i { display: none; }
} }
/* 2b · a long sign beside a four-step strip (the Skyline, "THE SKYLINE · REHEARSALS", at 1024) wrapped to a second row that the place clips, so the name vanished
   (run 29, mocks walk M6). Below 600 px of place the strip takes the narrow form and the sign tightens its tracking; at 538 px it is 281 + 14 + 195. */
@media (min-width: 768px) { @container spn-place (max-width: 600px) {
  [data-liquid] .spn-strip a, [data-liquid] .spn-strip > span { padding: 0 8px; }
  [data-liquid] .spn-strip > :not([aria-current]) > i { display: none; }
  [data-liquid] .spn-sign { letter-spacing: .1em; }
} }
/* 3 · last resort: the edge that hides more of the strip fades (only while the strip can scroll). */
@property --spn-fade-l { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --spn-fade-r { syntax: '<length>'; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll()) {
  [data-liquid] .spn-strip {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--spn-fade-l), #000 calc(100% - var(--spn-fade-r)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--spn-fade-l), #000 calc(100% - var(--spn-fade-r)), transparent 100%);
    animation: spn-strip-edge linear both; animation-timeline: scroll(self inline);
  }
  @keyframes spn-strip-edge { 0% { --spn-fade-l: 0px; --spn-fade-r: 28px; } 12% { --spn-fade-l: 28px; } 88% { --spn-fade-r: 28px; } 100% { --spn-fade-l: 28px; --spn-fade-r: 0px; } }
}

/* the ONE Pause (founder item 19) */
[data-liquid] .spn-pause,
[data-liquid] .spn-theme {
  grid-area: pause; display: inline-flex; align-items: center; gap: 8px; height: 44px; margin: 0; padding: 0 16px 0 12px; border-radius: 999px;
  color: var(--spn-ink); font: 600 13px/1 var(--spn-font); white-space: nowrap; cursor: pointer;
}
[data-liquid] .spn-pause svg { display: block; width: 16px; height: 16px; flex: none; fill: currentColor; stroke: none; }
[data-liquid] .spn-pause .spn-play { display: none; }
[data-liquid] .spn-pause[aria-pressed="true"] .spn-play { display: block; }
[data-liquid] .spn-pause[aria-pressed="true"] .spn-pausing { display: none; }
[data-liquid] .spn-pause[aria-pressed="true"] { border-color: var(--spn-primary); }
[data-liquid] .spn-pause:disabled { cursor: not-allowed; opacity: .72; }

/* Round 28 · the light switch in the slot Pause motion held (board 28, accepted 19 Oct; walk-r21/_r28-theme.css section 1). It borrows the pill's
   rect and look (.spn-pause above); only the icon style, the sun/moon pick by theme and the sun's lamp gold are its own. Never violet. */
[data-liquid] .spn-theme svg { display: block; width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.dark [data-liquid] .spn-theme .r28-moon, html:not(.dark) [data-liquid] .spn-theme .r28-sun { display: none; }
html.dark [data-liquid] .spn-theme [data-when="light"], html:not(.dark) [data-liquid] .spn-theme [data-when="dark"] { display: none; }
[data-liquid] .spn-theme { -webkit-tap-highlight-color: transparent; }
[data-liquid] .spn-theme:hover { border-color: color-mix(in srgb, var(--spn-ink) 45%, var(--spn-line)); }
html.dark [data-liquid] .spn-theme .r28-sun { color: var(--spn-lit); }
/* the phone menu (founder item 20) */
[data-liquid] .spn-menu {
  display: none; grid-area: menu; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border-radius: 999px; color: var(--spn-ink); cursor: pointer;
}
[data-liquid] .spn-menu svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
[data-liquid] :is(.spn-back, .spn-strip a, .spn-pause, .spn-theme, .spn-menu):focus-visible { outline: 3px solid var(--spn-focus); outline-offset: 2px; }
/* the sign's words stay readable to a screen reader when the place hides them (the strip's aria-label carries them too) */
[data-liquid] .spn-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* 5 · the ONE lantern chip: [white door, only for an interview DATE] · II · I·III; the same rect on every page, not a button */
[data-liquid] .spn-chip {
  grid-area: chip; display: inline-flex; align-items: center; gap: 0; height: 44px; padding: 0 6px; border-radius: 999px;
  color: var(--spn-ink); font: 600 13px/1 var(--spn-font); white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default;
}
[data-liquid] .spn-lan { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 9px; }
[data-liquid] .spn-lan + .spn-lan { border-left: 1px solid var(--spn-line); }
[data-liquid] .spn-lan-d { color: var(--spn-body); font-weight: 500; }
[data-liquid] .spn-lan-d b { color: var(--spn-ink); font-weight: 700; }
[data-liquid] .spn-lan:is([data-status="estimate"], [data-status="none"]) .spn-lan-d { font-style: italic; color: var(--spn-muted); }
[data-liquid] .spn-chip[data-own] .spn-lan { opacity: .9; }
[data-liquid] .spn-chip[data-own~="door"] .spn-lan[data-lan="door"],
[data-liquid] .spn-chip[data-own~="2"] .spn-lan[data-lan="2"],
[data-liquid] .spn-chip[data-own~="13"] .spn-lan[data-lan="13"] { opacity: 1; }
/* the lantern orbs: billboards, true circles */
[data-liquid] .spn-orb {
  --s: 26px; position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--s); height: var(--s); aspect-ratio: 1; border-radius: 50%;
  font: 700 12px/1 var(--spn-font); letter-spacing: 0; font-style: normal; font-variant-numeric: normal;
}
/* round 19c (14 Oct): every orb numeral is 12 px at every width (it was 10 / 8.5 px, and 9 / 7.5 px on phones). The orbs keep their 26 px circle,
   ring and fill; "I·III" holds 12 px inside it by tracking in (-.08em, weight 650). Phones keep the same 26 px circle so the numeral never shrinks. */
[data-liquid] .spn-orb[data-s="2"] {
  color: var(--sec-2); border: 1.5px solid var(--sec-2); background: var(--spn-well);
  box-shadow: inset 1px 1px 0 var(--spn-spec), 0 0 10px -3px color-mix(in srgb, var(--sec-2) 40%, transparent);
}
[data-liquid] .spn-orb[data-s="13"] {
  color: var(--sec-on); background: var(--sec-13); font-size: 12px; font-weight: 650; letter-spacing: -.08em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 10px -3px color-mix(in srgb, var(--sec-1) 36%, transparent);
}
html:not(.dark) [data-liquid] .spn-orb[data-s="2"] { box-shadow: inset 1px 1px 0 #fff, 0 1px 1px rgba(34, 20, 70, .18); }
html:not(.dark) [data-liquid] .spn-orb[data-s="13"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 1px 1px rgba(34, 20, 70, .22); }
/* an estimate: a hatched window, no count (and "date not set" wears the same dashed ring) */
[data-liquid] .spn-orb:is([data-status="estimate"], [data-status="none"]) {
  color: var(--spn-primary); border: 1.5px dashed var(--spn-primary); box-shadow: none;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--spn-primary) 26%, transparent) 0 2px, transparent 2px 5px), var(--spn-well);
}
/* the white door: the Colonnade door's miniature (w/h 0.44) */
[data-liquid] .spn-door { display: block; width: 12px; height: 27px; flex: none; overflow: visible; }
[data-liquid] .spn-door .d-room { fill: #F1E9FF; }
[data-liquid] .spn-door .d-leaf { fill: #3A2C52; }
[data-liquid] .spn-door .d-frame { fill: none; stroke: #FFFFFF; stroke-width: 2.4; }
[data-liquid] .spn-door .d-cap, [data-liquid] .spn-door .d-sill { fill: #FFFFFF; }
html:not(.dark) [data-liquid] .spn-door .d-room { fill: #FFFFFF; }
html:not(.dark) [data-liquid] .spn-door .d-leaf { fill: #4A3F66; }
html:not(.dark) [data-liquid] .spn-door .d-frame { stroke: var(--spn-ink); }
html:not(.dark) [data-liquid] .spn-door .d-cap, html:not(.dark) [data-liquid] .spn-door .d-sill { fill: var(--spn-ink); }


/* 6 · phone and narrow */
@media (max-width: 767px) {
  [data-liquid] { --spn-gutter: 16px; --spn-th-h: 92px; }
  /* row 1: back · chip · Pause (and the menu, when the page has a drawer) */
  [data-liquid] .spn-header {
    --spn-strip-h: 38px;
    height: auto; min-height: var(--spn-th-h); padding: 6px var(--spn-gutter) 0;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 44px 36px; row-gap: 6px;
    grid-template-areas: "back chip pause" "place place place";
  }
  [data-liquid] .spn-header[data-spn-menu] {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "menu back chip pause" "place place place place";
  }
  [data-liquid] .spn-header[data-spn-menu] .spn-menu { display: inline-flex; }
  /* the back pill takes what row 1 leaves */
  [data-liquid] .spn-back { justify-self: start; gap: 5px; padding: 0 9px 0 7px; font-size: 12px; min-width: 44px; max-width: 100%; overflow: hidden; justify-content: center; }
  [data-liquid] .spn-back svg { width: 14px; height: 14px; }
  [data-liquid] .spn-back .spn-back-l { display: none; }
  [data-liquid] .spn-back .spn-back-s { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  [data-liquid] .spn-pause { width: 44px; padding: 0; justify-content: center; }
  [data-liquid] .spn-theme { width: 44px; padding: 0; justify-content: center; }
  [data-liquid] .spn-pause .spn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-liquid] .spn-theme .spn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-liquid] .spn-place { column-gap: 10px; }
  [data-liquid] .spn-sign { font-size: 11px; letter-spacing: .12em; }
  [data-liquid] .spn-strip a, [data-liquid] .spn-strip > span { min-height: 30px; min-width: 48px; padding: 0 10px; font-size: 12px; }
  @container spn-place (max-width: 330px) {
    [data-liquid] .spn-strip a, [data-liquid] .spn-strip > span { padding: 0 8px; }
    [data-liquid] .spn-strip > :not([aria-current]) > i { display: none; }
  }
  /* chip: smaller orbs, no unit */
  [data-liquid] .spn-chip { padding: 0 3px; font-size: 12px; }
  [data-liquid] .spn-lan { padding: 0 6px; gap: 5px; }
  /* round 43 fix round 2: "20 d", not "20" (the unit is what says the number is days); an unset date is a dash, so the chip fits it */
  [data-liquid] .spn-orb { --s: 26px; }
  [data-liquid] .spn-door { width: 10px; height: 22.7px; }
  [data-liquid] .spn-header-ph { height: var(--spn-th-h); }
}
/* narrower desktops (768–1100) */
@media (min-width: 768px) and (max-width: 1100px) {
  [data-liquid] .spn-pause { width: 44px; padding: 0; justify-content: center; }
  [data-liquid] .spn-pause .spn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-liquid] .spn-back .spn-back-l { display: none; }
  [data-liquid] .spn-back .spn-back-s { display: inline; }
}
/* never an ellipsis: when even the short name does not fit, the header marks the pill data-spn-fit="arrow" (the arrow alone) */
[data-liquid] .spn-back[data-spn-fit="arrow"] { width: 44px; min-width: 0; padding: 0; justify-content: center; }
[data-liquid] .spn-back[data-spn-fit="arrow"] :is(.spn-back-l, .spn-back-s) { display: none !important; }
[data-liquid] .spn-back[data-spn-fit="arrow"] svg { width: 16px; height: 16px; }
/* narrow phones (320): row 1 is back · chip · Pause in 288 px, so the back pill is its arrow */
@media (max-width: 359px) {
  [data-liquid] { --spn-hgap: 8px; }
  [data-liquid] .spn-back { width: 44px; min-width: 0; padding: 0; justify-content: center; }
  [data-liquid] .spn-back svg { width: 16px; height: 16px; }
  [data-liquid] .spn-back .spn-back-s { display: none; }
}


@container spn-row (max-width: 336px) {
  [data-liquid] .spn-header[data-spn-menu] .spn-back { display: none; }
}


/* 7 · the clock hide (C9): a running clock removes the frame; CSS only, so nothing remounts. Row and marked pieces first, */
html:has([data-clock-running="true"]) [data-liquid] :is(.spn-header, .spn-header-ph, [data-spn-chrome]) { display: none !important; }
/* … then the frame's own pieces by their own hooks (so the server markup hides them too, before any script). */
html:has([data-clock-running="true"]) [data-app-shell]:has(:is(.spn-header, .spn-header-ph)) :is([data-shell-banners], [data-mobile-tabbar], .liquid-trust, div:has(> .liquid-sidebar)) { display: none !important; }
/* … and the house frame's phone dock (run 30, 25 Oct 2026: at 375 the Exam Room's "Back", word count and "Finish sitting" sat under it, untappable) */
html:has([data-clock-running="true"]) [data-nav-opt="4"] .r31-sh-dock { display: none !important; }
/* … and the Exam Room's running sitting gets the bare room back (fixer, 6 Oct): <main> is the frame's padded, 1320 px
   workspace, but the sitting was laid out for the whole viewport (a 100dvh column, a sticky header, a fixed footer). */
html:has(.sitting-writing-live[data-clock-running="true"]) [data-liquid] .liquid-shell-main { padding: 0; }
html:has(.sitting-writing-live[data-clock-running="true"]) [data-liquid] .liquid-shell-main > * { max-width: none; margin-inline: 0; }

/* The interview station's calm motion keeps binding the room while a clock runs. */
[data-liquid][data-interview-liquid][data-station-room]:has([data-clock-running="true"]) :is(.interview-draw, .st-thread, .st-draw, .st-sweep, .st-grow, .st-breathe) {
  animation: none !important; transition: none !important; stroke-dashoffset: 0;
}
[data-liquid][data-interview-liquid][data-station-room]:has([data-clock-running="true"]) * { animation: none !important; }


/* 8 · the Studio's active item: first-paint look from the header's data-spn-nav / data-spn-dock (copied from shell.css's aria-current rules) */
[data-app-shell]:has(.spn-header[data-spn-nav="/mock-test"]) .liquid-nav-link[href="/mock-test"],
[data-app-shell]:has(.spn-header[data-spn-nav="/exam-room"]) .liquid-nav-link[href="/exam-room"],
[data-app-shell]:has(.spn-header[data-spn-nav="/essay"]) .liquid-nav-link[href="/essay"],
[data-app-shell]:has(.spn-header[data-spn-nav="/today"]) .liquid-nav-link[href="/today"],
[data-app-shell]:has(.spn-header[data-spn-nav="/study-plan"]) .liquid-nav-link[href="/study-plan"],
[data-app-shell]:has(.spn-header[data-spn-nav="/interview"]) .liquid-nav-link[href="/interview"] {
  background: var(--wash); border-color: var(--line); color: var(--primary); box-shadow: var(--shadow-control);
}
[data-app-shell]:has(.spn-header[data-spn-nav="/mock-test"]) .liquid-nav-link[href="/mock-test"]:after,
[data-app-shell]:has(.spn-header[data-spn-nav="/exam-room"]) .liquid-nav-link[href="/exam-room"]:after,
[data-app-shell]:has(.spn-header[data-spn-nav="/essay"]) .liquid-nav-link[href="/essay"]:after,
[data-app-shell]:has(.spn-header[data-spn-nav="/today"]) .liquid-nav-link[href="/today"]:after,
[data-app-shell]:has(.spn-header[data-spn-nav="/study-plan"]) .liquid-nav-link[href="/study-plan"]:after,
[data-app-shell]:has(.spn-header[data-spn-nav="/interview"]) .liquid-nav-link[href="/interview"]:after {
  content: ''; width: 4px; height: 20px; background: var(--primary); border-radius: 8px; position: absolute; left: -1px;
}
@media (max-width: 767px) {
[data-app-shell]:has(.spn-header[data-spn-dock="/mock-test"]) .liquid-mobile-bottom a[href="/mock-test"],
[data-app-shell]:has(.spn-header[data-spn-dock="/practice"]) .liquid-mobile-bottom a[href="/practice"],
[data-app-shell]:has(.spn-header[data-spn-dock="/today"]) .liquid-mobile-bottom a[href="/today"],
[data-app-shell]:has(.spn-header[data-spn-dock="/study-plan"]) .liquid-mobile-bottom a[href="/study-plan"],
[data-app-shell]:has(.spn-header[data-spn-dock="/interview"]) .liquid-mobile-bottom a[href="/interview"] {
  color: var(--primary); background: var(--wash);
}
[data-app-shell]:has(.spn-header[data-spn-dock="/mock-test"]) .liquid-mobile-bottom a[href="/mock-test"] > span[aria-hidden="true"]:first-child,
[data-app-shell]:has(.spn-header[data-spn-dock="/practice"]) .liquid-mobile-bottom a[href="/practice"] > span[aria-hidden="true"]:first-child,
[data-app-shell]:has(.spn-header[data-spn-dock="/today"]) .liquid-mobile-bottom a[href="/today"] > span[aria-hidden="true"]:first-child,
[data-app-shell]:has(.spn-header[data-spn-dock="/study-plan"]) .liquid-mobile-bottom a[href="/study-plan"] > span[aria-hidden="true"]:first-child,
[data-app-shell]:has(.spn-header[data-spn-dock="/interview"]) .liquid-mobile-bottom a[href="/interview"] > span[aria-hidden="true"]:first-child {
  opacity: 1;
}
}


/* 9 · the Mocks wrapper: on a spine path it is not a Liquid root, so it keeps its sizing here */
[data-liquid] [data-mocks-presentation]:not([data-liquid]) { min-height: 100%; overflow: visible; }


/* 10 · forced colours */
@media (forced-colors: active) {
  [data-liquid] .spn-orb { forced-color-adjust: none; }
  [data-liquid] .spn-pause[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* =============================================================================
   wave 19 (redo20 item 5) · LIGHT IS INK ON CREAM, once, for every 2.0 page
   The light shell above is the old Liquid lavender (#F7F5FC page, #EEE8F6 raised, #EDE4FF wash, lilac lines). By day the house is plaster
   and paper: the ground and the shell are the house plaster, cards are cream paper, lines and edges are warm hairlines. Ink, the section
   colours, gold, the violet action and focus are unchanged; dark (html.dark) is untouched. Values are walk/shared/spine.css's
   `html:not(.dark)` block, literal. The second block re-points the Liquid app's own light tokens the same way, on this sheet's 2.0 pages only.
   ============================================================================= */
html:not(.dark) [data-liquid]:not([data-theme="dark"]) {
  --spn-page: oklch(0.976 0.006 82);
  --spn-ground: oklch(0.976 0.006 82);
  --spn-card: oklch(0.992 0.007 86);
  --spn-raised: oklch(0.957 0.011 80);
  --spn-wash: oklch(0.938 0.020 82);
  --spn-line: oklch(0.872 0.015 78);
  --spn-edge: oklch(0.815 0.018 76);
  --spn-well: oklch(0.995 0.005 86);
  --spn-opaque: oklch(0.965 0.010 82);
  --spn-pill-bg: oklch(0.992 0.006 86 / .95);
  --spn-shade: oklch(0.30 0.03 60 / .16);
  --spn-contact: 0 1px 1px oklch(0.30 0.03 60 / .10), 0 2px 5px -2px oklch(0.30 0.03 60 / .22);
  --spn-door-soft: oklch(0.835 0.011 76);
  --spn-door-pale: oklch(0.925 0.009 78);
}
html:not(.dark) [data-liquid]:not([data-theme="dark"]) {
  --page: oklch(0.976 0.006 82);
  --card: oklch(0.992 0.007 86);
  --raised: oklch(0.957 0.011 80);
  --wash: oklch(0.938 0.020 82);
  --line: oklch(0.872 0.015 78);
  --strong-line: oklch(0.70 0.035 72);
  --material-clear: linear-gradient(130deg, oklch(0.995 0.005 86 / .96), oklch(0.985 0.009 85 / .92) 48%, oklch(0.958 0.013 80 / .9));
  --material-depth: linear-gradient(130deg, oklch(0.968 0.012 82 / .97), oklch(0.948 0.016 80 / .94) 55%, oklch(0.928 0.019 78 / .91));
  --material-well: oklch(0.995 0.005 86);
  --material-opaque: oklch(0.965 0.010 82);
  --material-edge: oklch(0.815 0.018 76);
  --shell-background: oklch(0.985 0.008 85 / .95);
  --ambient-background: none;
  --shadow-panel: inset 0 1px 1px oklch(1 0 0), inset 0 -1px 1px oklch(0.40 0.03 60 / .16), 0 16px 40px -26px oklch(0.30 0.03 50 / .38), 0 3px 5px -3px oklch(0.30 0.03 50 / .2);
  --shadow-control: inset 0 1px 1px oklch(1 0 0 / .5), 0 6px 18px -10px oklch(0.30 0.03 50 / .36);
  --shadow-hover: inset 0 1px 1px oklch(1 0 0 / .66), 0 8px 22px -10px oklch(0.30 0.03 50 / .45);
  --chart-well: oklch(0.985 0.008 85);
  --unknown-wash: oklch(0.945 0.008 75);
}
