/* stock_seasonality.css — Calendar Clock (Lane 2).
   Paired plain-copy asset: templates/ is the source, site/ must byte-match
   (python -m scripts.check_template_site_sync --fix).

   SURFACE LANGUAGE: macro.html. This page adopts the two systems macro.html
   established rather than inventing a third —
     * the Attio type roles from templates/_macro_attio_type.css.j2 (display /
       ui / data, .06em overlines) — see the TYPE block below;
     * the desk surface from templates/macro-desk.css (hairlines, the two-part
       card shadow, the 14px card radius, the four-point spacing scale).
   Colour still resolves from theme.css, so the light theme and the zh 红涨绿跌
   swap flow with no re-render.

   Page-local colour tokens, two only:
     --sx-ink  median path, gate rules + fill, eyebrows, page accent
     --sx-now  current (incomplete) year thread + today marker
   Per-year outcomes deliberately use --up/--down, NOT the ink, so the sample is
   read in the same colour language as every other price surface on the site. */

/* ── TYPE: Inter Display for the display role ───────────────────────────────
   The same three faces macro.html loads, declared here because this is a
   standalone page that links its own sheet. URLs are stylesheet-relative and
   this file ships to the site root, so they resolve to /fonts/ exactly like
   theme.css's Inter faces. San Francisco is not redistributed — it arrives
   through the native -apple-system / "SF Pro Text" fallback in --sx-data. */
@font-face { font-family: "MX Inter Display"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/InterDisplay-500.woff2") format("woff2"); }
@font-face { font-family: "MX Inter Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/InterDisplay-600.woff2") format("woff2"); }
@font-face { font-family: "MX Inter Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/InterDisplay-700.woff2") format("woff2"); }

:root {
  --sx-ink: #8a7fd4;
  --sx-now: var(--warn);

  /* Type roles, copied from macro.html's --font-display / --font-data so the
     two pages read as one product. NOTE what is absent: the terminal mono.
     `--num` is for pure figures and this page has no slot that needs a fixed
     advance width, so every figure here takes the proportional data face with
     tabular figures switched on — the same call macro.html makes. */
  --sx-display: "MX Inter Display", Inter, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --sx-data: Inter, "SF Pro Text", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  /* Desk surface, from macro-desk.css. */
  --sx-hair: color-mix(in srgb, var(--line) 78%, transparent);
  --sx-text-2: color-mix(in srgb, var(--text) 66%, transparent);
  --sx-tile: color-mix(in srgb, var(--panel2) 86%, var(--panel));
  --sx-card-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent),
    0 1px 1px rgba(0, 0, 0, .28), 0 14px 30px -18px rgba(0, 0, 0, .55);
  --sx-r-sm: 8px;
  --sx-r-md: 10px;
  --sx-r-lg: 14px;
  --sx-sp-2: 8px;
  --sx-sp-3: 12px;
  --sx-sp-4: 16px;
  --sx-sp-5: 20px;
  --sx-sp-6: 24px;
}
html[data-theme="light"] {
  --sx-ink: #6a5cc0;
  --sx-hair: color-mix(in srgb, var(--line) 92%, transparent);
  /* 70% put every muted line on this page at 4.42:1 over the light panel —
     under AA, and doctrine §5.8 judges light as a design, not a translation.
     78% clears 4.5:1 on both --panel and --bg without flattening the hierarchy
     (primary --text stays a clear step above). Dark is untouched: it measures
     5.9–13.7 already. */
  --sx-text-2: color-mix(in srgb, var(--text) 78%, transparent);
  --sx-card-shadow: inset 0 1px 0 rgba(255, 255, 255, .72),
    0 1px 2px rgba(20, 30, 50, .05), 0 14px 30px -20px rgba(20, 30, 50, .16);
}

/* ── page frame ─────────────────────────────────────────────────────────────
   THE PAGE MUST PAINT ITS OWN CANVAS. theme.css deliberately does not: its
   aurora backdrop is a fixed body::before at z-index -1 whose own comment says
   it paints "over the opaque body { background: var(--bg) }" — the opaque layer
   is the PAGE's job, and every other template in this repo declares it. This
   sheet did not, so the dark tokens (--text #d7dce3) rendered straight onto the
   user agent's white canvas on any browser not in dark mode: unreadable pale
   text over a white-to-lavender wash. Do not remove this rule. */
body {
  background: var(--bg);
  color: var(--text);
}

.sx-wrap { max-width: 1180px; margin: 0 auto; padding: var(--sx-sp-5) 18px 64px; }
@media (min-width: 1100px) { .sx-wrap { padding: 26px var(--sx-sp-6) 72px; } }

/* Overlines: macro.html's single value — .06em on the Display face at 12/16 is
   the house rhythm (the terminal-era .14em this page shipped with fragmented
   every label it touched). The masthead's own .sx-eyebrow was retired when the
   mode bar took that slot; the surviving overlines below are the ledger's
   .sx-led-state / .sx-led-break / .sx-led-h3. */

/* ── masthead: identity left, instrument search right, one baseline ────────
   Previously two floating blocks that shared no alignment. One hairline-ruled
   bar puts the symbol and the control that changes it on the same row. */
.sx-mast {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: var(--sx-sp-4) var(--sx-sp-5);
  padding-bottom: var(--sx-sp-4); margin-bottom: var(--sx-sp-5);
  border-bottom: 1px solid var(--sx-hair);
}
.sx-mast-id { flex: 1 1 340px; min-width: 0; }

