/* Public site: the web app's design tokens (web/src/styles.css), light and dark
   by the visitor's system setting. No framework: one small file, cached for a year
   (the URL carries a content hash). */
:root {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #eff2f7; --surface-3: #e3e8f0;
  --border: #e1e6ee; --border-strong: #c8d0dc;
  --fg: #101828; --muted: #535f75; --subtle: #7f8aa0;
  --brand: #1f56e0; --brand-fg: #ffffff; --brand-soft: #e8efff;
  --accent: #c2690f; --accent-soft: #fdeedb;
  --up: #0b7a55; --up-soft: #e1f2ea; --down: #c62f3a; --down-soft: #fae5e6;
  --warn: #a96d12; --warn-soft: #faf0da; --ring: #1f56e0;
  --ink: #0b1430; --ink-fg: #eef2fb; --ink-muted: #a7b1cc; --ink-border: #24305a;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 1px rgb(16 24 40 / 0.03);
  --shadow-lift: 0 1px 2px rgb(16 24 40 / 0.05), 0 16px 36px -14px rgb(16 40 110 / 0.22);
  --font-sans: "Inter", "Inter var", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans", sans-serif;
  --font-display: "Barlow Semi Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 0.75rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1d; --surface: #111829; --surface-2: #172036; --surface-3: #1f2a44;
    --border: #222c44; --border-strong: #35415e;
    --fg: #e8ebf3; --muted: #a5aec4; --subtle: #717c97;
    --brand: #6f9bff; --brand-fg: #08101f; --brand-soft: #172650;
    --accent: #f0a647; --accent-soft: #2d2415;
    --up: #35c48f; --up-soft: #10261e; --down: #f2656e; --down-soft: #2c1518;
    --warn: #e3ad4c; --warn-soft: #2a2213; --ring: #6f9bff;
    --ink: #060a16; --ink-fg: #e8ebf3; --ink-muted: #9aa4be; --ink-border: #1d2742;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-lift: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 40px -12px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
/* Headings: the web app's self-hosted face (web/public/fonts, same origin in production);
   system fallbacks when it isn't there. */
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans);
  font-size: 15px; line-height: 1.55; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
h1 { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: 0; }
h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: 0; }
h3 { font-size: 0.95rem; font-weight: 650; }
p { margin: 0; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 0.8125rem; }
.up { color: var(--up); }
.down { color: var(--down); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ticker: two rows, scrolled by CSS; the second copy of each row is for a seamless loop */
.ticker { background: var(--surface); border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.ticker .row { height: 32px; overflow: hidden; display: flex; align-items: center; position: relative; }
.ticker .row + .row { border-top: 1px solid var(--border); }
.ticker .track { display: flex; width: max-content; animation: scroll var(--dur, 120s) linear infinite; }
.ticker .row:hover .track, .ticker .row:focus-within .track { animation-play-state: paused; }
.ticker .item { display: inline-flex; gap: 6px; align-items: baseline; padding: 0 14px; white-space: nowrap; color: var(--fg); }
.ticker .item b { font-weight: 600; }
.ticker .item .px { font-variant-numeric: tabular-nums; color: var(--muted); }
.ticker .item .ch { font-variant-numeric: tabular-nums; font-weight: 600; }
.ticker .label { position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; display: flex; align-items: center;
  padding: 0 10px 0 16px; background: linear-gradient(90deg, var(--surface) 75%, transparent);
  color: var(--subtle); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker .track { animation: none; }
  .ticker .row { overflow-x: auto; }
  .ticker .track > [aria-hidden] { display: none; }
}

/* announcement strip and header */
.announce { background: var(--ink); color: var(--ink-fg); font-size: 0.8125rem; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; height: 36px; }
.announce span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.announce a { color: var(--ink-fg); font-weight: 600; white-space: nowrap; }
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top .bar { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; font-size: 1.02rem; flex: none; }
.logo:hover { text-decoration: none; }
.logo .mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: var(--brand-fg);
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 800; }
.nav { display: flex; align-items: stretch; margin-left: 12px; height: 64px; }
.dd { position: relative; display: flex; }
.dd-t { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; color: var(--fg); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.dd-t svg { width: 14px; height: 14px; }
.dd-t:hover, .dd-t[aria-current] { color: var(--brand); text-decoration: none; }
.dd-m { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 12px 12px; box-shadow: var(--shadow-lift); z-index: 30; }
.dd:hover .dd-m, .dd:focus-within .dd-m { display: block; }
.dd-m a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--fg); font-size: 0.9rem; font-weight: 500; }
.dd-m a:hover { background: var(--surface-2); text-decoration: none; }
.search { margin-left: auto; width: 240px; min-width: 0; }
.search input, .mnav-p input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--fg); padding: 0 14px; font: inherit; font-size: 0.875rem; }
.search input:focus, .mnav-p input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.actions { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.875rem; border: 1px solid var(--border-strong); color: var(--fg); background: var(--surface); white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.btn.primary:hover { filter: brightness(1.08); background: var(--brand); }
.mnav { display: none; }
.mnav summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--fg); }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary svg { width: 22px; height: 22px; }
.mnav-p { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lift); padding: 12px 16px 20px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.mnav-p ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.mnav-p li a { display: block; padding: 8px 0; color: var(--fg); font-size: 0.9rem; }
.mnav-p .mh { margin: 12px 0 2px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--fg); }
@media (max-width: 1100px) { .search { display: none; } .actions { margin-left: auto; } }
@media (max-width: 960px) {
  .nav { display: none; }
  .mnav { display: block; }
}
@media (max-width: 520px) {
  .top .actions .btn:not(.primary) { display: none; }
  .top .btn { padding: 0 14px; }
}
@media (max-width: 360px) { .logo .nm { display: none; } }

