/* ——————————— Kairos·JP — editorial dark, Linear/Arc vibe ——————————— */
:root[data-theme="midnight"]{
  --bg-0: oklch(16% 0.015 265);
  --bg-1: oklch(19% 0.018 265);
  --bg-2: oklch(22% 0.02 265);
  --bg-3: oklch(26% 0.022 265);
  --fg-0: oklch(96% 0.01 265);
  --fg-1: oklch(82% 0.012 265);
  --fg-2: oklch(64% 0.015 265);
  --fg-3: oklch(48% 0.018 265);
  --line: oklch(28% 0.02 265);
  --line-strong: oklch(36% 0.025 265);
  --line-faint: oklch(24% 0.018 265);
  --accent: oklch(78% 0.14 250);
  --accent-2: oklch(80% 0.12 210);
  --up: oklch(78% 0.16 155);
  --down: oklch(68% 0.18 25);
  --warn: oklch(82% 0.15 85);
}
:root[data-theme="graphite"]{
  --bg-0: oklch(12% 0.005 265);
  --bg-1: oklch(15% 0.006 265);
  --bg-2: oklch(18% 0.008 265);
  --bg-3: oklch(22% 0.008 265);
  --fg-0: oklch(96% 0.005 265);
  --fg-1: oklch(80% 0.006 265);
  --fg-2: oklch(62% 0.008 265);
  --fg-3: oklch(46% 0.01 265);
  --line: oklch(24% 0.008 265);
  --line-strong: oklch(34% 0.01 265);
  --line-faint: oklch(20% 0.006 265);
  --accent: oklch(80% 0.12 230);
  --accent-2: oklch(82% 0.1 200);
  --up: oklch(78% 0.14 155);
  --down: oklch(68% 0.16 25);
  --warn: oklch(82% 0.14 85);
}
:root[data-theme="ink"]{
  --bg-0: oklch(97% 0.008 80);
  --bg-1: oklch(99% 0.005 80);
  --bg-2: oklch(94% 0.01 80);
  --bg-3: oklch(90% 0.012 80);
  --fg-0: oklch(18% 0.015 265);
  --fg-1: oklch(32% 0.012 265);
  --fg-2: oklch(48% 0.01 265);
  --fg-3: oklch(62% 0.008 265);
  --line: oklch(86% 0.01 265);
  --line-strong: oklch(76% 0.012 265);
  --line-faint: oklch(92% 0.008 265);
  --accent: oklch(42% 0.14 25);
  --accent-2: oklch(50% 0.14 250);
  --up: oklch(52% 0.18 155);
  --down: oklch(48% 0.2 25);
  --warn: oklch(62% 0.16 85);
}

:root[data-density="compact"]  { --gap: 10px; --pad: 12px; --fs-base: 13px; }
:root[data-density="comfortable"] { --gap: 16px; --pad: 18px; --fs-base: 14px; }
:root[data-density="spacious"] { --gap: 22px; --pad: 24px; --fs-base: 15px; }

:root[data-motion="calm"] { --anim-mul: 1.6; }
:root[data-motion="normal"] { --anim-mul: 1; }
:root[data-motion="energetic"] { --anim-mul: 0.6; }

* { box-sizing: border-box; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; width: 100%; background: var(--bg-0); color: var(--fg-1); font-family: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif; font-size: var(--fs-base); letter-spacing: -0.005em; overflow-x: hidden; }
body { min-height: 100vh; }
#root { width: 100%; }

#root { min-height: 100vh; }
.app { display: flex; min-height: 100vh; width: 100%; }

/* ——————————— sidebar ——————————— */
.side { position: fixed; top: 0; left: 0; width: 264px; height: 100vh; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, var(--bg-0), oklch(14% 0.018 265) 100%); overflow: hidden; z-index: 100; }
:root[data-theme="ink"] .side { background: linear-gradient(180deg, var(--bg-1), var(--bg-2) 100%); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); color: var(--accent); display: grid; place-items: center; border: 1px solid var(--line); box-shadow: 0 0 24px -6px oklch(78% 0.14 250 / 0.3); }
.brand-n { font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; font-size: 15px; }
.brand-dot { color: var(--accent); margin: 0 2px; }
.brand-s { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase; }

.search { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; color: var(--fg-2); transition: border-color .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(78% 0.14 250 / 0.1); }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--fg-0); font-size: 13px; font-family: inherit; }
.kbd { font-size: 10px; padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }

.side-sec { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.side-sec-h { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wl-tf { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px; gap: 1px; }
.wl-tf-b { background: transparent; border: none; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 4px; cursor: pointer; }
.wl-tf-b:hover { color: var(--fg-1); }
.wl-tf-b.on { background: var(--bg-0); color: var(--fg-0); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.side-list { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.side-list::-webkit-scrollbar { width: 4px; }
.side-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }

.side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; background: transparent; border: 1px solid transparent; color: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; font-family: inherit; }
.side-row:hover { background: var(--bg-1); }
.side-row.on { background: var(--bg-2); border-color: var(--line); box-shadow: inset 2px 0 0 var(--accent); }
.side-row-l { display: flex; flex-direction: column; min-width: 0; }
.side-row-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--fg-0); letter-spacing: -0.01em; }
.side-row-n { font-size: 11px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.side-row-r { display: flex; align-items: center; gap: 8px; }
.side-row-c { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; width: 54px; text-align: right; }

.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.mkt-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; }
.mkt-row .up { color: var(--up); } .mkt-row .down { color: var(--down); }

/* ——————————— main ——————————— */
.main { padding: 18px 22px 28px; display: flex; flex-direction: column; gap: var(--gap); width: 100%; min-width: 0; overflow-x: hidden; margin-left: 264px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.breadcrumbs { color: var(--fg-3); font-size: 12.5px; letter-spacing: -0.005em; display: flex; gap: 8px; align-items: center; }
.breadcrumbs .sep { color: var(--line-strong); }
.breadcrumbs .strong { color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.topbar-r { display: flex; align-items: center; gap: 10px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-1); }
.live-dot span { width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 var(--up); animation: pulse-dot calc(2s*var(--anim-mul)) infinite; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 oklch(78% 0.16 155 / 0.6); } 50% { box-shadow: 0 0 0 6px oklch(78% 0.16 155 / 0); } }

.btn { background: var(--bg-1); color: var(--fg-1); border: 1px solid var(--line); padding: 7px 12px; border-radius: 7px; font-family: inherit; font-size: 12.5px; cursor: pointer; transition: all .15s; letter-spacing: -0.005em; }
.btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn.primary { background: var(--fg-0); color: var(--bg-0); border-color: var(--fg-0); font-weight: 500; }
.btn.primary:hover { background: var(--fg-1); }
.btn.ghost { background: transparent; }
.btn.btn-sm { padding: 5px 10px; font-size: 11.5px; border-radius: 6px; }
.btn.ok { background: color-mix(in oklch, var(--up) 18%, var(--bg-1)); border-color: color-mix(in oklch, var(--up) 50%, var(--line)); color: var(--up); }

/* ——————————— ticker header ——————————— */
.tk-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 18px 22px; background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden; }
.tk-head::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(ellipse at 85% 30%, oklch(78% 0.14 250 / 0.08), transparent 60%); pointer-events: none; }
.tk-l { display: flex; gap: 18px; align-items: center; position: relative; }
.tk-sym { display: flex; align-items: baseline; gap: 0; padding: 6px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.tk-code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 22px; letter-spacing: 0.02em; color: var(--fg-0); font-weight: 500; }
.tk-exch { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--fg-3); }
.tk-main h1.tk-name { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg-0); }
.tk-meta { font-size: 12px; color: var(--fg-2); display: flex; gap: 8px; margin-top: 2px; }
.tk-meta .dot { color: var(--line-strong); }
.tk-r { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; position: relative; }
.tk-price-v { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 28px; color: var(--fg-0); letter-spacing: -0.02em; text-align: right; }
.tk-price-c { display: inline-flex; align-items: center; gap: 6px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; padding: 3px 8px; border-radius: 6px; margin-top: 2px; }
.tk-price-c.up { color: var(--up); background: oklch(78% 0.16 155 / 0.1); }
.tk-price-c.down { color: var(--down); background: oklch(68% 0.18 25 / 0.1); }
.tk-price-c .muted { color: var(--fg-3); font-size: 11px; }
.tk-theme-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tk-theme { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); font-size: 11px; color: var(--fg-1); background: var(--bg-2); }
.tk-theme .tc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 8px var(--tc); }

/* ——————————— cards ——————————— */
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: var(--pad); display: flex; flex-direction: column; gap: var(--gap); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-t { font-size: 13px; color: var(--fg-0); font-weight: 500; letter-spacing: -0.005em; }
.panel-s { font-size: 11px; color: var(--fg-3); letter-spacing: 0.02em; margin-top: 2px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--gap); }
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
@media (max-width: 1180px){ .hero-grid, .bottom-grid { grid-template-columns: 1fr; } }

