/* ==========================================================================
   Market Breadth Desk — visual system
   Dark, editorial, data-first. No external fonts or assets.
   ========================================================================== */

:root {
  --bg: #08111c;
  --bg-deep: #060d16;
  --panel: #101c2a;
  --panel-soft: #0d1825;
  --panel-raised: #142232;
  --line: #203247;
  --line-soft: rgba(120, 151, 181, 0.13);
  --text: #e8eef7;
  --text-soft: #c5d0de;
  --muted: #8496ab;
  --dim: #5d7085;
  --gold: #c9a05b;
  --gold-bright: #e0ba78;
  --gold-soft: rgba(201, 160, 91, 0.14);
  --red: #e2574a;
  --red-soft: rgba(226, 87, 74, 0.13);
  --green: #3fa98a;
  --green-soft: rgba(63, 169, 138, 0.13);
  --blue: #78a9c4;
  --blue-soft: rgba(120, 169, 196, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  --shell: 1440px;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1000px 560px at 88% -10%, rgba(201, 160, 91, 0.075), transparent 64%),
    radial-gradient(900px 600px at -8% 28%, rgba(79, 125, 162, 0.055), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, #09131f 52%, var(--bg-deep) 100%);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

::selection {
  color: #101820;
  background: var(--gold);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.page-glow {
  position: fixed;
  top: -240px;
  right: -100px;
  z-index: 0;
  width: 680px;
  height: 680px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(201, 160, 91, 0.12), transparent 67%);
  filter: blur(10px);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 max(24px, calc((100vw - var(--shell)) / 2 + 40px));
  background: rgba(8, 17, 28, 0.78);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px) saturate(135%);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  width: 31px;
  height: 31px;
  padding: 6px;
  background: linear-gradient(145deg, rgba(201, 160, 91, 0.15), rgba(201, 160, 91, 0.025));
  border: 1px solid rgba(201, 160, 91, 0.38);
  border-radius: 9px;
}

.brand-mark i {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, var(--gold-bright), rgba(201, 160, 91, 0.35));
  border-radius: 2px;
}

.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 12px; }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy b {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.topbar-right {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.source-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 5px 10px;
  color: var(--gold-bright);
  background: rgba(201, 160, 91, 0.075);
  border: 1px solid rgba(201, 160, 91, 0.23);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.source-pill i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201, 160, 91, 0.12);
}

#sourceText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-pill.is-custom {
  color: #a9d9c9;
  background: var(--green-soft);
  border-color: rgba(63, 169, 138, 0.25);
}

.source-pill.is-custom i {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 169, 138, 0.12);
}

.asof b {
  color: var(--text-soft);
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-num);
  font-size: 13px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.4);
}

/* --------------------------------------------------------------------------
   Page navigation / secondary page header
   -------------------------------------------------------------------------- */

