/* Weekend Board styles. Colours, type scale and spacing come from design/tokens.css (served at /tokens.css). */
@font-face {
  font-family: "Archivo";
  src: url("/static/fonts/archivo-latin-var.woff2") format("woff2-variations"),
       url("/static/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* redesign10 (evidence/redesign10/DESIGN.md): a terminal-grade data board. Dense tables, tabular numerals, 13px UI
   type, 1px rules, no shadows. Green/red only for direction; amber only for "closed" and the brand's tape. */
:root {
  --wrap: 1440px;
  --gutter: 12px;
  --head-h: 48px;
  --fs-11: 0.6875rem; --fs-13: 0.8125rem;
  --rule: color-mix(in srgb, var(--line) 75%, transparent);
  --hover: color-mix(in srgb, var(--surface) 70%, transparent);
  --tint-closed: color-mix(in srgb, var(--closed) 14%, transparent);
  --tint-up: color-mix(in srgb, var(--up) 85%, transparent);
  --track: color-mix(in srgb, var(--line) 55%, transparent);
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  --amber: #F5B041; --navy: #0F1B2D;
  /* one column template shared by the header and every row, so columns line up. stress12 #12: the action track (Long /
     Short) is a FIXED width (--act), never `auto`: an auto track was 0 px in the header (its cell is empty) and ~102 px
     in rows with trade links, so the 1.5fr name column differed and every header sat one column off at >= 1380 px.
     --cols lists only the tracks shown at that width; the hidden cells are display:none in the header AND the rows. */
  --cols: minmax(170px, 1.5fr) 132px 184px 124px 92px 72px 88px 76px 76px 84px;
  --act: 112px;
  --colgap: 14px;
}
@media (min-width: 720px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: var(--fs-14); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
code { font-family: inherit; font-weight: 500; font-size: 0.95em; background: var(--surface); padding: 1px 5px; border-radius: var(--radius-s); }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-dim); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-s); z-index: 50; }
.skip:focus { left: 8px; }

/* ---- top bar: one row, terminal-like ------------------------------------------------------------------------- */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 4px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1.0625rem; font-weight: 800; font-stretch: 75%; letter-spacing: 0; height: 40px; margin-right: 14px; flex: none; }
.brand-mark { width: 22px; height: 22px; }
.site-nav { display: flex; align-items: center; height: 100%; min-width: 0; }
.nav-list { display: flex; align-items: stretch; height: 100%; list-style: none; margin: 0; padding: 0; }
.nav-list > li { display: flex; }
.site-nav a, .nav-more-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; font-size: var(--fs-13); font-weight: 500; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .nav-more-btn:hover { color: var(--text); }
.nav-list > li > a[aria-current="page"], .nav-more-btn.is-current { color: var(--text); box-shadow: inset 0 -2px 0 var(--closed); }
.nav-more { position: relative; }
.nav-more-btn { height: 100%; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav-more-btn svg { width: 9px; height: 6px; }
.nav-sec { display: none; position: absolute; top: calc(100% + 1px); left: 0; min-width: 180px; list-style: none; margin: 0; padding: 4px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 0 0 var(--radius-s) var(--radius-s); z-index: 31; }
.nav-more[data-open] .nav-sec { display: block; }
.nav-sec a { display: flex; height: 34px; padding: 0 14px; }
.nav-sec a:hover { background: var(--surface); }
.nav-sec a[aria-current="page"] { color: var(--text); box-shadow: inset 2px 0 0 var(--closed); }
.nav-toggle { display: none; }
.head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.theme-toggle, .nav-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--text-dim); background: transparent; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.nav-toggle { display: none; }
.theme-toggle:hover, .nav-toggle:hover { color: var(--text); border-color: var(--text-dim); }
.theme-toggle svg { width: 16px; height: 16px; }
.nav-toggle svg { width: 18px; height: 18px; }
.btn-terminal { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--radius-s); background: var(--amber); color: var(--navy); font-size: var(--fs-13); font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-terminal:hover { background: color-mix(in srgb, var(--amber) 88%, #fff); text-decoration: none; }
.btn-terminal[hidden] { display: none; }   /* home13: the shared page's unfilled slot (display:inline-flex beat [hidden]) */
/* phones and narrow tablets: one row (brand, Terminal, theme, menu). The links live in the menu panel. */
@media (max-width: 899px) {
  .site-nav { order: 3; height: auto; }
  .nav-toggle { display: inline-grid; }
  .head-tools { margin-left: auto; }
  .js .nav-list { display: none; }
  .site-nav[data-open] .nav-list { display: grid; grid-template-columns: 1fr 1fr; position: fixed; top: var(--head-h); left: 0; right: 0; height: auto;
    max-height: calc(100vh - var(--head-h)); overflow-y: auto; padding: 6px var(--gutter) 12px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 31; }
  .site-nav[data-open] .nav-list > li > a, .site-nav[data-open] .nav-sec a { height: 44px; padding: 0 8px; font-size: var(--fs-14); box-shadow: none; }
  .site-nav[data-open] .nav-list a[aria-current="page"] { color: var(--text); box-shadow: inset 2px 0 0 var(--closed); }
  .site-nav[data-open] .nav-more { display: contents; }
  .site-nav[data-open] .nav-more-btn { display: none; }
  .site-nav[data-open] .nav-sec { display: contents; }
  .site-nav[data-open] .nav-sec > li { display: flex; }
  html:not(.js) .head-row { flex-wrap: wrap; height: auto; }
  html:not(.js) .nav-list { flex-wrap: wrap; order: 4; width: 100%; }
  html:not(.js) .nav-more .nav-sec { display: contents; }
  html:not(.js) .nav-more-btn { display: none; }
  html:not(.js) .nav-toggle { display: none; }
}
@media (max-width: 379px) { .brand span { display: none; } }

.site-foot { padding-top: var(--space-6); padding-bottom: var(--space-6); margin-top: var(--space-8); font-size: var(--fs-12); color: var(--text-dim); border-top: 1px solid var(--line); }
.site-foot p + p { margin-top: var(--space-1); }
.site-foot a { color: var(--text-dim); }
.site-foot a:hover { color: var(--text); }
.foot-dim { color: var(--text-dim); font-size: var(--fs-12); max-width: 90ch; }

/* ---- shared bits -------------------------------------------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--radius-s); font-size: var(--fs-12); color: var(--closed); background: var(--tint-closed); border: 1px solid color-mix(in srgb, var(--closed) 30%, transparent); line-height: 1.4; }
.chip strong { font-weight: 700; color: var(--closed); white-space: nowrap; }
.chip-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--closed); }
.chip-open { color: var(--text-dim); background: transparent; border-color: var(--line); }
/* fixB P0-1: real pricing live outside the cash session (overnight / extended): not "closed", no countdown */
.chip-live { color: var(--text-dim); background: transparent; border-color: var(--line); }
.chip-live .chip-dot { background: var(--up); }
.chip-live strong { color: var(--text); }
.btn-trade { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 10px; border-radius: var(--radius-s); background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; font-size: var(--fs-12); text-decoration: none; white-space: nowrap; }
.btn-trade:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--bg)); text-decoration: none; }
.btn-trade-lg { min-height: 40px; padding: 0 20px; font-size: var(--fs-14); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-s); border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: var(--fs-13); }
.btn-ghost:hover { border-color: var(--text-dim); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.display { font-stretch: 75%; font-weight: 800; letter-spacing: -0.01em; line-height: 1.05; }
.arrow { width: 12px; height: 8px; flex: none; color: var(--text-dim); margin: 0 5px; }

/* ---- home: one line of context, then data --------------------------------------------------------------------- */
.board-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0 8px; }
.hero-title { font-size: var(--fs-13); font-weight: 600; color: var(--text); }
.hero-title span + span::before { content: " "; }
.status { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-12); color: var(--text-dim); }
.status-top { display: none; }
.status-time::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); margin-right: 6px; vertical-align: 1px; }
.status-time.is-live::before { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 20%, transparent); }
.status-time.is-stale { color: var(--closed); font-weight: 600; }
.status-time.is-stale::before { background: var(--closed); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 0 auto; }
.chips > .chip { position: relative; }   /* keeps the chip's .sr detail inside the mobile scroll strip */
.lede { font-size: var(--fs-14); line-height: 1.55; color: var(--text-dim); max-width: 72ch; }

