/* ============================================================
   stockportfolio.pro — v2 design system
   One system, every screen derived from it.

   Principles (the lens):
   - The numbers are the material; the interface defers to them.
   - Color carries meaning only: direction, health, interaction.
   - Depth from hairlines and space, not shadows and glass.
   - One family (Inter), hierarchy from weight + optical size.
   - Provenance is structural: every figure can say where it's from.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Tokens ---------- */
:root {
  /* paper + ink */
  --paper: #faf9f6;
  --surface: #ffffff;
  --ink: #1c1b18;
  --ink-2: #5f5c55;
  --ink-3: #8f8b82;
  --line: #e8e6e0;
  --line-strong: #d8d5cd;

  /* meaning */
  --accent: #1a4fd6;
  --accent-ink: #15409f;
  --accent-tint: #eef2fd;
  --pos: #1b7a4b;
  --pos-tint: #ecf5ef;
  --neg: #b3261e;
  --neg-tint: #fbeeec;

  /* type */
  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 11.5px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;

  /* rhythm */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1480px;
  --gutter: 32px;
}

/* ---------- Base ---------- */
html, body { background: var(--paper); }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-tint); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type ---------- */
.display {
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.06;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.title-1 { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -0.025em; }
.title-2 { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.title-3 { font-size: var(--text-base); font-weight: 600; letter-spacing: -0.005em; }
.prose { font-size: var(--text-base); color: var(--ink); max-width: 68ch; }
.prose p + p { margin-top: 0.8em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: var(--text-sm); }
.label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.num, .table-data td, .kpi-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  height: 60px;
}
.wordmark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark span { color: var(--ink-3); font-weight: 500; }
.wordmark:hover { color: var(--ink); }
.nav-links {
  display: flex;
  gap: var(--s4);
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-links a { color: var(--ink-2); padding: 6px 4px; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--ink); }
.nav-spacer { flex: 1; }
.nav-search {
  position: relative;
  width: 230px;
}
.nav-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
  font-size: var(--text-sm);
}
.nav-search input::placeholder { color: var(--ink-3); }
.nav-search-results {
  position: absolute;
  top: 40px; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(28, 27, 24, 0.10);
  overflow: hidden;
}
.nav-search-results a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav-search-results a:last-child { border-bottom: 0; }
.nav-search-results a:hover, .nav-search-results a.is-active { background: var(--accent-tint); }
.nav-search-results .sym { font-weight: 650; min-width: 52px; font-variant-numeric: tabular-nums; }
.nav-search-results .nm { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Buttons + inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; color: var(--paper); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 10px; }
.btn-quiet:hover { color: var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: var(--text-xs); }

.field { display: grid; gap: 6px; }
.field > span { font-size: var(--text-sm); font-weight: 550; color: var(--ink-2); }
.input, .select {
  height: 42px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  padding: 0 12px;
  font-size: var(--text-sm);
  color: var(--ink);
}
.input::placeholder { color: var(--ink-3); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* ---------- Loading ring (the system's one spinner) ---------- */
.spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -4px;
}
.spin-lg { width: 28px; height: 28px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--text-sm); }

/* ---------- Consent banner ---------- */
.consent {
  position: fixed; left: 20px; bottom: 20px; z-index: 80;
  max-width: 360px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 16px 48px rgba(28, 27, 24, 0.12);
  font-size: var(--text-sm);
}
.consent p { margin: 0 0 12px; color: var(--ink-2); }
.consent strong { color: var(--ink); }
.consent-actions { display: flex; gap: 8px; align-items: center; }
.consent-actions a { margin-left: auto; font-size: var(--text-xs); }
@media (max-width: 480px) { .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

/* ---------- Cards / sections ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-pad { padding: var(--s5); }
.section { margin-top: var(--s7); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s4);
}
.section-head .title-2 { margin: 0; }
.hairline { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

/* ---------- KPI ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s4) var(--s5);
}
.kpi { display: grid; gap: 2px; }
.kpi-value { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.kpi-sub { font-size: var(--text-xs); color: var(--ink-3); }

/* ---------- Deltas (meaning color) ---------- */
.delta-pos { color: var(--pos); }
.delta-neg { color: var(--neg); }

/* ---------- Segmented control ---------- */
.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 5px 13px;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
}
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