/* ——————————— price chart ——————————— */
.chart-card { min-width: 0; }
.price-chart { width: 100%; height: auto; display: block; }
.price-chart .axis { font-size: 9.5px; fill: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.price-chart .evt-marker { cursor: pointer; }
.price-chart .tt-lbl { font-size: 9px; fill: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.06em; }
.price-chart .tt-val { font-size: 11px; fill: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg.small { border-radius: 6px; }
.seg button { background: transparent; border: 0; color: var(--fg-2); padding: 5px 10px; border-radius: 5px; font-family: inherit; font-size: 11.5px; cursor: pointer; transition: all .15s; }
.seg.small button { padding: 3px 7px; font-size: 10.5px; font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.05em; }
.seg button:hover { color: var(--fg-0); }
.seg button.on { background: var(--bg-3); color: var(--fg-0); }
.chart-stats { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 1px; background: var(--line-faint); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.chart-stats > div { background: var(--bg-1); padding: 6px 10px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-0); display: flex; flex-direction: column; gap: 2px; }
.chart-stats > div span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; font-family: inherit; }

/* ——————————— graph ——————————— */
.graph-card { min-width: 0; }
.rel-graph { width: 100%; height: 100%; min-height: 450px; display: block; }
.rg-node { cursor: pointer; transition: opacity .3s; }
.rg-node.dim { opacity: 0.18; }
.rg-node:hover circle:first-of-type { filter: url(#node-glow); }
.rg-label { font-family: "Inter Tight", "Inter", -apple-system, system-ui, sans-serif; font-size: 8px; font-weight: 500; fill: var(--fg-0); pointer-events: none; letter-spacing: -0.02em; }
.rg-label.c { font-size: 9.5px; font-weight: 600; }
.rg-label.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em; font-weight: 500; }
.rg-sublabel { font-size: 9px; fill: var(--fg-2); pointer-events: none; font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em; }
.rg-chg { font-size: 9px; font-family: "JetBrains Mono", ui-monospace, monospace; pointer-events: none; }
.rg-ext-label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; fill: var(--fg-2); pointer-events: none; letter-spacing: 0.03em; text-transform: uppercase; }
.rg-col-label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; fill: var(--fg-3); pointer-events: none; letter-spacing: 0.08em; text-transform: uppercase; }
.rg-edge { transition: opacity .2s; }
.rg-edge.dim { opacity: 0.3; }
.rg-edge-label { font-size: 8.5px; fill: var(--fg-2); pointer-events: none; font-family: inherit; letter-spacing: 0.01em; }
.rg-edge-chip { transition: opacity .15s; pointer-events: none; }
.rg-legend { pointer-events: none; }
.rg-legend-title { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 8.5px; fill: var(--fg-3); letter-spacing: 0.1em; }
.rg-legend-lbl { font-size: 9.5px; fill: var(--fg-1); font-family: inherit; }
.rg-node.ext circle:first-of-type { cursor: default; }
.rg-node.c { cursor: default; }
.legend { display: flex; gap: 10px; font-size: 10.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.04em; }
.legend-hint { font-size: 10.5px; color: var(--fg-3); font-family: inherit; letter-spacing: 0; text-transform: none; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.legend .lg-s { background: oklch(72% 0.12 220); }
.legend .lg-p { background: oklch(70% 0.1 280); border-top: 2px dashed oklch(70% 0.1 280); height: 0; }
.legend .lg-r { background: oklch(88% 0.17 80); box-shadow: 0 0 6px oklch(88% 0.17 80); }

/* ——————————— theme belt ——————————— */
.theme-belt { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; border-top: 1px dashed var(--line-faint); padding: 10px 2px 2px; }
.theme-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); font-family: inherit; font-size: 11px; cursor: pointer; transition: all .15s; }
.theme-chip .tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); transition: box-shadow .2s; }
.theme-chip.mine { color: var(--fg-0); border-color: var(--line-strong); }
.theme-chip.mine .tc-dot { box-shadow: 0 0 8px var(--tc); }
.theme-chip.active { background: var(--bg-3); border-color: var(--tc); color: var(--fg-0); }
.theme-chip .tc-count { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; color: var(--fg-3); }

/* ——————————— value chain strip ——————————— */
.vcs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; align-items: start; position: relative; }
.vcs-col { padding: 4px 10px 4px 0; position: relative; min-width: 0; }
.vcs-col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; border-bottom: 1px dashed var(--line-faint); margin-bottom: 10px; }
.vcs-col-i { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 10px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; }
.vcs-col-n { font-size: 11px; color: var(--fg-1); letter-spacing: 0.04em; text-transform: uppercase; }
.vcs-col-body { display: flex; flex-direction: column; gap: 4px; }
.vcs-chip { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; color: inherit; cursor: pointer; text-align: left; transition: all .15s; font-family: inherit; position: relative; }
.vcs-chip:hover { background: var(--bg-3); border-color: var(--line-strong); transform: translateY(-1px); }
.vcs-chip.c { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 20px -8px var(--accent); }
.vcs-chip-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-0); }
.vcs-chip-n { font-size: 11px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcs-chip-c { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; margin-top: 2px; }
.vcs-arrow { position: absolute; right: -8px; top: 16px; color: var(--fg-3); font-size: 14px; pointer-events: none; }
.vcs-empty { color: var(--fg-3); font-size: 11px; padding: 6px; text-align: center; }

/* ——————————— news ——————————— */
.news-card { padding-bottom: 6px; }
.news-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.news-list { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.news-list::-webkit-scrollbar { width: 4px; }
.news-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }
.news-item { background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; transition: all .15s; cursor: default; opacity: 0; transform: translateY(4px); animation: slideIn calc(0.5s*var(--anim-mul)) cubic-bezier(0.2,0.6,0.2,1) forwards; }
@keyframes slideIn { to { opacity: 1; transform: translateY(0); } }
.news-item:hover { background: var(--bg-3); border-color: var(--line-strong); }
.news-item.imp-high { border-left-color: var(--warn); }
.news-item.imp-med { border-left-color: var(--accent-2); }
.news-item.imp-low { border-left-color: var(--line-strong); }
.news-top { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.news-time { color: var(--fg-2); }
.news-src { padding: 1px 6px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 4px; font-size: 9.5px; letter-spacing: 0.03em; }
.news-sent { margin-left: auto; }
.news-sent.s-p { color: var(--up); }
.news-sent.s-n { color: var(--down); }
.news-sent.s-z { color: var(--fg-2); }
.news-h { font-size: 13px; line-height: 1.35; color: var(--fg-0); letter-spacing: -0.005em; }
.news-bot { display: flex; gap: 5px; flex-wrap: wrap; }
.news-chip { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg-1); border: 1px solid var(--line); color: var(--fg-1); }
.news-chip.c { background: oklch(78% 0.14 250 / 0.14); border-color: var(--accent); color: var(--accent); }
.news-theme { font-size: 10px; padding: 2px 7px; border-radius: 12px; border: 1px solid; background: transparent; }

/* ——————————— correlation ——————————— */
.corr-wrap { display: flex; flex-direction: column; gap: 8px; }
.corr-list { display: flex; flex-direction: column; gap: 2px; }
.corr-row { display: grid; grid-template-columns: 52px 1fr 120px 44px; gap: 10px; align-items: center; padding: 7px 10px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: inherit; cursor: pointer; text-align: left; font-family: inherit; opacity: 0; transform: translateX(-4px); animation: slideR calc(0.5s*var(--anim-mul)) cubic-bezier(0.2,0.6,0.2,1) forwards; }
@keyframes slideR { to { opacity: 1; transform: translateX(0); } }
.corr-row:hover { background: var(--bg-2); border-color: var(--line); }
.corr-tk { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--fg-0); }
.corr-name { font-size: 11.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corr-bar { position: relative; }
.corr-bar-bg { display: block; position: relative; height: 8px; background: var(--bg-2); border-radius: 2px; overflow: hidden; }
.corr-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; transform-origin: left; animation: grow calc(0.9s*var(--anim-mul)) cubic-bezier(0.2,0.7,0.2,1); }
@keyframes grow { from { transform: scaleX(0); } }
.corr-bar-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.corr-val { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; text-align: right; }

/* ——————————— footer ——————————— */
.foot { color: var(--fg-3); font-size: 11px; padding: 14px 4px; display: flex; gap: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.03em; border-top: 1px dashed var(--line-faint); }
.foot .sep { color: var(--line-strong); }

/* ——————————— tweaks panel ——————————— */
.tweaks { position: fixed; bottom: 18px; right: 18px; z-index: 100; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 300px; box-shadow: 0 20px 60px -20px oklch(0% 0 0 / 0.6); backdrop-filter: blur(12px); }
.tweaks-h { font-size: 11px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; padding-bottom: 6px; border-bottom: 1px dashed var(--line-faint); }
.tweaks-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tweaks-row label { font-size: 11.5px; color: var(--fg-2); }

/* ——————————— subtle rotating sheen on brand mark ——————————— */
.brand-mark svg { animation: spin calc(40s*var(--anim-mul)) linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ——————————— view switcher ——————————— */
.topbar { gap: 16px; }
.topbar-c { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.view-switcher { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { background: transparent; border: 0; color: var(--fg-2); font-size: 11.5px; padding: 5px 10px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; letter-spacing: 0.01em; }
.seg button.on { background: var(--bg-3); color: var(--fg-0); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button:hover:not(.on) { color: var(--fg-1); }
.theme-select { display: flex; gap: 6px; overflow-x: auto; min-width: 0; padding: 2px 0; scrollbar-width: none; }
.theme-select::-webkit-scrollbar { display: none; }
.theme-select-chip { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--fg-2); font-size: 11px; padding: 4px 10px; border-radius: 14px; cursor: pointer; white-space: nowrap; font-family: inherit; letter-spacing: 0.01em; transition: all .18s ease; }
.theme-select-chip .tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 8px var(--tc); display: inline-block; }
.theme-select-chip.on { background: color-mix(in oklch, var(--tc) 14%, transparent); border-color: var(--tc); color: var(--fg-0); }
.theme-select-chip:hover:not(.on) { color: var(--fg-1); border-color: var(--line-strong); }

/* ——————————— Theme hero ——————————— */
.theme-hero { position: relative; background: linear-gradient(135deg, color-mix(in oklch, var(--tc) 14%, var(--bg-1)) 0%, var(--bg-1) 55%), var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; overflow: hidden; }
.theme-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 400px 200px at 0% 0%, color-mix(in oklch, var(--tc) 28%, transparent), transparent 65%); pointer-events: none; }
.theme-hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklch, var(--tc) 22%, transparent), transparent 60%); filter: blur(8px); pointer-events: none; }
.theme-hero-l { position: relative; z-index: 2; min-width: 0; }
.theme-hero-label { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 10px var(--tc); display: inline-block; }
.theme-hero-n { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg-0); margin: 0 0 6px 0; line-height: 1.05; }
.theme-hero-sub { font-size: 12.5px; color: var(--fg-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.theme-hero-sub .dot { color: var(--line-strong); }
.theme-hero-r { position: relative; z-index: 2; display: flex; gap: 24px; align-items: flex-end; }
.theme-hero-agg { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.theme-hero-chg { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; }
.theme-hero-br { font-size: 22px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.theme-hero-br .up { color: var(--up); }
.theme-hero-br .down { color: var(--down); }
.theme-hero-br .sep { color: var(--line-strong); margin: 0 2px; }
.theme-hero-lbl { font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-top: 4px; }
.theme-hero-spark { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* ——————————— Theme value chain (members) ——————————— */
.theme-vc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.theme-vc-col { display: flex; flex-direction: column; gap: 10px; padding: 4px 10px; position: relative; border-right: 1px dashed var(--line-faint); }
.theme-vc-col:last-child { border-right: 0; }
.theme-vc-col:first-child { padding-left: 0; }
.theme-vc-col:last-child { padding-right: 0; }
.theme-vc-h { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--fg-2); letter-spacing: 0.08em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; padding: 0 2px 6px; border-bottom: 1px solid var(--line-faint); }
.theme-vc-i { width: 16px; height: 16px; border-radius: 4px; background: var(--bg-3); color: var(--fg-1); display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; }
.theme-vc-n { flex: 1; color: var(--fg-1); }
.theme-vc-c { color: var(--fg-3); font-size: 10px; }
.theme-vc-body { display: flex; flex-direction: column; gap: 8px; }
.theme-vc-flow { position: absolute; right: -5px; top: 28px; bottom: 0; width: 10px; pointer-events: none; }
.theme-vc-flow::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--tc) 40%, transparent), transparent); transform: translateX(-50%); }

