/* Layout: one left-aligned column, max 1080px; the score line is the signature element. */
/* Layout: report-style single column, max 1080px; ruled data grids, warm stone header band, the score strip is the signature. */
:root {
  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #1C1B19;
  --muted: #69655D;
  --line: #E2DED5;
  --pine: #0F7350;
  --pine-soft: #E4F2EC;
  --band: #F1EEE7;
  --accent: #E8A900;
  --up: #0F7A4B;
  --down: #B3392B;
  --flat: #6B7482;
  --head-bg: #FBFAF7;
  --head-ink: #1C1B19;
  --head-muted: #625D54;
  --head-brand: #0F7350;
  --head-band: rgba(28, 27, 25, 0.06);
  --head-line: rgba(28, 27, 25, 0.16);
  --head-btn-ink: #FFFFFF;
  --tier-elite: #0B5A3E;
  --tier-strong: #1E8A5F;
  --tier-stable: #8DB8A2;
  --tier-watch: #D6A72E;
  --tier-caution: #C1572F;
  --s0: #0F7350;
  --s1: #D08A00;
  --s2: #2F5FA7;
  --s3: #9B3D73;
  --font-display: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161513; --surface: #1E1D1A; --ink: #ECE8E0; --muted: #A39E94; --line: #302E2A;
    --pine: #4CC896; --pine-soft: #1A2A23; --band: #1C1B18; --accent: #F5C542;
    --up: #5CCB93; --down: #F08A75; --flat: #9A958C;
    --head-bg: #161513; --head-ink: #ECE8E0; --head-muted: #A39E94; --head-brand: #4CC896;
    --head-band: rgba(255, 255, 255, 0.05); --head-line: rgba(255, 255, 255, 0.14); --head-btn-ink: #10140F;
    --tier-elite: #8FE0BC; --tier-strong: #4CC896; --tier-stable: #5F8F7A; --tier-watch: #E0B54A; --tier-caution: #E07A55;
    --s0: #4CC896; --s1: #F2B544; --s2: #7FA8EC; --s3: #D88BB8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161513; --surface: #1E1D1A; --ink: #ECE8E0; --muted: #A39E94; --line: #302E2A;
  --pine: #4CC896; --pine-soft: #1A2A23; --band: #1C1B18; --accent: #F5C542;
  --up: #5CCB93; --down: #F08A75; --flat: #9A958C;
  --head-bg: #161513; --head-ink: #ECE8E0; --head-muted: #A39E94; --head-brand: #4CC896;
    --head-band: rgba(255, 255, 255, 0.05); --head-line: rgba(255, 255, 255, 0.14); --head-btn-ink: #10140F;
  --tier-elite: #8FE0BC; --tier-strong: #4CC896; --tier-stable: #5F8F7A; --tier-watch: #E0B54A; --tier-caution: #E07A55;
  --s0: #4CC896; --s1: #F2B544; --s2: #7FA8EC; --s3: #D88BB8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-text); font-size: 16px; line-height: 1.55;
}
a { color: var(--pine); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, .h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3, .h3 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
main.wrap { display: flex; flex-direction: column; gap: 56px; padding-block: 40px 72px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.header-row { display: flex; align-items: center; gap: 24px; padding-block: 14px; flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-weight: 750; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 8px; }
.wordmark { gap: 0; font-size: 1.85rem; font-weight: 750; letter-spacing: -0.035em; align-items: center; line-height: 1; }
.wm-mark { width: 1.05em; height: 1.05em; margin-right: 0.28em; flex: none; }
.wm-pin { fill: var(--pine); }
.wm-dot { fill: var(--paper); }
.wm-here { color: var(--pine); }
.wordmark .beta { margin-left: 10px; align-self: center; }
.beta { font-family: var(--font-text); font-size: 0.72rem; font-weight: 600; color: var(--pine); background: var(--pine-soft); padding: 2px 7px; border-radius: 999px; letter-spacing: 0.02em; }
.main-nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--pine); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--pine); color: var(--surface); border: 1px solid var(--pine); border-radius: 999px; padding: 9px 18px; font: 600 0.95rem var(--font-text); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--pine); }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 18px; padding-top: 16px; max-width: 760px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.search { position: relative; max-width: 520px; }
.search input, .table-tools input, select, textarea, input[type="email"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 14px;
}
.search input { font-size: 1.05rem; padding: 14px 16px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); z-index: 4; box-shadow: 0 10px 30px rgba(20, 40, 30, 0.12); }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--pine-soft); }

