/* ============================================================
   Daily Pick — 정통 금융 리포트 디자인 시스템
   ============================================================ */

:root {
  /* Surface */
  --bg-page: #f7f5f0;
  --bg-paper: #ffffff;
  --bg-panel: #fbfaf6;
  --bg-sidebar: #1a1d23;
  --bg-sidebar-hover: #232730;
  --bg-dark-panel: #0f1115;
  --bg-stripe: #f3f1ec;

  /* Borders */
  --border-hair: #e6e1d6;
  --border-strong: #c9c2b1;
  --border-dark: #2a2e38;

  /* Text */
  --ink-1: #0a0a0a;
  --ink-2: #2a2a2a;
  --ink-3: #5b5e66;
  --ink-4: #8a8d96;
  --ink-inv: #f5f3ee;
  --ink-inv-2: #b8bbc4;
  --ink-inv-3: #6a6e78;

  /* Korean market semantics */
  --up: #d62828;
  --up-soft: #fcebea;
  --up-strong: #a51e1e;
  --down: #0d4f9e;
  --down-soft: #e7eef9;
  --down-strong: #082e5e;
  --flat: #6b6e75;

  /* Accents */
  --gold: #8a6f2a;
  --gold-soft: #f0e7cf;
  --accent-ink: #1a1d23;

  /* Typography */
  --font-sans: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: 'Noto Serif KR', 'IBM Plex Serif', 'Source Serif Pro', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Sizing */
  --sidebar-w: 220px;
  --header-h: 56px;
  --tab-h: 48px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 1, 'kern' 1;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  height: 100vh;
  min-height: 720px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  color: var(--ink-inv);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-dark);
}
.brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-dark);
}
.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand-mark .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--up);
  display: inline-block;
  transform: translateY(-1px);
}
.brand-sub {
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-inv-3);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.nav-group {
  padding: 14px 0 6px;
}
.nav-group-title {
  padding: 0 18px 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-inv-3);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 12.5px;
  color: var(--ink-inv-2);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: var(--ink-inv); }
.nav-item.active {
  background: var(--bg-sidebar-hover);
  color: #fff;
  border-left-color: var(--up);
}
.nav-item .ico {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.nav-item .badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(214,40,40,0.18);
  color: #ff8888;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--border-dark);
  font-size: 11px;
  color: var(--ink-inv-3);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-footer .row { display: flex; justify-content: space-between; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ec27e; display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(46,194,126, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,194,126, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(46,194,126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46,194,126, 0); }
}

/* ---------- Header (ticker tape) ---------- */
.header {
  grid-area: header;
  background: var(--bg-dark-panel);
  color: var(--ink-inv);
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-dark);
  overflow: hidden;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-right: 1px solid var(--border-dark);
  white-space: nowrap;
}
.header-meta .date {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.header-meta .session {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-inv-3);
  text-transform: uppercase;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-wrap::before, .ticker-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 24px;
  z-index: 2; pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg-dark-panel), transparent); }