/* the tape: biggest gaps in one strip */
.movers { display: flex; align-items: stretch; border: 1px solid var(--line); border-left: 3px solid var(--closed); border-radius: var(--radius-s); background: var(--surface); overflow: hidden; }
.movers-title { flex: none; display: flex; align-items: center; padding: 0 12px; font-size: var(--fs-12); font-weight: 600; color: var(--text-dim); border-right: 1px solid var(--line); white-space: nowrap; }
.movers-list { position: relative; list-style: none; margin: 0; padding: 0; display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mover { position: relative; }   /* keeps the .sr labels inside the scroll strip (they overflowed the page at 393 px) */
.movers-list::-webkit-scrollbar { display: none; }
.mover { flex: 1 1 0; min-width: 150px; max-width: 250px; border-right: 1px solid var(--rule); }
.mover a { justify-content: space-between; grid-template-columns: minmax(0, 1fr) auto; }
.mover a { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; padding: 7px 14px 5px; text-decoration: none; }
.mover a:hover { background: var(--hover); }
.mv-name { font-weight: 600; font-size: var(--fs-13); white-space: nowrap; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.mv-venue { display: none; }
.mv-gap { font-size: var(--fs-14); font-weight: 700; white-space: nowrap; text-align: right; }
.mv-gap .gap-sub { display: none; }
.mover .gapbar { grid-column: 1 / -1; height: 6px; margin-top: 3px; }
.mover .gapbar-fill { height: 4px; margin-top: -2px; }
.mover .gapbar-track { height: 1px; }
.mover .gapbar-axis { width: 1px; }

/* toolbar: asset-class tabs + share */
.board-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font: inherit; font-size: var(--fs-13); font-weight: 500; color: var(--text-dim); background: transparent; border: 1px solid transparent; border-radius: var(--radius-s); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--text); background: var(--surface); border-color: var(--line); }
.tab-n { font-size: var(--fs-11); color: var(--text-dim); }
.tab[hidden] { display: none; }

/* ---- the market table ------------------------------------------------------------------------------------------ */
.board { margin-top: 8px; border-top: 1px solid var(--line); }
.thead, .row { display: grid; grid-template-columns: var(--cols) var(--act); column-gap: var(--colgap); align-items: center; }
/* no trade links anywhere on this board (links off, a blocked country): no empty action column. The shared edge page
   keeps it (its rows carry empty .trade-cell slots that site.js fills). */
