:root {
  color-scheme: dark;
  --bg: #0b0d0e;
  --surface: #121516;
  --surface-raised: #171b1c;
  --surface-soft: #1c2021;
  --line: #2a3031;
  --line-strong: #3b4344;
  --text: #eef1ef;
  --muted: #929b98;
  --green: #46c88a;
  --green-soft: rgba(70, 200, 138, 0.14);
  --coral: #ef6f63;
  --coral-soft: rgba(239, 111, 99, 0.14);
  --yellow: #e5bd55;
  --yellow-soft: rgba(229, 189, 85, 0.14);
  --cyan: #62b8c7;
  --cyan-soft: rgba(98, 184, 199, 0.14);
  --radius: 6px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 26px 30px;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs {
  min-height: 48px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar { display: none; }

.workspace-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  flex: 0 0 auto;
  text-decoration: none;
}

.workspace-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.workspace-tab.active { color: var(--text); }
.workspace-tab.active::after { background: var(--yellow); }
.workspace-tab svg { width: 15px; height: 15px; }

.brand-lockup, .top-actions, .market-status, .phase-line, .section-heading,
.chart-foot, .balance-labels, .source-status, .component-head, .component-value,
.observation-strip, .global-row, .global-name, .driver-impact {
  display: flex;
  align-items: center;
}

.brand-lockup { gap: 12px; }
.brand-lockup h1 { margin: 0 0 3px; font-size: 20px; font-weight: 600; }
.brand-lockup p { margin: 0; color: var(--muted); font-size: 12px; }

.brand-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 7px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.brand-mark span { width: 4px; background: var(--text); border-radius: 1px; }
.brand-mark span:nth-child(1) { height: 8px; background: var(--coral); }
.brand-mark span:nth-child(2) { height: 17px; background: var(--yellow); }
.brand-mark span:nth-child(3) { height: 12px; background: var(--green); }

.top-actions { gap: 10px; }
.market-status { gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.market-status.ok .status-dot { background: var(--green); }
.market-status.partial .status-dot { background: var(--yellow); }
.market-status.error .status-dot { background: var(--coral); }
.market-status.collecting .status-dot { animation: pulse 1s ease-in-out infinite; }

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  cursor: pointer;
}

.icon-button:hover { border-color: var(--muted); background: var(--surface-soft); }
.icon-button:disabled { cursor: wait; opacity: 0.6; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button.spinning svg { animation: spin 0.9s linear infinite; }

.overview-band {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.45fr);
  gap: 42px;
  padding: 38px 4px 34px;
  border-bottom: 1px solid var(--line);
}

.score-block { display: flex; align-items: center; gap: 24px; }
.score-ring-wrap { position: relative; width: 166px; height: 166px; flex: 0 0 166px; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.score-ring-track, .score-ring-progress { fill: none; stroke-width: 8; }
.score-ring-track { stroke: var(--line); }
.score-ring-progress {
  stroke: var(--yellow);
  stroke-linecap: round;
  stroke-dasharray: 414.69;
  stroke-dashoffset: 414.69;
  transition: stroke-dashoffset 0.55s ease, stroke 0.25s ease;
}

.score-ring-progress.cool { stroke: var(--coral); }
.score-ring-progress.neutral { stroke: var(--yellow); }
.score-ring-progress.warm { stroke: var(--green); }
.score-ring-progress.hot { stroke: var(--coral); }

.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.score-center strong { font-size: 46px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.score-center span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.phase-summary { min-width: 0; }
.phase-line { gap: 10px; flex-wrap: wrap; }
.phase-name { font-size: 26px; font-weight: 600; }
.trend-badge, .quiet-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.trend-badge.up { color: var(--green); border-color: rgba(70, 200, 138, 0.45); }
.trend-badge.down { color: var(--coral); border-color: rgba(239, 111, 99, 0.45); }
.phase-summary > p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.phase-summary .confidence-text { margin-top: 18px; font-size: 11px; }

.readout-block { align-self: center; min-width: 0; }
.section-kicker { margin: 0 0 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.readout-block h2 { margin: 0; max-width: 720px; font-size: 24px; line-height: 1.45; font-weight: 500; }
.readout-detail { margin: 10px 0 24px; color: var(--muted); font-size: 13px; }

.cycle-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cycle-step {
  position: relative;
  min-height: 52px;
  padding: 10px 9px;
  border-top: 3px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
}

.cycle-step span, .cycle-step small { display: block; }
.cycle-step span { color: inherit; font-size: 12px; }
.cycle-step small { margin-top: 5px; font-size: 10px; opacity: 0.72; }
.cycle-step.active { color: var(--text); background: var(--surface-soft); border-top-color: var(--yellow); }
.cycle-step.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 7px;
  height: 7px;
  background: var(--yellow);
  transform: translateX(-50%) rotate(45deg);
}

.timeline-section, .components-section, .drivers-section { padding: 30px 4px; border-bottom: 1px solid var(--line); }
.section-heading { justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }
.section-note { margin: 0; color: var(--muted); font-size: 12px; }

.segmented-control { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3px; }
.segment {
  min-width: 58px;
  height: 29px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.segment.active { background: var(--surface-soft); color: var(--text); }

.chart-wrap { position: relative; height: 276px; width: 100%; }
#sentimentChart { display: block; width: 100%; height: 100%; }
.chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 118px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #202526;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  font-size: 11px;
}
.chart-tooltip strong { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; }
.hidden { display: none !important; }
.chart-foot { justify-content: flex-start; gap: 18px; min-height: 24px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.chart-foot > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-foot > span:last-child { margin-left: auto; color: var(--text); }
.legend-line { width: 20px; height: 0; border-top: 2px dashed var(--muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.market-chart-workspace { padding: 30px 4px; }
.market-chart-heading { margin-bottom: 22px; }
.market-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.market-period-control { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.market-period-control::-webkit-scrollbar { display: none; }
.market-period-control .segment { min-width: 60px; flex: 0 0 auto; }
.market-chart-range { color: var(--muted); font-size: 11px; white-space: nowrap; }
.market-chart-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.market-chart-stats > div { min-width: 0; padding: 11px 14px 12px; border-right: 1px solid var(--line); }
.market-chart-stats > div:first-child { padding-left: 0; }
.market-chart-stats > div:last-child { border-right: 0; }
.market-chart-stats span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.market-chart-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.market-chart-stats strong.positive-text { color: var(--coral); }
.market-chart-stats strong.negative-text { color: var(--green); }
.market-kline-wrap { position: relative; height: 520px; width: 100%; }
#marketKlineChart { display: block; width: 100%; height: 100%; }
.market-kline-foot { min-height: 26px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.market-kline-foot > span { display: inline-flex; align-items: center; gap: 7px; }
.market-kline-foot > span:last-child { margin-left: auto; color: var(--text); }
.legend-candle { width: 8px; height: 13px; display: inline-block; border: 1px solid currentColor; }
.legend-candle.up { color: var(--coral); background: var(--coral); }
.legend-candle.down { color: var(--green); background: var(--green); }

.component-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.component-card {
  min-height: 168px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.component-card.is-loading { opacity: 0.65; }
.component-card.is-loading::before { content: ""; display: block; width: 46%; height: 12px; background: var(--line); }
.component-head { justify-content: space-between; gap: 10px; }
.component-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.component-name svg { width: 15px; height: 15px; color: var(--muted); }
.component-weight { color: var(--muted); font-size: 10px; }
.component-value { align-items: baseline; gap: 7px; margin: 22px 0 12px; }
.component-value strong { font-size: 29px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.component-value span { color: var(--muted); font-size: 11px; }
.meter { height: 5px; overflow: hidden; background: var(--line); border-radius: 2px; }
.meter > span { display: block; height: 100%; background: var(--yellow); transition: width 0.45s ease; }
.meter > span.positive { background: var(--green); }
.meter > span.negative { background: var(--coral); }
.component-caption { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.market-columns { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 34px; border-bottom: 1px solid var(--line); }
.data-section { min-width: 0; padding: 30px 4px; }
.data-section + .data-section { border-left: 1px solid var(--line); padding-left: 34px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { min-width: 0; min-height: 86px; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat span, .stat small { display: block; color: var(--muted); font-size: 10px; }
.stat strong { display: inline-block; margin: 10px 4px 0 0; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat small { display: inline; }
.breadth-balance { margin-top: 16px; }
.balance-labels { justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.balance-track { display: flex; height: 7px; overflow: hidden; background: var(--line); border-radius: 2px; }
.balance-track span:first-child { background: var(--green); }
.balance-track span:last-child { background: var(--coral); }

.global-list { border-top: 1px solid var(--line); }
.global-row { min-height: 56px; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.global-name { gap: 9px; font-size: 12px; }
.global-name i { width: 7px; height: 7px; border: 1px solid var(--muted); transform: rotate(45deg); }
.global-values { text-align: right; }
.global-values strong { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.global-values span { font-size: 11px; }
.positive-text { color: var(--green); }
.negative-text { color: var(--coral); }
.observation-strip { align-items: stretch; margin-top: 16px; gap: 0; border: 1px solid var(--line); }
.observation { flex: 1 1 25%; min-width: 0; padding: 10px; border-right: 1px solid var(--line); }
.observation:last-child { border-right: 0; }
.observation span, .observation strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.observation span { color: var(--muted); font-size: 9px; }
.observation strong { margin-top: 6px; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }

.drivers-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 34px; }
.drivers-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.drivers-table th, .drivers-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.drivers-table th { color: var(--muted); font-size: 10px; font-weight: 500; }
.drivers-table th:nth-child(1) { width: 31%; }
.drivers-table th:nth-child(2) { width: 31%; }
.drivers-table th:nth-child(3) { width: 16%; text-align: right; }
.drivers-table th:nth-child(4) { width: 22%; text-align: right; }
.drivers-table td:nth-child(3), .drivers-table td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.driver-impact { justify-content: flex-end; gap: 7px; }
.impact-bar { width: 48px; height: 4px; background: var(--line); }
.impact-bar span { display: block; height: 100%; }
.methodology { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.methodology summary { padding: 13px 2px; cursor: pointer; font-size: 12px; font-weight: 600; }
.methodology-content { padding: 0 2px 10px; }
.methodology-content p { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.research-summary-section, .research-module {
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
}

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

.research-summary-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.research-summary-card.is-loading { opacity: 0.65; }
.research-summary-card > span { display: block; color: var(--muted); font-size: 11px; }
.research-summary-card strong { display: block; margin-top: 17px; font-size: 23px; line-height: 1.3; font-weight: 600; }
.research-summary-card small { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.research-summary-card .accent-yellow { color: var(--yellow); }
.research-summary-card .accent-green { color: var(--green); }
.research-summary-card .accent-coral { color: var(--coral); }

.research-conclusion, .module-verdict {
  margin: 16px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(229, 189, 85, 0.4);
  border-radius: var(--radius);
  background: var(--yellow-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.75;
}

.module-heading { margin-bottom: 16px; }
.module-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.module-title-line h2 { margin: 0; font-size: 17px; font-weight: 600; }
.module-index { color: var(--yellow); font-size: 11px; font-variant-numeric: tabular-nums; }
.module-heading p { margin: 9px 0 0 30px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.research-chart-wrap { position: relative; width: 100%; height: 310px; }
.research-chart-wrap canvas { display: block; width: 100%; height: 100%; }
.chart-range-summary { margin: 7px 0 16px; color: var(--muted); font-size: 11px; }

.research-stat-grid, .opportunity-grid, .short-cycle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.research-stat, .opportunity-stat, .short-cycle-stat {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.research-stat > span, .opportunity-stat > span, .short-cycle-stat > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.research-stat strong, .opportunity-stat strong, .short-cycle-stat strong {
  display: block;
  margin-top: 12px;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.research-stat small, .opportunity-stat small, .short-cycle-stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.research-factor-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr); gap: 24px; align-items: start; }
.research-factor-layout .module-verdict { margin-top: 0; }

.research-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.research-table th, .research-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; line-height: 1.55; }
.research-table th { color: var(--muted); font-size: 10px; font-weight: 500; }
.research-table th:nth-child(1) { width: 20%; }
.research-table th:nth-child(2) { width: 29%; }
.research-table th:nth-child(3) { width: 16%; }
.research-table th:nth-child(4) { width: 35%; }
.research-table td:nth-child(3) { font-variant-numeric: tabular-nums; }

.opportunity-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opportunity-stat.primary { border-color: rgba(229, 189, 85, 0.45); background: var(--yellow-soft); }
.opportunity-stat.primary strong { color: var(--yellow); font-size: 28px; }
.opportunity-table th:nth-child(1) { width: 22%; }
.opportunity-table th:nth-child(2) { width: 25%; }
.opportunity-table th:nth-child(3) { width: 35%; }
.opportunity-table th:nth-child(4) { width: 18%; text-align: right; }
.opportunity-table td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }

.cycle-table th:nth-child(1) { width: 12%; }
.cycle-table th:nth-child(2) { width: 15%; }
.cycle-table th:nth-child(3), .cycle-table th:nth-child(4) { width: 9%; }
.cycle-table th:nth-child(5) { width: 12%; }
.cycle-table th:nth-child(6) { width: 43%; }
.cycle-table tr.current-row td { background: rgba(229, 189, 85, 0.04); }
.cycle-phase {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  white-space: nowrap;
}
.cycle-phase.positive { color: var(--green); background: var(--green-soft); }
.cycle-phase.negative { color: var(--coral); background: var(--coral-soft); }
.cycle-phase.neutral { color: var(--yellow); background: var(--yellow-soft); }
.short-cycle-grid { grid-template-columns: 1fr 1fr 1.4fr; margin-top: 18px; }

.pool-overview, .pool-module {
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
}

.pool-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pool-ranking-rule {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--yellow);
  background: var(--yellow-soft);
  color: var(--text);
  font-size: 11px;
  line-height: 1.65;
}

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

.pool-module-head > div:first-child { min-width: 0; }
.pool-module-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.pool-module-head p { margin: 9px 0 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pool-controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pool-search { position: relative; display: block; }
.pool-search svg { position: absolute; top: 9px; left: 10px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.pool-search input, .pool-sort select {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 11px;
}
.pool-search input { width: 220px; padding: 0 10px 0 32px; }
.pool-search input::placeholder { color: var(--muted); }
.pool-sort select { width: 112px; padding: 0 9px; }
.pool-freshness.fresh { color: var(--green); border-color: rgba(70, 200, 138, 0.35); }
.pool-freshness.stale { color: var(--coral); border-color: rgba(239, 111, 99, 0.35); }

.pool-table { width: 100%; min-width: 1220px; border-collapse: collapse; table-layout: fixed; }
.pool-table th, .pool-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 11px; line-height: 1.5; }
.pool-table th { color: var(--muted); font-size: 10px; font-weight: 500; }
.pool-table th:nth-child(1) { width: 17%; }
.pool-table th:nth-child(2) { width: 9%; }
.pool-table th:nth-child(3) { width: 10%; }
.pool-table th:nth-child(4) { width: 17%; }
.pool-table th:nth-child(5) { width: 12%; }
.pool-table th:nth-child(6) { width: 17%; }
.pool-table th:nth-child(7) { width: 18%; }
.pool-table td strong, .pool-table td small { display: block; }
.pool-table td strong { font-weight: 600; }
.pool-table td small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pool-stock-link { display: block; margin-top: 6px; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; }
.pool-stock-link:hover { color: var(--cyan); text-decoration: underline; }
.pool-score { font-size: 18px; font-variant-numeric: tabular-nums; }
.pool-tag { display: inline-flex; align-items: center; min-height: 20px; margin: 0 5px 0 0; padding: 2px 6px; border: 1px solid rgba(229, 189, 85, 0.35); border-radius: var(--radius); color: var(--yellow); background: var(--yellow-soft); font-size: 9px; white-space: nowrap; }
.pool-tag.dual { color: var(--cyan); border-color: rgba(98, 184, 199, 0.35); background: var(--cyan-soft); }
.pool-foot { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.buy-ratio-cell { font-variant-numeric: tabular-nums; }
.buy-ratio-value { font-size: 16px !important; letter-spacing: -0.02em; }
.buy-ratio-cell a { color: var(--cyan); text-decoration: none; }
.buy-ratio-cell a:hover { text-decoration: underline; }
.pool-disclaimer { margin: 18px 4px 0; }

.decision-workspace {
  padding: 30px 4px;
}

.decision-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.decision-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.decision-slot {
  min-width: 0;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.decision-slot:disabled { cursor: default; opacity: 0.82; }
.decision-slot:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-raised); }
.decision-slot > span, .decision-slot > small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.decision-slot strong { display: block; margin: 12px 0 8px; font-size: 16px; font-weight: 600; }
.decision-slot.running { border-color: rgba(93, 162, 255, 0.42); }
.decision-slot.running strong { color: var(--cyan); }
.decision-slot.completed { border-color: rgba(64, 192, 133, 0.42); }
.decision-slot.completed strong { color: var(--green); }
.decision-slot.failed { border-color: rgba(244, 111, 103, 0.42); }
.decision-slot.failed strong { color: var(--coral); }

.decision-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
}

.decision-date-control { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.decision-date-control select {
  width: min(520px, 58vw);
  min-width: 260px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
}
.decision-empty { padding: 17px 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; }
.decision-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.decision-summary { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.decision-summary strong { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.decision-summary p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; }
.decision-evidence { padding: 20px 0 16px; }
.compact-heading { margin-bottom: 12px; }
.compact-heading h3 { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
.decision-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.decision-info-grid article { min-height: 118px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.decision-info-grid article > span { display: block; color: var(--yellow); font-size: 10px; }
.decision-info-grid article p { margin: 8px 0 10px; font-size: 11px; line-height: 1.65; }
.decision-info-grid article div { display: flex; gap: 8px; flex-wrap: wrap; }
.decision-info-grid article a, .decision-info-grid article div span { color: var(--cyan); font-size: 10px; line-height: 1.45; text-decoration: none; }
.decision-info-grid article a:hover { text-decoration: underline; }
.decision-log-empty { margin: 0; color: var(--muted); font-size: 11px; }
.decision-search-log { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; margin-top: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.decision-search-log > strong { color: var(--muted); font-size: 10px; font-weight: 500; }
.decision-search-log > div { display: flex; gap: 7px; flex-wrap: wrap; }
.decision-search-log > div span { padding: 4px 7px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: 10px; }
.decision-table { min-width: 1320px; }
.decision-table th, .decision-table td { vertical-align: top; }
.decision-table th:nth-child(1) { width: 13%; }
.decision-table th:nth-child(2) { width: 7%; }
.decision-table th:nth-child(3) { width: 18%; }
.decision-table th:nth-child(4) { width: 11%; }
.decision-table th:nth-child(5) { width: 15%; }
.decision-table th:nth-child(6) { width: 9%; }
.decision-table th:nth-child(7) { width: 18%; }
.decision-table th:nth-child(8) { width: 9%; }
.decision-table td strong { display: block; font-size: 12px; font-weight: 600; }
.decision-table td small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.decision-table td p { margin: 0; line-height: 1.55; }
.decision-table .accent-yellow { color: var(--yellow); font-size: 18px; }
.decision-table .muted-arrow { margin: 0 3px; color: var(--muted); }
.decision-sources a { display: block; margin-bottom: 6px; color: var(--cyan); font-size: 10px; line-height: 1.45; text-decoration: none; }
.decision-sources a:hover { text-decoration: underline; }
.decision-history { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.decision-history-table { min-width: 880px; }
.decision-history-table th:nth-child(1) { width: 14%; }
.decision-history-table th:nth-child(2) { width: 10%; }
.decision-history-table th:nth-child(3) { width: 10%; }
.decision-history-table th:nth-child(4) { width: 8%; }
.decision-history-table th:nth-child(5) { width: 25%; }
.decision-history-table th:nth-child(6) { width: 33%; }
.decision-status { display: inline-block; padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); white-space: nowrap; }
.decision-status.running { color: var(--cyan); border-color: rgba(93, 162, 255, 0.35); }
.decision-status.completed { color: var(--green); border-color: rgba(64, 192, 133, 0.35); }
.decision-status.failed { color: var(--coral); border-color: rgba(244, 111, 103, 0.35); }
.decision-run-link { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--cyan); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.decision-run-link:hover { text-decoration: underline; }
.decision-disclaimer { margin-top: 18px; }

footer { padding: 22px 4px 0; color: var(--muted); font-size: 10px; }
footer p { margin: 12px 0 0; }
.source-status { gap: 12px; flex-wrap: wrap; }
.source-item { display: inline-flex; align-items: center; gap: 6px; }
.source-item i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.source-item.error i { background: var(--coral); }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #202526;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 12px;
}

.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;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

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

@media (max-width: 1050px) {
  .overview-band { grid-template-columns: 1fr; gap: 26px; }
  .component-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-columns { grid-template-columns: 1fr; gap: 0; }
  .data-section + .data-section { border-left: 0; border-top: 1px solid var(--line); padding-left: 4px; }
  .drivers-layout { grid-template-columns: 1fr; gap: 24px; }
  .research-summary-grid, .research-stat-grid, .opportunity-grid, .pool-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-module-head { align-items: flex-start; flex-direction: column; }
  .decision-slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .decision-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-factor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-shell { padding: 0 15px 24px; }
  .topbar { min-height: 68px; }
  .brand-lockup p { display: none; }
  .overview-band { padding: 28px 0; }
  .score-block { gap: 15px; }
  .score-ring-wrap { width: 132px; height: 132px; flex-basis: 132px; }
  .score-center strong { font-size: 37px; }
  .phase-name { font-size: 21px; }
  .readout-block h2 { font-size: 19px; }
  .cycle-track { grid-template-columns: repeat(3, 1fr); }
  .timeline-section, .components-section, .drivers-section, .data-section { padding: 24px 0; }
  .component-grid { grid-template-columns: 1fr; }
  .component-card { min-height: 145px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: flex-end; }
  .section-note { max-width: 150px; text-align: right; }
  .chart-wrap { height: 240px; }
  .chart-foot > span:last-child { width: 100%; margin-left: 0; }
  .market-chart-workspace { padding: 24px 0; }
  .market-chart-toolbar { align-items: flex-start; flex-direction: column; }
  .market-chart-range { white-space: normal; }
  .market-chart-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-chart-stats > div, .market-chart-stats > div:first-child { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .market-chart-stats > div:nth-child(2n) { border-right: 0; }
  .market-chart-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
  .market-kline-wrap { height: 430px; }
  .market-kline-foot > span:last-child { width: 100%; margin-left: 0; }
  .observation-strip { display: grid; grid-template-columns: repeat(2, 1fr); }
  .observation { border-bottom: 1px solid var(--line); }
  .observation:nth-child(2) { border-right: 0; }
  .observation:nth-last-child(-n+2) { border-bottom: 0; }
  .table-scroll { overflow-x: auto; }
  .drivers-table { min-width: 610px; }
  .research-summary-section, .research-module, .pool-overview, .pool-module, .decision-workspace { padding: 24px 0; }
  .research-chart-wrap { height: 250px; }
  .research-table { min-width: 680px; }
  .decision-table { min-width: 1080px; }
  .decision-table th:first-child, .decision-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg);
  }
  .cycle-table { min-width: 760px; }
  .short-cycle-grid { grid-template-columns: 1fr; }
  .decision-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-info-grid { grid-template-columns: 1fr; }
  .pool-controls { width: 100%; }
  .pool-search { flex: 1 1 auto; }
  .pool-search input { width: 100%; }
}

@media (max-width: 420px) {
  .brand-mark { display: none; }
  .market-status { max-width: 126px; }
  .market-status span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .score-block { align-items: flex-start; }
  .score-ring-wrap { width: 112px; height: 112px; flex-basis: 112px; }
  .score-center strong { font-size: 31px; }
  .phase-summary .confidence-text { margin-top: 10px; }
  .cycle-track { grid-template-columns: repeat(2, 1fr); }
  .section-heading { flex-wrap: wrap; }
  .research-summary-grid, .research-stat-grid, .opportunity-grid, .pool-summary-grid { grid-template-columns: 1fr; }
  .pool-controls { align-items: stretch; flex-direction: column; }
  .pool-sort select { width: 100%; }
  .decision-toolbar, .decision-summary { grid-template-columns: 1fr; }
  .decision-toolbar { align-items: flex-start; flex-direction: column; }
  .decision-date-control { width: 100%; align-items: flex-start; flex-direction: column; }
  .decision-date-control select { width: 100%; min-width: 0; }
  .decision-stat-grid { grid-template-columns: 1fr; }
  .decision-slot-grid { grid-template-columns: 1fr; }
  .decision-search-log { grid-template-columns: 1fr; }
  .workspace-tabs { gap: 18px; }
}