.ticker-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg-dark-panel), transparent); }
.ticker {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 18px;
  height: 100%;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tick {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.tick .name {
  font-family: var(--font-sans);
  color: var(--ink-inv-2);
}
.tick .px { color: #fff; }
.tick.up .chg { color: #ff6b6b; }
.tick.down .chg { color: #6aa9ff; }
.tick.flat .chg { color: var(--ink-inv-3); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-left: 1px solid var(--border-dark);
}
.icon-btn {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: var(--ink-inv-2);
}
.icon-btn:hover { background: var(--bg-sidebar-hover); color: #fff; }

/* ---------- Main ---------- */
.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabs {
  height: var(--tab-h);
  display: flex;
  align-items: stretch;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border-hair);
  padding: 0 24px;
  gap: 0;
  flex-shrink: 0;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
  position: relative;
  height: 100%;
}
.tab:hover { color: var(--ink-1); }
.tab.active {
  color: var(--ink-1);
  border-bottom-color: var(--ink-1);
  font-weight: 600;
}
.tab .count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  background: var(--bg-stripe);
  padding: 1px 6px;
  border-radius: 2px;
}
.tab.active .count { background: #1a1d23; color: #fff; }

.tabs-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.tabs-right .pill {
  padding: 4px 10px;
  background: var(--bg-stripe);
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-page);
}

/* ---------- Common bits ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 24px 10px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.section-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.panel {
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hair);
}
.panel-head h3 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.panel-head .meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--bg-stripe);
  color: var(--ink-2);
  border: 1px solid var(--border-hair);
  text-transform: uppercase;
}
.tag.gold { background: var(--gold-soft); color: var(--gold); border-color: #d9c98a; }
.tag.up { background: var(--up-soft); color: var(--up-strong); border-color: #f4c8c5; }
.tag.down { background: var(--down-soft); color: var(--down-strong); border-color: #c2d5ee; }
.tag.dark { background: #1a1d23; color: #fff; border-color: #1a1d23; }

/* Scrollbar */
.content::-webkit-scrollbar { width: 10px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: #d6d1c2; border-radius: 6px; border: 2px solid var(--bg-page); }

/* ============================================================
   TOP PICK PAGE
   ============================================================ */

.toppick {
  padding: 0 24px 32px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
  margin: 0 0 18px;
  overflow: hidden;
}
.hero-left {
  padding: 26px 28px 24px;
  position: relative;
  border-right: 1px solid var(--border-hair);
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.hero-eyebrow .badge-gold {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 2px;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-eyebrow .date-stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.stock-name {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.stock-meta-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13px;
}
.stock-meta-row .ticker-code {
  font-family: var(--font-mono);
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.stock-meta-row .sep { color: var(--ink-4); }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 22px;
}
.price-row .px {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.price-row .chg-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.price-row .chg {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}
.price-row .chg-pct {
  font-family: var(--font-mono);
  font-size: 13px;
}

.ratings-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.thesis {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-hair);
}
.thesis-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.thesis-text {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-1);
  text-wrap: pretty;
}
.thesis-text em {
  font-style: italic;
  color: var(--up-strong);
  background: linear-gradient(180deg, transparent 60%, var(--up-soft) 60%);
  padding: 0 2px;
}

/* Hero right: target price gauge */
.hero-right {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fbfaf6 0%, #ffffff 100%);
}
.target-block {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.target-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.target-head h4 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
}
.target-head .consensus-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.target-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.tnum {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tnum-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.tnum-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
}
.tnum-value.up { color: var(--up); }
.tnum-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.gauge-wrap { margin-top: 8px; }

.distance-bar {
  margin-top: 22px;
  border-top: 1px dashed var(--border-strong);
  padding-top: 16px;
}
.distance-bar h5 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.distance-bar h5 .upside {
  color: var(--up);
  font-weight: 700;
}
.bar-track {
  position: relative;
  height: 10px;
  background: var(--bg-stripe);
  border: 1px solid var(--border-hair);
  border-radius: 1px;
}
.bar-fill {
  position: absolute;
  top: -1px; bottom: -1px;
  left: -1px;
  background: linear-gradient(90deg, var(--up) 0%, #f25c5c 100%);
  border-radius: 1px;
}
.bar-marker {
  position: absolute;
  top: -8px; bottom: -8px;
  width: 2px;
  background: var(--ink-1);
}
.bar-marker.now { background: var(--ink-1); }
.bar-marker.target { background: var(--up); width: 2px; }
.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.bar-labels strong { color: var(--ink-1); font-weight: 600; }

/* Quick stats strip */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
  margin-bottom: 18px;
}
.qs {
  padding: 14px 16px;
  border-right: 1px solid var(--border-hair);
}
.qs:last-child { border-right: none; }
.qs-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.qs-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.qs-sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* Main grid */
.toppick-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

/* Chart panel */
.chart-panel { display: flex; flex-direction: column; }
.chart-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.chart-controls .ctrl-btn {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  color: var(--ink-3);
  border: 1px solid transparent;
  border-radius: 2px;
}
.chart-controls .ctrl-btn:hover { color: var(--ink-1); }
.chart-controls .ctrl-btn.active { background: #1a1d23; color: #fff; }

.chart-area {
  position: relative;
  padding: 18px 18px 8px;
}
.chart-area svg { display: block; width: 100%; height: auto; }

.chart-legend {
  display: flex;
  gap: 18px;
  padding: 4px 18px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.chart-legend .lg {
  display: inline-flex; align-items: center; gap: 6px;
}
.lg-swatch { width: 12px; height: 2px; }

.chart-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-hair);
}
.chart-summary .qs { border-right: 1px solid var(--border-hair); padding: 10px 14px; }

/* Right column stack */
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Broker reports list */
.broker-list { padding: 0; }
.broker-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hair);
}
.broker-row:last-child { border-bottom: none; }
.broker-logo {
  width: 28px; height: 28px;
  border-radius: 2px;
  background: var(--bg-stripe);
  border: 1px solid var(--border-hair);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 700;
  color: var(--ink-2);
}
.broker-info .name { font-size: 12.5px; font-weight: 600; }
.broker-info .meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.broker-target { text-align: right; }
.broker-target .new {
  font-family: var(--font-mono); font-weight: 700; font-size: 13.5px;
}
.broker-target .delta {
  font-family: var(--font-mono); font-size: 10.5px;
  margin-top: 2px;
}
.broker-target .delta.up { color: var(--up); }

/* Risk / catalyst lists */
.kv-list { padding: 14px 16px 16px; }
.kv-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-hair);
  font-size: 12.5px;
  line-height: 1.5;
}
.kv-item:last-child { border-bottom: none; }
.kv-item .marker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--up);
  letter-spacing: 0.02em;
  padding-top: 2px;
}
.kv-item.risk .marker { color: var(--down); }
.kv-item .body strong {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.kv-item .body span { color: var(--ink-3); }

/* Bottom sections */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* Foreign / Institutional flow chart */
.flow-bars {
  padding: 14px 16px 18px;
}
.flow-bars svg { display: block; width: 100%; }

/* Financials table */
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fin-table th, .fin-table td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-hair);
  font-family: var(--font-mono);
}
.fin-table th {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-stripe);
  border-bottom: 1px solid var(--border-strong);
}
.fin-table th:first-child, .fin-table td:first-child {
  text-align: left;
  font-family: var(--font-sans);
}
.fin-table td:first-child { color: var(--ink-2); font-weight: 500; }
.fin-table tr:last-child td { border-bottom: none; }
.fin-table tr.hi td { background: #fdf9ee; font-weight: 600; }

/* News strip */
.news-list { padding: 4px 0; }
.news-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-hair);
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
  transition: background 120ms;
}
.news-item:hover { background: var(--bg-stripe); }
.news-item:last-child { border-bottom: none; }
.news-item .time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding-top: 2px;
  letter-spacing: 0.02em;
}
.news-item .body strong { font-weight: 600; display: block; }
.news-item .body .src {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
}