/* ── the MODE control ───────────────────────────────────────────────────────
   Calendar clock / Catalyst is a higher-order control than a lens: it changes
   what the page is about, not how one chart is drawn. So it sits above the H1,
   in the slot the page's own name used to hold, and never in the lens row under
   the chart. It borrows the segmented track so it reads as the same family, and
   earns its seniority THREE ways: a real type step (13.5px display against the
   lens rows' 12.5px data face — the first cut was 12.5px too, so the whole
   claimed hierarchy was a weight change and placement), more air, and a pressed
   fill at roughly twice the lens rows' ink.

   The pressed FILL is keyed off html[data-sx-mode], not off aria-pressed: a
   ?mode=catalyst deep link paints the catalyst body from <head>, so a fill that
   waits for the end-of-body script showed "Calendar clock" pressed over a
   catalyst page — and permanently if the script never loads. Derived from the
   document's own mode attribute it cannot desync. aria-pressed stays the ARIA
   truth and is reconciled inline during parse. */
.sx-modebar { display: flex; align-items: center; gap: 5px; margin: 0 0 12px; position: relative; }
/* The tip anchors to the BAR, not to the `?`. House tips centre on their glyph,
   which is safe while the glyph is near the gutter — but the type step above
   pushed this one 44px further right and its tip 44px past the viewport at
   375px. The bar always starts at the wrap's left gutter, so opening from the
   bar's own left edge cannot overflow at any width. `position: static` on the
   trigger is what re-parents the tip's containing block to the bar. */
.sx-modebar .sx-help { position: static; }
.sx-modebar .sx-help .sx-tip { left: 0; transform: none; }
.sx-seg.sx-mode {
  border-color: color-mix(in srgb, var(--sx-ink) 30%, var(--line));
  background: color-mix(in srgb, var(--panel2) 94%, transparent);
}
.sx-seg.sx-mode .gbtn {
  font: 600 13.5px/1 var(--sx-display); letter-spacing: .005em;
  padding: 8px 15px;
  /* The mode track is deliberately deeper than the lens track, which pushed the
     UNPRESSED label to 4.37:1 in light — below the lens rows' own 4.49 baseline.
     The label is set here rather than inherited from .sx-seg's muted default. */
  color: color-mix(in srgb, var(--text) 84%, transparent);
}
html[data-lang="zh"] .sx-seg.sx-mode .gbtn { letter-spacing: 0; }
html:not([data-sx-mode="catalyst"]) .sx-seg.sx-mode .gbtn[data-v="calendar"],
html[data-sx-mode="catalyst"] .sx-seg.sx-mode .gbtn[data-v="catalyst"] {
  background: color-mix(in srgb, var(--sx-ink) 42%, var(--panel));
  border-color: color-mix(in srgb, var(--sx-ink) 72%, transparent);
  color: var(--text);
}
/* Light: the ink at 20% over white put the PRESSED label at 4.84:1 — the
   superior control was the least legible segment on the page. Deepen the ink
   under it and take the label to near-primary. */
html[data-theme="light"]:not([data-sx-mode="catalyst"]) .sx-seg.sx-mode .gbtn[data-v="calendar"],
html[data-theme="light"][data-sx-mode="catalyst"] .sx-seg.sx-mode .gbtn[data-v="catalyst"] {
  background: color-mix(in srgb, var(--sx-ink) 26%, #fff);
  border-color: color-mix(in srgb, var(--sx-ink) 62%, transparent);
  color: color-mix(in srgb, var(--sx-ink) 34%, var(--text));
}
/* .gbtn ships a --link focus ring; every other focusable on this page rings in
   the page ink, and a segmented control is where the keyboard needs it most. */
.sx-seg .gbtn:focus-visible { outline: 2px solid var(--sx-ink); outline-offset: 2px; }

/* Announcement target for the mode change — never rendered, always read. */
.sx-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Mode swaps the page body. Only `hide` is ever expressed, so no element loses
   its own display value on the way back. */
.sx-cat { display: none; }
html[data-sx-mode="catalyst"] .sx-cat { display: block; }
html[data-sx-mode="catalyst"] .sx-cal { display: none; }
.sx-h1 {
  font: 700 clamp(19px, 2vw, 23px)/1.25 var(--sx-display);
  letter-spacing: -.02em; margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
}
html[data-lang="zh"] .sx-h1 { letter-spacing: 0; }
/* The ticker is the identity, so it leads and carries the weight; the long
   legal name follows in the secondary ink. */
.sx-tick {
  font: 700 1em/1 var(--sx-display); letter-spacing: -.01em;
  color: var(--text); flex: none;
  padding: 4px 9px; border-radius: var(--sx-r-sm);
  background: color-mix(in srgb, var(--sx-ink) 15%, var(--panel2));
  border: 1px solid color-mix(in srgb, var(--sx-ink) 34%, var(--line));
}
.sx-name { font-weight: 600; color: var(--sx-text-2); min-width: 0; }

/* ── the answer, before any evidence ─────────────────────────────────────── */
.sx-verdict {
  font: 700 clamp(23px, 2.5vw, 31px)/1.22 var(--sx-display);
  letter-spacing: -.025em; max-width: 30ch;
  margin: 0 0 var(--sx-sp-4); color: var(--text);
  text-wrap: balance;
}
html[data-lang="zh"] .sx-verdict { letter-spacing: 0; max-width: 22em; }

/* ── chip strip ─────────────────────────────────────────────────────────── */
.sx-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 var(--sx-sp-5); padding: 0; list-style: none; }
.sx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12.5px/1 var(--sx-data); letter-spacing: -.005em;
  padding: 7px 11px; border-radius: var(--sx-r-sm);
  border: 1px solid var(--sx-hair); background: var(--sx-tile); color: var(--text);
  white-space: nowrap;
}
/* House law: the terminal mono is for FIGURES, never words — and a chip reads
   as a phrase ("22 of 25 up", "Through Aug 3"). Following macro.html, the
   figures inside take the proportional data face with tabular numerals rather
   than a second family, so the chip is set in one voice. */
