* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-padding-top: 5rem; }
body { margin: 0; color: var(--text); font: 400 .875rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.28; font-weight: 720; letter-spacing: -.025em; }
h2 { font-size: 1.25rem; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1rem; line-height: 1.5; }
time, .metric strong { font-variant-numeric: tabular-nums; }
code { font: .75rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
a, button, summary, select { transition: color 120ms, background-color 120ms, border-color 120ms; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; top: .75rem; left: .75rem; padding: .5rem 1rem; background: var(--surface); }
.muted { color: var(--text-muted); }
.topbar { position: sticky; top: 0; z-index: 10; height: 4rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-inner { height: 100%; max-width: 120rem; margin-inline: auto; padding-inline: 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand, .header-tools { display: flex; align-items: center; gap: .875rem; }
.brand { color: var(--text); font-size: 1.1875rem; font-weight: 700; line-height: 1; }
.brand img { width: 2.625rem; aspect-ratio: 1.4; height: auto; }
.brand-divider { width: 1px; height: 1.125rem; background: var(--line); }
.module { font-size: .8125rem; color: var(--text-muted); font-weight: 550; }
.header-tools { font-size: .75rem; }
.support-link { color: var(--text-secondary); padding: .625rem .5rem; }
.status-link { display: inline-flex; gap: .5rem; align-items: center; border: 1px solid var(--line); border-radius: 2rem; padding: .375rem .75rem; color: var(--warning); background: var(--surface); white-space: nowrap; }
.status-dot { inline-size: .375rem; block-size: .375rem; border-radius: 50%; background: currentColor; }
.app-shell { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); max-width: 120rem; margin-inline: auto; }
.sidebar { position: sticky; top: 4rem; align-self: start; max-height: calc(100dvh - 4rem); overflow-y: auto; min-width: 0; border-right: 1px solid var(--line); padding: 1.125rem .625rem 1.5rem; scrollbar-width: thin; }
.sidebar nav, .mobile-navigation nav { display: grid; gap: .875rem; }
.nav-group { display: block; color: var(--text-muted); font-size: .75rem; font-weight: 600; margin: .25rem .625rem; }
.sidebar nav a, .mobile-navigation nav a { min-height: 2.125rem; padding: .375rem .625rem; display: flex; align-items: center; gap: .625rem; color: var(--text-secondary); border-left: 2px solid transparent; border-radius: .3125rem; white-space: nowrap; }
.sidebar nav a:hover, .mobile-navigation nav a:hover { background: var(--surface-hover); color: var(--text); }
.sidebar nav a[aria-current], .mobile-navigation nav a[aria-current] { border-left-color: var(--accent); color: var(--accent); background: var(--surface-selected); font-weight: 650; }
.nav-icon { display: inline-grid; place-items: center; font: 600 1rem/1 ui-monospace, monospace; flex: 0 0 1.125rem; color: var(--text-muted); }
.main-region { min-width: 0; min-height: calc(100dvh - 4rem); display: flex; flex-direction: column; }
main { flex: 1; padding: 1.75rem; }
.mobile-navigation { display: none; }
.hero { border: 1px solid var(--line); border-radius: .75rem; min-height: 14.25rem; position: relative; overflow: hidden; background: linear-gradient(120deg, #10192C, #211935); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.75rem; }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero h1 { margin-block-end: .5rem; }
.hero p, .page-heading > p { color: var(--text-secondary); max-width: 66ch; }
.hero-logo { width: clamp(8rem, 14vw, 12rem); height: auto; border-radius: .625rem; flex-shrink: 0; }
.actions, .hero-status, .page-quality { display: flex; align-items: center; flex-wrap: wrap; gap: .625rem; }
.actions { margin-block-start: 1.25rem; }
.hero-status { margin-block-start: 1.25rem; font-size: .75rem; color: var(--text-muted); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 2.5rem; padding: .5rem .875rem; border: 1px solid var(--control-line); border-radius: .4375rem; color: var(--text); background: var(--surface); cursor: pointer; font-weight: 620; white-space: nowrap; }
.button:hover { background: var(--surface-hover); color: var(--text); border-color: var(--accent); }
.button-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.chip, .market { min-height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; white-space: nowrap; padding: .125rem .4375rem; border-radius: .3125rem; font-size: .75rem; font-weight: 640; }
.positive { color: var(--success); background: var(--success-bg); }
.caution { color: var(--warning); background: var(--warning-bg); }
.negative { color: var(--danger); background: var(--danger-bg); }
.neutral { color: var(--neutral); background: var(--neutral-bg); }
.market { min-width: 1.625rem; font-family: ui-monospace, monospace; }
.market-s { color: var(--spot); background: var(--spot-bg); }
.market-f { color: var(--perpetual); background: var(--perpetual-bg); }
.market-d { color: var(--delivery); background: var(--delivery-bg); }
.market-pm { color: var(--premarket); background: var(--premarket-bg); }
.market-ps { color: var(--presale); background: var(--presale-bg); }
.market.uncertain { color: var(--text-muted); background: transparent; border: 1px dashed var(--line); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-block: 1rem 1.5rem; }
.metric { min-width: 0; display: grid; gap: .25rem; padding: .875rem 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: .625rem; }
a.metric:hover, a.coverage-tile:hover, a.exchange-card:hover { background: var(--surface-hover); color: var(--text); border-color: var(--control-line); }
.metric-name { color: var(--text-secondary); font-weight: 550; }
.metric strong { font-size: 1.625rem; line-height: 1.25; }
.metric .muted, .status-metrics .metric span:last-child { font-size: .75rem; }
.status-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.coverage-section, .source-section { margin-block: 1.5rem; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .625rem; margin-block-end: .75rem; }
.section-title a { font-size: .75rem; font-weight: 600; }
.coverage-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .625rem; }
.coverage-tile { display: flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .5rem .625rem; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; }
.coverage-tile strong { margin-inline-start: auto; color: var(--text); }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem; }
.content-panel { background: var(--surface); border: 1px solid var(--line); border-radius: .625rem; padding: 1.125rem; margin-block-end: .875rem; }
.content-panel > h2 { margin-block-end: .75rem; }
.dense-panel { padding: .875rem 1rem; }
.event-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: .5rem; padding: .625rem 0; border-top: 1px solid var(--line); }
.event-row time { color: var(--text-muted); font-size: .75rem; }
.empty-note { color: var(--text-muted); padding: 1rem; background: var(--surface); border-radius: .5rem; }
.dense-panel .empty-note { padding: .25rem 0 .75rem; }
.page-heading { display: grid; gap: .5rem; margin-block: .25rem 1rem; }
.page-quality { font-size: .75rem; }
.exchange-grid { display: grid; gap: .625rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exchange-grid-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exchange-card { display: flex; gap: .625rem; align-items: center; min-width: 0; padding: .625rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); color: var(--text); flex-wrap: wrap; }
.exchange-mark { display: grid; place-items: center; flex: 0 0 2rem; block-size: 2rem; border-radius: .375rem; background: var(--surface-raised); color: var(--brand-violet); font: 650 .75rem/1 ui-monospace, monospace; }
.exchange-text { min-width: 0; }
.exchange-text strong, .exchange-text .muted { display: block; }
.exchange-text .muted, .exchange-time { font-size: .75rem; }
.exchange-time { color: var(--text-muted); margin-inline-start: auto; }
.exchange-card-cta { align-items: stretch; flex-direction: column; }
.exchange-link { display: flex; gap: .625rem; align-items: center; min-width: 0; color: var(--text); flex-wrap: wrap; }
.exchange-link:hover { color: var(--accent-hover); }
.button-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.button-outline:hover { background: var(--surface-hover); color: var(--accent-hover); border-color: var(--accent-hover); }
.referral-link { align-self: flex-start; }
.referral-pending { color: var(--text-muted); font-size: .75rem; }
.disclosure-note { margin-block: .75rem 0; color: var(--text-secondary); font-size: .8125rem; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.75rem; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .75rem; }
.footer-brand { display: grid; gap: .125rem; }
.footer-brand strong { font-size: .95rem; color: var(--text); }
.footer nav { display: flex; flex-wrap: wrap; gap: .875rem; }
.footer nav a { color: var(--text-secondary); }
.footer nav a:hover { color: var(--accent); }
.crumb, .tabs, .legend, .filter-form, .pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.crumb { font-size: .75rem; margin-block-end: .75rem; }
.tabs { margin-block: .75rem; }
.tabs a { padding: .5rem .75rem; color: var(--text-secondary); border: 1px solid var(--line); background: var(--surface); border-radius: .375rem; }
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--surface-selected); }
.filter-form { align-items: end; gap: .625rem; margin-block: .75rem; }
.filter-form label { display: grid; gap: .25rem; color: var(--text-secondary); font-size: .75rem; font-weight: 550; }
.filter-form input, .filter-form select { min-height: 2.5rem; padding: .375rem .625rem; color: var(--text); background: var(--surface); border: 1px solid var(--control-line); border-radius: .375rem; }
.search-control { flex: 1 1 16rem; }
.legend { gap: .75rem; color: var(--text-secondary); margin-block: .75rem; }
.notice { margin-block: .75rem; padding: .75rem; border-radius: .375rem; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: .625rem; background: var(--surface); max-block-size: min(70vh, 47.5rem); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8125rem; }
th, td { padding: .625rem .75rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-raised); color: var(--text-secondary); font-size: .75rem; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover > * { background: var(--surface-hover); }
.row-subtitle { display: block; margin-top: .125rem; }
.matrix { min-width: 120rem; }
.matrix td { min-width: 6.25rem; }
.matrix th:first-child { position: sticky; left: 0; min-width: 12.5rem; background: var(--surface-raised); z-index: 1; border-right: 1px solid var(--line); }
.matrix thead th:first-child { z-index: 3; }
.matrix-cell { display: flex; flex-wrap: wrap; gap: .25rem; }
.pagination { margin-block: 1rem; justify-content: flex-end; }
.narrow, .prose { max-inline-size: 75ch; }
.prose { display: grid; gap: .75rem; }
.prose h2, .prose .notice { margin: 0; }
.prose p, .prose li { color: var(--text-secondary); }
.prose .actions { margin: .375rem 0 0; }
.prose .text-link { justify-self: start; }
.prose .chip { justify-self: start; }
.facts { display: flex; flex-wrap: wrap; gap: .875rem 1.5rem; margin: 0; }
.facts > div { min-width: 7rem; }
.facts dt { font-size: .75rem; color: var(--text-muted); }
.facts dd { margin: .25rem 0 0; font-weight: 600; }
.error-panel { max-width: 34rem; display: grid; gap: 1rem; justify-items: start; }
@media (max-width: 1439px) and (min-width: 1024px) {
  .app-shell { grid-template-columns: 4rem minmax(0, 1fr); }
  .sidebar { padding-inline: .5rem; }
  .sidebar .nav-label, .sidebar .nav-group { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .sidebar nav a { justify-content: center; padding-inline: 0; }
}
@media (max-width: 1023px) {
  .topbar { height: 3.75rem; }
  .topbar-inner { padding-inline: 1.25rem; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-navigation { display: block; }
  .mobile-navigation summary { cursor: pointer; list-style: none; padding: .5rem .625rem; border: 1px solid var(--line); border-radius: .375rem; }
  .mobile-navigation nav { position: absolute; max-width: min(20rem, 90vw); inset: calc(100% + .25rem) 1rem auto auto; max-height: calc(100dvh - 5rem); overflow-y: auto; padding: .625rem; width: 16rem; background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; box-shadow: var(--shadow); }
  main { padding: 1.25rem; }
  .status-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exchange-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer { padding: 1rem 1.25rem; }
}
@media (max-width: 767px) {
  .topbar { height: 3.5rem; }
  .topbar-inner { padding-inline: .75rem; }
  .brand { gap: .4375rem; font-size: 1.0625rem; }
  .brand img { width: 2rem; }
  .module, .brand-divider, .header-tools .support-link { display: none; }
  .header-tools { gap: .375rem; }
  .status-link { padding-inline: .4375rem; }
  .mobile-navigation summary { min-height: 2.75rem; display: flex; align-items: center; }
  .mobile-navigation nav a { min-height: 2.75rem; }
  main { padding: .875rem; }
  h1 { font-size: 1.5rem; line-height: 1.33; }
  .hero { display: block; padding: 1rem; min-height: 0; }
  .hero-logo { display: none; }
  .hero-status { align-items: start; gap: .5rem; }
  .metrics, .status-metrics, .coverage-grid, .exchange-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .metric strong { font-size: 1.375rem; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .exchange-time { margin-inline-start: 0; }
  .table-scroll { max-block-size: none; }
  .matrix th:first-child { min-width: 9rem; }
  .footer { align-items: flex-start; flex-direction: column; padding: 1rem .875rem; }
  .button, .filter-form input, .filter-form select, .tabs a { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; } }
@media print {
  .topbar, .sidebar, .footer, .filter-form, .view-tabs, .pagination, .actions { display: none; }
  .app-shell { display: block; }
  .table-scroll { max-block-size: none; overflow: visible; }
  .content-panel, .metric, .hero { break-inside: avoid; }
}