.board:not([data-trade-on]):not(:has(.trade-cell)) { --act: 0px; }
.thead { position: sticky; top: var(--head-h); z-index: 5; padding: 0 12px; height: 30px; font-size: var(--fs-11); color: var(--text-dim); background: var(--bg); border-bottom: 1px solid var(--line); }
.th { font: inherit; font-size: var(--fs-11); color: var(--text-dim); background: none; border: 0; padding: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.th { cursor: pointer; height: 100%; }
button.th:hover { color: var(--text); }
button.th[aria-sort]::after { content: ""; display: inline-block; margin-left: 4px; border: 4px solid transparent; vertical-align: 1px; }
button.th[aria-sort="descending"]::after { border-top-color: currentColor; border-bottom-width: 0; }
button.th[aria-sort="ascending"]::after { border-bottom-color: currentColor; border-top-width: 0; vertical-align: 3px; }
button.th[aria-sort] { color: var(--text); }
.th-name, .th-sess { text-align: left; }
.th-bar { display: flex; justify-content: space-between; }
.th-axis { color: var(--text); }
.th-spark { text-align: center; }
.th-arrow { margin: 0 2px; }
.board-body { display: block; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 12px 12px 5px; border-bottom: 1px solid var(--rule); }
.group-head h2 { font-size: var(--fs-13); font-weight: 700; }
.group-meta { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-dim); }
.group-meta.closed { color: var(--closed); }
.group-meta.live .chip-dot { background: var(--up); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; padding: 0 12px; min-height: 40px; border-bottom: 1px solid var(--rule); font-size: var(--fs-13); }
.row:hover { background: var(--hover); }
.row > * { min-width: 0; }
.cell-name { display: flex; flex-direction: column; justify-content: center; min-height: 40px; text-decoration: none; }
.cell-name::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens the market */
.cell-name:hover .mname { text-decoration: underline; text-underline-offset: 3px; }
.mname { font-weight: 600; font-size: var(--fs-13); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcode { font-size: var(--fs-11); color: var(--text-dim); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-badge { display: none; }
/* QA-ROUND4 N9: liquidity tier, data's words (thin / moderate); liquid markets carry no tag */
.liq-tag { display: inline-block; margin-left: 4px; padding: 0 4px; border: 1px dashed currentColor; border-radius: 2px; font-size: var(--fs-11); line-height: 1.3; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.liq-tag.liq-thin { color: var(--closed); }
a.liq-tag:hover { color: var(--text); }
dd small.liq-thin { color: var(--closed); }
.cell-sess { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--fs-12); }
.sess { display: inline-block; padding: 0 5px; line-height: 17px; border-radius: 2px; font-size: var(--fs-11); font-weight: 600; border: 1px solid var(--line); color: var(--text-dim); }
.sess-closed { color: var(--closed); background: var(--tint-closed); border-color: color-mix(in srgb, var(--closed) 30%, transparent); }
.sess-ext { color: var(--text); border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.sess-in { color: var(--text-dim); }
.cell-px { display: flex; align-items: center; justify-content: flex-end; white-space: nowrap; }
.cell-px .ref { color: var(--text-dim); }
.cell-px .live { color: var(--text); font-weight: 600; min-width: 4.5ch; text-align: right; border-radius: 2px; }
.est-mark { margin-left: 1px; font-size: 0.625rem; vertical-align: super; color: var(--text-dim); text-decoration: none; cursor: help; }
.cell-gap { text-align: right; font-size: var(--fs-14); font-weight: 700; white-space: nowrap; line-height: 1.2; }
.gap-note { margin-left: 3px; font-size: var(--fs-11); font-weight: 500; color: var(--text-dim); }
.cell-chg, .cell-vol, .cell-oi, .cell-fund { text-align: right; white-space: nowrap; }
.cell-vol, .cell-oi, .cell-fund { color: var(--text-dim); }
.cell-spark { display: flex; justify-content: center; }
.cell-spark .spark { width: 88px; height: 24px; }
.row .btn-trade { justify-self: end; position: relative; z-index: 1; }
.row .liq-tag { position: relative; z-index: 1; }
.row-msg { padding: 14px 12px; font-size: var(--fs-13); color: var(--text-dim); border-bottom: 1px solid var(--rule); }

/* sorted: one flat list across groups (group heads hide; rows take their CSS order) */
.board.is-sorted .board-body { display: flex; flex-direction: column; }
.board.is-sorted .group, .board.is-sorted .rows { display: contents; }
.board.is-sorted .group-head { display: none; }
.board .group[hidden] { display: none !important; }
.board .row[hidden] { display: none; }

/* live price flash (subtle; off for reduced motion) */
@keyframes flash-up { from { background: color-mix(in srgb, var(--up) 28%, transparent); } to { background: transparent; } }
@keyframes flash-down { from { background: color-mix(in srgb, var(--down) 28%, transparent); } to { background: transparent; } }
.flash-up { animation: flash-up 900ms ease-out; }
.flash-down { animation: flash-down 900ms ease-out; }

/* the signature gap bar: fixed last-close axis at 50%, bar grows right (up) or left (down) */
.gapbar { position: relative; height: 16px; }
.gapbar-track { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--track); }
.gapbar-axis { position: absolute; left: 50%; top: 1px; bottom: 1px; width: 1px; background: var(--text-dim); }
.gapbar-fill { position: absolute; top: 50%; height: 8px; margin-top: -4px; transition: width 300ms ease-out; }
.gapbar-fill.up { left: 50%; background: var(--up); border-radius: 0 2px 2px 0; }
.gapbar-fill.down { right: 50%; background: var(--down); border-radius: 2px 0 0 2px; }
.gapbar-fill.up, .gapbar-fill.down { min-width: 2px; }
.gapbar-fill.flat { display: none; }
.gapbar.is-open .gapbar-axis { opacity: 0.4; }
.gapbar-big { height: 28px; }
.gapbar-big .gapbar-fill { height: 14px; margin-top: -7px; }

.spark { overflow: visible; }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-ref { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; opacity: 0.6; }
.spark-dot { fill: currentColor; }
.spark.flat { color: var(--text-dim); }

.foot-key { margin-top: 10px; font-size: var(--fs-11); color: var(--text-dim); max-width: 120ch; }
.foot-key .est-mark { vertical-align: baseline; font-size: inherit; }
.how { margin-top: 8px; font-size: var(--fs-12); color: var(--text-dim); }
.how summary { cursor: pointer; display: inline-block; padding: 4px 0; color: var(--text); font-weight: 600; }
.how-body { display: grid; gap: 8px; padding: 6px 0 4px; max-width: 90ch; }
.est-badge { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-11); color: var(--text-dim); text-decoration: none; margin-left: auto; }
.est-badge abbr.est { margin-left: 0; margin-right: 3px; font-size: inherit; }
.est-badge:hover { color: var(--text); }
.hc-est { margin-left: 4px; font-size: var(--fs-12); color: var(--text-dim); }
.m-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
/* while the home exchange is open the Gap column would repeat the 24h column: show a dash instead */
.row.is-open .cell-gap > .gap-val, .row.is-open .cell-gap > .gap-note { display: none; }
.row.is-open.is-live .cell-gap::after { content: "–"; color: var(--text-dim); font-weight: 400; }
.board-note { font-size: var(--fs-12); color: var(--text-dim); max-width: 90ch; }

/* desks: two compact links under the table */
.doors { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 0; }
@media (min-width: 760px) { .doors { grid-template-columns: 1fr 1fr; } }
.door { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 12px; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s); min-width: 0; font-size: var(--fs-12); }
.door:hover { background: var(--hover); text-decoration: none; }
.door-title { font-size: var(--fs-13); font-weight: 700; }
.door-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--text-dim); }
.door-facts strong { font-variant-numeric: tabular-nums; color: var(--text); }
.door-facts strong.up { color: var(--up); } .door-facts strong.down { color: var(--down); }
.door-facts span.door-univ { font-size: var(--fs-11); }