.sx-chip .n { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sx-chip-muted { color: var(--sx-text-2); }
.sx-chip-up {
  border-color: color-mix(in srgb, var(--up) 46%, var(--line));
  background: color-mix(in srgb, var(--up) 11%, var(--panel));
  color: var(--ink-up, var(--text));
}
.sx-chip-mkt {
  border-color: color-mix(in srgb, var(--info) 46%, var(--line));
  background: color-mix(in srgb, var(--info) 12%, var(--panel));
}
/* "2 connected" is a COUNT OF SOURCES, not a direction, so it must not wear
   --up: that token is price language and the zh 红涨绿跌 swap flips it to red,
   which reads as a market call about a coverage fact. The page ink is the right
   token — it is already what the rails and the CONNECTED state word carry, so
   the chip, the rail and the word are one colour story in both languages. */
.sx-chip-ink {
  border-color: color-mix(in srgb, var(--sx-ink) 46%, var(--line));
  background: color-mix(in srgb, var(--sx-ink) 14%, var(--panel));
}
.sx-chip-thin { border-style: dashed; color: var(--sx-text-2); }
.sx-chip-expl { border-style: dashed; color: var(--sx-text-2); background: transparent; }
/* [hidden] loses to the class rule above without this — a hidden chip would show. */
.sx-chip[hidden] { display: none; }

/* ── panels ─────────────────────────────────────────────────────────────── */
.sx-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--sx-r-lg); padding: 18px var(--sx-sp-5);
  margin-bottom: var(--sx-sp-4);
  box-shadow: var(--sx-card-shadow);
}
/* Panel titles: macro-desk sets sentence-case headings at 17/1.3, not another
   row of uppercase overlines. One overline per page (the masthead's) is enough. */
.sx-card > h2, .sx-sect > h2 {
  font: 600 16px/1.3 var(--sx-display); letter-spacing: -.01em;
  text-transform: none; color: var(--text); margin: 0 0 var(--sx-sp-3);
}
html[data-lang="zh"] .sx-card > h2, html[data-lang="zh"] .sx-sect > h2 { letter-spacing: 0; }
.sx-body { font: 400 13.5px/1.55 var(--font-ui); color: var(--text); }
.sx-dim  { color: var(--sx-text-2); }
.sx-num  { font-family: var(--sx-data); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ── help tip (house idiom, Tier 2) ─────────────────────────────────────── */
.sx-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text) 26%, transparent);
  color: var(--sx-text-2);
  font: 600 10px/1 var(--sx-data); cursor: help;
  position: relative; vertical-align: middle; margin-left: 5px; flex: none;
  transition: color .16s ease, border-color .16s ease;
}
.sx-help:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 46%, transparent); }
.sx-help .sx-tip {
  display: none; position: absolute; top: 145%; left: 50%; transform: translateX(-50%);
  width: min(330px, 78vw); background: var(--panel); border: 1px solid var(--line);
  padding: 11px 13px; border-radius: var(--sx-r-md); z-index: 60;
  font: 400 12px/1.5 var(--font-ui); color: var(--text); text-align: left;
  box-shadow: var(--popover-shadow); cursor: auto;
  max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain;
}
.sx-help:hover::before { content: ""; position: absolute; top: 100%; left: -30px; right: -30px; height: 12px; }
.sx-help:hover .sx-tip, .sx-help:focus-visible .sx-tip { display: block; }
.sx-help:focus-visible { outline: 2px solid var(--sx-ink); outline-offset: 2px; }
.sx-tip b { font-weight: 600; color: var(--sx-text-2); font-size: 11px; }
.sx-tip .r { display: block; margin: 0 0 5px; }
.sx-tip .r:last-child { margin-bottom: 0; }

/* ── the strand field ───────────────────────────────────────────────────── */
.sx-fieldcard { padding: var(--sx-sp-4) var(--sx-sp-3) 10px; }
.sxf { display: block; width: 100%; height: 340px; touch-action: pan-y; color: var(--text); }
.sxf text { font-family: var(--sx-display); }