.theme-card { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font-family: inherit; color: var(--fg-1); position: relative; overflow: hidden; opacity: 0; transform: translateY(6px); animation: tc-in .45s ease forwards; transition: all .18s ease; }
@keyframes tc-in { to { opacity: 1; transform: translateY(0); } }
.theme-card:hover { border-color: var(--line-strong); background: var(--bg-3); transform: translateY(-1px); }
.theme-card.cross { border-color: color-mix(in oklch, var(--warn) 40%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklch, var(--warn) 18%, transparent), 0 0 20px color-mix(in oklch, var(--warn) 8%, transparent); }
.theme-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.theme-card-tk { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-0); font-weight: 500; letter-spacing: 0.01em; }
.theme-card-chg { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.theme-card-n { font-size: 11.5px; color: var(--fg-1); line-height: 1.25; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-card-spark { margin: 2px -2px; }
.theme-card-spark svg { width: 100%; height: 28px; display: block; }
.theme-card-bot { display: flex; justify-content: space-between; gap: 4px; font-size: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-3); padding-top: 4px; border-top: 1px solid var(--line-faint); }
.theme-card-mc { color: var(--fg-2); }
.theme-card-px { color: var(--fg-1); }
.theme-card-xthemes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-faint); }
.theme-card-xt { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 1px solid color-mix(in oklch, var(--tc) 40%, var(--line)); color: var(--fg-2); font-size: 9.5px; padding: 1px 6px; border-radius: 10px; cursor: pointer; font-family: inherit; letter-spacing: 0.02em; }
.theme-card-xt:hover { background: color-mix(in oklch, var(--tc) 12%, transparent); color: var(--fg-0); }
.theme-card-xt .tc-dot { width: 5px; height: 5px; }

/* ——————————— Cross-theme overlap grid ——————————— */
.xtheme-grid { display: flex; flex-direction: column; gap: 2px; }
.xtheme-row { display: grid; grid-template-columns: minmax(140px, 0.8fr) 80px minmax(0, 1.4fr) 32px; gap: 14px; align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line-faint); padding: 10px 4px; cursor: pointer; font-family: inherit; color: var(--fg-1); text-align: left; transition: background .15s ease; }
.xtheme-row:hover { background: var(--bg-2); }
.xtheme-row:last-child { border-bottom: 0; }
.xtheme-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xtheme-n { font-size: 12px; color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xtheme-count-bar { height: 4px; background: var(--bg-2); border-radius: 2px; overflow: hidden; position: relative; }
.xtheme-count-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }
.xtheme-shared { display: flex; flex-wrap: wrap; gap: 4px; }
.xtheme-none { color: var(--fg-3); font-size: 10.5px; }
.xtheme-val { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--fg-0); text-align: right; font-variant-numeric: tabular-nums; }