/* Score line */
.scoreline-wrap { display: flex; flex-direction: column; gap: 10px; }
.scoreline-head { display: flex; flex-direction: column; gap: 4px; }
.scoreline-scroll { overflow-x: auto; }
.scoreline { width: 100%; min-width: 640px; height: auto; display: block; }
.scoreline .band { fill: var(--band); }
.scoreline .band-alt { fill: var(--paper); }
.scoreline .band-label { fill: var(--muted); font: 500 13px var(--font-text); }
.scoreline .tick { stroke: var(--muted); }
.scoreline .tick-label { fill: var(--muted); font: 12px var(--font-text); }
.scoreline .axis { stroke: var(--ink); stroke-width: 1.2; }
.scoreline .dot { stroke: var(--paper); stroke-width: 1.5; }
.scoreline .dot-link:hover .dot, .scoreline .dot-link:focus .dot { stroke: var(--ink); stroke-width: 2.5; }
.scoreline .leader { stroke: var(--muted); }
.scoreline .dot-label { fill: var(--ink); font: 600 13px var(--font-text); }
.t-elite { fill: var(--tier-elite); } .t-strong { fill: var(--tier-strong); } .t-stable { fill: var(--tier-stable); }
.t-watch { fill: var(--tier-watch); } .t-caution { fill: var(--tier-caution); }