.sxf-rule    { stroke: var(--line); stroke-opacity: .55; stroke-width: 1; }
.sxf-base    { stroke: var(--line); stroke-opacity: .9; stroke-width: 1; stroke-dasharray: 4 4; }
.sxf-band    { fill: var(--sx-ink); fill-opacity: .12; }
.sxf-strand  { fill: none; stroke: currentColor; stroke-opacity: .14; stroke-width: 1; }
.sxf-gatefill{ fill: var(--sx-ink); fill-opacity: .07; }
.sxf-median  { fill: none; stroke: var(--sx-ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.sxf-cur     { fill: none; stroke: var(--sx-now); stroke-opacity: .62; stroke-width: 1.3; stroke-linejoin: round; }
.sxf-gate    { stroke: var(--sx-ink); stroke-width: 1; stroke-dasharray: 3 3; stroke-opacity: .75; }
.sxf-today   { stroke: var(--sx-now); stroke-width: 1; stroke-opacity: .55; }
.sxf-mlab    { fill: var(--sx-text-2); font-size: 11px; font-weight: 600; letter-spacing: .06em; }

/* No dim/undim state: rendered, in-gate lighting is illegible at the year's
   y-scale (spec §13). The countable per-year outcome lives in the window fan. */

/* handles */
.sxf-hrail   { fill: none; }
.sxf-handle  { cursor: ew-resize; }
.sxf-handle .grip { fill: var(--sx-ink); }
.sxf-handle:focus { outline: none; }
.sxf-handle:focus-visible .grip { outline: 2px solid var(--sx-ink); outline-offset: 2px; }
.sxf-handle .hit { fill: transparent; }
.sxf-band-drag { cursor: grab; fill: transparent; }
.sxf-band-drag:active { cursor: grabbing; }
/* A drag owns both axes once it starts; the rest of the field keeps pan-y so the
   page still scrolls vertically over the chart (spec §7.3). */
.sxf-handle, .sxf-band-drag { touch-action: none; }

/* HTML overlays — the SVG itself carries no translated text (spec §4/§0.6) */
.sx-fieldwrap { position: relative; }
.sx-legend {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin: var(--sx-sp-2) 2px 0; font: 500 11.5px/1.3 var(--font-ui);
  letter-spacing: -.005em; color: var(--sx-text-2);
}
.sx-legend i { display: inline-block; width: 16px; height: 0; border-top: 2.6px solid var(--sx-ink); margin-right: 6px; vertical-align: middle; }
.sx-legend .lg-fan i { border-top-width: 1px; border-top-color: var(--text); opacity: .45; }
.sx-legend .lg-now i { border-top-width: 1.75px; border-top-color: var(--sx-now); }
.sx-legend .lg-up i { border-top-width: 1.4px; border-top-color: var(--up); }
.sx-legend .lg-dn i { border-top-width: 1.4px; border-top-color: var(--down); }

/* ── controls: three segmented choices, not nine loose pills ───────────────
   Each group is one recessed track and the pressed segment is the raised tile
   inside it, so the row reads as "pick one of these three things" three times
   over. The shared .gbtn glass (blur, sheen sweep, hover lift) is switched off
   inside a track: a segmented control that lifts and shines on hover reads as
   nine independent buttons, which is what it was doing. */
.sx-ctrls { display: flex; flex-wrap: wrap; gap: var(--sx-sp-3); margin: var(--sx-sp-4) 2px 0; }
.sx-ctrl { display: inline-flex; align-items: center; gap: 2px; }
.sx-seg {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: var(--sx-r-md);
  border: 1px solid var(--sx-hair);
  background: color-mix(in srgb, var(--panel2) 62%, transparent);
}
.sx-seg .gbtn {
  border-color: transparent; background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none; border-radius: 7px;
  min-height: 36px;
  padding: 6px 12px; font: 500 12.5px/1 var(--sx-data);
  letter-spacing: -.005em; color: var(--sx-text-2);
  transition: color .16s ease, background .16s ease;
}
.sx-seg .gbtn::after { display: none; }
.sx-seg .gbtn:hover { transform: none; box-shadow: none; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.sx-seg .gbtn:active { transform: none; }
.sx-seg .gbtn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--sx-ink) 20%, var(--panel));
  border-color: color-mix(in srgb, var(--sx-ink) 46%, transparent);
  color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.sx-seg .gbtn[disabled] { opacity: .38; cursor: not-allowed; }
.sx-seg .gbtn[disabled]:hover { background: transparent; color: var(--sx-text-2); }

/* ── this window / the years ────────────────────────────────────────────── */
.sx-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sx-sp-4); align-items: start; }
.sx-fig {
  font: 700 clamp(30px, 3.4vw, 38px)/1 var(--sx-data);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  letter-spacing: -.03em;
}
.sx-fig.up { color: var(--ink-up, var(--up)); } .sx-fig.dn { color: var(--ink-down, var(--down)); }
.sx-figlab { font: 400 13.5px/1.55 var(--font-ui); color: var(--sx-text-2); margin: 6px 0 var(--sx-sp-4); }

/* ── the window fan — THE signature (spec §5/§13) ───────────────────────
   Every year re-anchored to zero at the window's first day, at the WINDOW's own
   y-scale. The year field answers "when in the year"; this answers "how much,
   how consistently, how many". Its end-dot column is the countable sample. */