/* widths: drop columns right to left as the screen narrows (stress12 #12). Each --cols has exactly one track per cell
   still shown (+ the fixed action track), so the header and every row fill the same tracks; the name column keeps
   its minimum at the narrow end of each range (content = viewport - 2 x gutter - 24 px row padding). */
@media (max-width: 1439px) { :root { --cols: minmax(160px, 1.5fr) 128px 176px 110px 88px 68px 84px 72px 72px; } .th-fund, .cell-fund { display: none; } }
@media (max-width: 1279px) { :root { --cols: minmax(160px, 1.5fr) 128px 176px 110px 88px 68px 84px 72px; } .th-oi, .cell-oi { display: none; } }
@media (max-width: 1199px) { :root { --cols: minmax(150px, 1.5fr) 124px 168px 84px 66px 88px 70px; } .th-bar, .row > .gapbar { display: none; } }
@media (max-width: 1079px) { :root { --cols: minmax(150px, 1.5fr) 124px 168px 84px 66px 70px; } }
@media (min-width: 640px) and (max-width: 1079px) { .th-spark, .cell-spark { display: none; } }   /* back at 840–959 (no price column there) */
@media (max-width: 959px) { :root { --cols: minmax(140px, 1.6fr) 118px 84px 64px 88px 64px; } .th-px, .cell-px { display: none; } }
@media (min-width: 840px) and (max-width: 959px) { .th-spark { display: block; } .cell-spark { display: flex; } }
@media (max-width: 839px) { :root { --cols: minmax(140px, 1.6fr) 118px 84px 64px 64px; } }
@media (max-width: 719px) { :root { --cols: minmax(140px, 1.6fr) 118px 84px 64px; } }
@media (min-width: 640px) and (max-width: 719px) { .th-vol, .cell-vol { display: none; } }
/* phones: name + session | sparkline | last + 24h | gap */
@media (max-width: 639px) {
  :root { --gutter: 12px; }
  .board-top { padding: 8px 0 6px; gap: 4px 10px; }
  .hero-title { font-size: var(--fs-12); }
  .chips { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex-basis: calc(100% + 2 * var(--gutter)); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; font-size: var(--fs-11); }
  .movers { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; border-left-width: 0; border-right: 0; }
  .movers-title { display: none; }
  .mover { flex: none; min-width: 0; }
  .mover a { padding: 6px 12px 4px; }
  .board-bar { margin-top: 8px; }
  .board-bar .share { display: none; }
  .tabs { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .board { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .thead, .row { grid-template-columns: minmax(0, 1fr) 40px 70px 86px; column-gap: 8px; padding: 0 var(--gutter); }
  .cell-gap .gap-sub { font-size: 0.625rem; }
  .thead > .th-sess, .thead > .th-px, .thead > .th-bar, .thead > .th-vol, .thead > .th-oi, .thead > .th-fund, .thead > .th-trade { display: none; }
  .thead > .th-name { grid-column: 1; grid-row: 1; }
  .thead > .th-spark { grid-column: 2; grid-row: 1; visibility: hidden; }
  .thead > .th-chg { grid-column: 3; grid-row: 1; }
  .thead > .th-gap { grid-column: 4; grid-row: 1; }
  .row { grid-template-areas: "name spark px gap" "sess spark chg gap"; min-height: 48px; padding-top: 5px; padding-bottom: 5px; row-gap: 0; }
  .row > .cell-px { grid-area: px; display: flex; font-size: var(--fs-13); }
  .cell-px .arrow, .cell-px .est-mark { display: none; }
  /* phone: the last close is not drawn, but screen readers still hear it ("Last close 61,186, now 60,669") */
  .cell-px .ref { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .cell-px .live { font-weight: 500; }
  .cell-name { grid-area: name; min-height: 0; }
  .cell-name .mcode { display: none; }
  .cell-sess { grid-area: sess; font-size: var(--fs-11); }
  .cell-spark { grid-area: spark; display: flex; }
  .cell-spark .spark { width: 40px; height: 20px; }
  .cell-chg { grid-area: chg; font-size: var(--fs-11); line-height: 1.25; }
  .cell-gap { grid-area: gap; font-size: var(--fs-14); }
  .row > .gapbar, .cell-vol, .cell-oi, .cell-fund { display: none; }
  .row .btn-trade { display: none; }
  .group-head { padding: 10px var(--gutter) 4px; }
  .group-meta { font-size: var(--fs-11); }
  .doors { margin-top: 12px; }
}

/* QA-ROUND3 P1-7: the gap vs the cash close, beside the move since real pricing stopped */
.gap-sub { display: block; margin-top: 1px; font-size: var(--fs-12); font-weight: 500; font-stretch: 100%; color: var(--text-dim); }
.gap-sub[hidden] { display: none; }
.cell-gap .gap-sub { font-size: var(--fs-11); font-weight: 500; }

/* ---- market page: header strip, chart + figures side by side --------------------------------------------------- */
.crumb { padding-top: 6px; font-size: var(--fs-12); }
.crumb a { color: var(--text-dim); text-decoration: none; display: inline-flex; min-height: 28px; align-items: center; }
.arrow-back { margin: 0 6px 0 0; color: currentColor; }
.crumb a:hover { color: var(--text); }
.m-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.m-head h1 { font-size: 1.75rem; }
.m-sub { margin-top: 2px; color: var(--text-dim); font-size: var(--fs-12); }
.m-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 32px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-label { font-size: var(--fs-11); color: var(--text-dim); }
.m-now, .m-gap { font-size: 1.75rem; font-weight: 800; font-stretch: 87.5%; line-height: 1.1; margin-top: 2px; }
.m-delta { font-size: var(--fs-14); font-weight: 600; font-stretch: 100%; }
.m-cta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.m-cta-note { font-size: var(--fs-11); color: var(--text-dim); max-width: 40ch; text-align: right; }
.m-ipo-link { margin-top: 8px; font-size: var(--fs-12); color: var(--closed); }
.m-bar { margin-top: 10px; max-width: 560px; }
.m-bar-labels { display: flex; justify-content: space-between; font-size: var(--fs-11); color: var(--text-dim); }
.m-bar-labels span:nth-child(2) { color: var(--text); }
.m-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
@media (min-width: 1100px) { .m-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.chart-panel { padding: 10px 12px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 6px; }
.chart-head h2 { font-size: var(--fs-13); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: var(--fs-11); color: var(--text-dim); }
.lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg-line, .lg-dash, .lg-closed { display: inline-block; width: 14px; height: 0; }
.lg-line { border-top: 2px solid var(--text); }
.lg-line.up { border-color: var(--up); } .lg-line.down { border-color: var(--down); }
.lg-dash { border-top: 1px dashed var(--text-dim); }
.lg-closed { height: 8px; background: color-mix(in srgb, var(--closed) 22%, transparent); border-radius: 1px; }
.chart { height: clamp(280px, 36vw, 460px); }
.chart-fallback { padding: var(--space-6); color: var(--text-dim); }
.stats dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
@media (min-width: 1100px) { .stats dl { grid-template-columns: 1fr; } .stats dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; } .stats dd { text-align: right; } }
@media (min-width: 640px) and (max-width: 1099px) { .stats dl { grid-template-columns: repeat(4, 1fr); } }
.stats dl > div { background: var(--bg); padding: 7px 10px; }
.stats dt { font-size: var(--fs-12); color: var(--text-dim); }
.stats dd { margin: 0; font-size: var(--fs-14); font-weight: 600; }
.stats dd small { display: block; font-size: var(--fs-11); font-weight: 400; color: var(--text-dim); margin-top: 1px; }
.stats-note { margin-top: 8px; font-size: var(--fs-11); line-height: 1.5; color: var(--text-dim); }
.stats-note strong { color: var(--text); font-weight: 600; }
.peers { margin-top: 16px; }
.peers h2 { font-size: var(--fs-13); margin-bottom: 6px; }
.peers ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; border-top: 1px solid var(--rule); }
.peers a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: var(--fs-13); }
.peers a:hover { background: var(--hover); }
.peers .num { font-weight: 700; }
@media (max-width: 639px) {
  .m-head h1 { font-size: 1.5rem; }
  .m-hero { gap: 8px 20px; margin-top: 8px; }
  .m-now, .m-gap { font-size: 1.5rem; }
  .m-delta { font-size: var(--fs-12); }
  .m-cta { margin-left: 0; width: 100%; align-items: stretch; }
  .m-cta .btn-trade { width: 100%; }
  .m-cta-note { text-align: center; max-width: none; }
  .chart-panel { padding: 8px 6px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .chart { height: 260px; }
  .m-share .share-label { display: none; }
}

/* ---- prose pages -------------------------------------------------------------------------------------------- */
.prose { max-width: 76ch; padding-top: var(--space-3); font-size: var(--fs-14); }
.prose h2 { font-size: var(--fs-20); font-weight: 800; font-stretch: 87.5%; margin: var(--space-8) 0 var(--space-2); line-height: 1.2; }
.prose p, .prose li, .prose dd { line-height: 1.6; }
.prose p + p { margin-top: var(--space-3); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: var(--space-2); }
.page-title { font-size: clamp(1.5rem, 0.6vw + 1.25rem, 1.875rem); margin-top: 4px; }
.toc { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.toc a { font-size: var(--fs-12); padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--text-dim); }
.toc a:hover { color: var(--text); }
.defs dt { font-weight: 700; margin-top: var(--space-6); }
.defs dd { margin: var(--space-1) 0 0; color: var(--text); }
.empty { margin-top: var(--space-8); padding: var(--space-8) var(--space-6); }
.empty h2 { margin-top: var(--space-4); }
.empty p { color: var(--text-dim); }
.empty .btn-ghost { color: var(--text); margin-top: var(--space-2); }
.callout { margin-top: var(--space-12); padding: var(--space-6); }
.callout h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin-top: var(--space-4); }
.sample-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.sample-table caption { text-align: left; color: var(--text-dim); font-size: var(--fs-12); padding-bottom: var(--space-2); }
.sample-table th, .sample-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sample-table th { font-weight: 600; color: var(--text-dim); font-size: var(--fs-12); }
.sample-table td:first-child { font-weight: 600; white-space: nowrap; }
.notfound { padding-top: var(--space-12); }
.notfound .lede { margin-bottom: var(--space-6); }
.notfound .chip { margin-bottom: var(--space-4); }

@media (prefers-reduced-motion: reduce) { .gapbar-fill { transition: none; } }

/* ---- data freshness (QA P1-2 / P1-4) ------------------------------------------------------------------------ */
.delay-banner { display: flex; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-4) var(--space-6);
  border: 1px solid var(--closed); border-left-width: 6px; border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--closed) 16%, var(--bg)); color: var(--text); }