/* news-panel (re-used for theme) */
.news-panel { display: flex; flex-direction: column; gap: 10px; }
.panel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* Responsive */
@media (max-width: 1180px) {
  .theme-hero { grid-template-columns: 1fr; gap: 16px; }
  .theme-hero-r { justify-content: flex-start; }
  .theme-hero-n { font-size: 26px; }
  .theme-vc { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .theme-vc-col { border-right: 0; padding: 0; }
  .theme-vc-flow { display: none; }
}
@media (max-width: 860px) {
  .theme-vc { grid-template-columns: 1fr; }
}

/* ——————————— Thesis block ——————————— */
.theme-thesis { border-color: color-mix(in oklch, var(--tc) 24%, var(--line)); }
.thesis-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.thesis-main { min-width: 0; grid-column: 1 / -1; }
.thesis-eyebrow { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.thesis-body { font-size: 14px; line-height: 1.55; color: var(--fg-0); margin: 0; letter-spacing: -0.005em; text-wrap: pretty; }
.thesis-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.thesis-col-h { font-size: 10.5px; color: var(--fg-2); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--line-faint); }
.thesis-col-h.warn { color: var(--warn); }
.thesis-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.thesis-list li { font-size: 12px; line-height: 1.4; color: var(--fg-1); padding-left: 14px; position: relative; }
.thesis-list li::before { content: "›"; position: absolute; left: 0; top: 0; color: var(--tc); font-weight: 500; }
.thesis-cat { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.thesis-cat li { display: grid; grid-template-columns: 82px 1fr; gap: 8px; font-size: 11.5px; line-height: 1.35; align-items: baseline; }
.thesis-cat .cat-d { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--tc); letter-spacing: 0.02em; }
.thesis-cat .cat-l { color: var(--fg-1); }
@media (max-width: 1180px) { .thesis-grid { grid-template-columns: 1fr 1fr; } .thesis-main { grid-column: 1 / -1; } }
@media (max-width: 720px) { .thesis-grid { grid-template-columns: 1fr; } }

/* ——————————— KPI dashboard ——————————— */
.kpi-card { padding: 14px 18px; }
.kpi-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 18px; }
.kpi-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-k { font-size: 10px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.kpi-k .kpi-sub { letter-spacing: 0.04em; text-transform: none; color: var(--fg-3); }
.kpi-v { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; }
.kpi-bar { position: relative; height: 3px; background: var(--bg-2); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.kpi-bar-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.kpi-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
@media (max-width: 1180px) { .kpi-row { grid-template-columns: repeat(4, 1fr); row-gap: 14px; } }
@media (max-width: 720px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }

/* ——————————— Comparison table ——————————— */
.cmp-scroll { overflow-x: auto; margin: 0 -4px; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.cmp thead th { position: sticky; top: 0; background: var(--bg-1); z-index: 2; }
.cmp-th { font-size: 10.5px; font-weight: 500; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; font-family: "JetBrains Mono", ui-monospace, monospace; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); cursor: pointer; user-select: none; white-space: nowrap; }
.cmp-th.nosort { cursor: default; }
.cmp-th.t-left { text-align: left; }
.cmp-th.t-right { text-align: right; }
.cmp-th.t-center { text-align: center; }
.cmp-th.on { color: var(--fg-0); }
.cmp-th .sort-i { margin-left: 4px; font-size: 8px; color: var(--accent); }
.cmp-th:hover:not(.nosort) { color: var(--fg-1); }
.cmp-row { cursor: pointer; opacity: 0; transform: translateY(3px); animation: tc-in .4s ease forwards; }
.cmp-row:hover td { background: var(--bg-2) !important; }
.cmp-row td { padding: 8px 10px; border-bottom: 1px solid var(--line-faint); color: var(--fg-1); transition: background .15s ease; }
.cmp-num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; }
.cmp-tk { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); font-weight: 500; }
.cmp-n { color: var(--fg-0); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-pos { font-size: 11px; color: var(--fg-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-left { text-align: left; } .t-right { text-align: right; } .t-center { text-align: center; }

/* Analyst bar */
.ab { display: flex; flex-direction: column; gap: 2px; align-items: center; min-width: 80px; }
.ab-bar { display: flex; width: 100%; height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg-2); }
.ab-bar > div { height: 100%; transition: width .3s ease; }
.ab-nums { display: flex; gap: 3px; font-size: 10px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.ab-nums .up { color: var(--up); } .ab-nums .down { color: var(--down); }

/* ——————————— Dossier grid ——————————— */
.dossier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.dossier { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: all .18s ease; opacity: 0; transform: translateY(6px); animation: tc-in .5s ease forwards; position: relative; overflow: hidden; }
.dossier:hover { border-color: var(--line-strong); background: var(--bg-3); transform: translateY(-2px); box-shadow: 0 12px 32px -16px oklch(0% 0 0 / 0.5); }
.dos-hd { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dos-hd-l { display: flex; gap: 10px; align-items: center; min-width: 0; }
.dos-tk { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; font-weight: 500; color: var(--fg-0); background: var(--bg-3); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); }
.dos-n { font-size: 13px; color: var(--fg-0); letter-spacing: -0.005em; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dos-pos { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.02em; margin-top: 2px; }
.dos-hd-r { text-align: right; flex-shrink: 0; }
.dos-px { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--fg-0); }
.dos-chg { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dos-thesis { font-size: 12px; line-height: 1.45; color: var(--fg-1); text-wrap: pretty; padding: 10px 12px; background: var(--bg-1); border-left: 2px solid var(--line-strong); border-radius: 0 6px 6px 0; }
.dos-fin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line-faint); border-bottom: 1px solid var(--line-faint); }
.dos-fin > div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); font-variant-numeric: tabular-nums; }
.dos-fin > div > span:first-child { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.dos-analyst { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.dos-analyst-h { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 4px; }
.dos-target-l { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.dos-target-v { font-size: 14px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.dos-target-up { font-size: 10.5px; font-family: "JetBrains Mono", ui-monospace, monospace; margin-top: 1px; }
.dos-news { display: flex; flex-direction: column; gap: 5px; }
.dos-news-h { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 2px; }
.dos-news-none { font-size: 11px; color: var(--fg-3); padding: 6px 0; }
.dos-news-item { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 5px 8px; font-size: 11.5px; line-height: 1.35; border-left: 2px solid var(--line-strong); background: var(--bg-1); border-radius: 0 4px 4px 0; }
.dos-news-item.imp-high { border-left-color: var(--warn); }
.dos-news-item.imp-med { border-left-color: var(--accent-2); }
.dos-news-d { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; color: var(--fg-3); }
.dos-news-h2 { color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ——————————— Context drawer ——————————— */
.drawer-overlay { position: fixed; inset: 0; background: oklch(0% 0 0 / 0.48); backdrop-filter: blur(6px); z-index: 200; display: flex; justify-content: flex-end; animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer { width: min(860px, 94vw); height: 100vh; background: var(--bg-0); border-left: 1px solid color-mix(in oklch, var(--tc) 30%, var(--line)); box-shadow: -24px 0 60px -20px oklch(0% 0 0 / 0.6); overflow-y: auto; display: flex; flex-direction: column; animation: slide-right .32s cubic-bezier(0.2,0.7,0.1,1); }
@keyframes slide-right { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-h { position: sticky; top: 0; z-index: 5; background: linear-gradient(135deg, color-mix(in oklch, var(--tc) 14%, var(--bg-0)), var(--bg-0) 60%); border-bottom: 1px solid var(--line); padding: 20px 28px; display: flex; justify-content: space-between; gap: 16px; }
.drawer-crumb { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.drawer-sep { color: var(--line-strong); margin: 0 4px; }
.drawer-title { display: flex; gap: 14px; align-items: center; }
.drawer-tk { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 20px; color: var(--fg-0); background: var(--bg-2); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); font-weight: 500; }
.drawer-n { font-size: 24px; font-weight: 500; color: var(--fg-0); letter-spacing: -0.02em; }
.drawer-pos { font-size: 11.5px; color: var(--fg-2); margin-top: 6px; letter-spacing: 0.02em; }
.drawer-h-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; position: relative; }
.drawer-px { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 22px; color: var(--fg-0); }
.drawer-chg { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; font-variant-numeric: tabular-nums; }
.drawer-x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-1); cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.drawer-x:hover { background: var(--bg-3); color: var(--fg-0); }
.drawer-body { padding: 20px 28px 28px; display: flex; flex-direction: column; gap: 22px; }
.drawer-sec { display: flex; flex-direction: column; gap: 10px; }
.drawer-sec-h { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; padding-bottom: 4px; border-bottom: 1px dashed var(--line-faint); }
.drawer-sec-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.drawer-thesis { font-size: 13.5px; line-height: 1.55; color: var(--fg-0); letter-spacing: -0.005em; text-wrap: pretty; padding: 14px 16px; background: color-mix(in oklch, var(--tc) 6%, var(--bg-1)); border-left: 3px solid var(--tc); border-radius: 0 8px 8px 0; }

/* Rank grid */
.rank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rank-c { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rank-l { font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.rank-v { font-size: 16px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.rank-r { display: flex; gap: 6px; align-items: baseline; font-family: "JetBrains Mono", ui-monospace, monospace; }
.rank-r > span:first-child { font-size: 13px; color: var(--fg-1); }
.rank-r .gold { color: oklch(82% 0.15 85); }
.rank-r .silver { color: oklch(80% 0.04 265); }
.rank-of { font-size: 10px; color: var(--fg-3); }

/* Relative perf chart */
.rel-chart { width: 100%; height: auto; display: block; }
.rel-yl { font-size: 9px; fill: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.rel-lbl { font-size: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* VC position strip */
.vc-position { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.vcp-col { padding: 10px 12px; border: 1px solid var(--line-faint); border-right: 0; background: var(--bg-1); display: flex; flex-direction: column; gap: 6px; position: relative; }
.vcp-col:first-child { border-radius: 8px 0 0 8px; }
.vcp-col:last-child { border-right: 1px solid var(--line-faint); border-radius: 0 8px 8px 0; }
.vcp-col.me { background: color-mix(in oklch, var(--tc) 10%, var(--bg-1)); border-color: var(--tc); }
.vcp-i { width: 16px; height: 16px; border-radius: 4px; background: var(--bg-3); color: var(--fg-1); display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.vcp-n { font-size: 10.5px; color: var(--fg-2); letter-spacing: 0.08em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.vcp-members { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.vcp-chip { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-1); cursor: pointer; }
.vcp-chip.active { background: var(--tc); color: var(--bg-0); border-color: var(--tc); font-weight: 500; }
.vcp-chip:hover:not(.active) { background: var(--bg-3); }
.vcp-empty { font-size: 10px; color: var(--fg-3); }
.vcp-arr { position: absolute; right: -7px; top: 12px; color: var(--line-strong); font-size: 12px; background: var(--bg-0); padding: 2px; z-index: 2; }

/* Analyst large */
.analyst-lg { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.analyst-tgt { display: flex; gap: 24px; }
.analyst-tgt > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); }
.analyst-tgt > div > span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; }

/* Fin grid */
.fin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; padding: 14px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.fin-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); font-variant-numeric: tabular-nums; }
.fin-grid > div > span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; }

.drawer-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }

/* Primary IR documentation block (drawer) */
.ir-src-list { display: flex; flex-direction: column; gap: 8px; }
.ir-src-item { display: block; padding: 10px 12px; border: 1px solid #fcd34d; border-radius: 8px; background: rgba(252, 211, 77, 0.08); text-decoration: none; transition: background 0.15s ease; }
.ir-src-item:hover { background: rgba(252, 211, 77, 0.16); }
.ir-src-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ir-src-tag { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; background: #fef3c7; color: #92400e; }
.ir-src-tag-press_release { background: #fee2e2; color: #991b1b; }
.ir-src-tag-presentation { background: #ede9fe; color: #5b21b6; }
.ir-src-tag-ir_landing,
.ir-src-tag-ir_library { background: #d1fae5; color: #065f46; }
.ir-src-tag-ir_news { background: #dbeafe; color: #1e40af; }
.ir-src-tag-integrated_report { background: #e2e8f0; color: #334155; }
.ir-src-label { font-size: 13px; font-weight: 500; color: var(--fg-1); flex: 1; }
.ir-src-arr { font-size: 13px; color: #b45309; }
.ir-src-cites { margin-top: 6px; font-size: 11.5px; color: var(--fg-2); line-height: 1.4; }
.ir-src-cites-l { font-weight: 600; color: var(--fg-3); }

@media (max-width: 900px) {
  .drawer-sec-2col { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: repeat(2, 1fr); }
  .vc-position { grid-template-columns: 1fr; }
  .vcp-col { border-right: 1px solid var(--line-faint); border-radius: 0; }
  .vcp-arr { display: none; }
}

/* ——————————————————————————————————————————————————————————— */
/* THEME REPORT — long-form magazine view                     */
/* ——————————————————————————————————————————————————————————— */

/* Hero CTA on dashboard */
.rep-cta { display: inline-flex; align-items: center; gap: 14px; padding: 12px 18px; margin-top: 18px; background: color-mix(in oklch, var(--tc) 14%, var(--bg-1)); border: 1px solid color-mix(in oklch, var(--tc) 50%, var(--line)); border-radius: 12px; cursor: pointer; color: var(--fg-0); transition: all .18s ease; font-family: inherit; }
.rep-cta:hover { background: color-mix(in oklch, var(--tc) 22%, var(--bg-1)); border-color: var(--tc); transform: translateY(-1px); box-shadow: 0 14px 40px -16px color-mix(in oklch, var(--tc) 60%, transparent); }
.rep-cta-i { font-size: 22px; line-height: 1; opacity: 0.8; }
.rep-cta-l { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.rep-cta-t { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.rep-cta-s { font-size: 11px; color: var(--fg-2); letter-spacing: 0.02em; }
.rep-cta-arr { font-size: 18px; color: var(--tc); margin-left: 6px; }

/* Report shell */
.rep-view { position: relative; margin: 0 -22px; padding: 0; background: var(--bg-0); min-height: calc(100vh - 80px); display: flex; flex-direction: column; animation: rep-fade .25s ease; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
@keyframes rep-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.rep-progress { position: sticky; top: 0; z-index: 30; height: 2px; background: var(--bg-2); }
.rep-progress-bar { height: 100%; background: linear-gradient(90deg, var(--tc), color-mix(in oklch, var(--tc) 50%, var(--accent-2))); transition: width .1s linear; }
.rep-actions { display: flex; justify-content: space-between; align-items: center; padding: 12px 36px; border-bottom: 1px solid var(--line); background: color-mix(in oklch, var(--bg-0) 95%, var(--tc) 5%); }
.rep-back { background: transparent; border: 1px solid var(--line); color: var(--fg-1); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.rep-back:hover { background: var(--bg-2); color: var(--fg-0); border-color: var(--line-strong); }
.rep-actions-r { display: flex; gap: 8px; }

.rep-scroll { flex: 1; overflow-y: auto; }
.rep-inner { max-width: 1180px; margin: 0 auto; padding: 48px 56px 80px; display: flex; flex-direction: column; gap: 56px; }

.rep-empty { padding: 80px; text-align: center; color: var(--fg-2); display: flex; flex-direction: column; gap: 18px; align-items: center; }

/* Hero */
.rep-hero { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.rep-eyebrow { font-size: 11px; color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: inline-flex; align-items: center; gap: 8px; }
.rep-h1 { font-size: 48px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; color: var(--fg-0); margin: 0; text-wrap: pretty; }
.rep-sub { font-size: 17px; color: var(--fg-1); letter-spacing: -0.005em; max-width: 720px; line-height: 1.5; }
.rep-meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; flex-wrap: wrap; margin-top: 4px; }
.rep-meta .dot { color: var(--line-strong); }

/* TOC */
.rep-toc { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 22px 28px; }
.rep-toc-h { font-size: 11px; color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 14px; }
.rep-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rep-toc ul ul { margin-left: 20px; margin-top: 6px; gap: 4px; padding-left: 12px; border-left: 1px dashed var(--line); }
.rep-toc a { font-size: 13.5px; color: var(--fg-1); cursor: pointer; transition: color .12s; display: inline-block; }
.rep-toc a:hover { color: var(--tc); }
.rep-toc ul ul a { font-size: 12px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; }
.rep-toc ul ul a span { color: var(--fg-1); font-family: "Inter Tight", sans-serif; }

/* Section */
.rep-section { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.rep-h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg-0); margin: 0; display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rep-h2-n { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--tc); padding: 4px 8px; background: color-mix(in oklch, var(--tc) 14%, var(--bg-1)); border-radius: 6px; font-weight: 500; }
.rep-section-last { padding-bottom: 0; }

.rep-lede { font-size: 16.5px; line-height: 1.65; color: var(--fg-0); letter-spacing: -0.005em; max-width: 820px; text-wrap: pretty; margin: 0; }
.rep-errata-banner { padding: 10px 14px; background: color-mix(in oklch, var(--warn) 10%, var(--bg-1)); border: 1px solid color-mix(in oklch, var(--warn) 30%, var(--line)); border-radius: 8px; font-size: 13px; color: var(--fg-1); display: inline-flex; gap: 6px; align-items: center; }
.rep-errata-banner strong { color: var(--warn); font-weight: 500; }
.rep-errata-banner a { color: var(--tc); cursor: pointer; margin-left: 8px; }

/* Portfolio overview table */
.rep-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1); }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rep-table th { padding: 12px 14px; font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; border-bottom: 1px solid var(--line-strong); background: var(--bg-2); }
.rep-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-faint); color: var(--fg-1); }
.rep-row { cursor: pointer; transition: background .15s; }
.rep-row:hover td { background: var(--bg-2); }
.rep-row:last-child td { border-bottom: 0; }
.rep-num { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-3); font-size: 12px; }
.rep-link { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); font-weight: 500; margin-right: 12px; }
.rep-name { color: var(--fg-2); font-size: 12.5px; }
.rep-tier { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.08em; }
.rep-tier.tier-HIGH { background: color-mix(in oklch, var(--up) 18%, transparent); color: var(--up); }
.rep-tier.tier-MEDIUM { background: color-mix(in oklch, var(--accent-2) 18%, transparent); color: var(--accent-2); }
.rep-tier.tier-LOW { background: var(--bg-3); color: var(--fg-2); }
.rep-cell { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); }
.rep-cell.up { color: var(--up); } .rep-cell.down { color: var(--down); }

/* Conviction panel */
.rep-conv { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.rep-conv-c { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--fg-2); }
.rep-conv-c.tier-HIGH { border-top-color: var(--up); }
.rep-conv-c.tier-MEDIUM { border-top-color: var(--accent-2); }
.rep-conv-c.tier-LOW { border-top-color: var(--fg-3); }
.rep-conv-h { display: flex; justify-content: space-between; align-items: center; }
.conv-badge { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; padding: 3px 8px; border: 1px solid; border-radius: 4px; letter-spacing: 0.1em; font-weight: 500; }
.rep-conv-n { font-size: 11px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.rep-conv-list { display: flex; flex-direction: column; gap: 6px; }
.rep-conv-tk { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 6px; background: var(--bg-2); transition: all .12s; cursor: pointer; }
.rep-conv-tk:hover { background: var(--bg-3); transform: translateX(2px); }
.rep-conv-tkid { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--fg-0); font-weight: 500; min-width: 50px; }
.rep-conv-tkn { font-size: 12px; color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-conv-note { font-size: 12px; color: var(--fg-2); line-height: 1.45; padding-top: 8px; border-top: 1px dashed var(--line-faint); text-wrap: pretty; }

/* Stock deep dive */
.rep-stk-list { display: flex; flex-direction: column; gap: 36px; }
.rep-stk { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 24px; }
.rep-stk-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rep-stk-h-l { display: flex; gap: 16px; align-items: center; min-width: 0; }
.rep-stk-tk { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 22px; color: var(--fg-0); background: var(--bg-2); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); font-weight: 500; }
.rep-stk-tk-suf { color: var(--fg-3); font-size: 14px; }
.rep-stk-n { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; color: var(--fg-0); margin: 0; }
.rep-stk-pos { font-size: 12px; color: var(--fg-3); margin-top: 4px; letter-spacing: 0.02em; }
.rep-stk-h-r { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.rep-stk-px { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 18px; color: var(--fg-0); }
.rep-stk-chg { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; }
.rep-stk-chg.up { color: var(--up); } .rep-stk-chg.down { color: var(--down); }

.rep-stk-sec { display: flex; flex-direction: column; gap: 10px; }
.rep-stk-sech { font-size: 11px; color: var(--fg-3); letter-spacing: 0.16em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin: 0; padding-bottom: 6px; border-bottom: 1px dashed var(--line-faint); }
.rep-stk-thesis { font-size: 14.5px; line-height: 1.6; color: var(--fg-0); letter-spacing: -0.005em; margin: 0; text-wrap: pretty; }

/* Evidence list */
.rep-evidence { list-style: none; padding: 0; margin: 0; counter-reset: ev; display: flex; flex-direction: column; gap: 10px; }
.rep-evidence li { counter-increment: ev; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 14px; background: var(--bg-2); border-radius: 8px; border-left: 2px solid var(--tc); }
.rep-evidence li::before { content: "E" counter(ev, decimal-leading-zero); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.06em; }
.rep-evidence-c { font-size: 13.5px; line-height: 1.5; color: var(--fg-1); text-wrap: pretty; }
.cite-pills { display: inline-flex; gap: 4px; flex-shrink: 0; }
.cite-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; background: color-mix(in oklch, var(--tc) 18%, var(--bg-3)); color: var(--tc); border: 1px solid color-mix(in oklch, var(--tc) 40%, var(--line)); border-radius: 5px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 500; cursor: pointer; transition: all .12s; text-decoration: none; }
.cite-pill:hover { background: var(--tc); color: var(--bg-0); transform: translateY(-1px); }

/* Financial strip */
.rep-fin-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.rep-fin-strip > div { display: flex; flex-direction: column; gap: 3px; }
.rep-fin-strip span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.rep-fin-strip b { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--fg-0); font-weight: 500; font-variant-numeric: tabular-nums; }
.rep-fin-strip b.up { color: var(--up); } .rep-fin-strip b.down { color: var(--down); }
@media (max-width: 980px) { .rep-fin-strip { grid-template-columns: repeat(4, 1fr); row-gap: 12px; } }

/* Analyst */
.rep-analyst { display: flex; flex-direction: column; gap: 8px; }
.rep-analyst-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.rep-analyst-bar > div { transition: width .3s ease; }
.rep-analyst-nums { display: flex; gap: 18px; font-size: 12px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; flex-wrap: wrap; }
.rep-analyst-nums b { color: var(--fg-0); }
.rep-analyst-nums .up { color: var(--up); }
.rep-analyst-nums .down { color: var(--down); }
.rep-tgt { margin-left: auto; }

/* Filings */
.rep-filings { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-filing { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; color: var(--fg-1); text-decoration: none; font-size: 12.5px; transition: all .12s; }
.rep-filing:hover { background: var(--bg-3); border-color: var(--tc); color: var(--fg-0); transform: translateY(-1px); }
.rep-filing-i { color: var(--tc); font-size: 11px; }

/* Errata */
.rep-errata { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rep-errata th { padding: 10px 12px; font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; background: var(--bg-2); border-bottom: 1px solid var(--line-strong); text-align: left; }
.rep-errata td { padding: 10px 12px; border-bottom: 1px solid var(--line-faint); color: var(--fg-1); vertical-align: top; }
.rep-errata tr:last-child td { border-bottom: 0; }
.rep-errata-tk { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--fg-0); font-weight: 500; }
.rep-errata-old { color: var(--down); text-decoration: line-through; font-family: "JetBrains Mono", ui-monospace, monospace; }
.rep-errata-new { color: var(--up); font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; }
.rep-errata-src { font-size: 11.5px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; }
.rep-errata-none { padding: 24px; text-align: center; color: var(--fg-3); background: var(--bg-1); border-radius: 8px; border: 1px dashed var(--line); font-size: 13px; }

/* Methodology */
.rep-method-body { font-size: 14px; line-height: 1.6; color: var(--fg-1); max-width: 820px; margin: 0; text-wrap: pretty; }
.rep-disclaimer { padding: 12px 14px; background: var(--bg-1); border: 1px dashed var(--line); border-radius: 6px; font-size: 11.5px; color: var(--fg-3); font-style: italic; max-width: 820px; }

/* Sources */
.rep-src-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: src; }
.rep-src-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 14px; border-radius: 6px; transition: background .12s; scroll-margin-top: 80px; }
.rep-src-list li:target { background: color-mix(in oklch, var(--tc) 12%, var(--bg-1)); animation: src-flash 1.5s ease; }
@keyframes src-flash { 0%,30% { background: color-mix(in oklch, var(--tc) 25%, var(--bg-1)); } 100% { background: color-mix(in oklch, var(--tc) 12%, var(--bg-1)); } }
.rep-src-num { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--tc); font-size: 12px; font-weight: 500; }
.rep-src-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rep-src-meta { display: flex; gap: 8px; align-items: center; font-size: 10.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; flex-wrap: wrap; }
.rep-src-kind { padding: 1px 6px; border: 1px solid; border-radius: 3px; letter-spacing: 0.1em; font-size: 9.5px; font-weight: 500; }
.rep-src-pub { color: var(--fg-1); font-weight: 500; }
.rep-src-title a { font-size: 13.5px; color: var(--fg-0); text-decoration: none; line-height: 1.4; }
.rep-src-title a:hover { color: var(--tc); text-decoration: underline; }
.rep-src-arrow { color: var(--fg-3); font-size: 11px; }

.rep-foot { padding-top: 28px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; text-align: center; letter-spacing: 0.04em; }

@media (max-width: 900px) {
  .rep-inner { padding: 32px 24px 64px; gap: 40px; }
  .rep-h1 { font-size: 36px; }
  .rep-stk { padding: 20px; }
  .rep-stk-h { flex-direction: column; align-items: flex-start; }
  .rep-evidence li { grid-template-columns: 24px 1fr; }
  .rep-evidence li .cite-pills { grid-column: 2; }
}

/* Print */
@media print {
  body { background: white !important; color: black !important; }
  .topbar, .sidebar, .rep-actions, .rep-toc, .foot, .tweaks-panel { display: none !important; }
  .rep-view { margin: 0; }
  .rep-scroll { overflow: visible; }
  .rep-inner { max-width: none; padding: 0; }
  .rep-stk, .rep-section { page-break-inside: avoid; }
}


/* ——————————————————————————————————————————————————————————————
   Reports library view
   —————————————————————————————————————————————————————————————— */
.reports-view { display: flex; flex-direction: column; gap: 18px; }
.reports-hero { position: relative; background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 14%, var(--bg-1)) 0%, var(--bg-1) 60%); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; overflow: hidden; }
.reports-hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklch, var(--accent) 26%, transparent), transparent 60%); filter: blur(20px); pointer-events: none; }
.reports-hero-l { position: relative; z-index: 2; min-width: 0; }
.reports-hero-r { position: relative; z-index: 2; display: flex; gap: 10px; align-items: center; }
.reports-search { background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-0); padding: 9px 14px; font-family: inherit; font-size: 12.5px; border-radius: 8px; min-width: 280px; outline: none; transition: border-color .15s ease, background .15s ease; }
.reports-search:focus { border-color: var(--accent); background: var(--bg-1); }
.reports-search::placeholder { color: var(--fg-3); }

.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }

.report-card { position: relative; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 0; cursor: pointer; transition: all .2s ease; overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: translateY(8px); animation: rc-in .5s ease forwards; text-align: left; font-family: inherit; color: var(--fg-1); }
@keyframes rc-in { to { opacity: 1; transform: translateY(0); } }
.report-card:hover { border-color: color-mix(in oklch, var(--tc) 50%, var(--line-strong)); transform: translateY(-2px); box-shadow: 0 12px 32px -16px color-mix(in oklch, var(--tc) 40%, transparent), 0 0 0 1px color-mix(in oklch, var(--tc) 20%, transparent); }
.report-card-band { height: 3px; background: linear-gradient(90deg, var(--tc), color-mix(in oklch, var(--tc) 30%, transparent)); }
.report-card-h { padding: 16px 18px 10px; }
.report-card-eyebrow { font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.report-card-eyebrow .tc-dot { background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.report-card-date { color: var(--fg-3); letter-spacing: 0.06em; }
.report-card-t { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; color: var(--fg-0); margin: 0 0 6px; line-height: 1.25; text-wrap: pretty; }
.report-card-s { font-size: 12px; color: var(--fg-2); margin: 0; line-height: 1.4; font-style: italic; }
.report-card-summary { padding: 0 18px 14px; font-size: 12.5px; color: var(--fg-2); line-height: 1.55; margin: 0; flex: 1; text-wrap: pretty; }
.report-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-faint); }
.report-card-stats > div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-faint); }
.report-card-stats > div:last-child { border-right: 0; }
.report-card-stats > div span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.report-card-stats > div b { font-size: 14px; font-weight: 500; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.report-card-stats > div b.up { color: var(--up); }
.report-card-stats > div b.down { color: var(--down); }
.report-card-foot { padding: 11px 18px; border-top: 1px solid var(--line-faint); display: flex; justify-content: flex-end; }
.report-card-cta { font-size: 11.5px; color: var(--fg-2); letter-spacing: 0.02em; transition: color .15s ease; }
.report-card:hover .report-card-cta { color: var(--tc); }

.reports-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--fg-3); font-size: 13px; }


