/* mNAV platform tokens — Model Fit dashboard */
:root {
  --bg:        #0B0D10;
  --panel:     #11141A;
  --panel-2:   #141827;
  --line:      #1F242C;
  --grid:      #232932;
  --text:      #FFFFFF;
  --muted:     #B8BEC6;
  --dim:       #8A8F99;
  --faint:     #5A606A;
  --green:     #2EC07A;
  --amber:     #F5C518;
  --red:       #FF4D4D;
  --btc:       #F7931A;
  --gold:      #E5A12C;
  --accent:     #F7931A;
  --accent-dim: #6B3F0F;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 900px; margin: 0 auto; padding: 28px 24px 80px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  margin-bottom: 6px; padding-left: 25px; padding-right: 25px; }
.title { font-size: 28px; font-weight: 500; letter-spacing: -0.02em;
  font-family: 'Fraunces', Georgia, serif; line-height: 1.1; }
.title .accent-num { color: var(--accent); }
.title .sep { color: var(--dim); }
.sub { color: var(--dim); font-size: 13px; margin-top: 4px; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; }
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; margin-bottom: 14px; margin-top: 0; }
.hero-row { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; position: relative; text-align: center; }
.tile-label { color: var(--dim); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.tile-big { font-size: 24px; font-weight: 800; letter-spacing: -0.01em;
  line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--dim); font-size: 11px; margin-top: 6px; line-height: 1.4;
  font-variant-numeric: tabular-nums; }
.accent-num { color: var(--accent); }
.btc-num { color: var(--btc); }
.green-num { color: var(--green); }
.amber-num { color: var(--amber); }
.red-num { color: var(--red); }
.dim-num { color: var(--dim); }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; margin-bottom: 14px; }
.section h2 { font-size: 16px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 6px;
  font-family: 'Fraunces', Georgia, serif; }