.delay-banner[hidden] { display: none; }
.delay-banner:not([hidden]) + .hero, .delay-banner:not([hidden]) + .crumb { margin-top: var(--space-3); }
.db-icon { flex: none; width: 28px; height: 28px; color: var(--closed); margin-top: 2px; }
.db-title { font-size: var(--fs-28); font-weight: 800; font-stretch: 75%; line-height: 1.1; color: var(--closed); }
.db-text { margin-top: 4px; font-size: var(--fs-16); max-width: 80ch; }
.db-text span { font-weight: 700; }
@media (max-width: 639px) {
  .delay-banner { padding: var(--space-3) var(--space-4); margin-top: var(--space-2); }
  .db-icon { width: 22px; height: 22px; }
  .db-title { font-size: var(--fs-20); }
  .db-text { font-size: var(--fs-14); }
}
.status-time.is-stale { color: var(--closed); font-weight: 600; }
.status-time.is-stale::before { background: var(--closed); }

.state-note { display: none; font-size: var(--fs-14); font-weight: 600; font-stretch: 100%; color: var(--text-dim); white-space: nowrap; }
.row.is-stale .state-note, .row.is-unavailable .state-note { display: inline; }
.row.is-stale .gap-val, .row.is-unavailable .gap-val { display: none; }
.row.is-stale .cell-px .live, .row.is-stale .cell-px .ref { color: var(--text-dim); font-weight: 400; }
.row.is-stale .cell-px .live { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--text-dim) 60%, transparent); }
.row.is-stale .gapbar, .row.is-unavailable .gapbar { opacity: 0.35; }
.row.is-stale .gapbar-fill, .row.is-unavailable .gapbar-fill { display: none; }
.row.is-stale .spark, .row.is-unavailable .spark { color: var(--text-dim); opacity: 0.5; }
.row.is-unavailable .mname { color: var(--text-dim); }
.px-note { font-size: var(--fs-14); color: var(--text-dim); white-space: nowrap; }
.btn-trade.is-disabled { background: transparent; color: var(--text-dim); border: 1px dashed color-mix(in srgb, var(--text-dim) 55%, transparent); cursor: not-allowed; font-weight: 500; }
.btn-trade.is-disabled:hover { background: transparent; }
abbr.est { margin-left: 4px; font-size: var(--fs-12); font-weight: 500; color: var(--text-dim); text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.board-empty { margin-top: var(--space-6); max-width: 72ch; }
.m-gap-none { font-size: var(--fs-28); font-weight: 700; color: var(--text-dim); margin-top: 8px; }
.market.is-stale .m-now { color: var(--text-dim); }
.chart-tz { margin-top: var(--space-2); font-size: var(--fs-12); color: var(--text-dim); text-align: right; }

/* ---- scorecard ---------------------------------------------------------------------------------------------- */
.sc-intro { padding-bottom: 0; }
.sc-headline { margin-top: var(--space-8); padding: var(--space-6); display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-8); align-items: end; }
.sc-week { grid-column: 1 / -1; font-size: var(--fs-14); color: var(--text-dim); }
.sc-big { font-size: 2.5rem; margin-top: var(--space-1); white-space: nowrap; }
.sc-big span { font-size: var(--fs-28); font-weight: 600; color: var(--text-dim); }
.sc-big-note { grid-column: 1; font-size: var(--fs-16); color: var(--text-dim); max-width: 34ch; margin-top: var(--space-2); }
.sc-kpis { grid-column: 2; grid-row: 2 / span 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-4) var(--space-6); margin: 0; align-self: center; }
.sc-kpis dt { font-size: var(--fs-12); color: var(--text-dim); }
.sc-kpis dd { margin: 2px 0 0; font-size: var(--fs-28); font-weight: 800; font-stretch: 75%; }
.sc-kpis dd small { margin-left: 6px; font-size: var(--fs-14); font-weight: 400; font-stretch: 100%; color: var(--text-dim); }
.sc-h2 { font-size: var(--fs-28); font-weight: 800; font-stretch: 75%; line-height: 1.15; margin-top: var(--space-12); }
.sc-sub { margin-top: var(--space-2); font-size: var(--fs-14); color: var(--text-dim); max-width: 80ch; }
.sc-missing { margin-top: var(--space-3); }
.sc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); min-width: 720px; }
.sc-table th, .sc-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; white-space: nowrap; }
.sc-table thead th { font-size: var(--fs-12); font-weight: 500; color: var(--text-dim); white-space: normal; vertical-align: bottom; }
.sc-table th:first-child, .sc-table td:first-child { padding-left: 0; }
.sc-table .r { text-align: right; }
.sc-table tbody th { font-weight: 600; }
.sc-table small { color: var(--text-dim); font-size: var(--fs-12); margin-left: 4px; }
.sc-name { display: block; }
.sc-code { display: block; font-size: var(--fs-12); font-weight: 400; color: var(--text-dim); }
.sc-best { font-weight: 700; color: var(--text); }
.sc-table td.r:not(.sc-best) { color: var(--text-dim); }
.sc-table td.r.up { color: var(--up); } .sc-table td.r.down { color: var(--down); }
.sc-total th, .sc-total td { font-weight: 700; border-top: 2px solid var(--line); }
.sc-history tfoot td, .sc-history tfoot th { border-bottom: 0; }
.verdict { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.verdict svg { width: 12px; height: 12px; }
.verdict-yes { color: var(--up); }
.verdict-no { color: var(--down); }
.verdict-tie { color: var(--text-dim); }
.sc-notes { padding-top: 0; }
@media (max-width: 639px) {
  .sc-headline { grid-template-columns: 1fr; padding: var(--space-4); }
  .sc-big { font-size: 3.5rem; }
  .sc-kpis { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; margin-top: var(--space-4); }
  .sc-kpis dd { font-size: var(--fs-20); }
  .sc-h2 { font-size: var(--fs-20); margin-top: var(--space-8); }
  .table-wrap { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
}
@media (max-width: 639px) {
  /* wide scorecard tables scroll sideways; keep the market name in view */
  .sc-table th:first-child, .sc-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); padding-right: 10px; box-shadow: 1px 0 0 var(--line); }
}


