:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.04);
  --up: #1b7f4a;
  --up-soft: rgba(27, 127, 74, 0.1);
  --down: #c4313e;
  --down-soft: rgba(196, 49, 62, 0.1);
  --warn: #806646;
  --warn-soft: rgba(201, 168, 106, 0.22);
  --accent: #806646;
  --gold: #c9a86a;
  --header: rgba(245, 245, 247, 0.86);
  --chip: rgba(0, 0, 0, 0.04);
  --track: rgba(0, 0, 0, 0.06);
  --focus: #806646;
  --chart-grid: rgba(0, 0, 0, 0.06);
  --chart-tick: #8e8e93;
  --chart-zero: rgba(0, 0, 0, 0.28);
  --c1: #3a6fd8;
  --c2: #1f8a70;
  --c3: #b5811a;
  --c4: #c45c4a;
  --c5: #6d5bd0;
  --c6: #3d7ea6;
  --c7: #5c7d38;
  --spark-bad: var(--down);
  --spark-warn: var(--warn);
  --spark-good: #5eae7c;
  --spark-strong: #1b7f4a;
  --header-h: 58px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1314;
  --card: #1a2122;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 40px rgba(0, 0, 0, 0.35);
  --up: #3dd68c;
  --up-soft: rgba(61, 214, 140, 0.14);
  --down: #ff6b7a;
  --down-soft: rgba(255, 107, 122, 0.14);
  --warn: #e8d3a0;
  --warn-soft: rgba(232, 211, 160, 0.16);
  --accent: #e8d3a0;
  --gold: #c9a86a;
  --header: rgba(15, 19, 20, 0.88);
  --chip: rgba(255, 255, 255, 0.045);
  --track: rgba(255, 255, 255, 0.08);
  --focus: #e8d3a0;
  --chart-grid: rgba(255, 255, 255, 0.06);
  --chart-tick: #71717a;
  --chart-zero: rgba(255, 255, 255, 0.32);
  --c1: #8eb0ff;
  --c2: #5dcaa5;
  --c3: #e0b15a;
  --c4: #f0a090;
  --c5: #c4b5fd;
  --c6: #93c5e8;
  --c7: #b7d48e;
  --spark-bad: var(--down);
  --spark-warn: var(--warn);
  --spark-good: #8ad4b3;
  --spark-strong: #3dd68c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }

h1, h2, h3, p { margin: 0; }

button, input, a { font: inherit; }