.sx-fan { width: 100%; max-width: 480px; height: auto; display: block; margin: var(--sx-sp-3) 0 6px; }
.sx-fan .f { fill: none; stroke-opacity: .5; stroke-width: 1.25; }
.sx-fan .f.up { stroke: var(--up); } .sx-fan .f.dn { stroke: var(--down); }
.sx-fan .fmed { fill: none; stroke: var(--sx-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sx-fan .z { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.sx-fan .e.up { fill: var(--up); } .sx-fan .e.dn { fill: var(--down); }
.sx-fancap { font: 400 12.5px/1.5 var(--font-ui); color: var(--sx-text-2); margin: 0 0 var(--sx-sp-3); max-width: 44ch; }
.sx-fancap .n { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ── the chance track (spec §3) ─────────────────────────────────────────
   A |t| axis: a soft ink ramp where the shuffles concentrate, one tick where
   this window sits. No axes, no labels — the sentence above carries the number. */
.sx-track { position: relative; height: 4px; border-radius: 2px; margin: var(--sx-sp-3) 0 2px;
            background: linear-gradient(90deg, transparent, var(--sx-stops), transparent); }
.sx-track i { position: absolute; top: -3px; width: 2px; height: 10px;
              background: var(--sx-ink); border-radius: 1px; transform: translateX(-1px); }
.sx-after { font: 400 13.5px/1.55 var(--font-ui); color: var(--text); margin: 0; }
.sx-after.sx-dim { color: var(--sx-text-2); margin-top: 10px; }
.sx-after[hidden] { display: none; }

.sx-years { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
table.sx-tbl { width: 100%; border-collapse: collapse; font: 400 13px/1.4 var(--font-ui); }
table.sx-tbl th {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase; letter-spacing: .06em;
  color: var(--sx-text-2); text-align: left; padding: 0 var(--sx-sp-2) var(--sx-sp-2) 0;
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
html[data-lang="zh"] table.sx-tbl th { letter-spacing: 0; }
table.sx-tbl th:last-child, table.sx-tbl td:last-child { width: 52%; }
table.sx-tbl td { padding: 6px var(--sx-sp-2) 6px 0; border-top: 1px solid var(--sx-hair); vertical-align: middle; }
/* Measure columns take the data face + tabular figures; there is no label column
   on this table that could pick it up by accident. */
table.sx-tbl td.y, table.sx-tbl td.r {
  font-family: var(--sx-data); font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1; letter-spacing: -.01em; white-space: nowrap;
}
/* The year is the table's AXIS, not a footnote — it must be as legible as the
   figure beside it. Inheriting --text (not the dim ink) keeps it readable in
   both themes; the weight stops the digits reading as noise. */
table.sx-tbl td.y { color: var(--text); font-weight: 600; }
table.sx-tbl td.r { font-weight: 600; }
table.sx-tbl td.r.up { color: var(--ink-up, var(--up)); } table.sx-tbl td.r.dn { color: var(--ink-down, var(--down)); }
.sx-bar { position: relative; display: block; height: 9px; background: transparent; }
.sx-bar i { position: absolute; top: 0; height: 9px; border-radius: 2px; display: block; }
.sx-bar i.up { background: var(--up); } .sx-bar i.dn { background: var(--down); }
.sx-bar .zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.sx-yrow.cur td.y::after { content: "·"; color: var(--sx-now); margin-left: 4px; font-weight: 700; }

/* ── small multiples ────────────────────────────────────────────────────── */
.sx-sm { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sx-sp-4); }
.sx-smp h3 {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase; letter-spacing: .06em;
  color: var(--sx-text-2); margin: 0 0 var(--sx-sp-2); display: flex; align-items: center;
}
html[data-lang="zh"] .sx-smp h3 { letter-spacing: 0; }
.sx-smp svg { display: block; width: 100%; height: 92px; }
.sx-smcap { font: 400 12px/1.45 var(--font-ui); color: var(--sx-text-2); margin: 6px 0 0; }
.sx-smbar-up { fill: var(--up); } .sx-smbar-dn { fill: var(--down); }
.sx-smzero { stroke: var(--line); stroke-width: 1; }
.sx-smlab { fill: var(--sx-text-2); font-size: 9px; font-family: var(--sx-data); }
/* <summary> keeps the disclosure triangle but stops rendering as a click target
   the width of the card. */
.sx-sect > summary { cursor: pointer; list-style-position: outside; width: max-content; }
.sx-sect > summary:focus-visible { outline: 2px solid var(--sx-ink); outline-offset: 3px; border-radius: 4px; }

/* ── symbol picker ──────────────────────────────────────────────────────────
   An instrument control, not a bare text box: the magnifier states what the
   field does before it is focused, the "/" key hint states how to reach it
   without the mouse, and the shortcut row underneath is the standing set. */
.sx-pick { flex: 0 1 380px; min-width: 260px; }
/* The positioning context is the FIELD's wrapper, so the results open flush
   under the input rather than under the shortcut row below it. */
.sx-pick-box { position: relative; }
.sx-pick-field {
  display: flex; align-items: center; gap: var(--sx-sp-2);
  padding: 0 10px 0 11px; border-radius: var(--sx-r-md);
  border: 1px solid var(--line); background: var(--sx-tile);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.sx-pick-field:hover { border-color: color-mix(in srgb, var(--text) 24%, var(--line)); }
.sx-pick-field:focus-within {
  border-color: color-mix(in srgb, var(--sx-ink) 62%, var(--line));
  background: var(--panel2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sx-ink) 22%, transparent);
}
.sx-pick-ic { flex: none; color: var(--sx-text-2); display: block; transition: color .16s ease; }
.sx-pick-field:focus-within .sx-pick-ic { color: var(--sx-ink); }
/* Chrome-stripping is scoped to the WRAPPER, not to `.sx-pick input`. This
   sheet is a paired plain-copy asset and goes live on the VPS's 3-min pull,
   while the markup around it only lands when the render lane rebuilds the page
   — so for one render cycle the new CSS meets the old markup. Unscoped, this
   rule would erase the border and background of a bare input that has no
   wrapper to draw them, leaving an invisible search box in that window. */
.sx-pick input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box; color: var(--text);
  font: 500 13.5px/1.3 var(--font-ui); letter-spacing: -.005em;
  padding: 9px 12px; border-radius: var(--sx-r-md);
  border: 1px solid var(--line); background: var(--sx-tile);
}
.sx-pick-field input {
  padding: 10px 0; border: 0; border-radius: 0; background: transparent;
}
.sx-pick input::placeholder { color: var(--sx-text-2); font-weight: 400; }
.sx-pick input:focus { outline: none; }
.sx-pick input:focus-visible { outline: none; }
/* The hint is a keyboard affordance, so it disappears the moment the keyboard
   is in the field — it has served its purpose by then. */
.sx-pick-kbd {
  flex: none; font: 600 10.5px/1 var(--sx-data); color: var(--sx-text-2);
  padding: 4px 6px; border-radius: 5px; border: 1px solid var(--sx-hair);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  transition: opacity .14s ease;
}
.sx-pick-field:focus-within .sx-pick-kbd { opacity: 0; }
@media (hover: none) { .sx-pick-kbd { display: none; } }

.sx-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--sx-r-md);
  box-shadow: var(--popover-shadow); max-height: 320px; overflow-y: auto;
  padding: 5px; margin: 0; list-style: none;
}
.sx-pop[hidden] { display: none; }
.sx-pop li {
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font: 400 12.5px/1.35 var(--font-ui); display: flex; gap: 10px; align-items: baseline;
}
.sx-pop li[aria-selected="true"], .sx-pop li:hover { background: color-mix(in srgb, var(--sx-ink) 14%, var(--panel2)); }
/* Ticker = display face, like macro.html's .mx5-mkt-ticker. */
.sx-pop li .sy { font: 600 12.5px/1 var(--sx-display); letter-spacing: 0; min-width: 56px; color: var(--text); }
.sx-pop li .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sx-text-2); }
/* Reads "25 years" / "25 年" — a phrase, so it keeps the UI voice and takes
   only the tabular figures. This slot carried the terminal mono before, which
   is the exact defect the house law names. */