/* ---- growth: alerts bar, share units, top movers, footer QR (SPEC-v2 P7) ------------------------------------ */
.alerts-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px var(--space-4);
  margin-top: 0; padding-top: 8px; padding-bottom: 8px; font-size: var(--fs-14);
  background: linear-gradient(var(--line), var(--line)) center bottom / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.ab-text { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.ab-icon { width: 18px; height: 18px; flex: none; color: var(--closed); }
.ab-sub { color: var(--text-dim); }
.ab-links { display: flex; gap: 8px; }
.btn-alert { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 600;
  font-size: var(--fs-14); text-decoration: none; background: var(--tint-closed); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--closed) 45%, transparent); white-space: nowrap; }
.btn-alert:hover { border-color: var(--closed); }
.btn-alert-ghost { background: transparent; border-color: var(--line); font-weight: 500; }
@media (max-width: 639px) {
  .alerts-bar { padding-top: 6px; padding-bottom: 6px; font-size: var(--fs-12); flex-wrap: nowrap; }
  .ab-sub { display: none; }
  .btn-alert { min-height: 30px; padding: 0 10px; font-size: var(--fs-12); }
}

/* Regional risk notice (Board 2026-11-10, board/regions.py): dismissible, kept per browser (ab-rn). Narrow screens show
   the one-line form (same points, fewer words). */
