:root {
  --bg: #080a0b;
  --surface: rgba(14, 18, 19, 0.88);
  --surface-solid: #0e1213;
  --surface-raised: #14191a;
  --line: rgba(183, 197, 196, 0.16);
  --line-strong: rgba(227, 179, 65, 0.34);
  --text: #f2f5f3;
  --muted: #8d9b99;
  --dim: #596260;
  --gold: #e3b341;
  --gold-bright: #ffd66b;
  --teal: #47d8c8;
  --blue: #6ba6d9;
  --red: #f36d69;
  --amber: #ef934d;
  --state: var(--gold);
  --radius: 4px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.018) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(255,255,255,.014) 50%, transparent 50.1%);
  background-size: 80px 80px;
}
button { font: inherit; letter-spacing: 0; }
h1, h2, h3, h4, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.market-ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
#market-field { width: 100%; height: 100%; opacity: .48; }
.grid-plane {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,11,.05) 0%, rgba(8,10,11,.58) 48%, rgba(8,10,11,.96) 100%);
}
.scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(71,216,200,.4), transparent);
  box-shadow: 0 0 28px rgba(71,216,200,.16);
  animation: scan-field 12s linear infinite;
}

.topbar {
  min-height: 92px;
  padding: 15px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(8,10,11,.86);
  backdrop-filter: blur(18px);
  position: relative;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 18%;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(227,179,65,.7);
  animation: line-breath 4s ease-in-out infinite;
}
.brand-block, .market-quote, .verdict-line, .panel-heading, .section-heading { display: flex; align-items: center; }
.brand-block { gap: 15px; min-width: 0; }
.symbol-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
  color: var(--gold-bright);
  font: 700 14px Bahnschrift, Consolas, monospace;
  border: 1px solid rgba(227,179,65,.55);
  clip-path: polygon(0 0, 76% 0, 100% 24%, 100% 100%, 24% 100%, 0 76%);
}
.symbol-mark::before, .symbol-mark::after, .symbol-mark i {
  content: "";
  position: absolute;
  border: 1px solid rgba(227,179,65,.28);
  inset: 6px;
  transform: rotate(45deg);
  animation: mark-orbit 9s linear infinite;
}
.symbol-mark::after { inset: 12px; border-color: rgba(71,216,200,.34); animation-direction: reverse; animation-duration: 6s; }
.symbol-mark i { inset: -5px; border-color: rgba(227,179,65,.12); }
.symbol-mark b { position: relative; z-index: 1; font-weight: 700; }
.product-code { color: var(--gold); font: 600 9px Consolas, monospace; }
.brand-block h1 { margin-top: 3px; font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: 18px; font-weight: 650; }
.brand-block p { color: var(--muted); font: 500 10px Consolas, monospace; margin-top: 4px; }
.market-quote { gap: clamp(16px, 2.5vw, 36px); }
.market-quote > div { display: grid; gap: 4px; }
.market-quote small, .model-meta span, .score-details span, .sample-summary span { color: var(--muted); font-size: 10px; }
.market-quote strong { font: 600 13px Consolas, monospace; transition: color .2s ease, text-shadow .2s ease; }
.market-quote .quote-price strong { color: var(--gold-bright); font-size: 18px; }
.market-quote strong.tick { color: #fff; text-shadow: 0 0 14px rgba(227,179,65,.85); }
.feed-health { grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(239,147,77,.1); }
.status-dot.live { background: var(--teal); box-shadow: 0 0 0 5px rgba(71,216,200,.1), 0 0 17px rgba(71,216,200,.55); animation: status-pulse 2s ease-out infinite; }
.market-quote .sound-control { display: flex; align-items: center; gap: 8px; }
.sound-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: rgba(14,18,19,.72);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.sound-toggle:hover, .sound-toggle:focus-visible { color: var(--text); border-color: rgba(71,216,200,.44); outline: none; }
.sound-toggle:focus-visible { box-shadow: 0 0 0 2px rgba(71,216,200,.18); }
.sound-toggle[aria-pressed="true"] { color: var(--teal); border-color: rgba(71,216,200,.5); background: rgba(71,216,200,.07); box-shadow: 0 5px 20px rgba(0,0,0,.28); }
.speaker-icon { width: 15px; height: 15px; position: relative; display: block; }
.speaker-icon::before { content: ""; position: absolute; left: 0; top: 5px; width: 4px; height: 6px; border: 1px solid currentColor; border-right: 0; }
.speaker-icon::after { content: ""; position: absolute; left: 4px; top: 2px; width: 7px; height: 12px; background: currentColor; clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%); }
.speaker-icon i { position: absolute; right: -2px; top: 4px; width: 5px; height: 7px; border-right: 1px solid currentColor; border-radius: 0 50% 50% 0; opacity: .35; }
.sound-toggle[aria-pressed="true"] .speaker-icon i { opacity: 1; animation: sound-wave 2.6s ease-in-out infinite; }
.sound-toggle:not([aria-pressed="true"])::after { content: ""; position: absolute; width: 17px; height: 1px; background: currentColor; transform: rotate(-45deg); opacity: .8; }
.volume-control { width: 58px; opacity: 0; overflow: hidden; clip-path: inset(0 100% 0 0); pointer-events: none; transition: clip-path .24s ease, opacity .18s ease; }
.sound-control:hover .volume-control, .sound-control:focus-within .volume-control, .sound-control.active .volume-control { opacity: 1; clip-path: inset(0); pointer-events: auto; }
.volume-control input { width: 58px; height: 16px; margin: 0; accent-color: var(--teal); cursor: pointer; }

