.viz-root {
  --surface-1:      #fcfcfb;
  --page-plane:      #f9f9f7;
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;
  --gridline:       #e1e0d9;
  --baseline:       #c3c2b7;
  --border:         rgba(11,11,11,0.10);
  --series-blue:    #2a78d6;
  --series-violet:  #4a3aa7;
  --series-yellow:  #eda100;
  --good:           #0ca30c;
  --critical:       #d03b3b;
  --serious:        #ec835a;
  --warning:        #fab219;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--page-plane);
}
@media (prefers-color-scheme: dark) {
  .viz-root {
    --surface-1:      #1a1a19;
    --page-plane:      #0d0d0d;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted:     #898781;
    --gridline:       #2c2c2a;
    --baseline:       #383835;
    --border:         rgba(255,255,255,0.10);
    --series-blue:    #3987e5;
    --series-violet:  #9085e9;
    --series-yellow:  #c98500;
    --good:           #0ca30c;
    --critical:       #e66767;
    --serious:        #ec835a;
    --warning:        #fab219;
  }
}
:root[data-theme="dark"] .viz-root {
  --surface-1:      #1a1a19;
  --page-plane:      #0d0d0d;
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;
  --gridline:       #2c2c2a;
  --baseline:       #383835;
  --border:         rgba(255,255,255,0.10);
  --series-blue:    #3987e5;
  --series-violet:  #9085e9;
  --series-yellow:  #c98500;
  --critical:       #e66767;
}
:root[data-theme="light"] .viz-root {
  --surface-1:      #fcfcfb;
  --page-plane:      #f9f9f7;
  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;
  --gridline:       #e1e0d9;
  --baseline:       #c3c2b7;
  --series-blue:    #2a78d6;
  --critical:       #d03b3b;
}

* { box-sizing: border-box; }
.viz-root { max-width: 1080px; margin: 0 auto; padding: 32px 20px 64px; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.01em; }
.subtitle { color: var(--text-secondary); font-size: 15px; margin: 0 0 28px; max-width: 760px; line-height: 1.5; }
h2 { font-size: 17px; margin: 48px 0 4px; }
h2 .num { color: var(--text-muted); font-weight: 500; margin-right: 6px; }
.section-note { color: var(--text-secondary); font-size: 13.5px; margin: 0 0 18px; max-width: 760px; line-height: 1.55; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }

.tab-nav { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 1px solid var(--gridline); }
.tab-link { padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-link:hover { color: var(--text-primary); }
.tab-link.active { color: var(--text-primary); border-bottom-color: var(--series-blue); }

.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 600; }
.stat-delta { font-size: 12.5px; margin-top: 4px; font-weight: 500; }
.stat-delta.down { color: var(--critical); }
.stat-delta.up { color: var(--good); }
.stat-delta.neutral { color: var(--text-muted); }

svg text { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.axis-label { fill: var(--text-muted); font-size: 11px; text-anchor: middle; }
.y-label { fill: var(--text-muted); font-size: 11px; text-anchor: end; }
.gridline { stroke: var(--gridline); stroke-width: 1; }
.baseline { stroke: var(--baseline); stroke-width: 1; }
.price-line { fill: none; stroke: var(--series-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.price-dot { fill: var(--series-blue); stroke: var(--surface-1); stroke-width: 2; }
.vol-up { fill: var(--good); opacity: 0.55; }
.vol-down { fill: var(--critical); opacity: 0.55; }
.phase-band { opacity: 1; }
.phase-label { font-size: 11.5px; fill: var(--text-secondary); font-weight: 600; }
.ref-line { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ref-label { font-size: 10.5px; fill: var(--text-muted); }
.panel-title { font-size: 12px; fill: var(--text-secondary); font-weight: 600; }
.chart-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--text-secondary); margin-top: 10px; flex-wrap: wrap; }
.legend-key { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--text-secondary); font-weight: 600; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--gridline); }
td { padding: 9px 10px; border-bottom: 1px solid var(--gridline); vertical-align: top; line-height: 1.45; }
tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.tag.bull { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.tag.bear { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical); }
.tag.mixed { background: color-mix(in srgb, var(--warning) 22%, transparent); color: #8a6400; }
:root[data-theme="dark"] .tag.mixed { color: var(--warning); }
@media (prefers-color-scheme: dark) { .tag.mixed { color: var(--warning); } }

.finding { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--gridline); }
.finding:last-child { border-bottom: none; }
.finding-num { font-size: 20px; font-weight: 700; color: var(--text-muted); min-width: 28px; }
.finding-body h3 { margin: 0 0 6px; font-size: 14.5px; }
.finding-body p { margin: 0; font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 100px; background: var(--gridline); color: var(--text-secondary); }