.rnotice { margin-top: var(--space-2); }
.rnotice[hidden] { display: none; }
.rn-box { display: flex; align-items: flex-start; gap: var(--space-3); padding: 10px var(--space-3) 10px var(--space-4);
  font-size: var(--fs-14); line-height: 1.45; color: var(--text-dim); border: 1px solid var(--line);
  border-left: 3px solid var(--closed); border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--closed) 6%, var(--surface)); }
.rn-text { margin: 0; flex: 1; max-width: 120ch; }
.rn-title { color: var(--text); font-weight: 600; }
.rn-short { display: none; }
.rn-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  margin: -4px -6px -4px 0; border: 1px solid transparent; border-radius: var(--radius-s); background: transparent;
  color: var(--text-dim); cursor: pointer; }
.rn-close:hover { color: var(--text); border-color: var(--line); }
.rn-close svg { width: 16px; height: 16px; }
@media (max-width: 639px) {
  .rn-box { font-size: var(--fs-12); padding: 8px var(--space-2) 8px var(--space-3); gap: var(--space-2); }
  .rn-full, .rn-title { display: none; }
  .rn-short { display: inline; }
}

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-12); }
.share-label { color: var(--text-dim); margin-right: 2px; }
.btn-share { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-share:hover { border-color: var(--text-dim); }
.btn-share[hidden] { display: none; }
.share-msg { color: var(--text-dim); min-height: 1em; }

.site-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: end; }
.foot-official { color: var(--text); }
.foot-qr { margin: 0; text-align: center; font-size: var(--fs-12); color: var(--text-dim); }
.foot-qr .qr { display: block; width: 72px; height: 72px; padding: 4px; background: #fff; color: #0F1B2D; border-radius: var(--radius-s); margin: 0 auto 4px; }
@media (max-width: 639px) { .site-foot { grid-template-columns: 1fr; } .foot-qr { display: none; } }


/* launch-ops: shadow-mode footer line (admins only, board/shadowmode.py) */
.foot-shadow { font-size: var(--fs-12); border: 1px dashed currentColor; padding: 4px 8px; border-radius: 4px; max-width: 70ch; }
/* redesign10: on phones the chart comes before the share buttons */
@media (max-width: 639px) {
  .market { display: flex; flex-direction: column; }
  .market > .m-share { order: 5; margin-top: 10px; }
  .market > .peers { order: 6; }
}
@media (max-width: 639px) {
  .group-head .est-badge { font-size: 0; }                      /* phones: just the "est." mark (title explains it) */
  .group-head .est-badge abbr.est { font-size: var(--fs-11); margin: 0; }
}

/* ---- w11-L4 B4: "trade this gap" (Long / Short) on rows and the market page --------------------------------------
   Amber is the brand's action colour; green/red stay reserved for direction, so Long and Short look alike. Rows:
   desktop shows Long / Short, phones one compact Trade (40 px target). A disabled row keeps its dashed "Trade". */
.trade-cell { justify-self: end; display: inline-flex; align-items: center; gap: 4px; position: relative; z-index: 1; }
.btn-side { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 9px;
  border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--amber) 70%, transparent); background: transparent;
  color: var(--text); font-size: var(--fs-12); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-side:hover { background: color-mix(in srgb, var(--amber) 16%, transparent); border-color: var(--amber); text-decoration: none; }
.btn-side[hidden] { display: none; }
.trade-cell .btn-trade:not(.is-disabled) { display: none; }        /* desktop: Long / Short carry the row */
.trade-cell .btn-trade.is-disabled + .btn-side, .trade-cell .btn-trade.is-disabled ~ .btn-side { display: none; }
.btn-side-lg { min-height: 40px; padding: 0 18px; font-size: var(--fs-14); font-weight: 700; background: var(--amber);
  color: var(--navy); border-color: var(--amber); }