/* ——————————————————————————————————————————————————————————————
   View switcher dropdown (theme picker)
   —————————————————————————————————————————————————————————————— */
.view-switcher { display: inline-flex; gap: 8px; align-items: center; }

.theme-dd { position: relative; }
.theme-dd-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-1); border: 1px solid var(--line); color: var(--fg-0); font-family: inherit; font-size: 12.5px; padding: 6px 10px 6px 11px; border-radius: 7px; cursor: pointer; transition: all .15s ease; }
.theme-dd-btn:hover { border-color: color-mix(in oklch, var(--tc) 50%, var(--line-strong)); background: var(--bg-2); }
.theme-dd-btn .tc-dot { background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.theme-dd-cur { color: var(--fg-0); font-weight: 500; letter-spacing: -0.005em; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-dd-count { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--fg-3); background: var(--bg-2); border: 1px solid var(--line-faint); padding: 1px 6px; border-radius: 8px; }

.theme-dd-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 280px; max-width: 340px; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 16px 40px -12px rgba(0,0,0,0.35), 0 0 0 1px var(--line); padding: 6px; z-index: 200; display: flex; flex-direction: column; gap: 4px; animation: dd-in .14s ease; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.theme-dd-search { background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-0); font-family: inherit; font-size: 12px; padding: 7px 10px; border-radius: 6px; outline: none; margin-bottom: 2px; }
.theme-dd-search:focus { border-color: var(--accent); }
.theme-dd-search::placeholder { color: var(--fg-3); }