.sx-pop li .ny { color: var(--sx-text-2); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; font-size: 11.5px; white-space: nowrap; }
.sx-pop li.none { color: var(--sx-text-2); cursor: default; }
.sx-pop li.none:hover { background: transparent; }

.sx-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sx-sp-2); align-items: center; }
.sx-quick-lab {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase;
  letter-spacing: .06em; color: var(--sx-text-2); margin-right: 2px;
}
html[data-lang="zh"] .sx-quick-lab { letter-spacing: 0; }
/* Tickers, so the display face — never the mono. */
.sx-quick button {
  font: 600 11.5px/1 var(--sx-display); letter-spacing: 0;
  min-height: 36px;
  padding: 5px 9px; border-radius: 6px;
  background: transparent; border-color: var(--sx-hair);
  color: var(--sx-text-2); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sx-quick button::after { display: none; }
.sx-quick button:hover {
  transform: none; box-shadow: none; color: var(--text);
  background: color-mix(in srgb, var(--sx-ink) 15%, transparent);
  border-color: color-mix(in srgb, var(--sx-ink) 42%, var(--line));
}
.sx-quick button[aria-current="page"] {
  color: var(--text); font-weight: 700;
  background: var(--panel2);
  border-color: var(--sx-ink);
}

/* ── notices (honest states) ────────────────────────────────────────────── */
.sx-note {
  display: none; align-items: center; gap: var(--sx-sp-2); margin: 0 0 var(--sx-sp-4);
  padding: 11px 13px; border-radius: var(--sx-r-md);
  border: 1px dashed var(--line); background: var(--sx-tile);
  font: 400 13px/1.5 var(--font-ui); color: var(--sx-text-2);
}
.sx-note[data-on="1"] { display: flex; }
.sx-note a { color: var(--ink-link, var(--link)); }

/* ── honesty strip ──────────────────────────────────────────────────────── */
/* Six disclosures, so a FIXED three-up grid — two clean rows. auto-fit was
   tried and gives 4+2 at this width, which reads as a wrap accident. */
.sx-honesty dl { margin: 0; display: grid; gap: var(--sx-sp-5) var(--sx-sp-6); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .sx-honesty dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sx-honesty dt { font: 600 12.5px/1.4 var(--sx-display); letter-spacing: -.005em; color: var(--text); margin: 0 0 3px; }
html[data-lang="zh"] .sx-honesty dt { letter-spacing: 0; }
.sx-honesty dd { margin: 0; font: 400 13px/1.55 var(--font-ui); color: var(--sx-text-2); }

/* ── CATALYST MODE — the evidence boundary ─────────────────────────────────
   There is no event data, so this mode draws NOTHING that could be mistaken for
   it: no timeline, no axes, no dimmed chart waiting to be filled. Its one
   graphic device is the RAIL at the head of each ledger row — solid ink where a
   source is connected, a hollow 1px outline where it is not — so the reader
   counts the boundary before reading a word (the doctrine's canonized
   "non-verbal encoding that needs no vocabulary"). The break line between the
   two groups is the signature: the ledger is bisected exactly where the
   evidence ends, and it says so. Everything else in this mode is deliberately
   quiet type on the existing card system — one bold idea, not five. */
/* The stance line — Law 1's "so what do I do". It is the second thing read on
   this surface, so it takes near-primary ink, not the muted footnote token: at
   --sx-text-2 on the raw canvas (no panel lift under it) it measured 4.26:1 in
   light, the worst copy on the mode and the one line that must not be skimmable
   past. */
.sx-cat-act {
  font: 500 15px/1.5 var(--font-ui);
  color: color-mix(in srgb, var(--text) 86%, transparent);
  margin: -6px 0 var(--sx-sp-4); max-width: 56ch; text-wrap: pretty;
}
html[data-lang="zh"] .sx-cat-act { max-width: 30em; }

.sx-ledcard { padding-top: var(--sx-sp-5); }
.sx-led { list-style: none; margin: 0; padding: 0; }
.sx-led-row {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  gap: 0 var(--sx-sp-4);
  align-items: start;
  padding: var(--sx-sp-3) 0;
  border-top: 1px solid var(--sx-hair);
}
.sx-led-row:first-child { border-top: 0; padding-top: 4px; }
/* The whole point of the mark: filled = we have it, hollow = we do not. It is
   the only place in this mode where ink is spent. */
.sx-rail { display: block; align-self: stretch; min-height: 30px; border-radius: 2px; }
.is-on  > .sx-rail { background: var(--sx-ink); }
/* A hollow 1px outline was tried first and does not read at a 3px width — it
   renders as a slightly paler solid line, which is the opposite of the point.
   Dashed is this page's own vocabulary for "not settled" already (the gate
   rules, the exploratory chip, the notice boxes), so the boundary is spoken in
   a language the reader has met three times before they reach it. */
.is-off > .sx-rail {
  background: repeating-linear-gradient(to bottom,
    color-mix(in srgb, var(--text) 32%, transparent) 0 3px, transparent 3px 7px);
}
/* THE THIRD STATE. `Forecasts` and `Symbol screening` are not sources we lack —
   we chose never to build them. Marking a choice on the evidence axis is what
   made the ledger glance as "3 gaps" when there is exactly one, so these rows
   carry NO rail: the grid column stays for alignment and is simply empty. */
.sx-led-h3 {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase;
  letter-spacing: .08em; color: var(--sx-text-2);
  margin: var(--sx-sp-5) 0 var(--sx-sp-2);
}
html[data-lang="zh"] .sx-led-h3 { letter-spacing: .02em; text-transform: none; font-size: 12px; }
.sx-led-never .sx-led-row { grid-template-columns: 3px minmax(0, 1fr) auto; }
.sx-led-never .sx-led-body { grid-column: 2; }
.sx-led-never .sx-led-state { grid-column: 3; }

/* The route out of the boundary: where trial dates actually live. Sits with the
   dark group because that is where the reader asks the question. */
.sx-led-route {
  font: 400 13px/1.55 var(--font-ui); color: var(--sx-text-2);
  margin: var(--sx-sp-3) 0 0; padding-left: calc(3px + var(--sx-sp-4));
}
.sx-led-route a { color: var(--sx-ink); text-underline-offset: 3px; }

.sx-led-body { display: block; min-width: 0; }
.sx-led-name {
  display: block; font: 600 14px/1.35 var(--sx-display); letter-spacing: -.005em;
  color: var(--text);
}
html[data-lang="zh"] .sx-led-name { letter-spacing: 0; }
.is-off .sx-led-name { color: var(--sx-text-2); }
.sx-led-why { display: block; font: 400 13px/1.55 var(--font-ui); color: var(--sx-text-2); margin-top: 2px; }
.sx-led-state {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase;
  letter-spacing: .06em; color: var(--sx-text-2); white-space: nowrap; padding-top: 2px;
}
html[data-lang="zh"] .sx-led-state { letter-spacing: 0; }
.is-on .sx-led-state { color: color-mix(in srgb, var(--sx-ink) 76%, var(--text)); }

/* The break: a hairline that carries its own label. The ledger is bisected
   where the evidence ends — the rule is the finding, not decoration. */
.sx-led-break {
  display: flex; align-items: center; gap: var(--sx-sp-3);
  margin: var(--sx-sp-4) 0; padding: 0;
}
.sx-led-break::before, .sx-led-break::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: color-mix(in srgb, var(--text) 22%, transparent);
}
.sx-led-break::before { flex-grow: 0; flex-basis: 3px; }
.sx-led-break span {
  font: 600 11px/16px var(--sx-display); text-transform: uppercase;
  letter-spacing: .08em; color: var(--sx-text-2); white-space: nowrap;
}
html[data-lang="zh"] .sx-led-break span { letter-spacing: .02em; }

.sx-list { list-style: none; margin: 0; padding: 0; }
.sx-list li {
  font: 400 13.5px/1.55 var(--font-ui); color: var(--text);
  padding: 9px 0; border-top: 1px solid var(--sx-hair);
}
.sx-list li:first-child { border-top: 0; padding-top: 0; }
.sx-cat-lead { font: 400 13px/1.55 var(--font-ui); color: var(--sx-text-2); margin: 0 0 var(--sx-sp-3); }
.sx-cat-close { font: 400 13px/1.55 var(--font-ui); color: var(--sx-text-2); margin: var(--sx-sp-3) 0 0; }

/* The one-click route back. It is the only affordance in this mode that should
   attract a click, so it is the only thing wearing the ink as a fill. */
.sx-cta {
  display: inline-flex; align-items: center; margin-top: var(--sx-sp-4);
  padding: 10px 15px; border-radius: var(--sx-r-md); cursor: pointer;
  font: 600 13px/1 var(--sx-display); letter-spacing: -.005em;
  color: var(--text);
  background: color-mix(in srgb, var(--sx-ink) 26%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--sx-ink) 52%, var(--line));
  transition: background .16s ease, border-color .16s ease;
}
html[data-lang="zh"] .sx-cta { letter-spacing: 0; }
.sx-cta:hover {
  background: color-mix(in srgb, var(--sx-ink) 38%, var(--panel));
  border-color: color-mix(in srgb, var(--sx-ink) 70%, var(--line));
}
.sx-cta:focus-visible { outline: 2px solid var(--sx-ink); outline-offset: 2px; }
html[data-theme="light"] .sx-cta {
  background: color-mix(in srgb, var(--sx-ink) 14%, #fff);
  color: color-mix(in srgb, var(--sx-ink) 80%, var(--text));
}
html[data-theme="light"] .sx-cta:hover { background: color-mix(in srgb, var(--sx-ink) 22%, #fff); }

/* ── mobile: recompose, never squeeze (§7) ─────────────────────────────── */
@media (max-width: 720px) {
  .sx-wrap { padding: var(--sx-sp-4) 14px 56px; }
  .sx-mast { align-items: stretch; gap: var(--sx-sp-3); }
  .sx-two { grid-template-columns: 1fr; }
  .sx-sm { grid-template-columns: 1fr; }
  .sxf { height: 260px; }
  /* 44x48 TOUCH TARGETS (spec §4). The SVG is preserveAspectRatio="none", so a
     hit rect declared in viewBox units is squashed to ~0.34x horizontally and
     ~0.70x vertically at 375px — the 30x40 desktop rect renders about 10x28 CSS
     px, well under the minimum. These are the user-unit sizes that come out at
     >=44x48 on a 375px screen. They are deliberately ASYMMETRIC: the start
     handle's target extends left and the end handle's right, so two large
     targets can never overlap even at the 5-day minimum window. */
  .sxf-handle .hit { y: 294px; height: 72px; }
  #sxf-h1 .hit { x: -140px; width: 145px; }
  #sxf-h2 .hit { x: -5px; width: 145px; }
  .sx-years { max-height: none; overflow: visible; }
  .sx-pick { flex: 1 1 100%; }
  .sx-honesty dl { grid-template-columns: 1fr; gap: var(--sx-sp-3); }
  /* The ledger drops the status column under the row rather than squeezing it
     against the name; the rail then spans both lines so the mark still reads as
     one row's worth of evidence. */
  .sx-led-row, .sx-led-never .sx-led-row { grid-template-columns: 3px minmax(0, 1fr); gap: 0 var(--sx-sp-3); }
  .sx-rail { grid-row: 1 / span 2; }
  .sx-led-state, .sx-led-never .sx-led-state { grid-column: 2; margin-top: 6px; padding-top: 0; }
  .sx-led-route { padding-left: calc(3px + var(--sx-sp-3)); }
  .sx-cat-act { font-size: 14px; }
  /* years table -> cards, 2 per row */
  table.sx-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.sx-tbl, table.sx-tbl tbody { display: block; }
  table.sx-tbl tbody { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sx-sp-2); }
  table.sx-tbl tr { display: block; border: 1px solid var(--sx-hair); border-radius: 9px; padding: var(--sx-sp-2) 10px; }
  table.sx-tbl td { display: block; border-top: 0; padding: 0; }
  table.sx-tbl td.y { font-size: 11.5px; color: var(--sx-text-2); }
  table.sx-tbl td.r { font-size: 15px; margin: 1px 0 6px; }
  table.sx-tbl th:last-child, table.sx-tbl td:last-child { width: auto; }
}
@media (max-width: 420px) {
  .sx-chip { font-size: 11.5px; padding: 6px 9px; }
  .sx-ctrls { gap: var(--sx-sp-2); }
}

/* Touch targets. The gate handles carry their own user-unit sizing above (the
   SVG is preserveAspectRatio="none", so CSS px do not survive into it); these
   are the ordinary HTML controls, which shipped at 23-26px tall — a finger
   misses those. Keyed on the POINTER, not the width, so a desk mouse keeps the
   dense row and a touch screen gets the floor. */
@media (pointer: coarse) {
  .sx-seg .gbtn { min-height: 40px; padding: 6px 14px; }
  .sx-quick button { min-height: 40px; padding: 5px 12px; }
  .sx-pick input { padding: 13px 0; }
  /* The `?` dot is deliberately NOT given an oversized invisible hit box: it
     sits 2px from the last segment of a control, and a 44px box centred on it
     would swallow taps meant for "Detrended" / "Max". A Tier-2 tip that is a
     little fiddly to reach beats a control that misfires. */
}

/* ── motion: narrates arrival, never interaction (§4) ──────────────────── */
@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes sx-draw { to { stroke-dashoffset: 0; } }

.sxf-strand { animation: sx-fade 260ms ease-out both; }
.sxf-band   { animation: sx-fade 420ms ease-out 200ms both; }
.sxf-median { stroke-dasharray: var(--sx-len, 4000); stroke-dashoffset: var(--sx-len, 4000);
              animation: sx-draw 900ms cubic-bezier(.33,.62,.26,1) 240ms forwards; }
.sxf-gate, .sxf-gatefill, .sxf-handle, .sxf-today { animation: sx-rise 240ms ease-out 900ms both; }
.sx-chip    { animation: sx-fade 200ms ease-out both; }

/* re-selection only transitions lighting — it is never re-animated */
.sxf-gatefill { transition: fill-opacity 120ms linear; }
.sxf-gate, .sxf-handle { transition: transform 120ms linear; }

@media (prefers-reduced-motion: reduce) {
  .sxf-strand, .sxf-band, .sxf-median, .sxf-gate, .sxf-gatefill,
  .sxf-handle, .sxf-today, .sx-chip, .sx-fan .f, .sx-fan .fmed,
  .sx-pick-field, .sx-pick-ic, .sx-pick-kbd, .sx-seg .gbtn, .sx-quick button,
  /* .sx-cta is the only new thing on the Catalyst surface that moves (a
     background/border transition). .sx-cta::before/::after and
     .sx-led-break::before/::after were named here in the first cut and carry no
     animation and no transition — .sx-cta has no generated content at all — so
     the kill block was pinning dead selectors and the guard asserting them was
     vacuous. Pseudos are still named the moment one of them actually moves. */
  .sx-help, .sx-cta {
    animation: none !important; transition: none !important;
    opacity: 1; transform: none;
  }
  .sxf-median { stroke-dasharray: none; stroke-dashoffset: 0; }
  .sxf-strand { stroke-opacity: .14; }
  /* The hint fades on focus rather than moving, so parking the transition must
     not park the state change itself. */
  .sx-pick-field:focus-within .sx-pick-kbd { opacity: 0; }
}