.btn-side-lg:hover { background: color-mix(in srgb, var(--amber) 88%, #fff); }
.m-cta-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 640px) {
  .m-cta:has(.m-cta-row) { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; max-width: 560px; }
  .m-cta:has(.m-cta-row) .m-cta-note { flex-basis: 100%; max-width: 64ch; margin-left: auto; }
}
/* the market page's plain "Trade <name>" was a grey secondary button: amber now (primary when it stands alone,
   outlined next to Long / Short) */
.btn-trade-lg:not(.is-disabled) { background: var(--amber); color: var(--navy); font-weight: 700; }
.btn-trade-lg:not(.is-disabled):hover { background: color-mix(in srgb, var(--amber) 88%, #fff); }
.m-cta-row + .btn-trade-lg:not(.is-disabled) { min-height: 32px; background: transparent; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--amber) 70%, transparent); font-weight: 600; font-size: var(--fs-13); }
.m-cta-row + .btn-trade-lg:not(.is-disabled):hover { background: color-mix(in srgb, var(--amber) 16%, transparent); }
.m-cta-note a { color: var(--text-dim); }
.pub-actions .m-cta-row { vertical-align: middle; margin-right: 6px; }

/* ---- w11-L4 B11: one hero figure; "since real pricing stopped" is neutral context ------------------------------ */
.gap-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cell-gap .gap-sub, .mv-gap .gap-sub { color: var(--text-dim); font-weight: 500; }
.m-context { margin-top: 3px; font-size: var(--fs-12); color: var(--text-dim); font-weight: 500; }
.m-context .num { color: var(--text); }
.m-context-dd { color: var(--text); }
@media (max-width: 1199px) { .cell-gap .gap-sub { display: none; } }
.cell-gap .gap-sub { font-size: 0.625rem; }

/* ---- w11-L4 B15: the first market row in the first phone screen ----------------------------------------------- */
.rn-more { display: none; flex: none; align-self: center; min-height: 28px; padding: 0 8px; font: inherit; font-size: var(--fs-12);
  font-weight: 600; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.chip-more-li { display: none; list-style: none; }
.chip-more { cursor: pointer; font: inherit; font-size: var(--fs-11); font-weight: 700; }
@media (max-width: 639px) {
  /* regional notice: ONE line (title hidden; the short form ellipsised), "Read" opens it in place */
  .rnotice { margin-top: 4px; }
  .rn-box { padding: 4px 4px 4px 10px; align-items: center; gap: 6px; border-radius: var(--radius-s); }
  .rn-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rn-more { display: inline-flex; align-items: center; }
  .rn-close { width: 28px; height: 28px; margin: 0; }
  .rnotice.is-open .rn-text { white-space: normal; overflow: visible; }
  .rnotice.is-open .rn-full { display: inline; }
  .rnotice.is-open .rn-short { display: none; }
  /* one reopen chip (the next one), "+N" opens the rest */
  .chips > [data-chip-x] { display: none; }
  .chips.is-all { flex-wrap: wrap; }
  .chips.is-all > [data-chip-x] { display: inline-flex; }
  .chip-more-li { display: flex; flex: none; }
  .chips.is-all .chip-more-li { display: none; }
  /* compact alert bar */
  .alerts-bar { padding-top: 3px; padding-bottom: 3px; gap: 6px; }
  .ab-icon { width: 14px; height: 14px; }
  .btn-alert { min-height: 26px; padding: 0 9px; font-size: var(--fs-11); }
  .board-top { padding: 4px 0 4px; }
  .hero-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .board-bar { margin-top: 6px; }
  /* rows with trade links: name | now + 24h | gap | Trade (the sparkline makes room) */
  .row .trade-cell { grid-area: trade; justify-self: end; }
  .row .btn-side { display: none; }
  .row .trade-cell .btn-trade { display: inline-flex; }
  .row .btn-trade { min-height: 40px; min-width: 52px; padding: 0 8px; background: transparent; color: var(--text); font-weight: 700;
    border: 1px solid color-mix(in srgb, var(--amber) 75%, transparent); }
  .row .btn-trade.is-disabled { background: transparent; color: var(--text-dim); font-size: var(--fs-11); min-width: 52px; }
  .board[data-trade-on] .thead, .board[data-trade-on] .row { grid-template-columns: minmax(0, 1fr) 68px 78px 56px; }
  .board[data-trade-on] .row { grid-template-areas: "name px gap trade" "sess chg gap trade"; }
  .board[data-trade-on] .cell-spark { display: none; }
  .board[data-trade-on] .thead > .th-chg { grid-column: 2; }
  .board[data-trade-on] .thead > .th-gap { grid-column: 3; }
  .board[data-trade-on] .thead > .th-spark { display: none; }
  .row.crow .trade-cell { display: none; }
  .m-cta-row { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .m-cta .btn-trade-lg { width: 100%; }
}

/* ---- w11-L4: legal pages ---------------------------------------------------------------------------------------- */
.foot-legal a { color: var(--text-dim); }
.legal-updated { margin-top: 4px; font-size: var(--fs-12); color: var(--text-dim); }
.legal .lede { margin-top: var(--space-3); }
.legal-toc { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.legal-toc ol { margin: 0; padding-left: 1.3em; columns: 2 16rem; column-gap: var(--space-6); font-size: var(--fs-13); }
.legal-toc li + li { margin-top: 2px; }
.legal-table { width: 100%; border-collapse: collapse; margin-top: var(--space-2); font-size: var(--fs-13); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.legal-table th { color: var(--text-dim); font-weight: 600; font-size: var(--fs-12); }
.legal h2 { scroll-margin-top: calc(var(--head-h) + 8px); }
@media (max-width: 639px) { .legal-table { font-size: var(--fs-12); } .legal-table th, .legal-table td { padding: 5px 4px; } }

/* int12: videos12's tutorial videos (templates/partials/video.html, docs m.video). 16:9, click to play. */
.kt-video { margin: 20px 0; max-width: 880px; }
.kt-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-s, 6px); }
.kt-video figcaption { margin-top: 6px; font-size: 13px; color: var(--text-dim, inherit); }
.kt-video figcaption strong { color: var(--text, inherit); font-weight: 600; }
.lp-intro { grid-column: 1 / -1; justify-self: center; width: 100%; margin: 8px 0 0; }