/* Explore sections */
.explore-section { display: flex; flex-direction: column; gap: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.section-sub { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.view-all { font-weight: 600; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; min-width: 0; }
.card:hover { border-color: var(--pine); }
.card-name { font-family: var(--font-display); font-weight: 650; font-size: 1.25rem; }
.card-score { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.card-driver { color: var(--pine); font-weight: 600; }
.card-note { color: var(--muted); font-size: 0.92rem; }
.card-feature { gap: 14px; padding: 22px 24px; }
.card-feature .card-name { font-size: 1.45rem; }
.stat-pair { display: flex; gap: 28px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-family: var(--font-display); font-weight: 750; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--pine-soft); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: 0.88rem; font-weight: 500; }
.chip .arrow { color: var(--up); font-weight: 700; }
.card-thesis { font-weight: 600; border-top: 1px solid var(--line); padding-top: 12px; }

/* Signup */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.signup > div { display: flex; flex-direction: column; gap: 6px; }
.signup-form { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-form input[type="email"] { flex: 1 1 200px; }
.form-note { flex-basis: 100%; color: var(--pine); font-weight: 500; }

/* Market page */
.crumbs a { font-weight: 500; }
main.wrap > .crumbs { margin-bottom: -40px; }
.market-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.market-title { display: flex; flex-direction: column; gap: 8px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--pine-soft); color: var(--ink); }
.badge.tier { color: var(--surface); }
.badge.tier.t-elite { background: var(--tier-elite); } .badge.tier.t-strong { background: var(--tier-strong); }
.badge.tier.t-stable { background: var(--tier-stable); } .badge.tier.t-watch { background: var(--tier-watch); color: #1d1a10; }
.badge.tier.t-caution { background: var(--tier-caution); color: #1f140e; }
.badge-rise { background: var(--up); color: var(--surface); }
.stat-pair.big .stat-value { font-size: 3.2rem; }
.section-nav { display: flex; gap: 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-top: -24px; }
.section-nav a { font-weight: 600; text-decoration: none; }
section[id] { scroll-margin-top: 90px; display: flex; flex-direction: column; gap: 14px; }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 68ch; }
.prose p { font-size: 1.06rem; }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.prose h2 { margin-top: 12px; }

.fund-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fund-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.fund-name { display: flex; flex-direction: column; gap: 4px; }
.fund-score { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 10px; background: var(--band); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--pine); border-radius: 999px; }
.fund-nums { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.fund-nums .num { font-weight: 600; font-size: 1.1rem; }
.fund-momentum { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.pill.up { color: var(--up); } .pill.down { color: var(--down); } .pill.flat, .pill.na { color: var(--flat); }

.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.trend-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trend-card figcaption { display: flex; flex-direction: column; }
.trend-title { font-weight: 600; }
.trend { width: 100%; height: auto; display: block; }
.trend .grid { stroke: var(--line); }
.trend .zero { stroke: var(--muted); stroke-dasharray: 2 3; }
.trend .axis-label { fill: var(--muted); font: 11px var(--font-text); }
.trend .line-market { stroke: var(--pine); stroke-width: 2.5; stroke-linejoin: round; }
.trend .line-median { stroke: var(--flat); stroke-width: 1.5; stroke-dasharray: 5 4; }
.trend .end-dot { fill: var(--pine); }
.key { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 6px 0 0; }
.key-market { border-top: 3px solid var(--pine); }
.key-median { border-top: 2px dashed var(--flat); margin-left: 14px; }

.similar { display: flex; flex-direction: column; gap: 14px; }
.similar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.similar-list a { font-weight: 600; }

/* Tables */
.page-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.table-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: -32px; }
.table-tools input { max-width: 280px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.segmented button { font: 500 0.9rem var(--font-text); border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--pine); color: var(--surface); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
main.wrap > .table-scroll { margin-top: -32px; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { font-weight: 600; color: var(--muted); background: var(--surface); position: sticky; top: 0; }
th.num, td.num { text-align: right; }
thead button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
thead button[aria-sort] { color: var(--ink); }
tbody th a { color: var(--ink); font-weight: 600; text-decoration: none; }
tbody th a:hover { color: var(--pine); text-decoration: underline; }
tbody tr:hover { background: var(--pine-soft); }
.mini-bar { display: inline-block; width: 36px; height: 6px; background: var(--band); border-radius: 999px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--pine); }
.method-table td, .method-table th { white-space: normal; vertical-align: top; }
.method-table td:nth-child(3) { min-width: 240px; }

/* Compare */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: -24px; }
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick label { font-weight: 600; font-size: 0.9rem; }
.compare-output { display: flex; flex-direction: column; gap: 16px; }
.verdict { font-family: var(--font-display); font-size: 1.3rem; font-weight: 650; }
.cmp td .bar { width: 120px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.cmp td { white-space: nowrap; }
.best { font-size: 0.75rem; font-weight: 700; color: var(--up); margin-left: 6px; }

/* Forms */
.feedback-form { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; }
.radios { display: flex; gap: 20px; }
.radios label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-direction: column; gap: 6px; padding-block: 24px 40px; font-size: 0.9rem; }


/* Market page (Figma layout) */
.market-hero { align-items: flex-start; }
.market-title { max-width: 620px; gap: 10px; }
.score-line { font-size: 1.15rem; }
.score-line strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 750; margin-left: 4px; }
.summary { font-size: 1.1rem; color: var(--muted); }
.rank-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 6px; }
.rankstrip, .posline, .strength { width: 100%; height: auto; display: block; }
.rankstrip .axis, .posline .axis, .strength .axis { stroke: var(--line); stroke-width: 2; }
.rankstrip .other { fill: var(--flat); opacity: 0.45; }
.rankstrip .this, .posline .this { fill: var(--pine); stroke: var(--surface); stroke-width: 2; }
.rankstrip .this-label, .posline .this-label { fill: var(--ink); font: 600 13px var(--font-text); }
.posline .small-label { font-size: 12px; }
.rankstrip .axis-label, .posline .axis-label, .strength .axis-label { fill: var(--muted); font: 11px var(--font-text); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.tile-name { font-weight: 600; }
.tile-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 650; display: inline-flex; align-items: baseline; gap: 6px; }
.tile-unit { font-family: var(--font-text); font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.tile-trend { font-size: 0.88rem; font-weight: 600; margin-top: 4px; }
.tile-trend.up { color: var(--up); } .tile-trend.down { color: var(--down); } .tile-trend.flat, .tile-trend.na { color: var(--flat); }
.tile-trend .muted { font-weight: 400; }
.tile-label { color: var(--muted); font-size: 0.9rem; }
.takeaway { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.sw { display: flex; gap: 48px; flex-wrap: wrap; }
.sw > div { display: flex; flex-direction: column; gap: 4px; }
.momentum-head { color: var(--pine); }
.trend-latest { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; }
.why-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.why-cols > div { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.why-cols p { color: var(--muted); font-size: 1.02rem; }
.compare-block { display: flex; flex-direction: column; gap: 14px; }
.compare-block h3 { margin-top: 8px; }
.positions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-rank { font-weight: 700; }

/* Search page */
.search-big { max-width: 560px; margin-top: 6px; }
.search-big input { width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.results { display: flex; flex-direction: column; gap: 14px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rank-table thead th { text-align: center; }
.rank-table thead th:first-child { text-align: left; }
.rank-table td.num, .rank-table td:nth-child(4) { text-align: center; }
.rank-table .sub { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }

/* Compare page */
.compare { display: flex; flex-direction: column; gap: 22px; }
.compare > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.picks { margin-top: 0; }
.picks select.s-border { border-left-width: 5px; }
.picks select.s0 { border-left-color: var(--s0); } .picks select.s1 { border-left-color: var(--s1); }
.picks select.s2 { border-left-color: var(--s2); } .picks select.s3 { border-left-color: var(--s3); }
.tabs { align-self: flex-start; }
.compare-output { gap: 20px; }
.cmp-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(170px, 1fr)); gap: 24px; overflow-x: auto; }
.cmp-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cmp-name { font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.cmp-name:hover { color: var(--pine); }
.swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.swatch.s0, svg .s0 { background: var(--s0); fill: var(--s0); } .swatch.s1, svg .s1 { background: var(--s1); fill: var(--s1); }
.swatch.s2, svg .s2 { background: var(--s2); fill: var(--s2); } .swatch.s3, svg .s3 { background: var(--s3); fill: var(--s3); }
.cmp-score { font-family: var(--font-display); font-weight: 750; font-size: 1.9rem; line-height: 1.1; }
.cmp-rank { font-weight: 700; margin-bottom: 8px; }
.cmp-metric { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); }
.strength-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px 28px; }
.strength-card { display: flex; flex-direction: column; gap: 6px; }
.strength .row-label { fill: var(--ink); font: 13px var(--font-text); }
.strength circle { stroke: var(--surface); stroke-width: 2; }
.trend.multi .ml { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.trend.multi .ml.s0 { stroke: var(--s0); } .trend.multi .ml.s1 { stroke: var(--s1); }
.trend.multi .ml.s2 { stroke: var(--s2); } .trend.multi .ml.s3 { stroke: var(--s3); }
.trend.multi .end-label { font: 600 11px var(--font-text); }
.trend.multi .t0 { fill: var(--s0); } .trend.multi .t1 { fill: var(--s1); } .trend.multi .t2 { fill: var(--s2); } .trend.multi .t3 { fill: var(--s3); }

@media (max-width: 760px) {
  main.wrap { gap: 44px; padding-block: 28px 56px; }
  .header-row { gap: 10px 18px; }
  .wordmark { font-size: 1.55rem; }
  h1 { font-size: 1.4rem; }
  .main-nav { order: 3; flex-basis: 100%; gap: 16px; }
  .site-header .btn-quiet { margin-left: auto; padding: 6px 14px; }
  .signup { grid-template-columns: 1fr; }
  .fund-row { grid-template-columns: 1fr; gap: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-cols, .positions { grid-template-columns: 1fr; gap: 20px; }
  .stat-pair.big .stat-value { font-size: 2.5rem; }
  main.wrap > .crumbs { margin-bottom: -30px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ===== Design v2: research-brief layer ===== */
body { font-size: 16px; line-height: 1.6; }
h1, h2, h3, .h3 { letter-spacing: -0.005em; }
h1 { font-weight: 800; font-stretch: 112%; }
h2 { font-weight: 750; font-stretch: 108%; }
h3, .h3 { font-weight: 700; }
a { color: var(--pine); }

/* header band */
.site-header { background: var(--head-bg); border-bottom: 0; }
.header-row { padding-block: 16px; }
.wordmark { color: var(--head-ink); font-weight: 800; font-stretch: 110%; letter-spacing: -0.02em; }
.wm-here, .wm-pin { color: var(--head-brand); fill: var(--head-brand); }
.wm-dot { fill: var(--head-bg); }
.beta { background: transparent; color: var(--head-muted); border: 1px solid var(--head-muted); border-radius: 2px; font-weight: 600; letter-spacing: 0.04em; padding: 1px 6px; }
.main-nav a { color: var(--head-muted); font-weight: 600; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--head-ink); }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--head-brand); }
.site-header .btn-quiet { color: var(--head-ink); border-color: var(--head-muted); }

/* buttons, inputs, pills: square */
.btn { border-radius: 2px; background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; padding: 10px 18px; }
.btn-quiet { background: transparent; color: var(--ink); }
.search input, .search-big input, .table-tools input, select, textarea, input[type="email"] { border-radius: 2px; border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.search-results, .search-results a { border-radius: 2px; box-shadow: none; }
.pill { border-radius: 2px; border: 0; padding: 2px 0; font-weight: 700; }
.segmented { border-radius: 2px; padding: 0; border-color: var(--ink); }
.segmented button { border-radius: 0; color: var(--ink); font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* section heads read like report sections */
.explore-section, #overview, #fundamentals, #trends, #why, .compare-block, .scoreline-wrap { border-top: 3px solid var(--ink); padding-top: 14px; }
.section-head h2::after { content: ""; }
.view-all { text-decoration: none; border-bottom: 2px solid var(--accent); color: var(--ink); }

/* cards become a ruled data grid */
.cards { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 18px 20px 20px; }
.card:hover { background: var(--band); border-color: var(--line); }
.card-name { font-weight: 750; font-stretch: 106%; font-size: 1.2rem; }
.card-score { color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.card-driver { color: var(--pine); font-weight: 700; }
.card-feature .card-name { font-size: 1.35rem; }
.stat-value { font-weight: 800; font-stretch: 90%; font-size: 2.6rem; letter-spacing: -0.02em; }
.stat-label { text-transform: none; font-weight: 600; }
.chips { gap: 4px 16px; }
.chip { background: transparent; padding: 0; border-radius: 0; font-weight: 600; }
.chip .arrow { color: var(--pine); }
.card-thesis { border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-stretch: 104%; }

/* score strip */
.scoreline .band { fill: var(--band); }
.scoreline .band-alt { fill: transparent; }
.scoreline .axis { stroke: var(--ink); stroke-width: 2; }
.scoreline .dot { stroke: var(--paper); stroke-width: 2; }
.scoreline .dot-label { font: 700 13px var(--font-display); }

/* badges: swatch + text instead of pills */
.badge { border-radius: 2px; background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 2px 8px; font-weight: 700; }
.badge.tier { color: var(--paper); border: 0; }
.badge.tier.t-watch, .badge.tier.t-caution { color: #1A1206; }
.badge-rise { background: transparent; color: var(--ink); border: 0; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; padding-inline: 2px; }

/* market page */
.score-line strong { font-weight: 800; font-stretch: 90%; font-size: 2rem; }
.rank-card, .trend-card { border-radius: 0; border: 0; border-top: 2px solid var(--ink); background: transparent; padding-inline: 0; }
.trend .line-market, .trend .end-dot { stroke: var(--pine); }
.trend .end-dot { fill: var(--pine); }
.tile-value { font-weight: 800; font-stretch: 92%; }
.bar, .mini-bar { border-radius: 0; background: var(--band); }
.bar span, .mini-bar span { border-radius: 0; background: var(--pine); }
.section-nav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.section-nav a:hover { border-bottom-color: var(--accent); }

/* tables */
.table-scroll { border-radius: 0; border: 0; border-top: 2px solid var(--ink); }
thead th { color: var(--ink); font-weight: 700; background: var(--paper); }
tbody tr:hover { background: var(--band); }
.signup { border-radius: 0; border: 0; border-top: 3px solid var(--ink); background: var(--band); }

/* compare */
.cmp-name { font-weight: 750; }
.cmp-score { font-weight: 800; font-stretch: 90%; }
.picks select.s-border { border-left-width: 6px; }

.site-footer { background: var(--band); border-top: 0; }

/* lead band: full-bleed navy continuation of the header */
main.wrap { padding-top: 0; }
.lead-band {
  --ink: var(--head-ink); --muted: var(--head-muted); --paper: var(--head-bg); --surface: var(--head-bg);
  --band: var(--head-band); --line: var(--head-line); --pine: var(--head-brand);
  --tier-elite: #8FE0BC; --tier-strong: #4CC896; --tier-stable: #5F8F7A; --tier-watch: #E0B54A; --tier-caution: #E07A55;
  background: var(--head-bg); color: var(--head-ink);
  box-shadow: 0 0 0 100vmax var(--head-bg); clip-path: inset(0 -100vmax);
  padding-block: 28px 36px; display: flex; flex-direction: column; gap: 32px;
}
.lead-band .scoreline-wrap { border-top: 1px solid var(--line); }
.lead-band .lede { color: var(--head-muted); }
.lead-band h1 { color: var(--head-ink); }
.lead-band .crumbs { margin-bottom: -16px; }
.lead-band .crumbs a { color: var(--head-muted); }
.lead-band .btn { background: var(--head-brand); border-color: var(--head-brand); color: var(--head-btn-ink); }
.lead-band .badge.tier { color: #10140F; }
.lead-band .rank-card { border-top-color: var(--line); }
.lead-band .rankstrip .this { stroke: var(--head-bg); }
main.wrap > .lead-band + * { margin-top: 0; }

/* value-driven colour (heat) */
.heat-under { box-shadow: inset 0 -0.18em 0 var(--heat); padding-bottom: 0.04em; }
.stat-value.heat-under, .cmp-score .heat-under, .score-line .heat-under { box-shadow: inset 0 -0.14em 0 var(--heat); }
.tile-heat { display: block; height: 6px; background: var(--band); margin: 6px 0 4px; max-width: 220px; }
.tile-heat > span { display: block; height: 100%; }
.cmp-metric .tile-heat { max-width: 160px; margin: 4px 0; }
.rank-table td.heat-cell { background: color-mix(in srgb, var(--heat) 18%, transparent); font-weight: 600; }
.rank-table td.heat-strong { background: color-mix(in srgb, var(--heat) 30%, transparent); }
.rank-table td.heat-cell + td.heat-cell { border-left: 1px solid var(--paper); }
.trend .line-market { stroke-width: 3; }
.posline .this, .rankstrip .this { stroke: var(--paper); stroke-width: 2; }
/* Overpass: tune weights (no width axis) */
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3, .h3 { font-weight: 700; }
.wordmark { font-weight: 900; letter-spacing: -0.03em; }
.stat-value, .score-line strong, .tile-value, .cmp-score { font-weight: 900; letter-spacing: -0.03em; }
.card-name, .cmp-name { font-weight: 800; }
body { line-height: 1.55; }

/* no colour band: plain page, ruled header */
.site-header { border-bottom: 1px solid var(--line); }
.lead-band { --band: #F1EEE7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lead-band { --band: #1C1B18; } }
:root[data-theme="dark"] .lead-band { --band: #1C1B18; }
/* region map */
.map-wrap { border-top: 3px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.map-key { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.key-ramp { width: 140px; height: 8px; background: linear-gradient(90deg, #C8442F, #E0A526, #1E9A64); }
.regionmap { width: 100%; height: auto; display: block; overflow: hidden; }
.regionmap .st { stroke: var(--paper); stroke-width: 1.2; stroke-linejoin: round; }
.regionmap .st-core { fill: #E6E1D6; }
.regionmap .st-ctx { fill: transparent; stroke: var(--line); }
.regionmap .st-label { fill: #A8A194; font: 700 15px var(--font-display); letter-spacing: 0.08em; pointer-events: none; }
.regionmap .pin-dot { stroke: var(--paper); stroke-width: 2; transition: r .12s; }
.regionmap .pin-label { font: 700 14px var(--font-display); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; opacity: 0; pointer-events: none; }
.regionmap .pin-on .pin-label { opacity: 1; }
.regionmap .pin:hover .pin-label, .regionmap .pin:focus .pin-label { opacity: 1; }
.regionmap .pin:hover .pin-dot, .regionmap .pin:focus .pin-dot { stroke: var(--ink); r: 11px; }
.regionmap .pin:hover, .regionmap .pin:focus { outline: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .regionmap .st-core { fill: #2A2824; }
  :root:not([data-theme="light"]) .regionmap .st-ctx { fill: transparent; }
  :root:not([data-theme="light"]) .regionmap .st-label { fill: #5E5A52; }
}
:root[data-theme="dark"] .regionmap .st-core { fill: #2A2824; }
:root[data-theme="dark"] .regionmap .st-ctx { fill: transparent; }
:root[data-theme="dark"] .regionmap .st-label { fill: #5E5A52; }
@media (max-width: 640px) {
  .regionmap .pin-dot { r: 16px; stroke-width: 3; }
  .regionmap .pin-label { font-size: 30px; stroke-width: 7px; }
  .regionmap .st-label { font-size: 26px; }
  .regionmap .pin:hover .pin-dot { r: 19px; }
}

/* supply mix */
.mix { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.mix-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mix-head h3 { margin: 0; }
.mix-bar { display: flex; height: 14px; background: var(--band); overflow: hidden; }
.mix-bar > span { display: block; height: 100%; }
.mix-sf { background: #2F6F8F; }
.mix-mf { background: #C77D2E; }
.mix-ot { background: #A8A194; }
.mix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mix-grid > div { display: flex; flex-direction: column; gap: 2px; }
.mix-key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: baseline; }
.mix-val { font-size: 1.5rem; font-weight: 800; }
.mix-val .muted { font-size: 0.9rem; font-weight: 500; }
.mix-read { margin: 0; font-weight: 600; }
@media (max-width: 640px) { .mix-grid { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mix-sf { background: #5AA3C7; } :root:not([data-theme="light"]) .mix-mf { background: #E39B4C; } :root:not([data-theme="light"]) .mix-ot { background: #6B665D; } }
:root[data-theme="dark"] .mix-sf { background: #5AA3C7; }
:root[data-theme="dark"] .mix-mf { background: #E39B4C; }
:root[data-theme="dark"] .mix-ot { background: #6B665D; }

/* ===== workspace (preview) ===== */
.kw-page main.wrap { max-width: none; padding-inline: 0; gap: 0; padding-block: 0; }
.kw-page [hidden] { display: none !important; }
.kw-page main > .kw-app, .kw-page main > .kw-foot { margin-top: 0 !important; }
.kw-tools select.kw-input { width: auto; max-width: 260px; flex: none; }
.kw-tools #kwTableQ { flex: 0 1 280px; }
#kwJump { width: auto; max-width: 260px; flex: none; }
.kw-tools .btn { width: auto; }
.kw-page .site-footer { display: none; }
.kw-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 20px 10px; }
.kw-title { display: flex; align-items: baseline; gap: 10px; }
.kw-title h1 { font-size: 1.5rem; margin: 0; }
.kw-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 7px; background: var(--accent); color: #1C1B19; }
.kw-tabs { display: flex; border: 1px solid var(--line); }
.kw-tabs button { font: inherit; font-weight: 700; font-size: 14px; padding: 7px 14px; background: transparent; color: var(--muted); border: 0; cursor: pointer; }
.kw-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.kw-saved { margin-left: auto; }
.kw-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 20px 10px; }
.kw-input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 2px; min-width: 0; }
.kw-geo { position: relative; display: flex; gap: 6px; flex: 1 1 260px; max-width: 420px; }
.kw-geo .kw-input { flex: 1; }
.kw-geo-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 1200; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.kw-geo-results:empty { display: none; }
.kw-geo-results button { display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; padding: 8px 10px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.kw-geo-results button:hover { background: var(--band); }
.kw-base { display: flex; border: 1px solid var(--line); }
.kw-base button { font: inherit; font-size: 13px; font-weight: 700; padding: 7px 10px; background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.kw-base button[aria-pressed="true"] { background: var(--band); color: var(--ink); }
.kw-panel-toggle { display: none; }
.kw-stage { position: relative; display: grid; grid-template-columns: 1fr 380px; height: calc(100vh - 250px); min-height: 480px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kw-map { height: 100%; background: #dcd7cc; }
.kw-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 800; background: rgba(28,27,25,.86); color: #fff; font-size: 13px; padding: 7px 12px; pointer-events: none; max-width: 80%; text-align: center; }
.kw-panel { border-left: 1px solid var(--line); background: var(--paper); overflow: hidden; display: flex; flex-direction: column; }
.kw-panel[data-mode="list"] .kw-panel-detail { display: none; }
.kw-panel[data-mode="detail"] .kw-panel-list { display: none; }
.kw-panel-list, .kw-panel-detail { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.kw-panel-list { padding: 14px 16px; gap: 10px; }
.kw-panel-head { display: flex; align-items: center; gap: 10px; }
.kw-panel-head h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.kw-panel-detail .kw-panel-head { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kw-panel-detail .kw-panel-head > div { flex: 1; min-width: 0; font-weight: 800; }
.kw-count { font-size: 12px; background: var(--band); padding: 2px 7px; font-weight: 700; }
.kw-back { font: inherit; font-size: 13px; font-weight: 700; background: none; border: 0; color: var(--pine); cursor: pointer; padding: 0; white-space: nowrap; }
.kw-panel-body { overflow-y: auto; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.kw-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.kw-site { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; text-align: left; font: inherit; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 4px; color: var(--ink); cursor: pointer; }
.kw-site:hover, .kw-site.active { background: var(--band); }
.kw-site-main { display: flex; flex-direction: column; min-width: 0; }
.kw-site-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-site-score { font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: inset 0 -0.2em 0 var(--heat); padding: 0 1px; }
.kw-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.kw-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.kw-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.kw-empty { color: var(--muted); font-size: 14px; padding: 12px 2px; line-height: 1.5; }
.kw-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--pine); border-radius: 50%; animation: kwspin .8s linear infinite; vertical-align: -1px; margin-right: 4px; }
@keyframes kwspin { to { transform: rotate(360deg); } }
.kw-mkt { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.kw-mkt:hover .kw-mkt-name { text-decoration: underline; }
.kw-mkt-none { display: block; }
.kw-mkt-num { font-weight: 900; font-size: 15px; box-shadow: inset 0 -0.2em 0 var(--heat); font-variant-numeric: tabular-nums; }
.kw-mkt-name { font-weight: 700; }
.kw-mkt-meta { font-size: 12.5px; white-space: nowrap; }
.kw-mkt-go { margin-left: auto; color: var(--muted); }
.kw-parcel { display: flex; flex-direction: column; gap: 10px; }
.kw-parcel h3 { margin: 0; font-size: 1.05rem; }
.kw-parcel .label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.kw-parcel dl.kv, .kw-panel-body dl.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.kw-panel-body dl.kv dt { color: var(--muted); }
.kw-panel-body dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.kw-panel-body .src { font-size: 12.5px; color: var(--muted); }
.kw-panel-body details.full-rec summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--pine); }
.kw-panel-body .actions, .kw-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kw-panel-body .btn.sm { font-size: 13px; }
.kw-actions .btn, .kw-panel-body .actions .btn { font-size: 13px; padding: 7px 11px; }
.kw-addpick select { width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.kw-name { font: inherit; font-weight: 800; font-size: 1.05rem; width: 100%; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 3px 4px; }
.kw-name:focus { border-color: var(--line); background: var(--surface); outline: none; }
.kw-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kw-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.kw-form label.full { grid-column: 1 / -1; }
.kw-form .kw-input { font-weight: 400; color: var(--ink); width: 100%; }
.kw-parcels h4 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kw-prow { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; }
.kw-x { background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; }
.kw-danger { color: #B23A2A; }
.kw-danger.armed { background: #B23A2A; color: #fff; border-color: #B23A2A; }
.kw-tableview { padding-bottom: 20px; }
.kw-table-wrap { overflow-x: auto; padding: 0 20px; }
.kw-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.kw-tbl th { text-align: left; border-bottom: 2px solid var(--ink); padding: 0; }
.kw-tbl th.num, .kw-tbl td.num { text-align: right; }
.kw-tbl th button { font: inherit; font-weight: 800; font-size: 13px; background: none; border: 0; padding: 8px 6px; color: var(--ink); cursor: pointer; width: 100%; text-align: inherit; }
.kw-tbl td { border-bottom: 1px solid var(--line); padding: 7px 6px; vertical-align: middle; }
.kw-link { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--pine); cursor: pointer; text-align: left; }
.kw-foot { padding: 10px 20px 72px; margin: 0; }
/* keep content clear of the host badge pinned to the bottom-right corner */
body { padding-bottom: 64px; }
.kw-panel-body { padding-bottom: 72px; }
.kw-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 14px; z-index: 3000; }
.kw-site-label { background: rgba(28,27,25,.78) !important; color: #fff !important; border: 0 !important; box-shadow: none !important; font: 700 12px var(--font-text) !important; padding: 2px 6px !important; }
.kw-site-label::before { display: none; }
.leaflet-container { font-family: var(--font-text); }
@media (max-width: 860px) {
  .kw-stage { grid-template-columns: 1fr; height: calc(100vh - 290px); }
  .kw-panel { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; z-index: 900; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.15); transform: translateY(100%); transition: transform .2s; }
  .kw-app.panel-open .kw-panel { transform: none; }
  .kw-panel-toggle { display: inline-flex; }
  .kw-saved { display: none; }
  .kw-geo { flex-basis: 100%; max-width: none; order: 5; }
}

/* signup v2 */
.signup-form { flex-direction: column; align-items: stretch; gap: 10px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup-row input[type="email"] { flex: 1 1 200px; }
.signup-opts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.signup-opts select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%; }
.signup-check { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); line-height: 1.4; cursor: pointer; }
.signup-check input { margin-top: 3px; flex: none; }
.kw-signup { padding: 24px 20px 0; }
.kw-signup .signup { max-width: 1080px; }

/* search page: use the width, one toolbar row */
.search-page main.wrap { max-width: 1320px; }
.search-head { max-width: none; gap: 6px; }
.search-toolbar { flex-wrap: nowrap; gap: 16px; }
.search-toolbar .search { flex: 1 1 auto; max-width: 520px; margin: 0; }
.search-toolbar .search input { width: 100%; }
.search-count { margin: 0 auto 0 0; white-space: nowrap; font-size: 1rem; color: var(--muted); }
.search-page .rank-table { min-width: 0; }
@media (max-width: 760px) {
  .search-toolbar { flex-wrap: wrap; }
  .search-toolbar .search { flex-basis: 100%; max-width: none; }
}

/* market hero: two columns, locator map on the right */
.market-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); align-items: center; gap: 40px; }
.hero-side { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.hero-side figure { margin: 0; }
.hero-side .rank-card { width: 100%; max-width: none; border-top: 1px solid var(--line); padding-top: 12px; }
.locmap { width: 100%; height: auto; display: block; overflow: hidden; }
.locmap .st-core { fill: var(--band); stroke: var(--paper); stroke-width: 2; }
.lead-band .locmap .st-core { fill: #E6E1D6; }
.locmap .loc-other { stroke: var(--paper); stroke-width: 2; opacity: .85; transition: r .12s, opacity .12s; }
.locmap .loc-hit { fill: transparent; }
.locmap .loc-label { font: 700 22px var(--font-display); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; opacity: 0; pointer-events: none; }
.locmap .loc-label-this { opacity: 1; font-size: 26px; }
.locmap .loc-pin { cursor: pointer; }
.locmap .loc-pin:hover .loc-other, .locmap .loc-pin:focus .loc-other { r: 13px; opacity: 1; stroke: var(--ink); }
.locmap .loc-label.on { opacity: 1; }
.locmap .loc-pin:focus { outline: none; }
.loc-card figcaption { margin-top: 4px; }
.locmap .loc-ring { fill: none; stroke: var(--ink); stroke-width: 2.5; opacity: .35; }
.locmap .loc-this { stroke: var(--paper); stroke-width: 3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lead-band .locmap .st-core { fill: #2A2824; }  }
:root[data-theme="dark"] .lead-band .locmap .st-core { fill: #2A2824; }

@media (max-width: 860px) {
  .market-hero { grid-template-columns: 1fr; gap: 20px; }
  .loc-card { max-width: 420px; }
}

/* market page: tighter hero, sticky section tabs */
.market-hero { align-items: start; }
main.wrap > .lead-band:has(.market-hero) { padding-bottom: 8px; }
.section-nav { position: sticky; top: var(--hdr-h, 74px); z-index: 4; background: var(--paper); margin-top: -44px; padding-top: 12px; gap: 6px 22px; }
main.wrap > .lead-band + .section-nav { margin-top: -40px; }
main.wrap > .section-nav + section { margin-top: -30px; }
.section-nav a { padding-bottom: 8px; margin-bottom: -13px; }
.section-nav a.active { border-bottom-color: var(--pine); }
section[id] { scroll-margin-top: calc(var(--hdr-h, 74px) + 64px); }

.market-title .rank-card { width: 100%; max-width: 560px; margin-top: 8px; padding: 14px 0 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.market-hero { align-items: center; }

@media (max-width: 640px) {
  .section-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; font-size: 15px; white-space: nowrap; }
  .section-nav::-webkit-scrollbar { display: none; }
  .section-nav a { flex: none; }
}