a { color: inherit; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.top-inner, .footer-inner, #app {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.top-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.logo {
  height: 34px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.brand-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible { color: var(--accent); background: var(--chip); }

.top-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.updated { text-align: right; }

.eyebrow {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stamp { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.stamp span { color: var(--muted); font-weight: 500; }

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-btn:hover { background: var(--chip); }

.theme-btn svg { width: 18px; height: 18px; }

.icon-sun, .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: block; }

#app { padding: 28px 0 8px; }

.loading, .error-banner { padding: 28px 0; color: var(--muted); }

section { margin-bottom: 56px; scroll-margin-top: 76px; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.section-head h2, .score-kicker h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-head p, .lede {
  color: var(--muted);
  font-size: 14px;
  max-width: 68ch;
  margin-top: 4px;
}

.alert {
  margin-bottom: 22px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.grid-4, .grid-3, .grid-quotes, .yield-row {
  display: grid;
  gap: 12px;
}

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-quotes { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }

.card-kicker, .kpi .label {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.kpi .value {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.kpi .hint, .fine, .source, .story, .ma-sub, .spark-caption, .part-detail, .cross-quiet, .footer-line {
  color: var(--faint);
  font-size: 13px;
}

.kpi .hint { margin-top: 8px; }
.story { margin-top: 12px; color: var(--muted); }
.source { margin-top: 12px; font-size: 12px; }
.fine { margin-top: 10px; color: var(--muted); line-height: 1.45; }

.week { margin-top: 4px; font-size: 13px; font-weight: 600; }

.badge, .pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--chip);
  white-space: nowrap;
}

.badge.stale, .pill.flat { color: var(--warn); border-color: transparent; background: var(--warn-soft); }

.asof-note {
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.badge.bad { color: var(--down); border-color: transparent; background: var(--down-soft); }
.badge.calm, .pill.up { color: var(--up); border-color: transparent; background: var(--up-soft); }
.badge.warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.badge.hot, .pill.down { color: var(--down); border-color: transparent; background: var(--down-soft); }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.price-row .price { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.price-row .chg { font-size: 14px; font-weight: 600; }

.dma {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dma b { font-weight: 600; }

.chart-box { position: relative; height: 280px; min-width: 0; }
.chart-box.mid { height: 260px; }
.chart-box.spark { height: 56px; margin-top: 8px; }
.chart-box canvas { display: block; width: 100% !important; max-width: 100%; }

.panel { margin-top: 12px; }

.term {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.term > div {
  background: var(--chip);
  border-radius: 12px;
  padding: 10px;
}

.term .k { color: var(--faint); font-size: 12px; }
.term .v { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin-top: 2px; }

.meter {
  position: relative;
  height: 8px;
  margin: 14px 0 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--down), var(--warn) 50%, var(--up));
}

.fg-value {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.fg-value .price { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

.meter-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
}

.meter i, .band-mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
  background: var(--track);
}

.stack span:nth-child(1) { background: var(--up); }
.stack span:nth-child(2) { background: var(--faint); opacity: 0.45; }
.stack span:nth-child(3) { background: var(--down); }

.yield-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.yield-row .value { font-size: 26px; }

.solo { max-width: 560px; }
#kamatok .grid-quotes { margin-top: 12px; }

.yield-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.score-card { padding: 22px 22px 16px; }

.score-layout {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.score-layout > * { min-width: 0; }

.score-kicker {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.score-lead { margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 42ch; }

.score-figure {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.score-num {
  font-size: clamp(72px, 9vw, 96px);
  line-height: 0.86;
  letter-spacing: -0.055em;
  font-weight: 600;
}

.score-of {
  color: var(--faint);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.score-num.tone-bad { color: var(--down); }
.score-num.tone-warn { color: var(--warn); }
.score-num.tone-good, .score-num.tone-strong { color: var(--up); }

.verdict {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.verdict.tone-bad { background: var(--down-soft); color: var(--down); }
.verdict.tone-warn { background: var(--warn-soft); color: var(--warn); }
.verdict.tone-good, .verdict.tone-strong { background: var(--up-soft); color: var(--up); }

.band-wrap { position: relative; margin-top: 18px; }

.band {
  display: flex;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--track);
}

.band i { display: block; height: 100%; }
.band .b-bad { width: 40%; background: var(--down); }
.band .b-warn { width: 20%; background: var(--warn); }
.band .b-good { width: 20%; background: var(--up); opacity: 0.72; }
.band .b-strong { width: 20%; background: var(--up); }

.band-labels {
  position: relative;
  height: 16px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 11px;
}

.band-labels span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.band-labels span.is-first { transform: translateX(0); }
.band-labels span.is-last { transform: translateX(-100%); }

.method {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.method summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
}

.method summary::-webkit-details-marker { display: none; }

.method summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg) translateY(-1px);
}

.method[open] summary::before { transform: rotate(45deg) translateY(-1px); }

.method-body {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.method-body p + p { margin-top: 10px; }
.method-body ul { margin: 8px 0 0; padding-left: 18px; }
.method-body li + li { margin-top: 6px; }

.spark-block { margin-bottom: 8px; }
.score-main .spark-block { margin-top: 16px; margin-bottom: 0; }

.overbought {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.breadth-card { padding: 16px; }

.donut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.donut-tile {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 8px 12px;
  background: var(--card);
  min-width: 0;
}

.donut-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.donut-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.donut {
  width: min(148px, 86%);
  height: auto;
  display: block;
  margin: 6px auto 2px;
}

.donut-track,
.donut-value {
  fill: none;
  stroke-width: 11;
}

.donut-track { stroke: var(--track); }

.donut-value { stroke-linecap: round; }
.donut-value.zone-ok { stroke: var(--up); }
.donut-value.zone-bad { stroke: var(--down); }
.donut-value.zone-hot { stroke: var(--gold); }

.donut-tick {
  stroke: var(--text);
  stroke-width: 1.35;
  stroke-linecap: butt;
  opacity: 0.72;
}

.donut-pct {
  fill: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.donut-pill { margin-top: 2px; }
.donut-week { margin-top: 6px; font-size: 12px; font-weight: 600; }

.donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.donut-legend span { display: inline-flex; align-items: center; gap: 6px; }
.donut-legend .legend-note { color: var(--faint); }

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
  flex: 0 0 auto;
}

.swatch.bad { background: var(--down); }
.swatch.ok { background: var(--up); }
.swatch.hot { background: var(--gold); }

.ad-line { margin-top: 16px; }
.ad-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.ad-bar {
  margin-top: 6px;
  height: 8px;
  border-radius: 99px;
  background: var(--down);
  overflow: hidden;
}
.ad-bar i { display: block; height: 100%; background: var(--up); }

.oversold-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.score-spark { width: 100%; height: 124px; display: block; overflow: visible; }
.score-spark .spark-guide {
  stroke: var(--faint);
  stroke-width: 0.8;
  opacity: 0.45;
}
.score-spark .spark-area { stroke: none; opacity: 0.28; }
.score-spark .spark-area.band-bad { fill: var(--down); }
.score-spark .spark-area.band-warn { fill: var(--warn); }
.score-spark .spark-area.band-good { fill: var(--spark-good); }
.score-spark .spark-area.band-strong { fill: var(--spark-strong); }
.score-spark .spark-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.score-spark .spark-dot { stroke: var(--card); stroke-width: 1.2; }
.score-spark .spark-dot.band-bad { fill: var(--down); }
.score-spark .spark-dot.band-warn { fill: var(--warn); }
.score-spark .spark-dot.band-good { fill: var(--spark-good); }
.score-spark .spark-dot.band-strong { fill: var(--spark-strong); }
.score-spark .spark-tick {
  fill: var(--faint);
  font-size: 10px;
  font-weight: 600;
  dominant-baseline: central;
}
.tone-bad { --spark: var(--down); }
.tone-warn { --spark: var(--warn); }
.tone-good, .tone-strong { --spark: var(--up); }

.missing-note {
  margin: 8px 0;
  color: var(--warn);
  font-size: 13px;
}

.part { padding: 9px 0; border-top: 1px solid var(--line); }
.part:first-child { border-top: 0; padding-top: 2px; }
.part.is-missing { opacity: 0.62; }

.part-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.part-name { font-size: 14px; font-weight: 600; }
.part-meta {
  color: var(--faint);
  font-size: 13px;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}
.part-meta span:first-child { color: var(--text); font-weight: 600; }

.part-detail { margin-top: 4px; line-height: 1.4; font-size: 12px; }

.bar {
  height: 4px;
  border-radius: 99px;
  background: var(--track);
  margin-top: 7px;
  overflow: hidden;
}

.bar i { display: block; height: 100%; border-radius: 99px; background: var(--c1); }
.bar i.tone-bad { background: var(--down); }
.bar i.tone-warn { background: var(--warn); }
.bar i.tone-good, .bar i.tone-strong { background: var(--up); }

.nasdaq-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.nasdaq-close {
  margin-top: 4px;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.regime {
  margin: 0;
  max-width: 280px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.25;
  text-align: center;
}

.regime.tone-bad { background: var(--down-soft); color: var(--down); }
.regime.tone-warn { background: var(--warn-soft); color: var(--warn); }
.regime.tone-good { background: var(--up-soft); color: var(--up); }

.regime-note { margin-top: 12px; color: var(--muted); font-size: 14px; }

.ma-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.ma-tile {
  background: var(--chip);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.ma-kicker {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.ma-value { margin-top: 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.ma-dist { margin-top: 2px; font-size: 14px; font-weight: 600; }

.cross-fresh {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--up-soft);
  color: var(--up);
  font-weight: 600;
  line-height: 1.4;
}

.cross-quiet { margin-top: 10px; }

.subhead {
  margin: 22px 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sector-card { padding: 8px 8px 12px; }

.sector-head, .sector-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) minmax(180px, 1.7fr) 88px 88px 92px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.sector-head {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sector-head span:nth-child(n + 3) { text-align: right; }

.sector-row { border-radius: 12px; }
.sector-row + .sector-row { margin-top: 2px; }
.sector-row.leader { background: var(--up-soft); }
.sector-row.laggard { background: var(--down-soft); }

.s-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.s-name strong { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.s-ticker { color: var(--faint); font-size: 12px; }

.s-barcell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.s-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: var(--track);
}
.s-zero {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--chart-zero);
}
.s-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 99px;
}
.s-fill.up { left: 50%; background: var(--up); }
.s-fill.down { right: 50%; background: var(--down); }
.s-week { font-size: 13px; font-weight: 600; min-width: 64px; text-align: right; }
.s-metric { text-align: right; font-size: 14px; font-weight: 600; }
.s-k { display: none; }

.bench {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 4px 4px 8px;
  padding: 8px 12px 4px;
  color: var(--muted);
  font-size: 13px;
}

.lead-line { margin: 0 12px 8px; color: var(--muted); font-size: 13px; }

.mover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mover-card h3 { margin-bottom: 4px; }

.mover-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.mover-ticker { font-size: 13px; font-weight: 600; color: var(--muted); }
.mover-name { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; min-width: 0; }
.mover-chg { font-size: 14px; font-weight: 600; }

.mover-link {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mover-link span { font-weight: 600; color: var(--faint); margin-right: 6px; }
.mover-link:hover { color: var(--text); }

.summary-empty {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 14px;
}

.takeaway {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  max-width: 68ch;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.summary-card h3 { font-size: 16px; line-height: 1.35; }
.summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.summary-source {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.summary-source:hover { color: var(--text); }

.headline-list { display: flex; flex-direction: column; }

.headline {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.headline:hover .news-title { color: var(--muted); }

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.news-item {
  display: block;
  text-decoration: none;
  padding: 12px 12px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.news-item:hover { background: var(--chip); border-color: var(--line); }

.news-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.news-meta {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 12px;
}

.news-meta .src { color: var(--muted); font-weight: 600; }

.note { margin-top: 10px; color: var(--faint); font-size: 12px; }

.empty { color: var(--muted); padding: 8px 4px 12px; }

.site-footer {
  width: 100%;
  margin-top: 36px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--faint);
  font-size: 13px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: start;
}

.footer-col { min-width: 0; }

.footer-logo-link {
  display: inline-block;
  line-height: 0;
  cursor: pointer;
  border-radius: 8px;
}

.footer-logo-link:hover .footer-logo,
.footer-logo-link:focus-visible .footer-logo { opacity: 0.78; }

.footer-logo {
  height: 104px;
  width: auto;
  display: block;
}

.footer-logo-dark { display: none; }
[data-theme="dark"] .footer-logo-light { display: none; }
[data-theme="dark"] .footer-logo-dark { display: block; }

.brokers { margin: 4px 0 0; justify-self: end; max-width: 560px; }

.brokers-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.broker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.broker-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  text-decoration: none;
}

.broker-link:hover,
.broker-link:focus-visible { border-color: var(--line-strong); }

.broker-link img {
  height: 30px;
  width: auto;
  display: block;
}

.brokers-note {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.disclaimer {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.footer-line { margin-top: 6px; max-width: 62ch; }

@media (max-width: 1100px) {
  .grid-4, .grid-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yield-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yield-charts, .score-layout, .news-grid, .mover-grid, .summary-grid { grid-template-columns: 1fr; }
  .donut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ma-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-inner { flex-wrap: wrap; padding: 10px 0; gap: 8px 16px; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .sector-head, .sector-row {
    grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 1.5fr) 72px 72px 80px;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .top-inner, .footer-inner, #app { width: min(1120px, calc(100% - 28px)); }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .brokers { justify-self: start; margin-top: 0; max-width: none; }
  .broker-link { min-height: 52px; padding: 12px 16px; }
  .broker-link img { height: 28px; }
  .site-footer { margin-top: 28px; padding: 28px 0 36px; }
  .footer-logo { height: 88px; }
  .updated { text-align: left; }
  .nav { flex-wrap: wrap; overflow: visible; }
  .grid-4, .grid-3, .grid-quotes, .yield-row { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 20px; }
  .kpi .value { font-size: 30px; }
  .nasdaq-top { flex-direction: column; align-items: stretch; }
  .regime { max-width: none; }
  .score-card, .card { padding: 16px 14px 14px; }
  .part-top { align-items: flex-start; }
  .sector-head { display: none; }
  .sector-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }
  .s-name, .s-barcell { grid-column: 1 / -1; }
  .s-metric { text-align: left; }
  .s-k { display: block; color: var(--faint); font-size: 11px; font-weight: 600; }
  .s-week { min-width: 58px; }
}

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