main { width: min(1560px, 100%); margin: 0 auto; padding: 0 clamp(18px, 3vw, 46px) 46px; }
.verdict-band {
  min-height: 216px;
  display: grid;
  grid-template-columns: 38px minmax(300px, 1.35fr) minmax(320px, 1fr) minmax(190px, .62fr);
  align-items: center;
  gap: clamp(20px, 3vw, 46px);
  padding: 31px 0 34px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.signal-index { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 4px; }
.signal-index span { color: var(--gold); font: 600 9px Consolas, monospace; }
.signal-index i { display: block; width: 1px; flex: 1; background: linear-gradient(var(--gold), transparent); }
.eyebrow { display: block; color: var(--muted); font: 600 10px Consolas, monospace; text-transform: uppercase; }
.verdict-line { gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.verdict-line h2 {
  font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif;
  font-size: clamp(42px, 5vw, 72px);
  line-height: .96;
  font-weight: 620;
  color: var(--state);
  text-shadow: 0 0 38px color-mix(in srgb, var(--state) 22%, transparent);
  transition: color .45s ease, text-shadow .45s ease;
}
.confidence {
  border: 1px solid color-mix(in srgb, var(--state) 50%, transparent);
  color: var(--state);
  padding: 6px 9px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--state) 7%, transparent);
  font: 600 11px Consolas, monospace;
}
.verdict-main p { color: var(--muted); margin-top: 16px; font-size: 12px; }
.cluster-label { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 12px; color: var(--muted); }
.cluster-label span { color: #d5dcda; font-size: 14px; font-weight: 650; }
.cluster-label b { color: var(--dim); font: 500 10px Consolas, monospace; }
.timeframe-grid { display: grid; grid-template-columns: repeat(3, minmax(82px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tf-item { min-height: 82px; display: grid; place-items: center; align-content: center; gap: 9px; background: rgba(14,18,19,.88); position: relative; overflow: hidden; }
.tf-item::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--state); transform: scaleX(.35); transition: transform .5s ease; }
.tf-item:hover::after { transform: scaleX(1); }
.tf-item span { color: var(--muted); font: 650 13px Consolas, monospace; }
.tf-item strong { font-size: 15px; }
.model-meta { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; border-left: 1px solid var(--line); padding-left: 22px; }
.model-meta strong { font: 600 11px Consolas, monospace; text-align: right; color: #d9dfdd; }

.workspace-grid { display: grid; grid-template-columns: .85fr 1.28fr 1fr; border-bottom: 1px solid var(--line); background: rgba(8,10,11,.26); }
.panel { min-height: 306px; padding: 27px 26px 29px; border-right: 1px solid var(--line); position: relative; }
.panel:first-child { padding-left: 0; }
.panel:last-child { border-right: 0; padding-right: 0; }
.panel::before { content: ""; position: absolute; top: 0; left: 26px; width: 22px; height: 1px; background: var(--gold); opacity: .65; }
.panel:first-child::before { left: 0; }
.panel-heading { justify-content: space-between; margin-bottom: 24px; }
.panel-heading > div { display: grid; gap: 5px; }
.panel-heading h3 { font-size: 14px; font-weight: 650; }
.panel-heading > span { color: var(--muted); font-size: 9px; }
.panel-code { color: var(--gold); font: 500 8px Consolas, monospace; }
.probability-list { display: grid; gap: 18px; }
.probability-row { display: grid; grid-template-columns: 50px 1fr 48px; align-items: center; gap: 11px; font-size: 11px; }
.track { height: 4px; background: #252b2b; overflow: visible; position: relative; }
.track::after { content: ""; position: absolute; inset: -4px 0; background: repeating-linear-gradient(90deg, transparent 0 24%, rgba(255,255,255,.07) 24% 24.5%); }
.fill { height: 100%; background: var(--teal); box-shadow: 0 0 10px rgba(71,216,200,.28); animation: probability-breathe 4.8s ease-in-out infinite; }
.fill.range { background: var(--gold); box-shadow: 0 0 12px rgba(227,179,65,.34); }
.fill.short { background: var(--red); box-shadow: 0 0 12px rgba(243,109,105,.32); }
.fill.shock { background: var(--amber); box-shadow: 0 0 12px rgba(239,147,77,.34); }
.probability-row strong { text-align: right; font: 600 11px Consolas, monospace; }
.evidence-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.evidence-columns h4 { font: 600 9px Consolas, monospace; color: var(--muted); margin-bottom: 12px; }
.evidence-columns ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.evidence-columns li { position: relative; padding: 8px 8px 8px 19px; color: #cbd2d0; font-size: 11px; line-height: 1.55; border-top: 1px solid rgba(255,255,255,.05); }
.evidence-columns li::before { content: "+"; position: absolute; left: 2px; top: 8px; color: var(--teal); font-family: Consolas, monospace; }
#negative-evidence li::before { content: "−"; color: var(--red); }
.metrics-grid { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; margin: 0; }
.metrics-grid dt, .metrics-grid dd { min-height: 28px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.055); }
.metrics-grid dt { color: var(--muted); font-size: 10px; }
.metrics-grid dd { margin: 0; justify-content: flex-end; font: 600 10px Consolas, monospace; color: #dce2df; }

.accuracy-section { padding: 31px 0 34px; border-bottom: 1px solid var(--line); }
.section-heading { justify-content: space-between; margin-bottom: 24px; }
.section-heading h2 { font: 620 23px Bahnschrift, "Microsoft YaHei UI", sans-serif; margin-top: 7px; }
.segmented { display: flex; border: 1px solid var(--line); background: rgba(8,10,11,.55); }
.segmented button { min-width: 67px; height: 35px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.segmented button:last-child { border-right: 0; }
.segmented button:hover { color: var(--text); background: rgba(255,255,255,.035); }
.segmented button.active { color: #090b0c; background: var(--gold); box-shadow: 0 0 22px rgba(227,179,65,.19); font-weight: 650; }
.accuracy-layout { display: grid; grid-template-columns: 1.2fr 1.2fr .75fr; gap: 32px; }
.accuracy-primary { display: flex; align-items: center; gap: 30px; }
.score-ring {
  --score: 0deg;
  width: 148px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  position: relative;
  background: radial-gradient(circle at center, #090c0c 57%, transparent 59%), conic-gradient(var(--gold) var(--score), #242a2a 0);
  box-shadow: inset 0 0 28px rgba(0,0,0,.78), 0 0 34px rgba(227,179,65,.08);
  transition: background .45s ease;
}
.score-ring::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(227,179,65,.16); border-radius: 50%; }
.score-orbit { position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed rgba(227,179,65,.24); animation: score-orbit 20s linear infinite; }
.score-orbit::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; top: 19px; right: 13px; background: var(--gold-bright); box-shadow: 0 0 11px var(--gold); }
.score-ring strong { font: 700 28px Consolas, monospace; }
.score-ring small { color: var(--muted); font-size: 9px; }
.score-details { flex: 1; display: grid; gap: 12px; }
.score-details > div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.065); padding-bottom: 9px; }
.score-details strong { font: 600 11px Consolas, monospace; }
.state-accuracy { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.state-stat { min-height: 82px; padding: 14px; background: var(--surface-solid); display: grid; gap: 7px; position: relative; overflow: hidden; }
.state-stat::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--teal); transform: scaleX(.34); transform-origin: left; transition: transform .35s ease; }
.state-stat:hover::after { transform: scaleX(1); }
.state-stat.range::after { background: var(--gold); }.state-stat.short::after { background: var(--red); }.state-stat.shock::after { background: var(--amber); }
.state-stat span { color: var(--muted); font-size: 10px; }.state-stat strong { font: 650 18px Consolas, monospace; }.state-stat small { color: var(--dim); }
.sample-summary { padding-left: 25px; border-left: 1px solid var(--line); display: grid; align-content: center; gap: 12px; }
.sample-summary > div { display: flex; justify-content: space-between; }.sample-summary strong { font: 650 14px Consolas, monospace; }
.sample-summary p { color: var(--amber); font-size: 10px; line-height: 1.55; min-height: 22px; }
#research-status { color: var(--muted); }

.ledger-section { padding-top: 31px; }
.section-heading.compact { margin-bottom: 14px; }
.section-heading.compact > span { color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); background: rgba(8,10,11,.35); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 10px; border-bottom: 1px solid rgba(255,255,255,.055); text-align: left; font-size: 10px; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-family: Consolas, monospace; }
td { color: #cbd2d0; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(227,179,65,.035); }
td.mono { font-family: Consolas, monospace; }
.state-tag { display: inline-block; min-width: 72px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 2px; text-align: center; }
footer { min-height: 46px; padding: 0 clamp(18px, 3vw, 46px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font: 500 9px Consolas, monospace; background: rgba(8,10,11,.92); }
#health { color: var(--teal); }

html[data-state="long_trend"] { --state: var(--teal); }
html[data-state="range"] { --state: var(--gold); }
html[data-state="short_trend"] { --state: var(--red); }
html[data-state="shock"] { --state: var(--amber); }
html[data-state="transition"] { --state: var(--blue); }

.reveal { opacity: 0; transform: translateY(10px); animation: reveal-in .65s cubic-bezier(.2,.75,.2,1) forwards; }
.reveal-1 { animation-delay: 40ms; }.reveal-2 { animation-delay: 130ms; }.reveal-3 { animation-delay: 220ms; }.reveal-4 { animation-delay: 310ms; }
@keyframes reveal-in { to { opacity: 1; transform: translateY(0); } }
@keyframes scan-field { 0% { transform: translateX(-18vw); opacity: 0; } 12% { opacity: .65; } 88% { opacity: .65; } 100% { transform: translateX(92vw); opacity: 0; } }
@keyframes line-breath { 0%, 100% { width: 12%; opacity: .45; } 50% { width: 27%; opacity: 1; } }
@keyframes mark-orbit { to { transform: rotate(405deg); } }
@keyframes status-pulse { 0% { box-shadow: 0 0 0 0 rgba(71,216,200,.4); } 70% { box-shadow: 0 0 0 8px rgba(71,216,200,0); } 100% { box-shadow: 0 0 0 0 rgba(71,216,200,0); } }
@keyframes probability-breathe {
  0%, 100% { opacity: .72; filter: brightness(.92); }
  50% { opacity: 1; filter: brightness(1.16); }
}
@keyframes score-orbit { to { transform: rotate(360deg); } }
@keyframes sound-wave { 0%, 100% { transform: scaleX(.7); opacity: .55; } 50% { transform: scaleX(1.2); opacity: 1; } }

@media (max-width: 1080px) {
  .verdict-band { grid-template-columns: 28px 1fr 1fr; }
  .model-meta { grid-column: 2 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; grid-template-columns: auto auto auto auto; }
  .workspace-grid { grid-template-columns: 1fr 1fr; }
  .panel { border-bottom: 1px solid var(--line); }
  .diagnostics-panel { grid-column: 1 / -1; padding-left: 0; }
  .diagnostics-panel::before { left: 0; }
  .accuracy-layout { grid-template-columns: 1fr 1fr; }
  .sample-summary { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; grid-template-columns: repeat(3, 1fr); }
  .sample-summary p { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .topbar { align-items: flex-start; min-height: 112px; }
  .product-code, .brand-block p { display: none; }
  .symbol-mark { width: 46px; height: 46px; }
  .market-quote { gap: 12px; }
  .market-quote .quote-updated { display: none; }
  .market-quote .quote-price strong { font-size: 15px; }
  .verdict-band { grid-template-columns: 20px minmax(0, 1fr); gap: 13px; min-height: 0; }
  .timeframe-cluster, .model-meta { grid-column: 2; }
  .model-meta { grid-template-columns: auto 1fr; }
  .verdict-line h2 { font-size: clamp(38px, 14vw, 58px); }
  .workspace-grid, .accuracy-layout { grid-template-columns: 1fr; }
  .panel, .panel:first-child, .panel:last-child { min-height: 0; padding: 25px 0; border-right: 0; }
  .panel::before { left: 0; }
  .diagnostics-panel { grid-column: auto; }
  .section-heading { align-items: flex-end; gap: 14px; }
  .section-heading h2 { font-size: 19px; }
  .segmented button { min-width: 54px; height: 32px; font-size: 11px; }
  .accuracy-primary { gap: 20px; }
  .score-ring { width: 120px; }
  .state-accuracy { grid-template-columns: 1fr 1fr; }
  footer { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; flex-direction: column; }
}

@media (max-width: 420px) {
  .topbar { padding-left: 14px; padding-right: 14px; }
  .brand-block { gap: 9px; }
  .brand-block h1 { font-size: 15px; }
  .feed-health { display: none !important; }
  .volume-control { width: 46px; }
  .volume-control input { width: 46px; }
  main { padding-left: 14px; padding-right: 14px; }
  .evidence-columns { grid-template-columns: 1fr; gap: 22px; }
  .accuracy-primary { align-items: flex-start; }
  .score-ring { width: 104px; }
  .score-details { min-width: 0; }
  .state-accuracy { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .scan-line { display: none; }
}