/* ---------- Data table ---------- */
/* proxy scrollbar above a wide table, kept in sync with its .table-wrap */
.scroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 4px; }
.scroll-top > div { height: 1px; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-data {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: var(--text-sm);
}
.table-data th, .table-data td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.table-data thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface);
  position: sticky;
  top: 0;
}
.table-data tbody tr:last-child td { border-bottom: 0; }
.table-data tbody tr:hover td { background: #fcfbf9; }
.table-data .row-head {
  text-align: left;
  font-weight: 550;
  color: var(--ink);
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 2;
  border-right: 1px solid var(--line);
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-data tbody tr:hover .row-head { background: #fcfbf9; }
.table-data .col-now { font-weight: 650; }
.table-data .row-sub .row-head { font-weight: 400; color: var(--ink-2); padding-left: 26px; }
.table-data .row-rule td { border-bottom: 1px solid var(--line-strong); }
.table-clickable tbody tr { cursor: pointer; }

/* collapsible statement groups */
.grp-caret {
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 11px;
  padding: 0 6px 0 0; vertical-align: baseline;
}
.grp-caret:hover { color: var(--ink); }

/* sortable headers */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable[data-dir='desc']::after { content: ' ↓'; }
th.sortable[data-dir='asc']::after { content: ' ↑'; }

/* ---------- Sparkline ---------- */
.spark { width: 84px; height: 22px; }
.spark path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spark .pos { stroke: var(--pos); }
.spark .neg { stroke: var(--neg); }
.spark .flat { stroke: var(--ink-3); }

/* ---------- Chips / provenance ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip-accent { border-color: transparent; background: var(--accent-tint); color: var(--accent-ink); }
.provenance {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-top: var(--s3);
}

/* ---------- Health checks ---------- */
.health-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2px var(--s6); }
.health-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.health-mark { font-weight: 700; width: 16px; flex: none; }
.health-pass .health-mark { color: var(--pos); }
.health-fail .health-mark { color: var(--neg); }
.health-label { font-weight: 550; }
.health-detail { color: var(--ink-3); font-size: var(--text-xs); margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------- Ask (inline, in-flow — not a bubble) ---------- */
.ask-bar {
  display: flex;
  gap: var(--s3);
  align-items: center;
}
.ask-bar .input { flex: 1; height: 46px; border-radius: 11px; font-size: var(--text-base); }
.ask-panel { margin-top: var(--s4); }
/* the conversation: question as a soft bubble on the right, answer as a
   document on the left — generous air between turns */
.ask-exchange { display: grid; gap: 44px; }
.ask-q {
  justify-self: end;
  max-width: 76%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 18px;
}
/* the trace: while working, one quiet line with a breathing dot + stop;
   when done, a single disclosure line holding the whole trail */
.ask-working-row { display: flex; align-items: center; gap: 12px; }
.ask-working-row .ask-working::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 9px; vertical-align: 1px;
  animation: askPulse 1.4s ease-in-out infinite;
}
@keyframes askPulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.ask-stop {
  border: 1px solid var(--line-strong); background: none; border-radius: 999px;
  font-size: 11px; color: var(--ink-2); padding: 3px 12px; cursor: pointer; font-family: inherit;
}
.ask-stop:hover { border-color: var(--ink-3); color: var(--ink); }
.ask-trace { margin: 0 0 14px; }
.ask-trace summary {
  font-size: var(--text-xs); color: var(--ink-3); cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.ask-trace summary::-webkit-details-marker { display: none; }
.ask-trace summary::before { content: '✓'; color: var(--pos); }
.ask-trace summary::after { content: '▸'; font-size: 9px; transition: transform 0.12s ease; }
.ask-trace details[open] summary::after { transform: rotate(90deg); }
.ask-trace details > div { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 8px 0 2px; }
.ask-step { font-size: var(--text-xs); color: var(--ink-3); }
.ask-step::before { content: '✓ '; color: var(--pos); }
.ask-step-miss::before { content: '✕ '; color: var(--ink-3); }
.ask-a { max-width: 74ch; font-size: 15px; line-height: 1.75; }
.ask-a table {
  border-collapse: collapse;
  margin: 10px 0;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.ask-a th, .ask-a td { padding: 9px 20px 9px 0; border-bottom: 1px solid var(--line); text-align: right; }
.ask-a th:first-child, .ask-a td:first-child { text-align: left; }
.ask-a th { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 600; }
.ask-a p { margin: 0 0 14px; }
.ask-a ul, .ask-a ol { margin: 6px 0 14px; padding-left: 20px; }
.ask-a li { margin-bottom: 6px; }
/* the closing synthesis — a rule, then the read */
.ask-read { border-top: 1px solid var(--line-strong); margin-top: 22px; padding-top: 18px; }
/* answer footer: feedback · sources · quota, one quiet line */
.ask-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 18px; font-size: var(--text-xs); color: var(--ink-3); }
.ask-fb { display: inline-flex; gap: 4px; }
.ask-fb button { border: 0; background: none; padding: 4px; color: var(--ink-3); cursor: pointer; border-radius: 6px; line-height: 0; }
.ask-fb button:hover { color: var(--ink); background: var(--surface); }
.ask-fb button.is-picked { color: var(--accent-ink); }
.ask-fb button:disabled:not(.is-picked) { opacity: 0.35; cursor: default; }
.ask-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ask-working { font-size: var(--text-sm); color: var(--ink-3); font-style: italic; }
/* charts inside an answer */
.ask-viz { margin: 22px 0 26px; padding: 20px 24px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ask-viz figcaption { margin-bottom: 12px; }
.ask-viz-legend { display: flex; gap: 18px; justify-content: center; margin-top: 6px; font-size: var(--text-xs); color: var(--ink-2); }
.ask-viz-legend .lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ask-viz-legend .lg-ink { background: var(--ink); }
.ask-viz-legend .lg-accent { background: var(--accent); }
.ask-viz-legend .lg-pos { background: var(--pos); }
/* the suggested follow-up */
.ask-next { border: 1px solid var(--line-strong); background: none; border-radius: 999px; padding: 7px 14px; font-size: var(--text-sm); color: var(--accent-ink); cursor: pointer; font-family: inherit; }
.ask-next:hover { border-color: var(--accent); }
.ask-next:disabled { opacity: 0.5; cursor: default; }
.ask-quote { border-left: 2px solid var(--line-strong); padding-left: 12px; color: var(--ink-2); }
.ask-cursor::after { content: '▍'; color: var(--accent); animation: askBlink 1s steps(1) infinite; }
@keyframes askBlink { 50% { opacity: 0; } }
.ask-quota { font-size: var(--text-xs); color: var(--ink-3); }

/* ---------- Alerts / notices ---------- */
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: var(--s3) var(--s4);
  font-size: var(--text-sm);
}
.notice-neg { border-left-color: var(--neg); }
.notice-pos { border-left-color: var(--pos); }

/* ---------- Footer ---------- */
.footer {
  margin-top: var(--s8);
  border-top: 1px solid var(--line);
  padding: var(--s6) 0 var(--s7);
  font-size: var(--text-sm);
  color: var(--ink-3);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); justify-content: space-between; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--ink); }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--line) 25%, #f1efe9 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  color: transparent !important;
  user-select: none;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Page rhythm ---------- */