.theme-dd-list { display: flex; flex-direction: column; gap: 1px; max-height: 320px; overflow-y: auto; padding: 2px 0; }

.theme-dd-item { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--fg-1); font-family: inherit; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: background .12s ease; }
.theme-dd-item:hover { background: var(--bg-2); }
.theme-dd-item.on { background: color-mix(in oklch, var(--tc) 12%, transparent); }
.theme-dd-item .tc-dot { background: var(--tc); box-shadow: 0 0 8px var(--tc); flex-shrink: 0; }
.theme-dd-i-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.theme-dd-i-n { font-size: 12.5px; color: var(--fg-0); font-weight: 500; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-dd-i-s { font-size: 10.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-dd-i-rep { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.1em; color: var(--accent); background: color-mix(in oklch, var(--accent) 14%, transparent); border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--line)); padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.theme-dd-empty { padding: 16px 12px; text-align: center; font-size: 11.5px; color: var(--fg-3); }

/* ——————————————————————————————————————————————————————————————
   Reports list — vertical rows (replaces grid)
   —————————————————————————————————————————————————————————————— */
.reports-list { display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.reports-list-h { display: grid; grid-template-columns: 56px minmax(0, 2fr) minmax(0, 1.4fr) 70px 70px 70px 80px 90px; gap: 16px; padding: 10px 18px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.reports-list-h > div { text-align: right; }
.reports-list-h > div:nth-child(1), .reports-list-h > div:nth-child(2), .reports-list-h > div:nth-child(3) { text-align: left; }

.report-row { display: grid; grid-template-columns: 56px minmax(0, 2fr) minmax(0, 1.4fr) 70px 70px 70px 80px 90px; gap: 16px; padding: 16px 18px; align-items: center; border-bottom: 1px solid var(--line-faint); cursor: pointer; transition: background .14s ease, border-color .14s ease; position: relative; background: transparent; border-left: 0; border-right: 0; border-top: 0; color: var(--fg-1); font-family: inherit; text-align: left; opacity: 0; transform: translateY(4px); animation: rr-in .35s ease forwards; }
@keyframes rr-in { to { opacity: 1; transform: translateY(0); } }
.report-row:last-child { border-bottom: 0; }
.report-row:hover { background: color-mix(in oklch, var(--tc) 6%, var(--bg-2)); }
.report-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--tc); border-radius: 0 2px 2px 0; opacity: 0; transition: opacity .15s ease; }
.report-row:hover::before { opacity: 1; }

.report-row-date { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-2); letter-spacing: 0.04em; }
.report-row-date small { display: block; font-size: 9px; color: var(--fg-3); margin-top: 2px; letter-spacing: 0.1em; text-transform: uppercase; }
.report-row-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.report-row-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--fg-3); text-transform: uppercase; }
.report-row-eyebrow .tc-dot { background: var(--tc); box-shadow: 0 0 8px var(--tc); width: 6px; height: 6px; }
.report-row-t { font-size: 14.5px; font-weight: 500; letter-spacing: -0.012em; color: var(--fg-0); margin: 0; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.report-row-s { font-size: 11.5px; color: var(--fg-3); font-style: italic; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.report-row-summary { font-size: 12px; color: var(--fg-2); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: pretty; }
.report-row-stat { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--fg-0); font-variant-numeric: tabular-nums; letter-spacing: -0.005em; }
.report-row-stat small { display: block; font-size: 9px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; font-weight: 400; }
.report-row-stat.up { color: var(--up); }
.report-row-stat.down { color: var(--down); }
.report-row-cta { text-align: right; font-size: 11px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.05em; transition: color .15s ease, transform .15s ease; }
.report-row:hover .report-row-cta { color: var(--tc); transform: translateX(2px); }

@media (max-width: 1100px) {
  .reports-list-h { display: none; }
  .report-row { grid-template-columns: 1fr; gap: 6px; }
  .report-row-stat, .report-row-cta, .report-row-date { text-align: left; }
}


/* ——————————————————————————————————————————————————————————————
   Themes landing — summary grid
   —————————————————————————————————————————————————————————————— */
.themes-view { display: flex; flex-direction: column; gap: 18px; }
.themes-hero { position: relative; background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 14%, var(--bg-1)) 0%, var(--bg-1) 60%); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; overflow: hidden; }
.themes-hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklch, var(--accent) 26%, transparent), transparent 60%); filter: blur(20px); pointer-events: none; }
.themes-hero-l { position: relative; z-index: 2; min-width: 0; }
.themes-hero-r { position: relative; z-index: 2; display: flex; gap: 10px; align-items: center; }

.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.theme-tile { position: relative; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 0; cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: translateY(8px); animation: tt-in .45s ease forwards; text-align: left; font-family: inherit; color: var(--fg-1); }
@keyframes tt-in { to { opacity: 1; transform: translateY(0); } }
.theme-tile:hover { border-color: color-mix(in oklch, var(--tc) 50%, var(--line-strong)); transform: translateY(-2px); box-shadow: 0 12px 32px -16px color-mix(in oklch, var(--tc) 40%, transparent), 0 0 0 1px color-mix(in oklch, var(--tc) 20%, transparent); }
.theme-tile-band { height: 3px; background: linear-gradient(90deg, var(--tc), color-mix(in oklch, var(--tc) 25%, transparent)); }

.theme-tile-h { padding: 14px 18px 6px; display: flex; flex-direction: column; gap: 4px; min-height: 54px; }
.theme-tile-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg-0); line-height: 1.25; }
.theme-tile-eyebrow > span:last-child { flex: 1; min-width: 0; }
.theme-tile-eyebrow .tc-dot { background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.theme-tile-sub { font-size: 11px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.04em; line-height: 1.3; }

.theme-tile-chart { padding: 10px 18px 12px; display: flex; align-items: center; justify-content: stretch; height: 62px; }
.theme-tile-chart > * { width: 100%; }
.theme-tile-chart svg { width: 100% !important; height: 50px !important; }

.theme-tile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-faint); }
.theme-tile-stats > div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-faint); }
.theme-tile-stats > div:last-child { border-right: 0; }
.theme-tile-stats span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.theme-tile-stats b { font-size: 13.5px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -0.005em; }
.theme-tile-stats b.up { color: var(--up); }
.theme-tile-stats b.down { color: var(--down); }
.theme-tile-stats b .sl { color: var(--fg-3); margin: 0 3px; font-weight: 400; }

.theme-tile-foot { padding: 10px 16px 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-faint); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; }
.theme-tile-flags { display: flex; gap: 8px; align-items: center; color: var(--fg-3); letter-spacing: 0.05em; }
.tile-flag { display: inline-flex; align-items: center; gap: 4px; }
.tile-flag.rep { background: color-mix(in oklch, var(--tc) 16%, var(--bg-2)); color: var(--tc); padding: 2px 7px; border-radius: 4px; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.12em; border: 1px solid color-mix(in oklch, var(--tc) 30%, transparent); }
.theme-tile-cta { color: var(--fg-3); letter-spacing: 0.05em; transition: color .15s ease, transform .15s ease; }
.theme-tile:hover .theme-tile-cta { color: var(--tc); transform: translateX(2px); }

/* Theme dropdown: hide DD badge, show tiny rep dot */
.theme-dd-i-rep-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 6px var(--tc); flex-shrink: 0; margin-left: 4px; }


/* ——————————— Firehose · News view ——————————— */
.nv-view { display: flex; flex-direction: column; min-height: 0; }

