:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --panel: #111519;
  --line: #283034;
  --muted: #8d999b;
  --text: #edf0ef;
  --accent: #cbf782;
  --faint: #151b20;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 80% 10%, #a6d66d05, transparent 40%), var(--bg); }
::selection { background: var(--accent); color: var(--bg); }
main { max-width: 1376px; margin: 0 auto; padding: 0 56px 24px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input { font: inherit; }
button { min-height: 44px; padding: 10px 14px; border: 1px solid #384348; border-radius: 5px; background: #12191d; color: var(--text); cursor: pointer; }
button:hover:not(:disabled) { background: #1c2529; border-color: #52604a; }
button:disabled { opacity: .35; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error-text { color: #d6b279; }
.skip-link { position: absolute; top: -70px; left: 20px; z-index: 2; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 4px; background: var(--bg); font-size: 12px; }
.skip-link:focus { top: 12px; }

/* Shared URR masthead and compact scanner introduction. */
.masthead { min-height: 72px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 16px; font-weight: 750; letter-spacing: .015em; }
.brand img { width: 30px; height: 30px; flex: none; }
.brand strong { font-size: 12px; font-weight: 550; letter-spacing: .11em; }
.brand-divider { margin: 0 10px; color: #546060; font-size: 17px; font-weight: 400; }
.market-label { margin-left: auto; color: #9daaab; font: 10px var(--mono); letter-spacing: .12em; white-space: nowrap; }
.market-label span { margin: 0 10px; color: #4e5b60; }
.clock { border-left: 1px solid var(--line); padding-left: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.clock > span { font: 16px var(--mono); letter-spacing: -.035em; }
.clock small { display: block; margin-top: 5px; color: var(--muted); font: 8px var(--mono); letter-spacing: .1em; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 48px; padding: 19px 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--accent); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .13em; }
.eyebrow-line { width: 22px; height: 1px; background: var(--accent); }
h1 { margin-bottom: 9px; font-size: 48px; font-weight: 600; line-height: 1.04; letter-spacing: -.065em; }
h1 > span { color: var(--accent); }
.lede { max-width: 620px; color: #97a3a7; font-size: 12px; line-height: 1.7; }
.source-label { margin-top: 5px; color: #74868c; font: 9px/1.5 var(--mono); }
.signal-model { border-left: 1px solid #384333; padding: 6px 0 6px 26px; }
.model-label { display: flex; justify-content: space-between; color: #97a3a7; font: 9px var(--mono); letter-spacing: .13em; }
.model-equation { margin: 16px 0 9px; color: var(--text); font: 500 21px var(--mono); letter-spacing: -.07em; white-space: nowrap; }
.model-equation span { color: var(--accent); }
.model-caption { color: var(--muted); font-size: 10px; line-height: 1.5; }

/* View selection and connection state. */
.navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 22px; }
.tab { min-height: 44px; padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover:not(:disabled) { background: transparent; color: var(--text); border-bottom-color: var(--accent); }
.live-dot { display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.coverage-toggle { padding-right: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.coverage-toggle:hover:not(:disabled) { background: transparent; color: var(--text); }
#coverage-count { margin-left: 9px; color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chevron { margin-left: 10px; }
.coverage-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.coverage-panel h2 { margin-bottom: 8px; font-size: 17px; font-weight: 550; letter-spacing: -.025em; }
.coverage-panel p, #coverage-list { color: var(--muted); font-size: 12px; line-height: 1.7; }
.coverage-item { padding: 5px 0; overflow-wrap: anywhere; }
.coverage-item strong { margin-right: 10px; color: var(--text); }
.coverage-summary { margin-bottom: 8px; }
.status-strip { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 42px; color: var(--muted); font: 10px var(--mono); }
.status-strip > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.status-strip strong { color: #b2beb9; font-size: 10px; font-weight: 500; }
.status-light { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex: none; }
.status-light.live { background: #76dfaa; box-shadow: 0 0 0 3px #76dfaa12; }
.status-light.error { background: #d6b279; }
#updated { white-space: nowrap; }

/* Rankings use the same neutral lime score as the NSE scanner. */
.ranking-panel { overflow: hidden; border: 1px solid #293237; border-radius: 9px; background: #101519; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 24px; }
.panel-heading .eyebrow { margin-bottom: 6px; font-size: 8px; }
.panel-heading h2 { font-size: 20px; font-weight: 550; letter-spacing: -.035em; }
.panel-heading p:not(.eyebrow) { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ranking-context { flex-shrink: 0; text-align: right; }
.ranking-context > span { font: 19px var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ranking-context small { display: block; margin-top: 5px; color: var(--muted); font: 9px var(--mono); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { padding: 11px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0d1216; color: #829298; font: 9px var(--mono); text-align: left; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 24px; }
.numeric { text-align: right; }
td { padding: 10px 20px; border-bottom: 1px solid #293237; background: #11171b; font: 14px var(--mono); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td:first-child { width: 64px; }
td:nth-child(2) { width: 31%; }
.rank-one td { background: #141b1b; }
.rank-one td:first-child { background: linear-gradient(90deg, #cbf78208, transparent), #141b1b; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid #344047; border-radius: 4px; color: #87959a; font: 10px var(--mono); }
.rank-one .rank-badge { border-color: #cbf78240; background: #cbf7820b; color: var(--accent); }
.symbol { color: var(--text); font: 600 16px Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.015em; overflow-wrap: anywhere; }
.coin-category { display: block; width: fit-content; max-width: 100%; margin-top: 4px; padding: 1px 5px; border: 1px solid #354047; border-radius: 3px; color: #a0b0b5; font: 11px/1.4 var(--mono); letter-spacing: .025em; overflow-wrap: anywhere; }
.source-detail { margin-top: 4px; color: var(--muted); font: 10px/1.4 var(--mono); }
.source-detail summary { width: fit-content; max-width: 100%; cursor: pointer; list-style: none; }
.source-detail summary::-webkit-details-marker { display: none; }
.source-detail summary::after { content: " +"; color: #708188; }
.source-detail[open] summary::after { content: " \2212"; }
.source-detail p { margin-top: 6px; color: #a2afb1; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.activity-value { color: var(--accent); font: 500 22px/1.1 var(--mono); letter-spacing: -.04em; }
.activity-meter { height: 3px; max-width: 112px; margin: 9px 0 0 auto; overflow: hidden; border-radius: 3px; background: #293338; }
.activity-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .68; }
.money { white-space: nowrap; }
.money small { display: block; margin-top: 5px; color: var(--muted); font: 9px var(--mono); }
.normal-value { color: #a6b3b5; }
.table-footer { display: flex; justify-content: space-between; gap: 20px; padding: 11px 24px; border-top: 1px solid var(--line); color: #8899a1; font-size: 10px; line-height: 1.6; }
.unit-label { font: 8px/1.6 var(--mono); letter-spacing: .1em; white-space: nowrap; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 325px; padding: 45px 25px; text-align: center; }
.empty-state h3 { margin: 22px 0 11px; font-size: 21px; font-weight: 500; letter-spacing: -.035em; }
.empty-state p { max-width: 480px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.pulse-icon { display: flex; align-items: center; gap: 5px; height: 36px; }
.pulse-icon i { width: 4px; height: 14px; border-radius: 2px; background: #cbf78290; }
.pulse-icon i:nth-child(2) { height: 24px; }
.pulse-icon i:nth-child(3) { height: 36px; }
.pulse-icon i:nth-child(4) { height: 22px; }
.notice { padding: 10px 24px; border-top: 1px solid #b9955d28; background: #bd955a08; color: #c6b089; font-size: 11px; line-height: 1.6; }

/* Completed-minute history and archive progress. */
.history-progress { display: grid; grid-template-columns: 1fr 180px; align-items: center; gap: 30px; margin-top: 14px; padding: 15px 22px; border: 1px solid var(--line); border-radius: 7px; }
.history-progress > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px; }
.section-label { color: var(--muted); font: 8px var(--mono); letter-spacing: .12em; }
.history-progress strong { color: #c6d0cd; font-size: 11px; font-weight: 500; }
.history-progress .muted { flex-basis: 100%; padding-left: 62px; font-size: 10px; line-height: 1.6; }
.progress-track { height: 3px; overflow: hidden; border-radius: 3px; background: #293338; }
#progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.history-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 16px 0; }
.history-controls label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font: 10px var(--mono); }
.history-controls input { min-height: 44px; padding: 10px 12px; border: 1px solid #384348; border-radius: 5px; background: #12191d; color: var(--text); font-size: 12px; }
.history-controls button { font-size: 12px; }
.history-controls #history-go { border-color: #44523b; background: #c4f58006; color: var(--accent); font-weight: 500; }
.history-controls #history-go:hover { background: #cbf78212; }
.history-step { display: flex; gap: 8px; margin-left: auto; }
#saved-count { flex-basis: 100%; margin-top: 3px; font: 10px var(--mono); }
.history-timeline { margin-top: 22px; }
.timeline-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 15px; }
.timeline-heading h2 { font-size: 16px; font-weight: 550; letter-spacing: -.025em; }
.timeline-heading p { color: var(--muted); font-size: 11px; }
#timeline-list { display: flex; gap: 7px; overflow-x: auto; padding: 5px 5px 12px; margin: 0 -5px; }
.minute-chip { flex-shrink: 0; min-width: 88px; padding: 10px 11px; background: var(--panel); text-align: left; }
.minute-chip.active { border-color: var(--accent); background: #cbf78208; }
.minute-chip time { display: block; margin-bottom: 6px; color: var(--muted); font: 10px var(--mono); }
.minute-chip strong { font-size: 11px; font-weight: 500; }
.minute-chip em { display: block; margin-top: 5px; color: var(--accent); font: 11px var(--mono); }
.minute-chip.partial { border-style: dashed; }

/* Brief methodology uses the same quiet, ruled layout as the NSE site. */
.methodology { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 28px; padding: 23px 0; border-top: 1px solid var(--line); }
.methodology h3 { margin-bottom: 8px; color: var(--accent); font: 10px var(--mono); }
.methodology h3 span { margin-left: 8px; color: #d1dbd5; font: 550 12px Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.methodology p { color: var(--muted); font-size: 11px; line-height: 1.75; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 17px; border-top: 1px solid var(--line); color: #74868c; font: 9px/1.7 var(--mono); }

@media (max-width: 1100px) {
  main { padding-right: 32px; padding-left: 32px; }
  .intro { grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; }
  .model-equation { font-size: 18px; }
  th, td { padding-right: 15px; padding-left: 15px; }
  .methodology { gap: 24px; }
}

@media (max-width: 850px) {
  main { padding-right: 24px; padding-left: 24px; }
  .masthead { gap: 20px; }
  .clock { display: none; }
  .intro { grid-template-columns: 1fr; gap: 0; padding: 27px 0 25px; }
  .signal-model { display: none; }
  h1 { font-size: 48px; }
  .lede { max-width: 560px; }
  .status-strip { align-items: flex-start; flex-direction: column; gap: 7px; padding: 13px 0; }
  .coverage-panel { grid-template-columns: 1fr; gap: 17px; }
  .panel-heading { padding: 17px 20px; }
  th { font-size: 8px; }
  th:first-child, td:first-child { padding-left: 20px; }
  .history-progress { grid-template-columns: 1fr 100px; }
  .table-footer { padding-right: 20px; padding-left: 20px; }
  .unit-label { display: none; }
  .page-footer { flex-direction: column; gap: 6px; }
}

@media (max-width: 700px) {
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: 27px minmax(0, 1fr) 115px; gap: 17px 12px; padding: 20px; border-top: 1px solid var(--line); background: #11171b; }
  tbody tr.rank-one { background: linear-gradient(90deg, #cbf78206, transparent 65%), #11171b; }
  td, td:first-child, td:nth-child(2) { width: auto; padding: 0; border: 0; background: transparent; }
  .rank-one td, .rank-one td:first-child { background: transparent; }
  td:first-child { grid-column: 1; grid-row: 1 / span 2; }
  td:nth-child(2) { grid-column: 2; grid-row: 1; }
  td:nth-child(3) { grid-column: 3; grid-row: 1; }
  td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: left; }
  td:nth-child(5) { grid-column: 3; grid-row: 2; }
  .symbol { font-size: 18px; }
  .coin-category { margin-top: 6px; }
  .source-detail { margin-top: 7px; font-size: 10px; }
  .source-detail summary { min-height: 28px; padding: 4px 0; }
  .source-detail p { font-size: 10px; }
  .activity-value { font-size: 24px; }
  .activity-meter { margin-top: 12px; height: 3px; }
  .money { font-size: 14px; }
  .money::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font: 9px/1.5 var(--mono); }
  .money small { display: block; margin-top: 4px; font-size: 9px; }
  .history-step { margin-left: 0; }
  .methodology { grid-template-columns: 1fr; gap: 17px; }
  .methodology > div + div { padding-top: 17px; border-top: 1px solid var(--line); }
}

@media (max-width: 500px) {
  main { padding: 0 20px 22px; }
  .masthead { min-height: 74px; gap: 14px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 25px; height: 25px; }
  .brand strong { font-size: 10px; letter-spacing: .07em; }
  .brand-divider { margin: 0 6px; }
  .market-label { max-width: 90px; font-size: 8px; line-height: 1.7; letter-spacing: .06em; text-align: right; white-space: normal; }
  .market-label span { margin: 0 3px; }
  .intro { padding: 29px 0 25px; }
  h1 { margin-bottom: 14px; font-size: 44px; }
  .intro .eyebrow { font-size: 8px; margin-bottom: 14px; }
  .lede { font-size: 12px; line-height: 1.75; }
  nav { gap: 23px; }
  .coverage-toggle { font-size: 10px; }
  #coverage-count { margin-left: 6px; }
  .chevron { margin-left: 6px; }
  .status-strip { font-size: 9px; line-height: 1.6; }
  .status-strip > div { gap: 7px; }
  .status-strip strong { font-size: 9px; }
  .panel-heading { align-items: flex-start; gap: 8px; padding: 18px 16px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading p:not(.eyebrow) { font-size: 10px; line-height: 1.7; }
  .ranking-context > span { font-size: 17px; }
  .ranking-context small { max-width: 75px; font-size: 8px; line-height: 1.5; }
  tbody tr { grid-template-columns: 25px minmax(0, 1fr) 100px; gap: 16px 10px; padding: 19px 16px; }
  .symbol { font-size: 16px; }
  .activity-value { font-size: 22px; }
  .money { font-size: 13px; }
  .table-footer { padding: 13px 16px; font-size: 9px; line-height: 1.7; }
  .notice { padding: 11px 16px; font-size: 10px; }
  .history-progress { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .history-progress .muted { padding-left: 0; }
  .history-controls { gap: 12px 10px; }
  .history-controls input { max-width: 160px; }
  .history-controls button { font-size: 11px; }
  .history-step { flex-basis: 100%; }
  .history-step button { flex: 1; }
  .timeline-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .empty-state { min-height: 300px; padding: 35px 20px; }
  .empty-state h3 { font-size: 19px; }
  .empty-state p { font-size: 12px; }
  .methodology { margin-top: 24px; }
  .page-footer { font-size: 8px; }
}

@media (max-width: 360px) {
  main { padding-right: 15px; padding-left: 15px; }
  h1 { font-size: 39px; }
  .market-label { max-width: 77px; font-size: 7px; }
  tbody tr { grid-template-columns: 23px minmax(0, 1fr) 91px; gap: 14px 8px; padding-right: 13px; padding-left: 13px; }
  .symbol { font-size: 15px; }
  .money { font-size: 12px; }
  .money::before { font-size: 8px; }
  .activity-value { font-size: 21px; }
}

@media (min-width: 851px) and (max-height: 800px) {
  .masthead { min-height: 64px; }
  .intro { padding-top: 12px; padding-bottom: 12px; }
  h1 { margin-bottom: 8px; font-size: 40px; }
  .intro .eyebrow { margin-bottom: 6px; }
  .lede { font-size: 11px; }
  .source-label { margin-top: 3px; }
  .panel-heading { padding-top: 10px; padding-bottom: 10px; }
  .panel-heading .eyebrow { margin-bottom: 4px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading p:not(.eyebrow) { margin-top: 4px; font-size: 10px; }
  .status-strip { min-height: 36px; }
  td { padding-top: 6px; padding-bottom: 6px; }
  .coin-category, .source-detail { margin-top: 3px; }
  .table-footer { padding-top: 9px; padding-bottom: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