/* ============================================================
   SCREENER PAGE
   ============================================================ */

.screener {
  padding: 18px 24px 32px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-bar .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 4px;
}
.chip {
  font-size: 11.5px;
  padding: 5px 10px;
  border: 1px solid var(--border-hair);
  border-radius: 2px;
  background: var(--bg-paper);
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.chip.on {
  background: #1a1d23; color: #fff; border-color: #1a1d23;
}
.chip.on .x { color: #b8bbc4; margin-left: 4px; }

.screener-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  margin-bottom: 14px;
  border-radius: 2px;
}

.screener-table-wrap {
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
}
.scr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.scr-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-paper);
  text-align: right;
  padding: 10px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border-strong);
  z-index: 1;
}
.scr-table thead th.l { text-align: left; }
.scr-table thead th.c { text-align: center; }
.scr-table tbody td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border-hair);
  font-family: var(--font-mono);
}
.scr-table tbody td.l { text-align: left; font-family: var(--font-sans); }
.scr-table tbody td.c { text-align: center; }
.scr-table tbody tr { cursor: pointer; transition: background 120ms; }
.scr-table tbody tr:hover { background: #fcfaf3; }
.scr-table tbody tr.featured { background: #fdf9ee; }
.scr-table tbody tr.featured:hover { background: #faf2dc; }
.scr-table tbody tr:last-child td { border-bottom: none; }

.rank {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.featured .rank { color: var(--gold); }
.stock-cell {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stock-cell .nm { font-weight: 600; color: var(--ink-1); font-size: 12.5px; }
.stock-cell .cd { font-family: var(--font-mono); color: var(--ink-3); font-size: 10.5px; letter-spacing: 0.04em; }

.score-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.score-track {
  width: 60px; height: 5px;
  background: var(--bg-stripe);
  border-radius: 1px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  background: var(--up);
}
.score-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}

.signal-badges {
  display: inline-flex;
  gap: 3px;
}
.sb {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-hair);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-4);
  background: var(--bg-paper);
}
.sb.on {
  background: var(--up);
  color: #fff;
  border-color: var(--up);
}

/* ============================================================
   REPORTS PAGE
   ============================================================ */

.reports {
  padding: 18px 24px 32px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.reports-left {
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
}

.report-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hair);
  cursor: pointer;
  transition: background 120ms;
}
.report-item:hover { background: var(--bg-stripe); }
.report-item:last-child { border-bottom: none; }
.report-item.active { background: #fdf9ee; border-left: 3px solid var(--gold); padding-left: 13px; }
.report-item .ri-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.report-item .ri-broker {
  font-size: 12px; font-weight: 600;
}
.report-item .ri-time {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
}
.report-item .ri-title {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-1);
  margin-bottom: 6px;
  text-wrap: pretty;
}
.report-item .ri-meta {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px;
}
.report-item .ri-meta .nm { color: var(--ink-3); }

.reports-right {
  background: var(--bg-paper);
  border: 1px solid var(--border-hair);
  border-radius: 2px;
}

.report-detail {
  padding: 26px 32px 32px;
}
.report-detail .rd-head {
  border-bottom: 2px solid var(--ink-1);
  padding-bottom: 14px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.rd-head .broker-line {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
}
.rd-head .pub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.rd-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: pretty;
}
.rd-stock-line {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.rd-stock-line strong { color: var(--ink-1); }

.rd-callouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 22px 0;
  border: 1px solid var(--border-hair);
  border-radius: 2px;
}
.rd-callout {
  padding: 14px 18px;
  border-right: 1px solid var(--border-hair);
}
.rd-callout:last-child { border-right: none; }
.rd-callout .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.rd-callout .val {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
}
.rd-callout .sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px; color: var(--ink-3);
}

.rd-section { margin-top: 22px; }
.rd-section h4 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  border-left: 3px solid var(--ink-1);
  padding-left: 10px;
}
.rd-section p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}
.rd-section p + p { margin-top: 8px; }
.rd-section ul.bullets {
  margin-top: 6px;
  padding-left: 16px;
}
.rd-section ul.bullets li {
  list-style: disc outside;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.rd-section ul.bullets li strong { color: var(--ink-1); }

.disclosures {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg-stripe);
  border-left: 3px solid var(--border-strong);
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* Hide views by default */
.view { display: none; }
.view.active { display: block; }