/* page */
main, main.wrap { padding-top: 20px; padding-bottom: 56px; }
.crumbs { font-size: 0.8125rem; color: var(--subtle); margin-bottom: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--fg); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.head .lede { color: var(--muted); max-width: 70ch; margin-top: 6px; }
.asof { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }
.dot.on { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; }
.quote .px { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.quote .ch { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem;
  font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill.up { background: var(--up-soft); color: var(--up); border-color: transparent; }
.pill.down { background: var(--down-soft); color: var(--down); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.card > header a { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.card > .body { padding: 0 16px 16px; }
.card > .note { padding: 10px 16px 14px; border-top: 1px solid var(--border); font-size: 0.8125rem; color: var(--subtle); }
section.card { margin-top: 16px; }
.grid > section.card { margin-top: 0; }

/* Hairlines between tiles come from each tile's outer shadow filling the 1px gap, so an
   incomplete last row leaves plain surface rather than a grey block. */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stats.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .stats.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface); padding: 12px 14px; min-width: 0; box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border); }
.stat dt { font-size: 0.75rem; color: var(--muted); }
.stat dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 1rem; overflow-wrap: anywhere; }
.stat dd small { font-weight: 500; color: var(--muted); font-size: 0.8rem; }

/* tables */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th { text-align: left; font-weight: 600; font-size: 0.75rem; color: var(--muted); padding: 8px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
table.data .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data td.name { min-width: 0; }
table.data td.d { white-space: nowrap; }
table.data td.name a { font-weight: 600; }
table.data td.name .sub { display: block; font-size: 0.75rem; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.card table.data th:first-child, .card table.data td:first-child { padding-left: 16px; }
.card table.data th:last-child, .card table.data td:last-child { padding-right: 16px; }
@media (max-width: 720px) {
  .hide-sm { display: none; }
  table.data td, table.data th { padding: 8px 8px; }
  table.data td.name .sub { max-width: 15ch; }
}

/* range bar (day / 52-week) */
.range { margin-top: 6px; }
.range .track { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--down-soft), var(--surface-3), var(--up-soft)); border: 1px solid var(--border); }
.range .mark { position: absolute; top: -4px; width: 3px; height: 12px; margin-left: -1px; border-radius: 2px; background: var(--fg); }
.range .ends { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.range-label { font-size: 0.75rem; color: var(--muted); }

/* chart */
.chart svg { display: block; width: 100%; height: auto; }
.chart .line { fill: none; stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.chart .up .line { stroke: var(--up); } .chart .up .area { fill: var(--up-soft); }
.chart .down .line { stroke: var(--down); } .chart .down .area { fill: var(--down-soft); }
.chart .axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--subtle); margin-top: 6px; }
.rets { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 0.85rem; }
.rets div span { color: var(--muted); margin-right: 6px; }

/* breadth bar */
.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); margin: 8px 0 6px; }
.split .a { background: var(--up); } .split .d { background: var(--down); }

/* link lists */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; list-style: none; margin: 0; padding: 0; }
.links li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); min-width: 0; }
.links li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links li span { color: var(--subtle); font-size: 0.8125rem; font-variant-numeric: tabular-nums; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 0.85rem; font-weight: 500; }
.chips a:hover { border-color: var(--border-strong); text-decoration: none; }
.chips a span { color: var(--subtle); margin-left: 4px; }

/* RA cards */
.ras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ra { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); }
.ra h3 { font-size: 0.95rem; overflow-wrap: anywhere; }
.ra .meta { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.ra .reg { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.ra .tags { margin-top: 8px; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 0.875rem; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.kv dd { margin-bottom: 10px; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  background: var(--brand-soft); border-radius: var(--radius); padding: 18px 20px; margin-top: 16px; }
.cta p { color: var(--fg); max-width: 60ch; }

/* hub */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 2.5rem; line-height: 1.1; max-width: 30ch; }
@media (max-width: 560px) { .hero h1 { font-size: 2rem; } }
.hero p { font-size: 1.05rem; color: var(--muted); max-width: 62ch; margin-top: 10px; }
.hero .actions { margin-top: 18px; margin-left: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--fg); box-shadow: var(--shadow); min-width: 0; }
.tile:hover { border-color: var(--border-strong); text-decoration: none; }
.tile .nm { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .c { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* faq */
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--subtle); font-weight: 500; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin-top: 8px; }

.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.news li:last-child { border-bottom: 0; }
.news .when { font-size: 0.75rem; color: var(--subtle); }
.news .det { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 20px; font-size: 0.875rem; }

/* footer */
footer.site { background: var(--ink); color: var(--ink-muted); padding: 40px 0 32px; font-size: 0.875rem; }
footer.site a { color: var(--ink-muted); }
footer.site a:hover { color: var(--ink-fg); }
footer.site .fhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 24px; border-bottom: 1px solid var(--ink-border); }
footer.site .fhead .logo { color: var(--ink-fg); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
footer.site .fhead a:not(.logo) { color: var(--ink-fg); overflow-wrap: anywhere; }
footer.site .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; padding: 32px 0; }
@media (max-width: 860px) { footer.site .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
footer.site h2 { font-size: 1rem; color: var(--ink-fg); margin-bottom: 14px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer.site li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
footer.site .legal { padding-top: 24px; border-top: 1px solid var(--ink-border); display: grid; gap: 10px; font-size: 0.75rem; line-height: 1.6; }
footer.site .legal .org { color: var(--ink-fg); }
footer.site .legal a { color: var(--ink-fg); overflow-wrap: anywhere; }
.announce .s { display: none; }
@media (max-width: 560px) { .announce .l { display: none; } .announce .s { display: inline; } }