.page-head { padding: var(--s7) 0 0; }
main { min-height: 60vh; padding-bottom: var(--s7); }

/* ---------- Masthead (no boxes — name, price, chart on the paper) ---------- */
.mast { padding-top: 20px; }
.mast-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.mast-price { font-size: 30px; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.1; text-align: right; }
.mast-chart { margin-top: 14px; }
.section-rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------- Key-numbers grid (label left, value right, hairline rows) ---------- */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.kv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv-row span { color: var(--ink-2); }
.kv-row b { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }

/* clamped prose with read-more */
.clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.open { display: block; }
#about-text { font-size: 13px; line-height: 1.65; color: var(--ink-2); }

/* ---------- The checks (verdict band) ---------- */
.checks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 4px 48px; }

/* ---------- Two-column band (ratios ║ check detail) ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }

/* ---------- Ask floor (pinned bar + sheet) — dark, unmissable ---------- */
.ask-floor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink);
  border-top: 1px solid #000;
  box-shadow: 0 -8px 24px rgba(28, 27, 24, 0.18);
}
.ask-floor-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter); }
.ask-floor .input {
  flex: 1; height: 44px; border-radius: 10px;
  background: #2c2b27; border-color: #45433d; color: var(--paper);
}
.ask-floor .input::placeholder { color: #a8a59c; }
.ask-floor .input:focus { border-color: var(--paper); box-shadow: none; }
.ask-floor .btn-primary { background: var(--paper); color: var(--ink); }
.ask-floor .btn-primary:hover { background: #fff; color: var(--ink); }
.ask-kbd { font-size: 11px; color: #a8a59c; border: 1px solid #45433d; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }

/* ---------- Chart hover ---------- */
.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; z-index: 6; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 27, 24, 0.12);
  padding: 7px 11px; font-size: 12px; line-height: 1.5;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chart-tip .label { margin-bottom: 2px; }
.chart-cross { position: absolute; z-index: 5; width: 0; border-left: 1px dotted var(--ink-3); opacity: 0.7; pointer-events: none; }

/* ---------- Key points dossier ---------- */
.dossier { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.kp-section { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kp-section:last-of-type { border-bottom: 0; }
.kp-head { font-size: 13.5px; font-weight: 650; letter-spacing: -0.005em; margin-bottom: 6px; }
.kp-points { margin: 0; padding-left: 16px; display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) { .dossier { grid-template-columns: 1fr; } }
.ask-sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 74px; z-index: 59;
  width: min(920px, 94vw); max-height: 72vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(28, 27, 24, 0.16); padding: 36px 44px;
}
body.has-ask-floor main { padding-bottom: 110px; }
body.has-ask-floor .footer { padding-bottom: 90px; }

/* ---------- Insights drawer (right edge) ---------- */
.drawer-tab {
  position: fixed; right: 0; top: 130px; z-index: 55;
  writing-mode: vertical-rl; text-orientation: mixed;
  background: var(--surface); border: 1px solid var(--line); border-right: 0;
  border-radius: 8px 0 0 8px; padding: 12px 7px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.04em;
}
.drawer-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.drawer-dim { position: fixed; inset: 0; background: rgba(28, 27, 24, 0.22); z-index: 64; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; z-index: 65;
  width: min(440px, 92vw); background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(28, 27, 24, 0.14);
  transform: translateX(102%); transition: transform 0.22s ease;
  overflow-y: auto; padding: 24px;
}
.drawer.open { transform: none; }
.drawer-close { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 20px; color: var(--ink-3); cursor: pointer; }
.drawer-close:hover { color: var(--ink); }

@media (max-width: 760px) {
  .kv { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .ask-sheet { bottom: 70px; max-height: 60vh; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-search { width: 100%; max-width: 280px; }
  .nav-inner { gap: 12px; }
  .nav .btn-quiet { display: none; }
  .display { font-size: clamp(30px, 9vw, 40px); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .table-data th, .table-data td { padding: 8px 10px; }
  .table-data .row-head { max-width: 150px; }
}