.section .lede { color: var(--dim); font-size: 11px; margin-bottom: 14px; line-height: 1.5; }
.section-head { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head > .head-titles { flex: 1; min-width: 0; }
.toggles { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.toggle-grp { display: inline-flex; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 2px; }
.toggle-grp button { background: transparent; border: 0; color: var(--dim);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.toggle-grp button:hover { color: var(--text); }
.toggle-grp button.active { background: var(--accent); color: #0B0D10; }
.legend { display: flex; gap: 14px; font-size: 10px; color: var(--dim);
  margin: 8px 0 0; flex-wrap: wrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px; vertical-align: middle; }
.legend-line { width: 14px; height: 2px;
  display: inline-block; margin-right: 6px; vertical-align: middle; }
.chart-wrap { position: relative; }
svg.chart { display: block; width: 100%; height: auto; }
.axis-label { fill: var(--dim); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600; }
.auto-comment { color: var(--muted); font-size: 12.5px; line-height: 1.6;
  margin-top: 14px; padding: 12px 16px;
  background: var(--panel-2);
  border-left: 3px solid var(--gold); border-radius: 6px; }
.auto-comment strong { color: var(--text); font-weight: 600; }
.auto-comment .num { color: var(--btc); font-variant-numeric: tabular-nums; }
.auto-comment .accent-num { color: var(--accent); font-variant-numeric: tabular-nums; }
.leader { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.leader th, .leader td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.leader th { color: var(--dim); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.leader td.tk, .leader th.tk { text-align: left; }
.leader td.tk strong { color: var(--text); }
.leader td.tk .nm { color: var(--dim); font-size: 11.5px; margin-left: 6px; }
.leader tr.below-gate { opacity: 0.5; }
.leader tr.row-hl { background: rgba(247, 147, 26, 0.06); }
.leader td.r2 { color: var(--accent); font-weight: 700; }
.leader .slope-pos { color: var(--green); }
.leader .slope-amp { color: var(--amber); }
.leader .slope-neg { color: var(--red); }
.leader tr:hover { background: var(--panel-2); cursor: pointer; }
.classification { display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid var(--line); background: var(--panel-2); }
.classification.pure_proxy { color: var(--green); border-color: rgba(46,192,122,0.3); background: rgba(46,192,122,0.06); }
.classification.amplified_proxy { color: var(--amber); border-color: rgba(245,197,24,0.3); background: rgba(245,197,24,0.06); }
.classification.tracks_dampened { color: var(--btc); border-color: rgba(247,147,26,0.3); background: rgba(247,147,26,0.06); }
.classification.confirmed_proxy { color: var(--green); border-color: rgba(46,192,122,0.25); background: rgba(46,192,122,0.05); }
.classification.confirmed_offband { color: var(--muted); }
.classification.emerging_fit { color: var(--muted); }
.classification.hidden_emerging { color: var(--dim); }
.classification.below_gate { color: var(--faint); }
.classification.broken { color: var(--red); border-color: rgba(255,77,77,0.3); background: rgba(255,77,77,0.06); }
.classification.no_data { color: var(--faint); }
.picker { position: relative; min-width: 280px; }
.picker-input { width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-family: inherit; font-size: 13px; padding: 8px 12px;
  border-radius: 8px; outline: none; transition: border-color 120ms; }
.picker-input:focus { border-color: var(--accent); }
.picker-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 320px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 50; display: none; }
.picker-panel.open { display: block; }
.picker-row { display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; cursor: pointer; gap: 8px; transition: background 100ms; }
.picker-row:hover, .picker-row.kbd-active { background: var(--panel-2); }
.picker-row.is-current { background: rgba(247,147,26,0.08); }
.picker-row-name { color: var(--text); font-size: 11.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-row-ticker { color: var(--dim); font-size: 10px; font-variant-numeric: tabular-nums;
  flex-shrink: 0; }
.picker-row-r2 { color: var(--accent); font-size: 10px; font-weight: 600;
  font-variant-numeric: tabular-nums; min-width: 50px; text-align: right; flex-shrink: 0; }
.picker-empty { padding: 16px; color: var(--dim); font-size: 12px; text-align: center; }
.foot { color: var(--faint); font-size: 11px; text-align: center; margin-top: 30px; line-height: 1.6; }
.foot a { color: var(--dim); }
.foot code { background: var(--panel-2); color: var(--muted); padding: 1px 5px; border-radius: 3px; }
@media (max-width: 768px) {
  .wrap { padding: 18px 14px 60px; }
  .top { flex-direction: column; gap: 10px; padding-left: 19px; padding-right: 19px; align-items: stretch; }
  .title { font-size: 22px; }
  .picker { min-width: 0; width: 100%; }
  .hero { padding: 16px; }
  .hero-row { grid-template-columns: repeat(2, 1fr); }
  .tile-big { font-size: 20px; }
  .section-head { flex-direction: column; gap: 8px; align-items: stretch; }
  .section { padding: 18px; }
  .section h2 { font-size: 14px; }
  .legend { gap: 8px; font-size: 10px; }
  .leader { font-size: 11.5px; }
  .leader th, .leader td { padding: 6px 6px; }
}
.explainer p.prose { color: var(--muted); font-size: 13px; line-height: 1.65;
  margin: 0 0 12px; max-width: 760px; }
.explainer p.prose:last-child { margin-bottom: 0; }
.explainer p.prose strong { color: var(--text); font-weight: 600; }
.explainer p.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.explainer p.prose a:hover { border-bottom-color: var(--accent); }
.explainer p.formula { color: var(--text); font-size: 14px; line-height: 1.5;
  margin: 4px 0 16px; padding: 10px 14px;
  background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; max-width: 560px; }
.info { color: var(--faint); cursor: help; font-size: 11px;
  position: relative; display: inline-block; margin-left: 4px;
  font-weight: 400; letter-spacing: 0; }
.info:hover { color: var(--muted); }
.info::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.info:hover::after, .info:focus::after { opacity: 1; }
.tile:last-child .info::after { left: auto; right: -8px; transform: none; }
.tile:first-child .info::after { left: -8px; right: auto; transform: none; }