.nv-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px 12px; border-bottom: 1px solid var(--line-faint); }
.nv-header-l { display: flex; align-items: center; gap: 14px; }
.nv-title { display: flex; align-items: baseline; gap: 12px; }
.nv-title-t { font-size: 22px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; }
.nv-title-s { font-size: 11px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.05em; }
.nv-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid color-mix(in oklch, var(--down) 40%, transparent); background: color-mix(in oklch, var(--down) 12%, var(--bg-1)); color: var(--down); font-size: 9.5px; letter-spacing: 0.14em; font-family: "JetBrains Mono", ui-monospace, monospace; border-radius: 3px; text-transform: uppercase; font-weight: 600; }
.nv-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--down); box-shadow: 0 0 6px var(--down); animation: nv-pulse 1.4s ease-in-out infinite; }
@keyframes nv-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.nv-header-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.seg.small { display: inline-flex; background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 2px; gap: 1px; }
.seg.small button { background: transparent; border: 0; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 4px; cursor: pointer; transition: all .15s; }
.seg.small button:hover { color: var(--fg-1); }
.seg.small button.on { background: var(--bg-0); color: var(--fg-0); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.nv-src-sel { background: var(--bg-1); border: 1px solid var(--line); color: var(--fg-1); font-size: 11px; font-family: "JetBrains Mono", ui-monospace, monospace; padding: 5px 8px; border-radius: 6px; outline: 0; cursor: pointer; }
.nv-src-sel:hover { border-color: var(--line-strong); }

.nv-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 28px 14px; border-bottom: 1px solid var(--line-faint); align-items: center; }
.nv-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); font-size: 11px; cursor: pointer; transition: all .15s; }
.nv-pill:hover { color: var(--fg-0); border-color: var(--line-strong); }
.nv-pill.on { color: var(--fg-0); }
.nv-pill-n { font-size: 9.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; margin-left: 2px; }
.nv-pill-clear { background: transparent; border: 0; color: var(--fg-3); font-size: 11px; cursor: pointer; padding: 4px 8px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.nv-pill-clear:hover { color: var(--fg-1); }

.nv-grid { display: grid; grid-template-columns: 1fr 320px; gap: 0; flex: 1; min-height: 0; }
.nv-feed { padding: 12px 28px 40px; min-width: 0; }
.nv-rail { border-left: 1px solid var(--line-faint); padding: 18px 20px; display: flex; flex-direction: column; gap: 28px; background: linear-gradient(180deg, var(--bg-0), color-mix(in oklch, var(--bg-1) 50%, var(--bg-0))); }

.nv-empty { padding: 60px 20px; text-align: center; color: var(--fg-3); font-size: 13px; }

/* Day grouping */
.nv-day { margin-bottom: 14px; }
.nv-day-h { display: flex; align-items: center; gap: 10px; padding: 14px 0 8px; position: sticky; top: 0; background: linear-gradient(180deg, var(--bg-0) 60%, transparent); z-index: 2; }
.nv-day-l { font-size: 10.5px; letter-spacing: 0.18em; color: var(--accent); font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }
.nv-day-d { font-size: 10.5px; letter-spacing: 0.08em; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.nv-day-n { font-size: 10px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.nv-day-line { flex: 1; height: 1px; background: var(--line-faint); }

.nv-day-list { display: flex; flex-direction: column; }

/* Individual row */
.nv-row { border-bottom: 1px solid var(--line-faint); transition: background .15s; }
.nv-row:hover { background: color-mix(in oklch, var(--bg-1) 50%, transparent); }
.nv-row.ex { background: var(--bg-1); border-bottom-color: var(--line); }

.nv-row-main { display: grid; grid-template-columns: 60px 110px 12px 1fr 100px; align-items: center; gap: 14px; padding: 10px 4px; width: 100%; background: transparent; border: 0; color: inherit; text-align: left; cursor: pointer; font-family: inherit; }

.nv-row-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-3); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.nv-row-src { display: inline-block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 6px; border: 1px solid; border-radius: 3px; text-align: center; font-weight: 600; }
.nv-row-imp { width: 7px; height: 7px; border-radius: 50%; display: inline-block; justify-self: center; box-shadow: 0 0 6px currentColor; }
.nv-row-h { font-size: 13.5px; color: var(--fg-0); line-height: 1.4; font-weight: 450; letter-spacing: -0.005em; }
.nv-row:hover .nv-row-h { color: var(--fg-0); }

.nv-row-s { display: inline-block; position: relative; height: 4px; width: 90px; background: var(--bg-2); border-radius: 2px; overflow: hidden; }
.nv-row-s-bar { display: block; position: absolute; top: 0; height: 100%; background: var(--fg-3); border-radius: 2px; }
.nv-row-s.pos .nv-row-s-bar { background: oklch(74% 0.16 155); }
.nv-row-s.posw .nv-row-s-bar { background: oklch(74% 0.1 155); }
.nv-row-s.neg .nv-row-s-bar { background: oklch(68% 0.18 25); }
.nv-row-s.negw .nv-row-s-bar { background: oklch(68% 0.12 25); }
.nv-row-s.neu .nv-row-s-bar { background: var(--fg-3); }

.nv-row-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 10px 188px; }
.nv-tchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 7px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; transition: all .15s; font-family: inherit; max-width: 240px; }
.nv-tchip:hover { border-color: var(--line-strong); background: var(--bg-3); }
.nv-tchip-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--fg-0); letter-spacing: 0.02em; }
.nv-tchip-n { font-size: 11px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; letter-spacing: -0.005em; }
.nv-tchip-c { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; font-variant-numeric: tabular-nums; }
.nv-tchip-c.up { color: var(--up); }
.nv-tchip-c.down { color: var(--down); }

.nv-thchip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; background: transparent; border: 1px solid; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 10.5px; letter-spacing: -0.005em; transition: all .15s; }
.nv-thchip:hover { background: color-mix(in oklch, currentColor 10%, transparent); }

/* Expanded detail */
.nv-row-ex { padding: 4px 4px 16px 188px; display: flex; flex-direction: column; gap: 12px; animation: nv-ex-in .2s ease; }
@keyframes nv-ex-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.nv-row-ex-sum { font-size: 12.5px; color: var(--fg-1); line-height: 1.55; max-width: 68ch; text-wrap: pretty; }
.nv-row-ex-l { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 6px; }
.nv-row-ex-ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.nv-row-ex-tick { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; background: var(--bg-2); border: 1px solid var(--line-faint); border-radius: 5px; cursor: pointer; font-family: inherit; color: inherit; text-align: left; transition: all .15s; }
.nv-row-ex-tick:hover { border-color: var(--line-strong); background: var(--bg-3); }
.nv-row-ex-tick-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--fg-0); }
.nv-row-ex-tick-n { font-size: 10.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.nv-row-ex-tick-c { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.nv-row-ex-tick-c.up { color: var(--up); }
.nv-row-ex-tick-c.down { color: var(--down); }

/* Right rail */
.nv-movers-h, .nv-sources-h { font-size: 10.5px; letter-spacing: 0.14em; color: var(--fg-3); text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; margin-bottom: 10px; font-weight: 600; }
.nv-movers-list { display: flex; flex-direction: column; gap: 1px; }
.nv-mover { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-family: inherit; color: inherit; text-align: left; transition: all .15s; }
.nv-mover:hover { background: var(--bg-1); border-color: var(--line-faint); }
.nv-mover-t { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--fg-0); }
.nv-mover-n { font-size: 10.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.nv-mover-r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.nv-mover-c { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.nv-mover-c.up { color: var(--up); }
.nv-mover-c.down { color: var(--down); }
.nv-mover-m { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; color: var(--fg-3); letter-spacing: 0.04em; }

.nv-sources-list { display: flex; flex-direction: column; gap: 10px; }
.nv-source { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line-faint); }
.nv-source:last-child { border-bottom: 0; }
.nv-source-t { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.nv-source-n { font-size: 9.5px; color: var(--fg-3); font-family: "JetBrains Mono", ui-monospace, monospace; }
.src-heartbeat { display: block; }
.nv-source-avg { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.nv-source-avg.pos { color: var(--up); }
.nv-source-avg.neg { color: var(--down); }

/* Segmented live dot for the News tab indicator */
.seg-live-dot { width: 6px; height: 6px; border-radius: 50%; background: oklch(68% 0.18 25); box-shadow: 0 0 6px oklch(68% 0.18 25); margin-left: 2px; animation: nv-pulse 1.4s ease-in-out infinite; }

@media (max-width: 1100px){
  .nv-grid { grid-template-columns: 1fr; }
  .nv-rail { border-left: 0; border-top: 1px solid var(--line-faint); }
  .nv-row-main { grid-template-columns: 50px 90px 10px 1fr 70px; gap: 10px; }
  .nv-row-tags, .nv-row-ex { padding-left: 4px; }
}


/* ——————————— Stock Brief Panel (below chart-stats) ——————————— */
.brief { margin-top: 14px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, var(--bg-1), color-mix(in oklch, var(--bg-1) 70%, var(--bg-0))); display: flex; flex-direction: column; gap: 12px; }

.brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brief-h-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brief-lbl { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }
.brief-pos { font-size: 11.5px; color: var(--fg-2); letter-spacing: -0.005em; }

.brief-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.brief-themes-inline { margin-top: 0; }
.brief-theme { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid; border-radius: 999px; font-size: 10.5px; letter-spacing: -0.005em; background: color-mix(in oklch, currentColor 6%, transparent); }

.brief-thesis { margin: 0; font-size: 13px; color: var(--fg-1); line-height: 1.55; letter-spacing: -0.005em; text-wrap: pretty; }

.brief-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-faint); border: 1px solid var(--line-faint); border-radius: 6px; overflow: hidden; }
.brief-m { background: color-mix(in oklch, var(--bg-1) 60%, var(--bg-0)); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.brief-m span { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; }
.brief-m b { font-size: 13px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -0.005em; }
.brief-m b.up { color: var(--up); }
.brief-m b.down { color: var(--down); }
.brief-sep { color: var(--fg-3); margin: 0 2px; font-weight: 400; }

.brief-analysts { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 2px 2px 0; }
.brief-a-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brief-a-lbl { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }
.brief-a-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line-faint); color: transparent; font-size: 0; }
.brief-a-bar span { display: block; min-width: 0; transition: flex .25s ease; }
.brief-a-buy  { background: oklch(72% 0.16 155); }
.brief-a-hold { background: oklch(72% 0.06 80); }
.brief-a-sell { background: oklch(68% 0.18 25); }
.brief-a-legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--fg-2); font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em; }
.brief-a-legend span { display: inline-flex; align-items: center; gap: 5px; }
.brief-a-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.brief-a-legend i.buy  { background: oklch(72% 0.16 155); }
.brief-a-legend i.hold { background: oklch(72% 0.06 80); }
.brief-a-legend i.sell { background: oklch(68% 0.18 25); }

.brief-a-tgt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 10px; border-left: 1px solid var(--line-faint); min-width: 120px; }
.brief-a-tgt-lbl { font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }
.brief-a-tgt-v { font-size: 15px; color: var(--fg-0); font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -0.01em; }
.brief-a-tgt-u { font-size: 11px; font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.brief-a-tgt-u.up { color: var(--up); }
.brief-a-tgt-u.down { color: var(--down); }

@media (max-width: 1180px){
  .brief-metrics { grid-template-columns: repeat(2, 1fr); }
  .brief-analysts { grid-template-columns: 1fr; }
  .brief-a-tgt { border-left: 0; border-top: 1px solid var(--line-faint); align-items: flex-start; padding: 10px 0 0; min-width: 0; }
}

/* Hide dashes when a value-chain stage has no peers */
.vcs-empty { height: 0; }

/* ——— Markdown report renderer ——— */
.rep-md-content { display: flex; flex-direction: column; gap: 6px; }
.rep-md-h2 { font-size: 20px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; margin: 24px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rep-md-h3 { font-size: 16px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.01em; margin: 16px 0 4px; }
.rep-md-h4 { font-size: 14px; font-weight: 600; color: var(--fg-1); margin: 12px 0 4px; }
.rep-md-p { font-size: 14px; line-height: 1.65; color: var(--fg-1); margin: 0; text-wrap: pretty; }
.rep-md-meta { font-size: 13px; color: var(--fg-2); line-height: 1.5; }
.rep-md-meta strong { color: var(--fg-1); }
.rep-md-li { font-size: 14px; line-height: 1.6; color: var(--fg-1); padding-left: 16px; }
.rep-md-li.bullet { padding-left: 20px; position: relative; }
.rep-md-li.bullet::before { content: "•"; position: absolute; left: 8px; color: var(--fg-3); }
.rep-md-hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.rep-md-table-wrap { overflow-x: auto; margin: 8px 0; }
.rep-md-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rep-md-table th { text-align: left; padding: 8px 10px; background: var(--bg-2); border-bottom: 2px solid var(--line-strong); font-weight: 600; color: var(--fg-1); white-space: nowrap; }
.rep-md-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--fg-1); vertical-align: top; }
.rep-md-table tr:hover td { background: var(--bg-1); }
.rep-md-table a { color: var(--accent); text-decoration: none; }
.rep-md-table a:hover { text-decoration: underline; }
.rep-md-content code { font-family: var(--mono); font-size: 12px; padding: 1px 4px; background: var(--bg-2); border-radius: 3px; }
.rep-md-content a { color: var(--accent); text-decoration: none; }
.rep-md-content a:hover { text-decoration: underline; }