.score-card { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.score-hero { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.score-number { font-size: 52px; font-weight: 700; line-height: 1; }
.score-max { font-size: 18px; color: var(--text-muted); font-weight: 500; margin-left: 2px; }
.score-band-tag { font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em; padding: 5px 14px; border-radius: 100px; background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); text-transform: uppercase; }
.meter-track { position: relative; height: 10px; border-radius: 100px; background: var(--gridline); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 100px; background: var(--good); }
.score-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.score-table th:nth-child(2), .score-table td:nth-child(2),
.score-table th:nth-child(3), .score-table td:nth-child(3),
.score-table th:nth-child(4), .score-table td:nth-child(4) { text-align: center; white-space: nowrap; }
.footnote { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--gridline); }
.sources { font-size: 11.5px; color: var(--text-muted); line-height: 1.8; }
.sources a { color: var(--text-muted); }

.glossary dt { font-weight: 700; font-size: 13.5px; margin-top: 14px; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 3px 0 0; font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; }

.search-box { display: flex; gap: 10px; margin: 4px 0 36px; max-width: 560px; }
.search-input { flex: 1; padding: 14px 16px; font-size: 15px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); font-family: inherit; min-width: 0; }
.search-input:focus { outline: 2px solid var(--series-blue); outline-offset: 1px; }
.search-btn { padding: 14px 22px; font-size: 14px; font-weight: 600; border-radius: 10px; border: none; background: var(--series-blue); color: #fff; cursor: pointer; white-space: nowrap; }
.search-btn:hover { opacity: 0.9; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.report-card { display: block; text-decoration: none; color: inherit; background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 16px; transition: border-color 0.15s; }
.report-card:hover { border-color: var(--series-blue); }
.report-ticker { font-size: 12.5px; font-weight: 700; color: var(--series-blue); letter-spacing: 0.03em; }
.report-name { font-size: 16px; font-weight: 600; margin-top: 2px; }
.report-summary { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }
.report-date { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

.request-panel { display: none; }
.request-panel.visible { display: block; }
.prompt-box { position: relative; background: var(--page-plane); border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); white-space: pre-wrap; margin-top: 12px; }
.copy-btn { margin-top: 12px; padding: 9px 16px; font-size: 13px; font-weight: 600; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); cursor: pointer; }
.copy-btn:hover { border-color: var(--series-blue); }
.copy-btn.copied { border-color: var(--good); color: var(--good); }

.site-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--gridline); padding-bottom: 16px; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.site-author { display: flex; align-items: center; gap: 12px; }
.site-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--series-yellow) 0%, var(--series-blue) 100%); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: 0.02em; }
.site-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.site-role { font-size: 11px; color: var(--text-muted); letter-spacing: 0.01em; }
.site-header-right { display: flex; align-items: center; gap: 10px; }
.site-tag { font-size: 11px; color: var(--text-muted); background: var(--page-plane); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; }
.site-linkedin { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; transition: background 0.15s, border-color 0.15s; }
.site-linkedin:hover { background: var(--gridline); border-color: var(--series-blue); }
.site-linkedin svg { width: 14px; height: 14px; flex-shrink: 0; }

@media (max-width: 720px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .search-box { flex-direction: column; }
}
