:root {
  color-scheme: light;
  --bg: #f2f5f3;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --text: #202927;
  --ink: #111917;
  --muted: #65716d;
  --faint: #909b97;
  --line: #d8e0dc;
  --line-strong: #bac7c1;
  --green: #087f67;
  --green-soft: #e6f4ef;
  --red: #c13f4b;
  --red-soft: #f8e7e9;
  --amber: #b4680b;
  --amber-soft: #f7edde;
  --blue: #225f93;
  --blue-soft: #e6eef7;
  --purple: #655493;
  --shadow: 0 14px 34px rgba(17, 25, 23, 0.07);
  --shadow-low: 0 8px 20px rgba(17, 25, 23, 0.05);
  font-family:
    "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", ui-sans-serif,
    system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(90deg, rgba(17, 25, 23, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 25, 23, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 18% 0, rgba(8, 127, 103, 0.09), transparent 30rem),
    linear-gradient(180deg, #fbfcfb 0, var(--bg) 36rem);
  background-size: 40px 40px, 40px 40px, auto, auto;
  color: var(--text);
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.panel-kicker {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-top: 7px;
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 4.05rem);
  line-height: 0.96;
  font-weight: 920;
  letter-spacing: 0;
}

h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.28;
  font-weight: 850;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.subtitle {
  max-width: 760px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.stamp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-low);
}

.stamp div {
  padding: 11px 13px;
  border-left: 1px solid var(--line);
}

.stamp div:first-child {
  border-left: 0;
}

.stamp dt {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 850;
}

.stamp dd {
  margin-top: 5px;
  color: var(--ink);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-read,
.hero-grid,
.level-grid,
.table-grid {
  display: grid;
  gap: 12px;
}

.quick-read > *,
.hero-grid > *,
.level-grid > *,
.table-grid > *,
.market-layout > *,
.market-detail-grid > * {
  min-width: 0;
}

.quick-read {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1.56fr);
  align-items: stretch;
  margin-bottom: 12px;
}

.quick-read > div:first-child,
.plain-grid article,
.status-panel,
.formula-panel,
.data-panel,
.market-read,
.module-card,
.market-detail-grid article,
.chart-wrap,
.table-wrap,
.method-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-low);
}

.quick-read > div:first-child {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 156px;
  padding: 18px 20px;
  overflow: hidden;
}

.quick-read > div:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.plain-headline {
  margin-top: 13px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.05vw, 1.88rem);
  line-height: 1.34;
  font-weight: 900;
}

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

.plain-grid article {
  position: relative;
  min-height: 156px;
  padding: 15px;
  overflow: hidden;
}

.plain-grid article::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--line-strong);
}

.plain-grid article:has(.positive)::after {
  background: var(--green);
}

.plain-grid article:has(.negative)::after {
  background: var(--red);
}

.plain-grid article:has(.neutral)::after {
  background: var(--amber);
}

.plain-grid span,
.rule-strip span,
.metric-tile span,
.momentum-tile span,
.source-list span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.plain-grid strong {
  display: block;
  margin-top: 12px;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: clamp(1.18rem, 1.55vw, 1.46rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plain-grid p {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.52;
}

.section-band {
  margin-top: 12px;
}

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

.trend-section {
  margin-bottom: 12px;
}

.chart-wrap {
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(17, 25, 23, 0.036) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 25, 23, 0.036) 1px, transparent 1px),
    rgba(255, 255, 255, 0.92);
  background-size: 52px 52px, 52px 52px, auto;
}

.main-chart {
  height: 330px;
}

.main-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.axis {
  stroke: #ccd8d2;
  stroke-width: 2;
}

.line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line.net {
  stroke: var(--green);
  stroke-width: 5.2;
}

.line.fed {
  stroke: var(--blue);
  stroke-width: 2.5;
  opacity: 0.78;
}

.line.tga {
  stroke: var(--amber);
  stroke-width: 2.5;
  opacity: 0.84;
}