/* ——————————— MOBILE (< 768px) ——————————— */
@media (max-width: 768px) {
  /* App: stack vertically on mobile */
  .app { flex-direction: column; }

  /* Hide sidebar, show hamburger */
  .side { display: none; position: fixed; top: 0; left: 0; }
  .side.mobile-open { display: flex; width: 100vw; height: 100vh; z-index: 200; }
  .main { margin-left: 0; padding: 12px 14px 24px; }

  /* Topbar: show view switcher prominently */
  .topbar { flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
  .topbar-r { display: none; }
  .breadcrumbs { font-size: 11px; display: none; }
  .topbar-c { width: 100%; order: -1; }
  .view-switcher { width: 100%; }
  .view-switcher .seg { width: 100%; display: flex; }
  .view-switcher .seg button { flex: 1; justify-content: center; font-size: 12px; padding: 8px 4px; }
  .view-switcher .seg button svg { display: none; }

  /* Hero grid: single column */
  .hero-grid { grid-template-columns: 1fr !important; }
  .bottom-grid { grid-template-columns: 1fr !important; }

  /* Chart card */
  .chart-stats { grid-template-columns: repeat(4, 1fr) !important; }
  .card-h { flex-direction: column; gap: 8px; }

  /* Graph card: compact for mobile, disable drag (causes scroll issues) */
  .graph-card { min-height: 260px; max-height: 350px; overflow: hidden; }
  .rel-graph { min-height: 260px; touch-action: pan-y; }
  .rg-node { pointer-events: auto; }

  /* Value chain strip: scroll horizontally */
  .vcs { overflow-x: auto; flex-wrap: nowrap; min-width: 0; }
  .vcs-col { min-width: 140px; flex-shrink: 0; }

  /* Theme belt: scroll */
  .theme-belt { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .theme-chip { flex-shrink: 0; }

  /* Comparison table: horizontal scroll */
  .cmp-scroll { margin: 0 -14px; padding: 0 14px; }

  /* Theme hero */
  .theme-hero { padding: 20px 16px !important; }
  .theme-hero-n { font-size: 22px !important; }
  .theme-hero-sub { font-size: 12px; }

  /* Thesis grid: single column */
  .thesis-grid { grid-template-columns: 1fr !important; }
  .thesis-main { grid-column: auto; }

  /* KPI row */
  .kpi-row { grid-template-columns: repeat(2, 1fr) !important; }

  /* Dossier grid */
  .dos-grid { grid-template-columns: 1fr !important; }

  /* Drawer: full screen on mobile */
  .drawer { width: 100% !important; max-width: 100vw !important; }

  /* Reports: single column */
  .reports-list-h { display: none; }
  .report-row { grid-template-columns: 1fr !important; gap: 4px; padding: 12px 14px; }

  /* Themes hero + grid */
  .themes-grid { grid-template-columns: 1fr !important; }
  .themes-hero, .reports-hero {
    grid-template-columns: 1fr !important;
    gap: 12px; padding: 16px; border-radius: 10px;
  }
  .themes-hero-r, .reports-hero-r {
    flex-direction: column; gap: 8px; width: 100%;
  }
  .themes-hero-r .reports-search,
  .reports-hero-r .reports-search { width: 100%; box-sizing: border-box; }
  .themes-hero-r .seg,
  .reports-hero-r .seg { width: 100%; display: flex; }
  .themes-hero-r .seg button,
  .reports-hero-r .seg button { flex: 1; justify-content: center; font-size: 11px; }
  .theme-hero-n { font-size: 20px !important; line-height: 1.25; word-break: break-word; }
  .theme-hero-sub { font-size: 11px; flex-wrap: wrap; }
  .theme-hero-label { font-size: 10px; }

  /* News view — full mobile layout */
  .nv-header { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .nv-header-l { width: 100%; }
  .nv-title { flex-wrap: wrap; gap: 6px 12px; }
  .nv-title-t { font-size: 18px; }
  .nv-header-r {
    width: 100%; justify-content: flex-start; gap: 6px;
    display: grid; grid-template-columns: 1fr 1fr;
  }
  .nv-header-r .seg { width: 100%; display: flex; }
  .nv-header-r .seg button { flex: 1; font-size: 10px; padding: 5px 4px; justify-content: center; }
  .nv-src-sel { width: 100%; grid-column: 1 / -1; font-size: 12px; padding: 8px; }

  /* Theme pills — horizontal scroll */
  .nv-pills { flex-wrap: nowrap; overflow-x: auto; padding: 8px 14px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .nv-pill { flex-shrink: 0; font-size: 10px; padding: 3px 8px 3px 6px; }
  .nv-pill-n { font-size: 9px; }

  /* News grid + rail */
  .nv-grid { grid-template-columns: 1fr !important; }
  .nv-row-main { grid-template-columns: 40px 1fr !important; gap: 6px; }
  .nv-row-s, .nv-row-imp, .nv-row-src { display: none; }
  .nv-rail { border-left: 0; border-top: 1px solid var(--line-faint); padding: 14px; }
  .nv-row-ex { padding-left: 46px !important; }
  .nv-row-tags { padding-left: 46px; }

  /* Footer */
  .foot { flex-direction: column; gap: 4px; text-align: center; font-size: 10px; }

  /* Brief panel */
  .brief-metrics { grid-template-columns: repeat(2, 1fr) !important; }

  /* Cross-theme */
  .xtheme-grid { grid-template-columns: 1fr !important; }

  /* Ticker header: stack vertically */
  .tk-head { grid-template-columns: 1fr !important; gap: 8px; padding: 14px 16px; }
  .tk-price-v { font-size: 22px; text-align: left; }
  .tk-price-c { font-size: 12px; }
  .tk-info { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .tk-cat { font-size: 10px; }

  /* Single report */
  .rep-inner { padding: 20px 16px 48px !important; }
  .rep-md-table-wrap { margin: 0 -16px; padding: 0 16px; overflow-x: auto; }
}

/* Mobile header bar — hidden on desktop */
.mobile-toggle { display: none; }
.mobile-bar { display: none; }

@media (max-width: 768px) {
  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-0);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 150;
  }
  .mobile-bar-brand {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 14px; color: var(--fg-0); letter-spacing: -0.02em;
  }
  .mobile-bar-brand .brand-dot { color: var(--accent); }
  .mobile-bar-r { display: flex; align-items: center; gap: 8px; }
  .mobile-bar-live {
    font-family: var(--mono); font-size: 10px; color: var(--fg-3);
    display: flex; align-items: center; gap: 4px;
  }
  .mobile-bar-live span {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--up); box-shadow: 0 0 4px var(--up);
  }
  .mobile-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px;
    cursor: pointer; color: var(--fg-1); font-size: 16px;
  }
}

/* ——————————— Trend Radar ——————————— */
.trend-radar { padding: 0 0 40px; }

.trend-stats-bar {
  display: flex; gap: 24px; padding: 16px 20px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.trend-stat-value {
  font: 600 20px/1.2 "Inter Tight", sans-serif; color: var(--fg-0);
}
.trend-stat-label {
  font: 400 11px/1.3 "JetBrains Mono", monospace; color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px;
}

.trend-status-filter, .trend-filters {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.trend-filter {
  padding: 5px 12px; border-radius: 6px; font: 500 12px/1.3 "Inter Tight", sans-serif;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-2);
  cursor: pointer; transition: all 0.15s;
}
.trend-filter:hover { border-color: var(--fg-2); color: var(--fg-1); }
.trend-filter.on {
  background: var(--accent); color: var(--bg-0); border-color: var(--accent);
}

.trend-section { margin-top: 20px; }
.trend-section-header {
  font: 600 13px/1.3 "Inter Tight", sans-serif; color: var(--fg-1);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.trend-actionable-badge {
  font: 500 11px/1 "JetBrains Mono", monospace;
  background: oklch(28% 0.06 145); color: oklch(76% 0.16 145);
  padding: 3px 8px; border-radius: 4px;
}

.trend-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 8px; overflow: hidden;
}
.trend-card.methodology-card {
  border-left: 3px solid oklch(76% 0.12 200);
  margin-bottom: 16px;
}
.trend-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 16px; gap: 12px;
}
.trend-card-left {
  display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0;
}
.trend-icon { font-size: 18px; flex-shrink: 0; line-height: 1.2; }
.trend-type {
  font: 600 11px/1.3 "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px;
}
.trend-headline {
  font: 400 13px/1.5 "Inter Tight", sans-serif; color: var(--fg-1);
  overflow: hidden; text-overflow: ellipsis;
}
.trend-card-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.trend-status {
  font: 500 10px/1 "JetBrains Mono", monospace;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.04em; white-space: nowrap;
}
.trend-expand {
  font-size: 12px; color: var(--fg-2); width: 16px; text-align: center;
}

.trend-card-body {
  padding: 0 16px 14px 44px;
}
.trend-meta-row {
  display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px;
  font: 400 12px/1.5 "Inter Tight", sans-serif; color: var(--fg-1);
}
.trend-meta-label {
  font: 500 11px/1.3 "JetBrains Mono", monospace; color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.04em; min-width: 100px;
  flex-shrink: 0;
}
.trend-tickers { display: flex; gap: 4px; flex-wrap: wrap; }
.trend-ticker-btn {
  font: 500 11px/1 "JetBrains Mono", monospace;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 6px; color: var(--accent); cursor: pointer;
}
.trend-ticker-btn:hover { border-color: var(--accent); }

.trend-confirms { margin-top: 8px; }
.trend-confirm-item {
  font: 400 12px/1.5 "Inter Tight", sans-serif; color: var(--fg-2);
  padding: 2px 0; display: flex; gap: 8px;
}
.trend-confirm-date {
  font: 400 11px/1.5 "JetBrains Mono", monospace; color: var(--fg-3);
  flex-shrink: 0; min-width: 80px;
}

/* Methodology card */
.methodology-steps {
  font: 400 12px/1.7 "Inter Tight", sans-serif; color: var(--fg-1);
}
.methodology-step {
  padding: 2px 0; border-left: 2px solid oklch(76% 0.12 200 / 0.3);
  padding-left: 10px; margin-bottom: 2px;
}
.anti-pattern-item {
  font: 400 12px/1.6 "Inter Tight", sans-serif; color: var(--fg-1);
  padding: 3px 0;
}
.cycle-signal {
  font: 400 11px/1.6 "Inter Tight", sans-serif; color: var(--fg-1);
  padding: 1px 0;
}
.cycle-signal.buy::before { content: "● "; color: oklch(76% 0.16 145); }
.cycle-signal.sell::before { content: "● "; color: oklch(68% 0.18 25); }

.trend-empty {
  text-align: center; padding: 60px 20px; color: var(--fg-2);
  font: 400 14px/1.6 "Inter Tight", sans-serif;
}
.trend-empty-icon { font-size: 40px; margin-bottom: 12px; }
.trend-empty-sub { font-size: 12px; color: var(--fg-3); margin-top: 6px; max-width: 400px; margin-inline: auto; }
