:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-soft: #fbfcfd;
  --text: #16212f;
  --muted: #647184;
  --line: #dbe1ea;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --red: #b91c1c;
  --violet: #6d28d9;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.48 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, p { margin: 0; }
button, select { font: inherit; }

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
}

/* ── Header ── */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 { margin-top: 4px; font-size: 26px; overflow-wrap: anywhere; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }

.top-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.language-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(48px, 1fr));
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 2px;
}

.lang-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
}

.lang-button.active {
  background: #eef2ff;
  color: var(--blue);
  font-weight: 700;
}

.symbol-control[hidden] { display: none; }
.symbol-control {
  display: grid;
  gap: 6px;
  min-width: 210px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select {
  min-height: 36px;
  /* min-width:0 + max-width lets the <select> shrink inside its grid/flex cell.
     Without it, a long option label (full company name) sets the select's
     min-content width and overflows the topbar on narrow phones — producing
     horizontal scroll on every detail tab. */
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

/* ── Stage nav ── */

.stage-nav {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stage-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  padding: 7px 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow);
  transition: background 0.15s;
}

.stage-nav a:hover {
  background: #eef2ff;
}

/* ── Stage sections ── */

.stage {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.stage-header h2 {
  font-size: 22px;
}

.stage-summary {
  color: #2f3c4d;
  margin-bottom: 14px;
  line-height: 1.6;
}

.stage-grid {
  display: grid;
  gap: 10px;
}

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

.stage-details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.stage-details summary {
  cursor: pointer;
  font-weight: 700;
}

/* Collapsible stage (3/4) — hero already owns the verdict; this is drill-down */
.stage-collapsible { padding: 0; }
.stage-collapsible details { padding: 14px 18px; }
.stage-collapsible details[open] { padding-bottom: 18px; }
.stage-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.stage-bar::-webkit-details-marker { display: none; }
.stage-bar::before {
  content: "▸";
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
  display: inline-block;
  transition: transform 0.15s;
}
.stage-collapsible details[open] .stage-bar::before { transform: rotate(90deg); }
.stage-bar-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stage-bar-title h2 { font-size: 18px; margin: 0; display: inline; }
.stage-bar-preview { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-bar-sub { font-size: 12px; grid-column: 1 / -1; margin: 0; }
.stage-collapsible details[open] .stage-bar-sub { margin-bottom: 4px; }
.stage-collapsible-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ── Badges ── */

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.positive { border-color: #99f6e4; background: #ecfdf5; color: var(--teal); }
.badge.warn { border-color: #f7c879; background: #fffbeb; color: var(--amber); }
.badge.risk { border-color: #fecaca; background: #fef2f2; color: var(--red); }
.badge.info { border-color: #c7d2fe; background: #eef2ff; color: var(--violet); }

.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Viz panels ── */

.viz-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  min-width: 0;
}

.viz-panel-wide {
  grid-column: span 2;
}

/* ── Bar fill (used by Stage-2 guidance gap) ── */

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.bar-fill {
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

/* ── KPI grid ── */

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

.kpi-card {
  min-height: 64px;
  border-left: 3px solid var(--teal);
  background: var(--panel-soft);
  padding: 7px 10px;
}

.kpi-card strong { display: flex; align-items: baseline; gap: 4px; font-size: 16px; }
.kpi-card small { color: var(--muted); font-size: 11px; }
.kpi-card span, .kpi-card em { display: block; margin-top: 3px; font-size: 12px; }
.kpi-card span { color: var(--text); font-weight: 600; }
.kpi-card em { color: var(--muted); font-style: normal; }
@media (min-width: 760px) { .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ── Narrative divergence (Stage-1 lead panel) ── */

.nd-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--panel-soft);
  margin: 12px 0 14px;
}
.nd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nd-head h3 { font-size: 14px; margin-right: 4px; }
.nd-headline { font-size: 12.5px; color: var(--muted); margin-left: auto; text-align: right; }
.nd-legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.nd-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.nd-rows { display: flex; flex-direction: column; gap: 5px; }
.nd-row {
  display: grid;
  grid-template-columns: 200px 1fr 80px 64px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.nd-label { color: var(--text); overflow-wrap: anywhere; }
.nd-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8edf4;
}
.nd-bar-prepared { background: var(--blue); }
.nd-bar-qa { background: var(--amber); }
.nd-counts { font-size: 12px; color: var(--muted); text-align: right; }
.nd-counts strong { color: var(--text); font-weight: 700; }
.nd-caveat { font-size: 11px; color: var(--muted); margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
@media (max-width: 720px) {
  .nd-row { grid-template-columns: 1fr 80px 60px; }
  .nd-bar { grid-column: 1 / -1; order: 3; }
}

/* ── Guidance gap ── */

.gap-panel { min-height: auto; }

.gap-comparison { display: grid; gap: 8px; }

.gap-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.4fr) minmax(60px, 1fr) minmax(100px, auto);
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.gap-bar-row span { color: #2f3c4d; }
.gap-bar-row strong { color: var(--muted); font-size: 12px; white-space: nowrap; }

.gap-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}

.gap-value { font-size: 15px; }
.gap-positive { color: var(--teal); }
.gap-negative { color: var(--red); }

/* ── Surprise pattern ── */

.surprise-panel { min-height: auto; }
.surprise-stats { display: flex; gap: 24px; }
.surprise-stat { display: flex; flex-direction: column; }
.surprise-stat strong { font-size: 22px; color: var(--teal); }
.surprise-stat span { color: var(--muted); font-size: 12px; }

.surprise-dots {
  display: flex;
  gap: 6px;
  align-items: stretch;
  height: 80px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  overflow: hidden;
}

.surprise-dot {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

/* The bar fills a dedicated track so its % height never collides with the
   label below it (which previously pushed the bar out of the box). */
.dot-track { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.dot-bar { width: 100%; max-width: 28px; min-height: 3px; border-radius: 3px 3px 0 0; }
.dot-beat .dot-bar { background: var(--teal); }
.dot-miss .dot-bar { background: var(--red); }
.surprise-dot small { flex: 0 0 auto; color: var(--muted); font-size: 10px; margin-top: 2px; }
.surprise-axis { font-size: 11px; margin-top: 4px; }
.surprise-note { font-size: 12px; margin-top: 4px; }

/* ── Trajectory ── */

.trajectory-section {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

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

.trajectory-chart { display: flex; align-items: flex-end; }

.traj-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  width: 100%;
  height: 140px;
}

.traj-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.traj-bar {
  width: 100%;
  max-width: 36px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.traj-bar-future { background: var(--teal); opacity: 0.7; }
.traj-bar-col small { font-size: 10px; color: var(--muted); margin-top: 2px; }

.trajectory-table { display: flex; flex-direction: column; gap: 10px; }

.beat-adj {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}

.beat-adj strong { font-size: 18px; color: var(--teal); }

/* ── Analyst strip ── */

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

.target-rows { display: grid; gap: 8px; }

.target-row {
  display: grid;
  grid-template-columns: minmax(60px, 0.3fr) auto auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.target-row span { color: var(--muted); font-size: 13px; }
.target-row strong { font-size: 16px; }

.momentum-line {
  margin-top: 8px;
  font-size: 13px;
}

.rating-badge {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue);
  margin: 4px 0;
}

.rating-scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

/* ── Verification stage ── */

.alert-line {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.alert-line.risk {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
}

.alert-line.positive {
  background: #ecfdf5;
  color: var(--teal);
  border: 1px solid #99f6e4;
}

.alert-line.info {
  background: #eff6ff;
  color: var(--blue);
  border: 1px solid #bfdbfe;
}

.insider-earnings { font-weight: 600; }
.insider-accum { margin-top: 6px; font-size: 12px; }

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.peer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.press-list {
  display: grid;
  gap: 8px;
}

.press-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.press-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.press-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

/* ── Metrics / tables ── */

.metric-list { display: grid; gap: 8px; }

.metric-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.metric-row span { color: var(--muted); }
.metric-row strong { min-width: 0; overflow-wrap: anywhere; text-align: right; }

.metric-desc {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.4;
  opacity: 0.8;
}

.metric-desc-block {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.mini-metric {
  min-height: 44px;
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 8px;
}

.mini-metric span { display: block; color: var(--muted); font-size: 11px; }
.mini-metric strong { display: block; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }

.metric-table { width: 100%; border-collapse: collapse; }
.metric-table th, .metric-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}
.metric-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.list { display: grid; gap: 7px; margin: 0; padding-left: 18px; }
.caveat-list li { color: var(--amber); }

/* ── Evidence ── */

.evidence-panel {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.evidence-panel summary { cursor: pointer; font-weight: 700; }

.evidence-layers { display: grid; gap: 10px; margin-top: 12px; }

.layer-evidence {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.layer-evidence summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 16px;
  margin-top: 12px;
}

.request-list { display: grid; gap: 8px; }
.request { border-left: 2px solid var(--line); padding: 2px 0 2px 8px; }
.request code { color: var(--blue); }

pre { overflow: auto; max-height: 420px; margin: 12px 0 0; color: #111827; font-size: 12px; }

.error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: var(--red);
  padding: 12px;
}

/* ── Responsive ── */

@media (max-width: 1100px) {
  .stage-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz-panel-wide { grid-column: span 2; }
  .analyst-strip { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topbar, .evidence-grid, .trajectory-grid, .stage-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .stage-grid-3 { grid-template-columns: 1fr; }
  .viz-panel-wide { grid-column: auto; }
  .top-actions { justify-items: stretch; }
}

@media (max-width: 560px) {
  .shell { padding: 12px; }
  .kpi-grid { grid-template-columns: 1fr; }

  .bar-row { grid-template-columns: 1fr auto; }
  .bar-track { grid-column: 1 / -1; }

  .metric-row { grid-template-columns: 1fr; gap: 2px; }
  .metric-row strong { text-align: left; }

  h1 { font-size: 22px; }
  .stage-header h2 { font-size: 18px; }
}

/* ── PM synthesis hero ── */
.pm-synthesis {
  background: var(--panel);
  border: 1px solid var(--border, #e3e7ee);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16, 33, 47, 0.04);
}
.pm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.pm-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pm-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.pm-horizon {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}
.pm-horizon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.pm-horizon-btn small {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.9;
}
.pm-horizon-btn:hover { color: var(--text); }
.pm-horizon-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.pm-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pm-bias { font-size: 13px; font-weight: 700; }
.pm-conviction {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
.pm-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid currentColor;
}
.pm-score { font-size: 26px; font-weight: 700; line-height: 1; }
.pm-score-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.pm-tone-positive { color: var(--teal); }
.pm-tone-negative { color: var(--red); }
.pm-tone-neutral { color: var(--blue); }
.pm-thesis {
  margin: 14px 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.pm-quality {
  display: grid;
  gap: 3px;
  margin: -4px 0 16px;
  padding: 8px 10px;
  border-left: 3px solid currentColor;
  background: var(--panel-soft);
  border-radius: 8px;
}
.pm-quality span { font-size: 12px; font-weight: 700; }
.pm-quality small { color: var(--muted); line-height: 1.5; }
/* price-tape chip: the divergence referee, between thesis and scenarios */
.pm-price-action {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 8px 10px;
  border-left: 3px solid currentColor;
  background: var(--panel-soft);
  border-radius: 8px;
}
.pm-pa-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pm-pa-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; opacity: 0.8;
}
.pm-pa-trend { font-size: 13px; font-weight: 700; color: currentColor; }
.pm-pa-div {
  font-size: 11px; font-weight: 700; color: currentColor;
  border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px;
}
.pm-pa-note { font-size: 12px; color: var(--muted); line-height: 1.55; }
/* recommendation as the headline action — biggest type in the head */
.pm-rec {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}
.pm-rec-action {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: currentColor;
}
.pm-rec-rationale { font-size: 13px; color: var(--muted); }
.pm-rr-chip {
  font-size: 11px;
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: auto;
}

/* scenarios — combined with inline R/R chip */
.pm-scenarios { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.pm-sc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pm-sc-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pm-sc-ev { font-size: 14px; font-weight: 700; }
.pm-sc-price small { color: var(--muted); }
.pm-sc-implied { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: currentColor; }
.pm-sc-rows { display: flex; flex-direction: column; gap: 6px; }
.pm-sc-row { display: grid; grid-template-columns: 48px 1fr 44px 52px 80px; align-items: center; gap: 10px; font-size: 12.5px; }
.pm-sc-leg { font-weight: 600; }
.pm-sc-prob-bar { height: 8px; border-radius: 999px; background: var(--panel-soft); overflow: hidden; }
.pm-sc-prob-fill { display: block; height: 100%; border-radius: 999px; }
.pm-sc-prob-fill.pm-tone-positive { background: var(--teal); }
.pm-sc-prob-fill.pm-tone-negative { background: var(--red); }
.pm-sc-prob-fill.pm-tone-neutral { background: var(--blue); }
.pm-sc-prob { text-align: right; color: var(--muted); }
.pm-sc-ret { text-align: right; font-weight: 700; }
.pm-sc-price { text-align: right; }
@media (max-width: 720px) {
  .pm-sc-row { grid-template-columns: 40px 1fr 38px 46px; }
  .pm-sc-price { display: none; }
}
.pm-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pm-col h4 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pm-col-bull h4 { color: var(--teal); }
.pm-col-bear h4 { color: var(--red); }
.pm-col-neutral h4 { color: var(--muted); }
.pm-pillar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 6px;
  background: var(--panel-soft);
  margin-bottom: 5px;
}
.pm-col-bull .pm-pillar { border-left: 3px solid var(--teal); }
.pm-col-bear .pm-pillar { border-left: 3px solid var(--red); }
.pm-col-neutral .pm-pillar { border-left: 3px solid var(--muted); }
.pm-pillar-label { font-size: 12px; font-weight: 600; color: var(--text); }
.pm-pillar-detail { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pm-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e3e7ee);
}
.pm-foot-item { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; line-height: 1.55; color: var(--text); }
.pm-foot-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.pm-risk .pm-foot-label { color: var(--red); }
.pm-watch .pm-foot-label { color: var(--blue); }
@media (max-width: 720px) {
  .pm-foot { grid-template-columns: 1fr; }
  .pm-head { flex-direction: column; }
  .pm-cols { grid-template-columns: 1fr; }
}

/* Industry-relative position band */
.pm-peer {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.pm-peer-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pm-peer-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pm-peer-cohort { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: #fff; }
.pm-peer-headline { font-size: 13px; font-weight: 600; color: var(--text); margin-left: auto; text-align: right; }
.pm-peer-rows { display: flex; flex-direction: column; gap: 6px; }
.pm-peer-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px 76px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.pm-peer-label { color: var(--text); }
.pm-peer-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: visible;
}
.pm-peer-typical {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.10);
  border-radius: 999px;
}
.pm-peer-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 14px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: currentColor;
  z-index: 2;
}
.pm-peer-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.55;
  cursor: help;
  z-index: 1;
}
.pm-peer-value { font-weight: 700; text-align: right; }
.pm-peer-rank {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.pm-peer-bucket { color: var(--muted); font-size: 11px; }
.pm-peer-caveat {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
@media (max-width: 720px) {
  .pm-peer-row { grid-template-columns: 1fr 80px 60px; }
  .pm-peer-track { grid-column: 1 / -1; order: 3; }
  .pm-peer-bucket { display: none; }
}

/* Catalyst calendar */
.catalysts {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.cat-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cat-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cat-headline { font-size: 13px; color: var(--text); }
.cat-counts { font-size: 12px; color: var(--muted); margin-left: auto; }
.cat-counts strong { color: var(--text); font-weight: 700; }
.cat-axis {
  position: relative;
  height: 28px;
  margin: 8px 0 14px;
}
.cat-axis-line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
}
.cat-axis-mark {
  position: absolute;
  top: -2px;
  font-size: 10px;
  color: var(--muted);
}
.cat-axis-start { left: 0; }
.cat-axis-end { right: 0; }
.cat-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background: currentColor;
  border: 2px solid var(--panel);
  cursor: help;
}
.cat-dot.cat-w-high { width: 14px; height: 14px; }
.cat-dot.cat-w-low { width: 8px; height: 8px; opacity: 0.65; }
.cat-rows { display: flex; flex-direction: column; gap: 6px; }
.cat-row {
  display: grid;
  grid-template-columns: 96px 50px auto 1fr 70px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.cat-row-date { font-weight: 700; color: var(--text); }
.cat-row-days { font-size: 11px; }
.cat-row-title { color: var(--text); overflow-wrap: anywhere; }
.cat-row-conf { font-size: 11px; text-align: right; }
.cat-caveat {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
@media (max-width: 720px) {
  .cat-row { grid-template-columns: 96px 1fr 70px; }
  .cat-row-days, .cat-row-conf { display: none; }
}

/* ── Event stream: the unified multi-source timeline (shares the catalyst panel look) ── */
.event-stream {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.es-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.es-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s, opacity .12s;
}
.es-chip:hover { border-color: var(--accent, var(--line)); }
.es-chip-active { background: var(--accent, var(--text)); color: #fff; border-color: transparent; }
.es-chip-n {
  font-weight: 700;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(127, 127, 127, .22);
  color: inherit;
}
.es-empty-filter { padding: 6px 0; }
.es-rows { display: flex; flex-direction: column; gap: 6px; }
.es-row {
  display: grid;
  /* date-only rows stay ~96px; social mentions carry a Beijing HH:MM:SS stamp and widen to fit */
  grid-template-columns: minmax(96px, max-content) auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.es-row-date { font-weight: 700; color: var(--text); white-space: nowrap; }
.es-row-title { color: var(--text); overflow-wrap: anywhere; }
a.es-row-title { color: var(--accent, var(--text)); text-decoration: none; }
a.es-row-title:hover, a.es-row-title:focus-visible { text-decoration: underline; }
.es-row-source { font-size: 11px; text-align: right; white-space: nowrap; }
@media (max-width: 720px) {
  .es-row { grid-template-columns: minmax(84px, max-content) auto 1fr; }
  .es-row-source { display: none; }
}

.revision-section .rev-steps { display: flex; flex-direction: column; gap: 8px; justify-content: center; height: 100%; }
.rev-step {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 13px;
}
.rev-step span { color: var(--muted); }
.rev-step strong { font-size: 14px; }

/* ── Watchlist (cross-symbol comparison) ── */
.watchlist {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.wl-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}
.wl-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.wl-sort { margin-left: auto; font-size: 12px; }
.wl-sort select {
  margin-left: 6px;
  min-height: 28px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  padding: 0 6px;
}
.wl-table-wrap { overflow-x: auto; }
.wl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.wl-table thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--line);
}
.wl-row {
  cursor: pointer;
  transition: background 0.15s;
}
.wl-row:hover,
.wl-row:focus-visible { background: rgba(29, 78, 216, 0.05); outline: none; }
.wl-row td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wl-row-active { background: rgba(29, 78, 216, 0.08); }
.wl-row-active td:first-child { border-left: 3px solid var(--blue); padding-left: 9px; }
.wl-symbol strong { display: block; font-size: 14px; color: var(--text); }
.wl-symbol small { display: block; font-size: 11px; }
.wl-industry { font-size: 11.5px; }
.wl-score { font-weight: 700; font-size: 14px; display: inline-block; min-width: 36px; }
.wl-action, .wl-bias { display: block; font-size: 11px; margin-top: 2px; }
.wl-ev { font-weight: 700; }
.wl-rr { text-align: right; }
.wl-empty-hint {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.wl-baseline {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}
/* Per-market EOD freshness chips: own row under the header, each market + its latest close. */
.wl-markets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 6px 0 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.wl-markets-label { letter-spacing: 0.02em; }
.wl-mkt {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  white-space: nowrap;
}
/* Markets behind the newest *finalized* close read dimmed, not alarming. */
.wl-mkt--lag { opacity: 0.5; }
/* A still-open session's half bar: keep full opacity (it's live/freshest) but tag it so the
   date isn't mistaken for a final EOD. Tag clears on its own once the market settles. */
.wl-mkt--intraday { border-style: dashed; }
.wl-mkt-tag {
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.02em;
  background: var(--line);
  color: var(--muted);
  vertical-align: 1px;
}
.wl-diff { white-space: nowrap; }
.wl-diff-chip {
  display: inline-block;
  margin: 1px 2px 0 0;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}
.wl-diff-flip {
  color: var(--violet);
  background: rgba(109, 40, 217, 0.06);
}
@media (max-width: 720px) {
  .wl-industry, .wl-rr { display: none; }
}

/* ── Hero ↔ Stage linkage ── */
/* Visually hint a hero element is clickable. */
.pm-pillar-link {
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.pm-pillar-link::after {
  content: "↳";
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s;
}
.pm-pillar-link:hover,
.pm-pillar-link:focus-visible {
  background: rgba(29, 78, 216, 0.06);
  outline: none;
  transform: translateX(1px);
}
.pm-pillar-link:hover::after,
.pm-pillar-link:focus-visible::after { opacity: 0.7; }

.cat-row-link {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  margin: 0 -4px;
  transition: background 0.15s;
}
.cat-row-link:hover,
.cat-row-link:focus-visible {
  background: rgba(29, 78, 216, 0.06);
  outline: none;
}
.cat-dot-link { cursor: pointer; }
.cat-dot-link:hover { transform: translate(-50%, -50%) scale(1.3); }

/* Anchor flash — briefly highlight the jumped-to panel. */
.anchor-flash {
  animation: anchorFlash 1.6s ease-out;
}
@keyframes anchorFlash {
  0% { box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.35); background-color: rgba(29, 78, 216, 0.10); }
  100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0); background-color: transparent; }
}

/* ── Change Brief: "what changed recently" card ── */
.change-brief {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.cb-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cb-eyebrow {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.cb-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.cb-meta-label { color: var(--muted); }
.cb-thesis { font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; }
.cb-bullets { font-size: 12.5px; }
.cb-bullets li { color: var(--text); }

/* ── Scorecards grid: global health check ── */
.scorecards {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.sc-head, .swl-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sc-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sc-sub { font-size: 12px; }
.sc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sc-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel-soft);
}
.sc-tone-positive { border-top-color: var(--teal); }
.sc-tone-risk { border-top-color: var(--red); }
.sc-tone-warn { border-top-color: var(--amber); }
.sc-tone-info { border-top-color: var(--blue); }
.sc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.sc-card-head h3 { font-size: 14px; }
.sc-headline { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.sc-metrics { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.sc-metric { display: flex; flex-direction: column; gap: 1px; }
.sc-metric-label { font-size: 11px; color: var(--muted); }
.sc-metric-value { font-size: 14px; color: var(--text); }
.sc-bullets { font-size: 12px; }
.sc-caveats { margin-top: 8px; }
.sc-caveats summary { font-size: 11.5px; color: var(--amber); cursor: pointer; }
.sc-caveats summary:hover { text-decoration: underline; }
.sc-caveats .caveat-list { margin-top: 6px; font-size: 12px; }

/* ── Profile sections detail ── */
.profile-sections { margin-bottom: 14px; }
.sec-takeaway { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }

/* ── Symbol watchlist ── */
.symbol-watchlist {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.swl-rows { display: flex; flex-direction: column; gap: 8px; }
.swl-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.swl-row:first-child { border-top: none; }
.swl-cat { font-weight: 700; color: var(--blue); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.swl-item { color: var(--text); line-height: 1.5; }
.swl-status {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sc-grid { grid-template-columns: 1fr; }
  .swl-row { grid-template-columns: 1fr; gap: 4px; }
  .cb-head { gap: 8px; }
}

/* ── Price-implied bar (reverse-DCF) ── */
.implied-bar { border-left: 3px solid var(--teal); margin-bottom: 16px; }
.implied-headline { font-weight: 600; margin: 6px 0 12px; }
.implied-bars { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.implied-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 10px; }
.implied-row-label { font-size: 13px; color: var(--muted, #64748b); }
.implied-track { background: #f1f5f9; border-radius: 4px; height: 14px; overflow: hidden; }
.implied-fill { height: 100%; border-radius: 4px; min-width: 2px; }
.implied-fill.gap-positive { background: var(--teal); }
.implied-fill.gap-negative { background: var(--red); }
.implied-row-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.implied-row-implied .implied-row-label { font-weight: 600; color: inherit; }
.implied-readout { margin: 8px 0 4px; font-size: 13px; }
.implied-hist { font-size: 12px; }
.implied-caveats { margin-top: 8px; font-size: 12px; }
.implied-caveats summary { cursor: pointer; color: var(--muted, #64748b); }
.implied-caveats ul { margin: 6px 0 0; padding-left: 18px; }
@media (max-width: 720px) {
  .implied-row { grid-template-columns: 96px 1fr 56px; gap: 6px; }
}

/* ── Tab navigation ── */
/* ── Top-level hub switch (观察池 / 事件流) — pill segmented control, sits above the
      hub views; visually heavier than the per-stock section tabs below. ── */
/* Sticky bar (full content width, page bg) wrapping the pill so it pins on scroll
   without long lists showing through. */
.hub-nav { position: sticky; top: 0; z-index: 30; display: block; margin: 0 0 16px; padding: 10px 0 8px; background: var(--bg); }
.hub-nav[hidden] { display: none; }
.hub-nav-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-nav-left { display: inline-flex; gap: 4px; padding: 4px; background: var(--line, #e2e8f0); border-radius: 10px; }
.hub-nav-left button {
  appearance: none; border: none; cursor: pointer; white-space: nowrap;
  padding: 7px 18px; font-size: 14px; font-weight: 600; border-radius: 7px;
  background: transparent; color: var(--muted, #64748b);
  position: relative;
}
/* Pro 事件流未读红点(blocks/stream.js 注入到「事件流」按钮上)。 */
.gs-alert-dot {
  position: absolute; top: 1px; right: 2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--red, #ef4444); color: #fff;
  font-size: 10px; line-height: 16px; font-weight: 700; text-align: center;
}
.hub-nav-left button:hover { color: var(--ink, #0f172a); }
.hub-nav-left button.active { background: var(--panel, #fff); color: var(--teal); box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.08)); }
.hub-nav-left .hub-home { margin-right: 8px; position: relative; }
.hub-nav-left .hub-home::after { content: ""; position: absolute; right: -5px; top: 18%; height: 64%; width: 1px; background: var(--panel, #cbd5e1); }
/* Right side: 使用说明 (guide) + direct 关注 buttons (X / 小红书). */
.hub-nav-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.hub-nav-right .hub-guide {
  appearance: none; border: none; cursor: pointer; white-space: nowrap; background: none;
  color: var(--muted, #64748b); font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 7px;
}
.hub-nav-right .hub-guide:hover { color: var(--ink, #0f172a); }
.hub-nav-right .hub-guide.active { color: var(--teal); }
.hub-follow {
  display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none;
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 7px;
}
.hub-follow.nav-x { background: #0f172a; color: #fff; }
.hub-follow.nav-xhs { background: #ff2442; color: #fff; }
.hub-follow:hover { opacity: .9; }

/* Event-stream hub placeholder (scaffold) */
.event-feed .feed-placeholder { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow); }
.feed-lead { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.feed-covers { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin: 16px 0 8px; }
.feed-symbols { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-sym-chip { font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }

/* Global event-stream feed rows (事件流 hub) — per-stock .es-row look + a symbol column. */
.event-feed { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.gs-rows { display: flex; flex-direction: column; gap: 6px; }
.es-month { margin: 12px 0 2px; font-size: 11px; letter-spacing: .04em; }
.gs-row {
  display: grid;
  grid-template-columns: minmax(96px, max-content) minmax(56px, max-content) auto 1fr auto;
  gap: 10px; align-items: center; font-size: 12.5px;
  border-bottom: 1px solid var(--line); padding: 4px 6px 6px; border-radius: 6px; cursor: pointer;
}
.gs-row:hover { background: var(--line); }
.es-tz { font-size: .82em; opacity: .5; margin-left: 2px; }
.gs-syms { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.gs-sym { font-weight: 700; color: var(--accent, var(--text)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-syms .gs-sym:hover { text-decoration: underline; }
.gs-main { min-width: 0; }
@media (max-width: 720px) {
  .gs-row { grid-template-columns: minmax(80px, max-content) minmax(48px, max-content) 1fr; }
  .gs-row .badge, .gs-row .es-row-source { display: none; }
}

.tab-nav { display: flex; gap: 4px; margin: 16px 0; border-bottom: 1px solid #e2e8f0; overflow-x: auto; }
.tab-nav button {
  appearance: none; border: none; background: none; cursor: pointer;
  padding: 10px 16px; font-size: 14px; color: var(--muted, #64748b);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-nav button:hover { color: var(--ink, #0f172a); }
.tab-nav button.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }
.tab-pane[hidden] { display: none; }

/* ── Score formula panel ── */
.sf-pillars { margin: 8px 0; }
.sf-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px dashed #eef2f6; }
.sf-row[data-target] { cursor: pointer; }
.sf-row[data-target]:hover .sf-label { color: var(--teal); }
.sf-label { font-size: 13px; }
.sf-pts { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.sf-sum { margin-top: 8px; border-top: 2px solid #e2e8f0; padding-top: 6px; }
.sf-total { border-bottom: none; font-size: 15px; }
.sf-total .sf-pts { font-size: 18px; }
.sf-thresholds { margin-top: 10px; font-size: 12px; }
.sf-thresholds summary { cursor: pointer; color: var(--muted, #64748b); }
.sf-thresholds ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }

/* ── Event descriptions ── */
.cat-row { flex-wrap: wrap; }
.cat-row-desc { flex-basis: 100%; font-size: 12px; margin-top: 2px; }
.press-cat {
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #f1f5f9; color: var(--muted, #64748b); white-space: nowrap;
}
.press-desc { flex-basis: 100%; font-size: 12px; margin-top: 2px; }

/* ── Pool (watchlist) ⇄ Detail master-detail navigation ── */
.view[hidden] { display: none; }
.pool-title { font-size: 20px; margin: 8px 0 12px; }
.back-pool {
  appearance: none; background: none; border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--muted, #64748b);
  font-size: 13px; margin: 6px 0 14px;
}
.back-pool:hover { color: var(--ink, #0f172a); border-color: var(--ink, #0f172a); }

/* ── Fundamentals tab ── */
.fundamentals { margin-top: 16px; }
.fd-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fd-head h2 { font-size: 20px; }
.fd-growth { margin-left: auto; font-weight: 700; font-size: 13px; }
.fd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fd-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); min-height: auto; }
.fd-card h3 { font-size: 14px; margin-bottom: 8px; }
.fd-sub { margin-top: 14px; }
.fd-margins { display: flex; flex-direction: column; gap: 12px; }
.fd-margin-head { display: flex; align-items: baseline; gap: 8px; }
.fd-margin-head strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.fd-yoy { font-size: 12px; font-weight: 700; }
.fd-spark { width: 100%; height: 28px; display: block; margin-top: 2px; }
.fd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.fd-tile { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.fd-tile-l { font-size: 12px; }
.fd-tile strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.gap-positive { color: var(--teal); } .gap-negative { color: var(--red); }

.fd-val { margin-top: 12px; }
.fd-val-note { font-size: 12px; font-weight: 400; }
.fd-valbars { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.fd-valrow { display: grid; grid-template-columns: 96px 1fr 56px 56px; align-items: center; gap: 10px; }
.fd-val-label { font-size: 13px; font-weight: 600; }
.fd-val-track { position: relative; height: 8px; background: linear-gradient(90deg,#ecfdf5,#fffbeb,#fef2f2); border: 1px solid var(--line); border-radius: 999px; }
.fd-val-med { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--muted); transform: translateX(-1px); }
.fd-val-cur { position: absolute; top: -4px; width: 12px; height: 16px; border-radius: 4px; background: var(--blue); transform: translateX(-6px); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.fd-val-cur.gap-negative { background: var(--red); } .fd-val-cur.gap-positive { background: var(--teal); }
.fd-val-now { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.fd-val-pct { font-size: 12px; text-align: right; }
@media (max-width: 720px) {
  .fd-grid { grid-template-columns: 1fr; }
  .fd-valrow { grid-template-columns: 70px 1fr 50px 48px; gap: 6px; }
}

/* fundamentals: DCF + peer comparison */
.fd-dcf { margin-top: 10px; font-size: 13px; }
.fd-peers { margin-top: 12px; }
.fd-peer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fd-peer-chip { border: 1px solid var(--line); background: #eef2ff; color: var(--blue); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.fd-peer-chip:hover { background: var(--blue); color: #fff; }

/* ── fundamentals verdict strip + 三问推理链分组 (2026-06) ── */
.fd-verdict { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 4px 0 6px; }
.fd-verdict-line { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.fd-verdict-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-vchip { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 11px; border: 1px solid var(--line); }
.fd-vchip i { font-style: normal; font-weight: 600; opacity: .7; }
.fd-vchip .fd-vchip-x { font-weight: 400; opacity: .7; }
.fd-vchip.good { border-color: #99f6e4; background: #ecfdf5; color: var(--teal); }
.fd-vchip.warn { border-color: #f7c879; background: #fffbeb; color: var(--amber); }
.fd-vchip.bad { border-color: #fecaca; background: #fef2f2; color: var(--red); }
.fd-group-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; margin: 18px 0 8px; padding-left: 8px; border-left: 3px solid var(--line); }
.fd-growth-card { margin-top: 0; }
.fd-growth-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.fd-growth-main { display: flex; align-items: baseline; gap: 8px; }
.fd-growth-yoy { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fd-growth-sub { font-size: 13px; }
.fd-growth-fcf { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fd-sig-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
.fd-sigs { font-size: 12px; line-height: 1.5; }
.fd-sigs li.gap-positive { color: var(--teal); }
.fd-sigs li.gap-negative { color: var(--red); }
/* income skeleton ($ scale) */
.fd-inc { display: flex; flex-direction: column; gap: 7px; }
.fd-inc-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 10px; }
.fd-inc-l { font-size: 13px; }
.fd-inc-v { font-size: 17px; font-variant-numeric: tabular-nums; }
.fd-inc-eps { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
/* dilution */
.fd-dil-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fd-dil-main { display: flex; align-items: baseline; gap: 8px; }
.fd-dil-main strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.fd-dil-yoy { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fd-dil-sbc { font-size: 12px; }
/* working capital (CCC) */
.fd-wc-ccc { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fd-wc-ccc strong { font-size: 20px; font-variant-numeric: tabular-nums; }
/* ROIC vs WACC */
.fd-ce-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fd-ce-metric { display: flex; flex-direction: column; gap: 2px; }
.fd-ce-metric strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.fd-ce-vs { font-size: 12px; }
.fd-ce-spread { margin-left: auto; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.fd-ce-assum { font-size: 11px; margin-top: 8px; }
.fd-capeff h3 .fd-vchip { vertical-align: middle; margin-left: 6px; }
/* peer-median reference (margins / returns only) */
.fd-peer { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fd-margin-head .fd-peer { margin-left: auto; }
.fd-tile-tall { gap: 4px; }
.fd-tile-tall .fd-spark { height: 22px; margin-top: 2px; }
/* secondary quality detail — collapsible (动线: 主次分层) */
.fd-more { margin: 8px 0 4px; }
.fd-more > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); user-select: none; }
.fd-more > summary::-webkit-details-marker { display: none; }
.fd-more > summary::before { content: "▸"; color: var(--muted); font-size: 11px; display: inline-block; transition: transform .15s; }
.fd-more[open] > summary { border-radius: 8px 8px 0 0; border-bottom: none; }
.fd-more[open] > summary::before { transform: rotate(90deg); }
.fd-more-label { font-size: 13px; font-weight: 700; }
.fd-more-hint { font-size: 12px; margin-left: auto; }
.fd-more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; }
.fd-more-body .fd-card { margin: 0; }
@media (max-width: 720px) { .fd-more-body { grid-template-columns: 1fr; } }
/* 详细分析: 7-box accordion — title + one-line takeaway always shown, detail folds (动线: 主次分层) */
.fd-sec-list { display: flex; flex-direction: column; gap: 6px; }
.fd-sec { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); overflow: hidden; }
.fd-sec > summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: baseline;
  gap: 10px; padding: 10px 14px; }
.fd-sec > summary::-webkit-details-marker { display: none; }
.fd-sec > summary::before { content: "▸"; flex: 0 0 auto; color: var(--muted); font-size: 11px;
  display: inline-block; transition: transform .15s; }
.fd-sec[open] > summary::before { transform: rotate(90deg); }
.fd-sec[open] > summary { border-bottom: 1px solid var(--line); }
.fd-sec-title { flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.fd-sec-take { flex: 1 1 auto; min-width: 0; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-sec[open] .fd-sec-take { white-space: normal; }
.fd-sec-body { padding: 12px 14px; }
.fd-sec-body .list { margin: 8px 0 0; }
@media (max-width: 560px) {
  .fd-sec > summary { flex-wrap: wrap; }
  .fd-sec-take { flex-basis: 100%; white-space: normal; }
}
.fd-cash-tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 8px; }
.fd-cash-tag.good { background: #ecfdf5; color: var(--teal); }
.fd-cash-tag.bad { background: #fef2f2; color: var(--red); }

/* ── 个股时间线 / Serenity Timeline (blocks/timeline.js) ───────────────────── */
.serenity-timeline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
/* `hidden` attr must beat the explicit display on .stl-toolbar/.stl-log-head/.stl-list
   (price-volume mode hides the mention-only chrome). */
.serenity-timeline [hidden] { display: none !important; }
.stl-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.stl-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stl-title { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.stl-sub { font-size: 12px; }
/* headline period-return, big tabular number */
.stl-stats { display: flex; align-items: baseline; gap: 8px; }
.stl-ret-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.stl-ret-v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.serenity-timeline .t-pos { color: var(--teal); }
.serenity-timeline .t-neg { color: var(--red); }

/* toolbar: legend (left) + filter pills (right) */
.stl-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stl-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.stl-lg { display: inline-flex; align-items: center; gap: 6px; }
.stl-lg i { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.stl-lg i.stl-lg-line { width: 16px; height: 2px; border-radius: 0; background: #1d4ed8; }
.stl-filters { display: inline-flex; gap: 6px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.stl-pill {
  display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 4px 11px; transition: background .15s, color .15s;
}
.stl-pill em { font-style: normal; font-variant-numeric: tabular-nums; opacity: 0.7; font-size: 11px; }
.stl-pill .stl-pill-dot { width: 8px; height: 8px; border-radius: 999px; }
.stl-pill:hover { color: var(--text); }
.stl-pill.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

.stl-chart { position: relative; min-height: 400px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #fbfcfe, #f6f8fb); padding: 6px; overflow: hidden; }
.stl-chart svg.stl-svg { width: 100%; height: 380px; display: block; }
.stl-nochart { display: grid; place-items: center; min-height: 380px; font-size: 13px; }
.stl-svg-note, .stl-nochart { padding: 8px; }

/* call-log section divider */
.stl-log-head { margin: 20px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.stl-log-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* hover tooltip card over the chart */
.stl-tip {
  position: absolute; z-index: 5; max-width: 280px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15,23,42,0.16); padding: 9px 11px; font-size: 12px;
}
.stl-tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.stl-tip-date { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.stl-tip-count { font-size: 12px; font-weight: 700; color: var(--text); }
.stl-tip-text { color: var(--text); line-height: 1.45; }
.stl-tip-why { font-size: 11px; margin-top: 3px; }
.stl-tip-meta { font-size: 11px; margin-top: 5px; }
.stl-tip-list { display: grid; gap: 5px; max-height: 180px; overflow: auto; }
.stl-tip-row { display: flex; align-items: flex-start; gap: 6px; }
.stl-tip-row-x { font-size: 11px; color: var(--text); line-height: 1.35; }

/* stance badge */
.stl-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.stl-badge.stl-bullish { background: #ecfdf5; color: var(--teal); }
.stl-badge.stl-bearish { background: #fef2f2; color: var(--red); }
.stl-badge.stl-neutral { background: #eef2ff; color: var(--violet); }

/* call list */
.stl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stl-empty { list-style: none; padding: 14px; text-align: center; font-size: 13px; }
.stl-item { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 10px 12px; background: var(--panel-soft); transition: box-shadow .15s, transform .15s; }
.stl-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stl-item.stl-edge-bullish { border-left-color: var(--teal); }
.stl-item.stl-edge-bearish { border-left-color: var(--red); }
.stl-item.stl-edge-neutral { border-left-color: #cbd5e1; }
.stl-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 5px; }
.stl-item-date { font-size: 12px; font-variant-numeric: tabular-nums; }
.stl-item-eng { font-size: 11px; margin-left: auto; }
.stl-item-text { color: var(--text); line-height: 1.5; font-size: 13px; }
.stl-item-why { font-size: 12px; margin-top: 4px; }
.stl-item-link { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--blue); text-decoration: none; }
.stl-item-link:hover { text-decoration: underline; }

/* ── Overview: score breakdown (diverging bars) ── */
.sb-breakdown { margin: .55rem 0 .25rem; }
.sb-head { display: flex; align-items: baseline; gap: .6em; margin-bottom: .3em; }
.sb-title { font-weight: 700; font-size: .9rem; }
.sb-drivers-note { font-weight: 400; font-size: .78rem; }
.sb-total { margin-left: auto; font-size: .82rem; }
.sb-total strong { font-variant-numeric: tabular-nums; }
.sb-row { display: flex; align-items: center; gap: .5em; padding: .12em 0; }
.sb-row-accent { border-left: 3px solid var(--blue); padding-left: .45em; margin-left: -.45em; }
.sb-row-link { cursor: pointer; border-radius: 3px; }
.sb-row-link:hover { background: var(--line); }
.sb-label { flex: 0 0 7.5em; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-row-accent .sb-label { font-weight: 700; }
.sb-dot { display: inline-block; width: .4em; height: .4em; border-radius: 50%; background: var(--blue); margin-right: .35em; vertical-align: middle; }
.sb-track { position: relative; flex: 1 1 auto; height: .7em; display: flex; align-items: center; }
.sb-track-axis { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.sb-bar { position: absolute; height: .55em; }
.sb-bar-neg { right: 50%; border-radius: 2px 0 0 2px; }
.sb-bar-pos { left: 50%; border-radius: 0 2px 2px 0; }
.sb-pts { flex: 0 0 2.6em; text-align: right; font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Overview: fundamental-quality badge ── */
.qb-quality { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; margin-bottom: .85rem; }
.qb-quality-label { font-weight: 700; }
.qb-quality-why { margin-left: .15em; }
.qb-factors { display: inline-flex; flex-wrap: wrap; gap: .55em; align-items: center; }
.qb-factor { display: inline-flex; align-items: center; gap: .2em; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.qb-factor-mark { font-size: .78em; }

/* ── Event × price reaction panel (events tab) ── */
.event-reactions {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.event-reactions .ev-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.event-reactions .ev-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.event-reactions .ev-sub { font-size: 12px; }
.ev-react-rows { display: flex; flex-direction: column; gap: 8px; }
.ev-react-bycat { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.ev-dist-label { font-size: 11px; margin-bottom: 6px; }
.ev-react-cat { display: grid; grid-template-columns: 1fr auto 64px; gap: 10px; align-items: baseline; font-size: 12.5px; }
.ev-react-cat-name { color: var(--text); overflow-wrap: anywhere; }
.ev-react-cat-n { font-size: 11px; }
.ev-react-ret { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-react-row {
  display: grid;
  grid-template-columns: 96px auto 1fr 72px 72px;
  gap: 10px;
  align-items: baseline;
  font-size: 12.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.ev-react-date { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ev-react-title { color: var(--text); overflow-wrap: anywhere; }
.event-reactions .ev-row-cat {
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap;
}
@media (max-width: 720px) {
  .ev-react-row { grid-template-columns: 80px 1fr auto; }
  .ev-react-title { grid-column: 1 / -1; }
  .event-reactions .ev-row-cat { grid-column: 1 / -1; }
}

/* ── Brand as a home link (clickable eyebrow) ── */
.brand-home { appearance: none; border: none; background: none; padding: 0; cursor: pointer; font: inherit; letter-spacing: inherit; }
.brand-home:hover { text-decoration: underline; }

/* ── Home portal (entry page) ── */
.home-hero { margin: 6px 0 22px; }
.home-tagline { font-size: 15px; line-height: 1.5; margin: 0; color: var(--text); max-width: 62ch; }
.home-meta { font-size: 12px; margin-top: 7px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
/* Update-cadence note: collapsed by default; a small disclosure triangle on the summary. */
.home-cadence { margin-top: 8px; font-size: 12px; max-width: 62ch; }
.home-cadence > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 5px; }
.home-cadence > summary::-webkit-details-marker { display: none; }
.home-cadence > summary::before { content: "\25B8"; font-size: 10px; transition: transform .15s ease; }
.home-cadence[open] > summary::before { transform: rotate(90deg); }
.home-cadence-list { margin: 6px 0 0; padding-left: 18px; line-height: 1.7; }
.home-cadence-list li { list-style: disc; }
/* align-items:stretch → both cards in a grid row share the taller height (tidy bottoms). */
/* ── Home: three-board change feed (new coverage → signal moves → latest events) ── */
.home-sec {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.home-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.home-sec-title { font-size: 14px; font-weight: 700; color: var(--text); }
.home-sec-title small { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12px; }
.home-sec-all {
  font-size: 12px; color: var(--teal); cursor: pointer; font-weight: 600; white-space: nowrap;
  background: none; border: 0; padding: 0; font-family: inherit; flex-shrink: 0;
}
.home-sec-all:hover { text-decoration: underline; }
.home-board-empty { font-size: 12px; color: var(--muted); font-style: italic; padding: 4px 0; }

/* Signal-move row */
.home-sig-row {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px;
  padding: 8px 6px; border-top: 1px solid var(--line); cursor: pointer;
  text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0;
  font: inherit; color: inherit; width: 100%;
}
.home-sig-row:first-of-type { border-top: none; }
.home-sig-row:hover { background: var(--panel-soft); }
.home-sig-row > * { min-width: 0; }
.home-sig-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap; justify-self: start;
}
.home-sig-tag.long { border-color: #c7d2fe; background: #eef2ff; color: var(--violet); }
.home-sig-tag.near { border-color: #99f6e4; background: #ecfdf5; color: var(--teal); }
.home-sig-sym { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-sig-bias { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-sig-delta { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; justify-self: end; }
.home-sig-delta.positive { color: var(--teal); }
.home-sig-delta.risk { color: var(--red); }
.home-sig-delta.info { color: var(--muted); }

/* Latest-event row */
.home-ev-row {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px;
  padding: 8px 6px; border-top: 1px solid var(--line); cursor: pointer;
}
.home-ev-row:first-of-type { border-top: none; }
.home-ev-row:hover { background: var(--panel-soft); }
.home-ev-row > * { min-width: 0; }
.home-ev-row .badge { justify-self: start; }
.home-ev-sym { font-weight: 700; font-size: 13px; white-space: nowrap; }
.home-ev-multi { font-size: 10px; color: var(--muted); margin-left: 3px; }
.home-ev-title { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.home-ev-date { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; justify-self: end; }

/* New-coverage row: two lines (chip · via · date / quote + tweet link) */
.home-new-row { padding: 8px 6px; border-top: 1px solid var(--line); }
.home-new-row:first-of-type { border-top: none; }
.home-new-row:hover { background: var(--panel-soft); }
.home-new-top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: inherit; width: 100%;
}
.home-new-top > * { min-width: 0; }
.home-new-idcell { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.home-new-chip {
  font-size: 12px; padding: 3px 10px; border-radius: 7px; border: 1px solid #99f6e4;
  background: #ecfdf5; color: var(--teal); font-weight: 600; white-space: nowrap;
}
/* 一揽子 vs 重点单提 标签:一揽子(琥珀,提醒"群体提及")/ 重点单提(蓝,单独点名)。 */
.home-new-kind {
  font-size: 10px; padding: 1px 6px; border-radius: 5px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0; letter-spacing: .02em;
}
.home-new-kind.basket { border: 1px solid #f7c879; background: #fffbeb; color: var(--amber); }
.home-new-kind.solo { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.home-new-via { font-size: 12px; }
/* Right cell: return since first mention (bold, green/red) + the first-seen date. */
.home-new-meta { justify-self: end; display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.home-new-ret { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.home-new-ret.positive { color: var(--teal); }
.home-new-ret.risk { color: var(--red); }
.home-new-date { font-size: 11px; font-variant-numeric: tabular-nums; justify-self: end; }
.home-new-evidence {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-top: 5px; padding-left: 2px; text-decoration: none; color: inherit;
}
.home-new-quote { font-size: 12px; color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-new-link { font-size: 11px; color: var(--teal); white-space: nowrap; font-weight: 600; flex-shrink: 0; }
.home-new-evidence:hover .home-new-link { text-decoration: underline; }

/* 使用说明页页尾的轻量关注链接行 */
.about-link-row {
  display: flex; align-items: center; gap: 8px; min-width: 200px; flex: 1;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  text-decoration: none; color: inherit; transition: border-color .12s, background .12s;
}
.about-link-row:hover { border-color: var(--blue); background: var(--panel-soft); }
.about-link-row .about-link-plat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); flex-shrink: 0; }
.about-link-row .about-link-handle { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; flex: 1; }
.about-link-row .about-link-go { margin-top: 0; font-size: 12.5px; font-weight: 700; color: var(--blue); text-decoration: none; flex-shrink: 0; }

/* ── 使用说明页:左主内容(平台→指标→最近更新) + 右侧 关注我 长边栏 ── */
.about-wrap { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.about-main { min-width: 0; }
.about-side { position: sticky; top: 64px; }
@media (max-width: 880px) {
  .about-wrap { grid-template-columns: 1fr; }
  .about-side { position: static; }
}
.about-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.about-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; }
/* 最近更新 / 升级日志 */
.about-log { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.about-log:first-of-type { border-top: none; padding-top: 0; }
.about-log-date { font-size: 11.5px; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.about-log-body { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0; }
/* 关注我边栏 */
.about-follow-intro { font-size: 12.5px; line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.about-side .about-links { flex-direction: column; }
.about-side .about-qr { margin: 0 0 12px; }
.about-side .about-qr img { width: 100%; max-width: 100%; }
.about-tagline { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 6px; line-height: 1.55; }
.about-follow { font-size: 13.5px; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.about-link { display: flex; flex-direction: column; gap: 3px; min-width: 200px; flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.about-link-plat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.about-link-handle { font-size: 14px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.about-link-go { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--blue); text-decoration: none; }
.about-link-go:hover { text-decoration: underline; }
.about-qr { margin: 14px 0 0; }
.about-qr img { width: 230px; max-width: 70%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block; }

/* ──────────────────────────────────────────────────────────────────────────
   Mobile hardening (phones). These close the last horizontal-overflow gaps the
   per-component breakpoints above missed; verified at a 390px viewport.
   ────────────────────────────────────────────────────────────────────────── */

/* Long unbreakable tokens in event meta (cashtags like $MTSI, handles, URLs)
   were pushing the event-stream feed past the screen edge. Let them wrap. */
.gs-main, .es-meta, .es-row-title { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  /* PT trajectory: the single grid column was growing to the chart/table
     min-content (12 quarter bars + a 3-col table) and dragging the page
     sideways. Pin the children to the column width, then let the dense bar
     chart and metric table scroll horizontally inside their card. */
  .trajectory-chart { min-width: 0; }
  .trajectory-table { min-width: 0; overflow-x: auto; }
  .traj-bars { overflow-x: auto; padding-bottom: 4px; }
  .traj-bar-col { min-width: 40px; }

  /* Event-stream rows (both the global 事件流 hub .gs-row and the per-symbol
     events tab .es-row): a tweet carries a full HH:MM:SS Beijing timestamp, so
     the date + ticker/badge columns ate the row and crushed the headline into a
     ~100px sliver that wrapped vertically, one or two CJK chars per line. Give
     the headline its own full-width line below the date/tickers. */
  .gs-row { grid-template-columns: max-content 1fr; row-gap: 3px; }
  .gs-row .gs-main { grid-column: 1 / -1; }

  .es-row { grid-template-columns: max-content 1fr; row-gap: 3px; }
  .es-row .es-row-main { grid-column: 1 / -1; }
  .es-row .badge { justify-self: start; }
}
.about-item { padding: 10px 0; border-top: 1px solid var(--line); }
.about-item:first-of-type { border-top: none; padding-top: 0; }
.about-item-h { font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 4px; }
.about-item-b { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.about-item-b b { color: var(--text); font-weight: 600; }
.about-disclaimer { font-size: 11.5px; line-height: 1.6; margin: 4px 2px 0; }

/* ─────────────────────────────────────────────────────────────
   登录 / 会员 / 付费墙(web/auth/auth.js)。独立于冻结核心,
   类名前缀 auth-* / pw-* / locked-* 避免与既有样式冲突。
   ───────────────────────────────────────────────────────────── */
.account-control { display: flex; align-items: center; }
.auth-btn {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; white-space: nowrap;
}
.auth-btn:hover { border-color: var(--blue); color: var(--blue); }
.auth-login { background: var(--blue); color: #fff; border-color: var(--blue); }
.auth-login:hover { filter: brightness(1.05); color: #fff; }
.auth-upgrade { background: var(--teal); color: #fff; border-color: var(--teal); }
.auth-upgrade:hover { filter: brightness(1.05); color: #fff; }
.auth-account { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.auth-badge { padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
/* 三档徽章:免费(灰)/ 标准(青)/ 专业(琥珀渐变)。member 类保留作旧前端别名。 */
.auth-badge-free { background: #f1f5f9; color: var(--muted); border: 1px solid var(--line); }
.auth-badge-standard, .auth-badge-member { background: #ecfdf5; color: var(--teal); border: 1px solid #99f6e4; }
.auth-badge-pro { background: linear-gradient(135deg,#fffbeb,#fef3c7); color: #b45309; border: 1px solid #fcd34d; }
.auth-email { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-exp { color: var(--muted); font-size: 11px; }
.auth-logout { padding: 4px 8px; }

/* 付费弹窗 */
.pw-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.pw-modal { position: relative; width: 100%; max-width: 380px; background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 22px 22px 20px; box-shadow: 0 24px 60px rgba(15,23,42,.25); }
.pw-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.pw-title { font-size: 17px; margin: 0 0 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pw-early { font-size: 11px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 999px; }
/* 两档对比卡(开通弹窗)。窄屏单列堆叠。 */
.pw-modal-tiers { max-width: 640px; }
.pw-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.pw-tier { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.pw-tier-pro { border-color: #fcd34d; background: linear-gradient(180deg,#fffdf6,#fff); }
.pw-tier.is-owned { opacity: .72; }
.pw-tier-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pw-tier-name { font-size: 15px; font-weight: 800; color: var(--text); }
.pw-tier-owned { font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }
.pw-tier-tagline { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.pw-tier-feats { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.pw-tier-feats li { font-size: 12px; color: var(--text); padding-left: 16px; position: relative; }
.pw-tier-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.pw-tier-pro .pw-tier-feats li::before { color: #d97706; }
@media (max-width: 560px) { .pw-tiers { grid-template-columns: 1fr; } }
.pw-plans { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: auto; }
.pw-plan { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.pw-plan:last-child { border-bottom: none; }
.pw-plan-name { font-weight: 600; color: var(--text); }
.pw-plan-price s { color: var(--muted); font-size: 12px; margin-right: 4px; }
.pw-plan-price b { color: var(--red); }
.pw-pay { text-align: center; padding: 12px 0 4px; border-top: 1px dashed var(--line); margin-top: 12px; }
.pw-qr { width: 168px; height: 168px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.pw-qr-missing { font-size: 12px; color: var(--red); padding: 30px 10px; border: 1px dashed var(--red); border-radius: 8px; margin-top: 10px; }
.pw-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0 2px 4px; }
.pw-contact { font-size: 12px; color: var(--text); font-weight: 600; margin: 0; }
.pw-redeem-label { font-size: 12px; font-weight: 600; color: var(--text); display: block; margin-bottom: 6px; }
.pw-redeem-row { display: flex; gap: 8px; }
.pw-code { flex: 1; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; }
.pw-redeem-msg { font-size: 12px; margin: 8px 2px 0; }
.pw-redeem-msg.ok { color: var(--teal); }
.pw-redeem-msg.err { color: var(--red); }

/* 登录/注册弹窗:Google + 邮箱密码 */
.auth-modal .auth-google-btn { width: 100%; text-align: center; padding: 9px 10px; font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.auth-tab { flex: 1; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); cursor: pointer; }
.auth-tab.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.auth-email-form { display: flex; flex-direction: column; gap: 8px; }
.auth-input { font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; }
.auth-input:focus { outline: none; border-color: var(--blue); }
.auth-email-submit { width: 100%; text-align: center; padding: 9px 10px; font-size: 13px; margin-top: 2px; }
.auth-email-submit:disabled { opacity: .6; cursor: default; }
.auth-email-msg { font-size: 12px; margin: 6px 2px 0; line-height: 1.5; }
.auth-email-msg.ok { color: var(--teal); }
.auth-email-msg.err { color: var(--red); }

/* 付费墙占位卡(第二步:非会员点个股时盖在深度区上) */
.locked-card { position: relative; border: 1px dashed var(--line); border-radius: 10px; padding: 22px; text-align: center; background: repeating-linear-gradient(135deg,#fafbfc,#fafbfc 10px,#f3f5f8 10px,#f3f5f8 20px); }
.locked-card h3 { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.locked-card p { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.locked-lock { font-size: 22px; margin-bottom: 6px; }

/* 半墙钩子页(非会员点个股) */
.teaser { padding: 4px 0; }
.teaser-note { font-size: 12px; margin: 0 0 14px; }
.teaser-conclusions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.teaser-conclusion { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.teaser-conc-label { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 56px; }
.teaser-conc-text { font-size: 14px; color: var(--text); }
.teaser-conc-score { font-size: 12px; font-weight: 600; color: var(--muted); }
.teaser-locked-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.teaser-cta { display: inline-block; }

/* 切票加载提示:顶部细进度条。延迟 200ms 才显示(见 core.js startLoadingHint),
   秒开(预取/缓存)的票不会闪,只有真慢的首加载才出现。不挡内容。 */
.load-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  box-shadow: 0 0 6px rgba(29, 78, 216, 0.5);
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.load-bar-active { opacity: 1; animation: load-bar-fill 1.4s ease-out forwards; }
@keyframes load-bar-fill { 0% { width: 0; } 50% { width: 70%; } 100% { width: 90%; } }