.line.rrp {
  stroke: var(--red);
  stroke-width: 2.5;
  opacity: 0.82;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.legend i {
  width: 18px;
  height: 4px;
  border-radius: 999px;
}

.legend .net {
  background: var(--green);
}

.legend .fed {
  background: var(--blue);
}

.legend .tga {
  background: var(--amber);
}

.legend .rrp {
  background: var(--red);
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.segment {
  border: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.segment.active {
  background: var(--ink);
  color: #ffffff;
}

.hero-grid {
  grid-template-columns: 1fr 1fr 0.92fr;
  margin-top: 12px;
}

.status-panel,
.formula-panel,
.data-panel {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.status-panel::before,
.formula-panel::before,
.data-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 127, 103, 0.045), transparent 44%);
}

.panel-head,
.compact {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 0;
}

.status-pill,
.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(8, 127, 103, 0.24);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.positive-bg {
  border-color: rgba(8, 127, 103, 0.24);
  background: var(--green-soft);
  color: var(--green);
}

.negative-bg {
  border-color: rgba(193, 63, 75, 0.24);
  background: var(--red-soft);
  color: var(--red);
}

.neutral-bg {
  border-color: rgba(180, 104, 11, 0.26);
  background: var(--amber-soft);
  color: var(--amber);
}

.hero-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.hero-value strong {
  color: var(--ink);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-value span {
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--panel-soft);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.body-copy {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.62;
}

.rule-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.rule-strip div,
.metric-tile,
.momentum-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.rule-strip div {
  padding: 10px;
}

.rule-strip strong {
  display: block;
  margin-top: 5px;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 0.9rem;
}

.formula {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.36;
  font-weight: 900;
}

.source-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.source-list li {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.source-list strong {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.35;
}

.market-radar {
  margin-top: 12px;
}

.market-score {
  display: flex;
  gap: 10px;
  align-items: center;
}

.market-score strong {
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 1.28rem;
  line-height: 1;
}

.market-layout,
.market-detail-grid {
  display: grid;
  gap: 12px;
}

.market-layout {
  grid-template-columns: 0.72fr 1.28fr;
  align-items: stretch;
}

.market-read {
  display: grid;
  align-content: space-between;
  padding: 16px;
}

.market-read p {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.48;
  font-weight: 850;
}

.market-read dl {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.market-read div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.market-read dt,
.market-read dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.market-read dd {
  color: var(--ink);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
}

.market-modules {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.module-card {
  display: grid;
  align-content: space-between;
  min-height: 124px;
  gap: 10px;
  padding: 12px;
  box-shadow: none;
}

.module-card.positive {
  border-color: rgba(8, 127, 103, 0.26);
}

.module-card.negative {
  border-color: rgba(193, 63, 75, 0.3);
}

.module-card.neutral {
  border-color: rgba(180, 104, 11, 0.28);
}

.module-card h3 {
  margin: 0;
}

.module-card span,
.module-card p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.38;
}

.module-card strong {
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 1.12rem;
}

.score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}

.module-card.positive .score-track i {
  background: var(--green);
}

.module-card.negative .score-track i {
  background: var(--red);
}

.market-detail-grid {
  grid-template-columns: 0.92fr 1.08fr;
  margin-top: 12px;
}

.market-detail-grid article {
  padding: 14px;
  box-shadow: none;
}

.trigger-list {
  display: grid;
  gap: 0;
}

.trigger-list li {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
}

.trigger-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.trigger-list strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.trigger-list span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.key-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.key-metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.key-metric-grid span,
.key-metric-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.key-metric-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 0.94rem;
}

.key-metric-grid small {
  margin-top: 5px;
  font-weight: 800;
}

.level-grid {
  grid-template-columns: 0.94fr 1.06fr;
  margin-top: 12px;
}

.tile-grid,
.momentum-grid,
.method-grid {
  display: grid;
  gap: 9px;
}

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

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

.metric-tile,
.momentum-tile {
  min-height: 88px;
  padding: 12px;
}

.metric-tile strong,
.momentum-tile strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: clamp(1.05rem, 1.32vw, 1.28rem);
  line-height: 1.1;
}

.metric-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.section-note {
  max-width: 540px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

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

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  box-shadow: none;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: right;
  font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-family:
    "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", ui-sans-serif,
    system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.method-band {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 18px;
  align-items: start;
  margin-top: 12px;
  padding: 15px;
}

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

.method-grid article {
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}

.method-grid strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.method-grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.58;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.neutral {
  color: var(--amber) !important;
}

.footer {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .topbar,
  .quick-read,
  .hero-grid,
  .level-grid,
  .table-grid,
  .market-layout,
  .market-detail-grid,
  .method-band {
    grid-template-columns: 1fr;
  }

  .stamp {
    min-width: 0;
  }

  .plain-grid,
  .market-modules,
  .key-metric-grid,
  .momentum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 22px, 1280px);
    padding-top: 14px;
  }

  .topbar {
    gap: 16px;
    padding-bottom: 14px;
  }

  .stamp,
  .plain-grid,
  .market-modules,
  .key-metric-grid,
  .tile-grid,
  .momentum-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .stamp div,
  .stamp div:first-child {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stamp div:first-child {
    border-top: 0;
  }

  .quick-read > div:first-child,
  .plain-grid article {
    min-height: 0;
  }

  .section-head,
  .panel-head,
  .market-score {
    display: grid;
  }

  .market-score {
    justify-items: start;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
    padding-inline: 8px;
  }

  .source-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .rule-strip {
    grid-template-columns: 1fr;
  }

  .hero-value {
    display: block;
  }

  .hero-value span {
    display: inline-flex;
    margin-top: 10px;
  }

  .main-chart {
    height: 260px;
  }
}