.page-nav {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(12, 23, 36, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.page-nav-link {
  padding: 5px 12px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.page-nav-link:hover {
  color: var(--text);
}

.page-nav-link.is-active {
  color: var(--gold-bright);
  background: rgba(201, 160, 91, 0.14);
  box-shadow: inset 0 0 0 1px rgba(201, 160, 91, 0.22);
}

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

.page-title {
  margin: 10px 0 0;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.page-title span {
  color: var(--gold-bright);
}

.page-lede {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.back-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.back-link:hover {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.4);
}

/* --------------------------------------------------------------------------
   Daily read (当日市场解读)
   -------------------------------------------------------------------------- */

.analysis-card {
  margin-top: 14px;
  padding: 20px 22px 18px;
}

.analysis-lead {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.9;
}

.analysis-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analysis-list li {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.analysis-list b {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.analysis-watch {
  margin-top: 16px;
  padding: 12px 15px;
  background: rgba(201, 160, 91, 0.06);
  border: 1px solid rgba(201, 160, 91, 0.2);
  border-radius: 10px;
}

.analysis-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.analysis-note {
  padding: 12px 14px 13px;
  background: rgba(10, 19, 30, 0.55);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.analysis-note-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.analysis-note-label {
  color: var(--gold-bright);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.analysis-note-value {
  color: var(--text);
  font-family: var(--font-num);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.analysis-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.analysis-note p b {
  color: var(--text-soft);
  font-weight: 500;
}

.analysis-watch-label {
  color: var(--gold-bright);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.analysis-watch p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.85;
}

@media (max-width: 1000px) {
  .analysis-list {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Index futures basis page
   -------------------------------------------------------------------------- */

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

.fut-card {
  position: relative;
  overflow: hidden;
  padding: 15px 17px 14px;
  background: linear-gradient(155deg, rgba(18, 33, 49, 0.92), rgba(12, 23, 36, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fut-card::before {
  position: absolute;
  top: 0;
  right: 22%;
  left: 22%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(201, 160, 91, 0.35), transparent);
}

.fut-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fut-code {
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.fut-name {
  color: var(--muted);
  font-size: 10.5px;
}

.fut-card-head .sig-pill {
  margin-left: auto;
}

.fut-value {
  margin-top: 11px;
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.fut-unit {
  margin-left: 2px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
}

.fut-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: var(--dim);
  font-size: 10.5px;
}

.fut-tags {
  margin-top: 8px;
  color: var(--gold-bright);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.sig-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}

.sig-bull {
  color: #8ed3bf;
  background: rgba(63, 169, 138, 0.15);
  border: 1px solid rgba(63, 169, 138, 0.25);
}

.sig-bear {
  color: #f0a59e;
  background: rgba(226, 87, 74, 0.15);
  border: 1px solid rgba(226, 87, 74, 0.25);
}

.sig-flat {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.fut-verdict {
  margin-top: 14px;
  padding: 20px 22px 18px;
}

/* ---- 四维打分卡 ---- */

.fut-score {
  margin-top: 14px;
  padding: 20px 22px 18px;
}

.score-total {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 2px 0 18px;
}

.score-num {
  font-family: var(--font-num);
  font-size: 44px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
}

.score-verdict {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.score-verdict.is-bear {
  color: #f0a59e;
  background: rgba(226, 87, 74, 0.14);
  border: 1px solid rgba(226, 87, 74, 0.28);
}

.score-verdict.is-bull {
  color: #8ed3bf;
  background: rgba(63, 169, 138, 0.14);
  border: 1px solid rgba(63, 169, 138, 0.28);
}

.score-verdict.is-flat {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.score-gauge-wrap {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.score-gauge {
  position: relative;
  display: block;
  height: 8px;
  background: linear-gradient(90deg, rgba(63, 169, 138, 0.75), rgba(32, 50, 71, 0.9) 50%, rgba(226, 87, 74, 0.75));
  border-radius: 999px;
}

.score-gauge i {
  position: absolute;
  top: -5px;
  width: 3px;
  height: 18px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(232, 238, 247, 0.5);
}

.score-gauge-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 9.5px;
}

.score-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.score-row {
  display: grid;
  grid-template-columns: 92px minmax(160px, 1.4fr) minmax(90px, 1fr) 54px 62px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(32, 50, 71, 0.55);
}

.score-row:first-child {
  border-top: none;
}

.score-label {
  color: var(--text-soft);
  font-size: 12.5px;
}

.score-reading {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.score-bar {
  position: relative;
  display: block;
  height: 6px;
  background: rgba(32, 50, 71, 0.65);
  border-radius: 999px;
}

.score-bar::before {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 1px;
  content: "";
  background: rgba(132, 150, 171, 0.4);
}

.score-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.score-bar i.is-neg {
  background: rgba(63, 169, 138, 0.75);
}

.score-bar i.is-pos {
  background: rgba(226, 87, 74, 0.75);
}

.score-weight {
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 11px;
  text-align: right;
}

.score-value {
  font-family: var(--font-num);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.score-value.is-neg { color: #8ed3bf; }
.score-value.is-pos { color: #f0a59e; }

.score-notes {
  margin-top: 16px;
  padding: 12px 15px;
  background: rgba(201, 160, 91, 0.05);
  border: 1px solid rgba(201, 160, 91, 0.18);
  border-radius: 10px;
}

.score-notes b {
  color: var(--gold-bright);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.score-notes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.85;
}

.score-notes li::marker {
  color: var(--gold);
}

@media (max-width: 1000px) {
  .score-row {
    grid-template-columns: 80px 1fr 54px;
    row-gap: 6px;
  }

  .score-row .score-bar {
    grid-column: 2 / 3;
  }

  .score-row .score-reading {
    grid-column: 2 / 3;
  }
}

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

.fut-stat {
  padding: 10px 12px;
  background: rgba(10, 19, 30, 0.55);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.fut-stat span {
  display: block;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.fut-stat b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 500;
}

.fut-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.fut-table {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.fut-table-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 9px 12px;
  background: rgba(201, 160, 91, 0.05);
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}

.fut-table-head span {
  color: var(--muted);
}

.fut-table-delta {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 11px;
}

.fut-table table {
  width: 100%;
  font-size: 11.5px;
}

.fut-table th {
  padding: 6px 10px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: left;
  background: transparent;
}

.fut-table td {
  padding: 5px 10px;
  color: var(--text-soft);
  border-top: 1px solid rgba(32, 50, 71, 0.5);
}

.fut-table th.num,
.fut-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fut-table td.cell-up {
  color: var(--red);
}

.fut-table td.cell-down {
  color: var(--green);
}

@media (max-width: 1000px) {
  .fut-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fut-stats {
    grid-template-columns: 1fr 1fr;
  }

  .fut-tables {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .fut-grid {
    grid-template-columns: 1fr;
  }

  .fut-stats {
    grid-template-columns: 1fr;
  }
}

.next-page {
  margin-top: 14px;
}
.next-page-card {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  background: linear-gradient(125deg, rgba(201, 160, 91, 0.1), rgba(12, 23, 36, 0.9) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.next-page-card:hover {
  border-color: rgba(201, 160, 91, 0.42);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.next-page-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.next-page-copy .kicker {
  margin: 0;
}

.next-page-copy strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.next-page-copy span {
  color: var(--muted);
  font-size: 12px;
}

.next-page-arrow {
  color: var(--gold-bright);
  font-family: var(--font-num);
  font-size: 22px;
  transition: transform 180ms ease;
}

.next-page-card:hover .next-page-arrow {
  transform: translateX(3px);
}


/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell), calc(100% - 80px));
  margin: 0 auto;
  padding-bottom: 54px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 56px;
  align-items: end;
  padding: 52px 0 36px;
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: var(--gold);
  opacity: 0.75;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 4.1vw, 56px);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.hero h1 span {
  position: relative;
  color: var(--gold-bright);
  white-space: nowrap;
}

.hero h1 span::after {
  position: absolute;
  right: 2px;
  bottom: -3px;
  left: 2px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(201, 160, 91, 0.65), transparent);
}

.lede {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span {
  padding: 5px 9px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.regime-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  background:
    radial-gradient(280px 160px at 90% 0%, rgba(201, 160, 91, 0.12), transparent 70%),
    linear-gradient(150deg, rgba(20, 34, 50, 0.94), rgba(12, 23, 36, 0.94));
  border: 1px solid rgba(201, 160, 91, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.regime-card::before {
  position: absolute;
  top: 0;
  right: 18%;
  left: 18%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(224, 186, 120, 0.65), transparent);
}

.regime-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.regime-head time {
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.regime-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 15px;
}

.regime-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.regime-title strong {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.regime-title span {
  color: var(--dim);
  font-size: 10.5px;
}

.regime-ad {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.regime-ad b {
  color: var(--gold-bright);
  font-family: var(--font-num);
  font-size: 29px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.regime-ad span {
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 10px;
}

.regime-meter {
  margin-top: 20px;
}

.meter-track {
  position: relative;
  height: 7px;
  background: #1a2a3c;
  border-radius: 999px;
}

.meter-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(201, 160, 91, 0.4), var(--gold));
  border-radius: 999px;
  transition: width 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meter-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--gold-bright);
  border: 2px solid #172333;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(201, 160, 91, 0.13);
  transform: translate(-50%, -50%);
  transition: left 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #52657c;
  font-family: var(--font-num);
  font-size: 9px;
}

.regime-foot {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  padding-top: 12px;
  color: var(--dim);
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
}

.regime-foot b {
  color: var(--text-soft);
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   KPI cards
   -------------------------------------------------------------------------- */

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

.kpi {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  padding: 17px 18px 10px;
  background: linear-gradient(155deg, rgba(18, 33, 49, 0.92), rgba(12, 23, 36, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.kpi::before {
  position: absolute;
  top: 0;
  right: 20%;
  left: 20%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(201, 160, 91, 0.38), transparent);
}

.kpi:hover {
  border-color: rgba(210, 227, 242, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

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

.kpi-label {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  color: var(--gold-bright);
  background: rgba(201, 160, 91, 0.08);
  border: 1px solid rgba(201, 160, 91, 0.19);
  border-radius: 5px;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.chip-muted {
  color: var(--dim);
  background: transparent;
  border-color: var(--line);
}

.chip-red {
  color: #f0a59e;
  background: var(--red-soft);
  border-color: rgba(226, 87, 74, 0.24);
}

.chip-green {
  color: #8ed3bf;
  background: var(--green-soft);
  border-color: rgba(63, 169, 138, 0.24);
}

.chip-gold {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.28);
}

.kpi-value {
  margin-top: 15px;
  font-family: var(--font-num);
  font-size: 34px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1;
}

.kpi-value-signal {
  padding-top: 4px;
  font-family: var(--font-sans);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.kpi-value-signal.is-top { color: #f18f85; }
.kpi-value-signal.is-bottom { color: #79c8b1; }
.kpi-value-signal.is-neutral { color: var(--text-soft); }
.kpi-value-signal.is-confirm { color: var(--gold-bright); }

.kpi-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 19px;
  margin-top: 8px;
  color: var(--dim);
  font-size: 10.5px;
}

.delta {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

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

/* --------------------------------------------------------------------------
   Boot error banner
   -------------------------------------------------------------------------- */

.boot-error {
  position: relative;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  color: #f4c9c4;
  background: rgba(226, 87, 74, 0.14);
  border-bottom: 1px solid rgba(226, 87, 74, 0.35);
  font-size: 12.5px;
}

.boot-error[hidden] {
  display: none;
}

.boot-error b {
  color: #ffd9d4;
  font-weight: 600;
}

.boot-error kbd {
  padding: 1px 5px;
  border: 1px solid rgba(244, 201, 196, 0.4);
  border-radius: 4px;
  font-family: var(--font-num);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Breadth pulse (TRIN / spreads / new high-low / HS300 crowding)
   -------------------------------------------------------------------------- */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pulse-grid .kpi {
  min-height: 132px;
  padding: 15px 17px 12px;
}

.pulse-grid .kpi-value {
  margin-top: 12px;
  font-size: 30px;
}

.pulse-grid .kpi-sub {
  margin-top: 7px;
}

.pulse-trin {
  grid-column: span 2;
}

.pulse-wide {
  grid-column: span 2;
}

.pulse-trin .kpi-value {
  font-size: 46px;
  color: var(--gold-bright);
  letter-spacing: -0.03em;
}

.pulse-note {
  margin: 9px 0 0;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.pulse-split {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 26px;
}

.pulse-split b {
  font-weight: 560;
}

.pulse-split .pulse-sep {
  color: var(--dim);
  font-size: 20px;
  font-weight: 400;
}

.pulse-split .is-high { color: #f18f85; }
.pulse-split .is-low { color: #79c8b1; }

.pulse-unit {
  margin-left: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.pulse-grid.is-empty {
  display: none;
}

.spark {
  width: 100%;
  height: 38px;
  margin-top: 7px;
  color: #aebdd0;
  overflow: visible;
}

.spark-gold { color: var(--gold); }
.spark-blue { color: var(--blue); }

.spark .spark-area {
  fill: currentColor;
  opacity: 0.09;
}

.spark .spark-line {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
  opacity: 0.9;
}

.spark .spark-last {
  fill: currentColor;
  stroke: var(--panel);
  stroke-width: 1.5;
}

.signal-strip {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 38px;
  margin-top: 7px;
}

.signal-tick {
  flex: 1;
  height: 3px;
  background: #223448;
  border-radius: 2px;
  transition: height 160ms ease, background 160ms ease;
}

.signal-tick.is-top {
  height: 18px;
  background: var(--red);
}

.signal-tick.is-bottom {
  height: 11px;
  background: var(--green);
  opacity: 0.8;
}

.signal-tick.is-latest {
  outline: 1px solid rgba(232, 238, 247, 0.4);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Control bar
   -------------------------------------------------------------------------- */

.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 14px;
  padding: 9px 11px;
  background: rgba(14, 27, 41, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}

.control-group,
.control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.control-label {
  padding-left: 4px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #0a1521;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.segmented button {
  min-width: 56px;
  padding: 5px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  transition: color 150ms ease, background 150ms ease;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.is-active {
  color: #15202b;
  background: var(--gold);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(201, 160, 91, 0.18);
}

.button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-ghost {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
}

.button-ghost:hover {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.32);
}

.button-quiet {
  color: var(--dim);
  background: transparent;
  border: 1px solid transparent;
}

.button-quiet:hover {
  color: var(--text-soft);
  border-color: var(--line);
}

.button-primary {
  color: #14202b;
  background: var(--gold);
  border: 1px solid var(--gold);
  font-weight: 600;
}

.button-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.button-icon {
  color: var(--gold);
  font-family: var(--font-num);
  font-size: 14px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Cards and charts
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  background: linear-gradient(160deg, rgba(17, 31, 47, 0.94), rgba(11, 22, 34, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.chart-card {
  padding: 18px 19px 12px;
  overflow: hidden;
}

.chart-card::before {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(201, 160, 91, 0.2), transparent);
}

.card-head,
.table-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.card-head h2,
.table-head h2,
.dialog-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.head-note {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 4px;
  color: var(--dim);
  font-size: 10px;
  white-space: nowrap;
}

.ad-toggle {
  margin-left: 8px;
  padding: 2px 9px;
  font: inherit;
  font-size: 10px;
  line-height: 16px;
  color: var(--muted);
  background: rgba(120, 151, 181, 0.07);
  border: 1px solid rgba(120, 151, 181, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ad-toggle:hover {
  color: var(--text);
  border-color: rgba(201, 160, 91, 0.45);
}

.ad-toggle.is-on {
  color: #101a25;
  background: var(--gold);
  border-color: var(--gold);
}

.key-dot {
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
}

.key-dot:first-child {
  margin-left: 0;
}

.key-index { background: #e8eef7; }
.key-ad { background: var(--gold); }

.key-triangle {
  margin-left: 8px;
  color: var(--red);
  font-size: 9px;}

.chart {
  width: 100%;
  margin-top: 8px;
}

.chart-main {
  height: 458px;
}

.chart-score {
  height: 252px;
}

.chart-caption {
  margin: 1px 0 0;
  color: #52657a;
  font-size: 10px;
  letter-spacing: 0.01em;
}

.chart-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  color: var(--muted);
  background: rgba(8, 17, 28, 0.45);
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.chart-fallback code {
  color: var(--gold-bright);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

/* ECharts tooltip markup */
.tt-card {
  min-width: 238px;
  padding: 12px 13px 11px;
}

.tt-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  color: var(--muted);
  border-bottom: 1px solid rgba(120, 151, 181, 0.13);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.tt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

.tt-badge {
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 9px;
  line-height: 1.5;
  white-space: nowrap;
}

.tt-danger {
  color: #ffb5ad;
  background: rgba(226, 87, 74, 0.18);
  border-color: rgba(226, 87, 74, 0.35);
}

.tt-panic {
  color: #93d8c3;
  background: rgba(63, 169, 138, 0.16);
  border-color: rgba(63, 169, 138, 0.32);
}

.tt-confirm {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.32);
}

.tt-euphoric {
  color: #ffd08a;
  background: rgba(226, 87, 74, 0.18);
  border-color: rgba(224, 186, 120, 0.4);
}

.tt-top {
  color: #f0a39b;
  background: var(--red-soft);
  border-color: rgba(226, 87, 74, 0.25);
}

.tt-bottom {
  color: #8ed3bf;
  background: var(--green-soft);
  border-color: rgba(63, 169, 138, 0.24);
}

.tt-none {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(120, 151, 181, 0.15);
}
.tt-warn {
  color: #e8b48a;
  background: rgba(201, 160, 91, 0.12);
  border-color: rgba(201, 160, 91, 0.3);
  border-style: dashed;
}

.tt-price {
  padding: 9px 0 8px;
  color: var(--text);
  font-family: var(--font-num);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.tt-price span {
  margin-left: 5px;
  font-size: 10px;
  letter-spacing: 0;
}

.tt-up { color: var(--red); }
.tt-down { color: var(--green); }
.tt-muted { color: var(--muted); }

.tt-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 5px 9px;
  align-items: baseline;
  font-size: 10px;
}

.tt-grid span {
  color: var(--dim);
}

.tt-grid b {
  color: var(--text-soft);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tt-grid i {
  min-width: 48px;
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 9px;
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}

.chart-main-card {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Split grid / readout
   -------------------------------------------------------------------------- */

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.readout {
  display: flex;
  flex-direction: column;
  padding: 18px 19px;
}

.mini-date {
  padding-top: 3px;
  color: var(--dim);
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.readout-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 16px;
}

.signal-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.signal-badge.is-neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.signal-badge.is-top {
  color: #f3a49c;
  background: var(--red-soft);
  border-color: rgba(226, 87, 74, 0.28);
}

.signal-badge.is-bottom {
  color: #8dd5c0;
  background: var(--green-soft);
  border-color: rgba(63, 169, 138, 0.27);
}

.signal-badge.is-confirm {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.3);
}

.pattern-row {
  margin: 0 0 14px;
  padding: 9px 10px;
  background: rgba(120, 151, 181, 0.04);
  border: 1px solid rgba(120, 151, 181, 0.12);
  border-radius: 8px;
}

.pattern-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pattern-value {
  font-size: 12.5px;
  font-weight: 700;
}

.pattern-value.is-high { color: #f0a49c; }
.pattern-value.is-mid { color: #e8b48a; }
.pattern-value.is-low { color: var(--muted); }

.pattern-note {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.75;
}

.pattern-hint {
  color: var(--muted);
}

.risk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 8px 10px;
  background: rgba(120, 151, 181, 0.05);
  border: 1px solid rgba(120, 151, 181, 0.14);
  border-radius: 8px;
}

.risk-label {
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.4px;
}

.risk-value {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
}

.risk-value.is-high { color: #f0a49c; }
.risk-value.is-mid { color: #e8b48a; }
.risk-value.is-low { color: #8dd3bf; }

.risk-note {
  font-size: 11px;
  color: var(--muted);
}

.risk-note.is-high { color: #f0a49c; }
.risk-note.is-mid { color: #e8b48a; }

.readout-text {
  min-height: 74px;
  margin: 12px 0 16px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.85;
}

.readout-text b {
  color: var(--text);
  font-weight: 600;}

.readout-text .metric-top { color: #f2a39a; }
.readout-text .metric-bottom { color: #85ceb9; }
.readout-text .metric-gold { color: var(--gold-bright); }

.readout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.readout-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: rgba(10, 21, 33, 0.5);
}

.readout-stat span {
  color: var(--dim);
  font-size: 9.5px;
}

.readout-stat b {
  color: var(--text-soft);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.readout-meter-block {
  margin-top: 17px;
}

.readout-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--dim);
  font-size: 10px;
}

.readout-meter-head b {
  color: var(--gold-bright);
  font-family: var(--font-num);
  font-size: 12.5px;
  font-weight: 500;
}

.ad-meter {
  position: relative;
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  background: #1b2b3d;
  border-radius: 99px;
}

.ad-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(201, 160, 91, 0.34), var(--gold));
  border-radius: inherit;
  transition: width 460ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ad-meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #4e6177;
  font-family: var(--font-num);
  font-size: 8.5px;
}

.readout-note {
  margin: auto 0 0;
  padding-top: 16px;
  color: var(--dim);
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */

.table-card {
  margin-top: 14px;
  overflow: hidden;
}

.table-head {
  align-items: center;
  padding: 18px 19px 14px;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-chips {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #0a1521;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.filter-chips button {
  padding: 4px 9px;
  color: var(--dim);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 10px;
  transition: color 150ms ease, background 150ms ease;
}

.filter-chips button:hover {
  color: var(--text-soft);
}

.filter-chips button.is-active {
  color: var(--gold-bright);
  background: rgba(201, 160, 91, 0.12);
}

.search-box {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 29px;
  padding: 0 9px;
  color: var(--dim);
  background: #0a1521;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.search-box span {
  font-family: var(--font-num);
  font-size: 14px;
  line-height: 1;
}

.search-box input {
  width: 125px;
  padding: 0;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 10.5px;
}

.search-box input::placeholder {
  color: #4e6177;
}

.table-hint {
  display: none;
  margin: 0;
  padding: 0 13px 7px;
  color: #4e6177;
  font-size: 9px;
}

.table-scroll {
  max-height: 520px;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-color: #2a4058 transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 12px;
  color: var(--dim);
  background: #0f1b29;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  padding-left: 19px;
}

th:last-child,
td:last-child {
  padding-right: 19px;
}

th.num,
td.num {
  text-align: right;
}

td {
  padding: 8px 12px;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(120, 151, 181, 0.075);
  font-family: var(--font-num);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

tbody tr {
  transition: background 130ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr.is-top {
  background: linear-gradient(90deg, rgba(226, 87, 74, 0.085), transparent 30%);
}

tbody tr.is-top:hover {
  background: linear-gradient(90deg, rgba(226, 87, 74, 0.12), rgba(255, 255, 255, 0.018) 42%);
}

tbody tr.is-bottom {
  background: linear-gradient(90deg, rgba(63, 169, 138, 0.055), transparent 27%);
}

tbody tr.is-confirm {
  background: linear-gradient(90deg, rgba(201, 160, 91, 0.075), transparent 30%);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
}

td.num {
  color: #b8c6d6;
}

.cell-up { color: #e58a81; }
.cell-down { color: #75c2ab; }
.cell-muted { color: var(--dim); }

.score-cell {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  min-width: 74px;
}

.score-cell span {
  color: var(--text);
}

.score-cell i {
  position: relative;
  display: block;
  width: 28px;
  height: 3px;
  overflow: hidden;
  background: #223448;
  border-radius: 9px;
}

.score-cell i::after {
  display: block;
  width: var(--score, 0%);
  height: 100%;
  content: "";
  background: var(--blue);
}

.signal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.signal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 19px;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  line-height: 1.4;
}

.signal-extra {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 8.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.signal-extra.is-danger {
  color: #ffb5ad;
  background: rgba(226, 87, 74, 0.18);
  border-color: rgba(226, 87, 74, 0.36);
}

.signal-extra.is-panic {
  color: #93d8c3;
  background: rgba(63, 169, 138, 0.15);
  border-color: rgba(63, 169, 138, 0.3);
}

.signal-extra.is-confirm {
  color: var(--gold-bright);
  background: var(--gold-soft);
  border-color: rgba(201, 160, 91, 0.32);
}

.signal-extra.is-euphoric {
  color: #ffd08a;
  background: rgba(226, 87, 74, 0.18);
  border-color: rgba(224, 186, 120, 0.4);
}

.signal-tag.is-top {
  color: #f0a49c;
  background: var(--red-soft);
  border-color: rgba(226, 87, 74, 0.22);
}

.signal-tag.is-bottom {
  color: #8dd3bf;
  background: var(--green-soft);
  border-color: rgba(63, 169, 138, 0.22);
}

.signal-tag.is-neutral {
  color: #5f7288;
}

.signal-tag.is-warn {
  color: #e8b48a;
  background: rgba(201, 160, 91, 0.1);
  border-color: rgba(201, 160, 91, 0.28);
  border-style: dashed;
}

.empty-row td {
  padding: 48px 20px;
  color: var(--dim);
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: center;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 19px;
  color: var(--dim);
  font-size: 10px;
}

.pager {
  display: flex;
  gap: 7px;
  align-items: center;
}

.pager button {
  width: 26px;
  height: 24px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-num);
  font-size: 12px;
  transition: color 150ms ease, border-color 150ms ease;
}

.pager button:hover:not(:disabled) {
  color: var(--gold-bright);
  border-color: rgba(201, 160, 91, 0.4);
}

.pager button:disabled {
  color: #34465a;
  cursor: not-allowed;
}

.pager span {
  min-width: 50px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.page-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  padding: 25px 2px 0;
  color: #4f6277;
  font-size: 9.5px;
}

.page-footer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Dialog
   -------------------------------------------------------------------------- */

.dialog {
  width: min(790px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  color: var(--text);
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(201, 160, 91, 0.07), transparent 70%),
    #0e1a28;
  border: 1px solid rgba(201, 160, 91, 0.24);
  border-radius: 17px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.dialog::backdrop {
  background: rgba(3, 8, 14, 0.72);
  backdrop-filter: blur(5px);
}

.dialog[open] {
  animation: dialog-in 180ms ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 21px 23px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.dialog-body {
  padding: 18px 23px 20px;
}

.dialog-lede {
  max-width: 660px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field-grid h3 {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.field-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 151, 181, 0.075);
  font-size: 10.5px;
  line-height: 1.55;
}

.field-list code {
  color: var(--gold-bright);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 10px;
  word-break: break-all;
}

.field-list span {
  color: var(--dim);
}

.field-list span code {
  color: #a9c4d6;
}

.dialog-callout {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 19px;
  padding: 11px 13px;
  color: var(--muted);
  background: rgba(201, 160, 91, 0.06);
  border: 1px solid rgba(201, 160, 91, 0.16);
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.7;
}

.dialog-callout b {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-size: 10.5px;
}

.dialog-foot {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 14px 23px;
  background: rgba(5, 12, 20, 0.24);
  border-top: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  color: var(--text-soft);
  background: #132131;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 9px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  font-size: 11px;
  line-height: 1.65;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-left-color: var(--red);
}

.toast.is-success {
  border-left-color: var(--green);
}

.toast.is-warning {
  border-left-color: var(--gold);
}

.toast-mark {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-family: var(--font-num);
  font-size: 12px;
  line-height: 1.5;
}

.toast.is-error .toast-mark { color: var(--red); }
.toast.is-success .toast-mark { color: var(--green); }
.toast.is-warning .toast-mark { color: var(--gold); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
  }

  .split-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 1fr);
  }

  .kpi-value {
    font-size: 30px;
  }
}

@media (max-width: 1000px) {
  .shell {
    width: min(var(--shell), calc(100% - 48px));
  }

  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 38px;
  }

  .regime-card {
    max-width: 560px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .page-nav-link {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .pulse-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pulse-trin,
  .pulse-wide {
    grid-column: span 2;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .readout-text {
    min-height: 0;
  }

  .readout-note {
    margin-top: 16px;
  }

  .chart-score {
    height: 240px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 32px);
  }

  .topbar {
    min-height: 60px;
    padding: 0 16px;
  }

  .asof {
    display: none;
  }

  .topbar-right {
    gap: 9px;
  }

  .source-pill {
    max-width: 142px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding: 30px 0 25px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .lede {
    margin-top: 15px;
    font-size: 12.5px;
  }

  .hero-tags {
    margin-top: 16px;
  }

  .regime-card {
    padding: 17px 18px;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi {
    min-height: 151px;
    padding: 15px 14px 8px;
  }

  .kpi-value {
    font-size: 27px;
  }

  .kpi-value-signal {
    font-size: 22px;
  }

  .spark {
    height: 31px;
  }

  .control-bar {
    align-items: flex-start;
  }

  .control-actions {
    width: 100%;
  }

  .control-actions .button {
    flex: 1;
  }

  .chart-card {
    padding: 15px 13px 10px;
  }

  .chart-main {
    height: 365px;
  }

  .chart-score {
    height: 220px;
  }

  .head-note {
    display: none;
  }

  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-tools {
    width: 100%;
  }

  .filter-chips {
    flex: 1;
  }

  .filter-chips button {
    flex: 1;
    padding-right: 5px;
    padding-left: 5px;
  }

  .search-box {
    flex: 1;
    min-width: 130px;
  }

  .search-box input {
    width: 100%;
  }

  .table-hint {
    display: block;
  }

  .table-scroll {
    max-height: 440px;
  }

  th,
  td {
    padding-right: 9px;
    padding-left: 9px;
  }

  th:first-child,
  td:first-child {
    padding-left: 13px;
  }

  th:last-child,
  td:last-child {
    padding-right: 13px;
  }

  .page-footer {
    display: block;
    line-height: 1.8;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .field-list li {
    grid-template-columns: 105px 1fr;
  }

  .dialog-head,
  .dialog-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .dialog-foot {
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (max-width: 520px) {
  .brand-copy small {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .page-nav {
    padding: 2px;
  }

  .next-page-card {
    padding: 15px 16px;
  }

  .next-page-copy span {
    display: none;
  }

  .pulse-grid {
    grid-template-columns: 1fr;
  }

  .pulse-trin,
  .pulse-wide {
    grid-column: span 1;
  }

  .pulse-grid .kpi {
    min-height: 116px;
  }

  .pulse-trin .kpi-value {
    font-size: 38px;
  }

  .kpi {
    min-height: 142px;
  }

  .control-label {
    width: 100%;
  }

  .control-group {
    width: 100%;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .control-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .control-actions .button-quiet {
    grid-column: 1 / -1;
  }

  .hero h1 {
    letter-spacing: -0.04em;
  }

  .readout-grid {
    grid-template-columns: 1fr;
  }

  .table-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    flex: 0 0 auto;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

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

/* --------------------------------------------------------------------------
   Scrollbars
   -------------------------------------------------------------------------- */

* {
  scrollbar-color: #2a4058 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: #2a4058;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
