/* Few Winners — a scoreboard, not a brochure.
   Layout: one 1120px column; the home page reads hero → score → markets → rules → buy zone → posts. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --ink: #14171c;
  --muted: #5c636e;
  --line: #d9dcd6;
  --accent: #1d3bd6;      /* cobalt: the one colour of the brand */
  --accent-ink: #ffffff;
  --core: #9aa3ad;        /* S&P 500 sleeve */
  --quality: #1d3bd6;     /* few-winners sleeve */
  --future: #7c8cf0;      /* future-winners sleeve */
  --p1: #1d3bd6; --p2: #5f74e6; --p3: #a4b0f2; --rest: #d6d9d2;
  --buy: #0d7a52; --buy-bg: #dcf1e7;
  --fair: #6b5d12; --fair-bg: #f1ecd0;
  --rich: #a8392f; --rich-bg: #f6e0dc;
  --unk: #5c636e; --unk-bg: #e7e9e4;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --ink: #e8eaee; --muted: #9aa2ad; --line: #2a2f37;
    --accent: #8597ff; --accent-ink: #0f1114; --core: #6b737e; --quality: #8597ff; --future: #4d5cb0;
    --p1: #8597ff; --p2: #5d6fd6; --p3: #3c4890; --rest: #2c3139;
    --buy: #5fd3a2; --buy-bg: #133528; --fair: #e2cc6a; --fair-bg: #332e12; --rich: #f08c80; --rich-bg: #3a1c19; --unk: #a3abb6; --unk-bg: #23272e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --ink: #e8eaee; --muted: #9aa2ad; --line: #2a2f37;
  --accent: #8597ff; --accent-ink: #0f1114; --core: #6b737e; --quality: #8597ff; --future: #4d5cb0;
  --p1: #8597ff; --p2: #5d6fd6; --p3: #3c4890; --rest: #2c3139;
  --buy: #5fd3a2; --buy-bg: #133528; --fair: #e2cc6a; --fair-bg: #332e12; --rich: #f08c80; --rich-bg: #3a1c19; --unk: #a3abb6; --unk-bg: #23272e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--body); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; font-stretch: 80%; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; font-weight: 800; font-stretch: 85%; }
h3 { font-size: 1.15rem; font-weight: 700; font-stretch: 90%; }
p { margin: 0; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stack { display: flex; flex-direction: column; gap: 56px; padding-block: 40px 72px; }
.page-top { padding-top: 40px; }
.kicker { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.sec-head p { max-width: 60ch; }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: 1.35rem; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.brand-mark i { display: block; width: 5px; background: var(--accent); border-radius: 1px; }
.brand-mark i:nth-child(1) { height: 18px; } .brand-mark i:nth-child(2) { height: 12px; opacity: .7; } .brand-mark i:nth-child(3) { height: 5px; opacity: .4; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav a.lang { font-family: var(--mono); font-size: 0.8rem; border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }

/* hero */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { padding-block: 56px 48px; display: grid; gap: 18px; }
.eyebrow { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.display { font-size: clamp(4rem, 15vw, 10.5rem); font-weight: 900; font-stretch: 62%; line-height: 0.86; letter-spacing: -0.015em; text-transform: uppercase; }
.lead { font-size: 1.2rem; line-height: 1.5; max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(1.08); }

/* scoreboard + allocation */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.board { background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 22px 24px; display: grid; gap: 16px; }
.board .kicker, .board .muted { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.board-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; }
.team { display: grid; gap: 4px; }
.team:last-child { text-align: right; }
.team-name { font-family: var(--display); font-weight: 700; font-stretch: 85%; font-size: 1.05rem; }
.team-score { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 500; line-height: 1; }
.vs { font-family: var(--mono); font-size: 0.8rem; color: color-mix(in srgb, var(--bg) 55%, transparent); padding-bottom: 10px; }
.board-foot { color: color-mix(in srgb, var(--bg) 70%, transparent); border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); padding-top: 12px; }
.alloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; display: grid; gap: 14px; align-content: start; }
.alloc-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; }
.alloc-label { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.bar { display: flex; height: 34px; border-radius: 4px; overflow: hidden; gap: 2px; }
.seg { display: flex; align-items: center; padding-left: 8px; min-width: 0; color: #fff; font-family: var(--mono); font-size: 0.78rem; }
.seg b { font-weight: 500; white-space: nowrap; overflow: hidden; }
.seg-core { background: var(--core); } .seg-quality { background: var(--quality); } .seg-future { background: var(--future); }
:root[data-theme="dark"] .seg, :root:not([data-theme="light"]) .seg { color: #fff; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* market splits */
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
@media (max-width: 720px) { .market-grid { grid-template-columns: 1fr; } }
.market { margin: 0; display: grid; gap: 8px; }
.market figcaption { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.market-name { font-family: var(--display); font-weight: 700; font-stretch: 85%; font-size: 1.1rem; }
.src { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.mbar { display: flex; height: 14px; gap: 2px; }
.mseg { display: block; border-radius: 2px; }
.mseg.p1 { background: var(--p1); } .mseg.p2 { background: var(--p2); } .mseg.p3 { background: var(--p3); } .mseg.rest { background: var(--rest); }
.mnames { display: flex; flex-wrap: wrap; gap: 2px 6px; color: var(--ink); }
.mnames b { font-weight: 600; }

/* rules */
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: rule; border-top: 2px solid var(--ink); }
.rule-list li { counter-increment: rule; padding: 18px 20px 4px 0; display: grid; gap: 8px; align-content: start; }
.rule-list li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.rule-list h3::before { content: counter(rule) "  "; font-family: var(--mono); font-weight: 500; color: var(--accent); }
@media (max-width: 820px) { .rule-list { grid-template-columns: 1fr; } .rule-list li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

/* buy zone */
.bz-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.bz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 8px; }
.bz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bz-name { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: 1.2rem; }
.bz-num { display: grid; gap: 2px; }
.big { font-size: 1.8rem; color: var(--buy); line-height: 1.1; }
.tick { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--mono); font-size: 0.78rem; font-weight: 500; padding: 1px 6px; border-radius: 3px; background: var(--unk-bg); color: var(--ink); white-space: nowrap; }
.tick small { font-size: 0.68rem; color: var(--muted); }
.tick.sm { font-size: 0.72rem; }

/* posts */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; }
.post-card { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p:last-child { color: var(--muted); }

/* tables */
.page-head { display: grid; gap: 12px; max-width: 70ch; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; white-space: nowrap; }
table.sl { min-width: 860px; }
table.sl td.co { min-width: 220px; }
.row-note { margin-top: 4px; max-width: 46ch; }
.count { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.chip { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st-buy { background: var(--buy-bg); color: var(--buy); }
.st-fair { background: var(--fair-bg); color: var(--fair); }
.st-rich { background: var(--rich-bg); color: var(--rich); }
.st-unknown, .st-out { background: var(--unk-bg); color: var(--unk); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: 500 0.85rem var(--body); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sl-group .sec-head { margin-bottom: 12px; }

/* article */
.post { max-width: 760px; padding-bottom: 72px; display: grid; gap: 28px; }
.post-head { display: grid; gap: 12px; }
.prose { font-size: 1.05rem; line-height: 1.7; display: grid; gap: 1em; }
.prose h2 { font-size: 1.5rem; margin-top: 0.8em; }
.prose h3 { margin-top: 0.4em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 0.35em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.prose blockquote { margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-family: var(--display); font-stretch: 90%; font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.post-disc { border-top: 1px solid var(--line); padding-top: 16px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); }
.foot-grid { padding-block: 28px 40px; display: grid; grid-template-columns: 200px 1fr; gap: 16px 32px; }
.foot-brand { font-family: var(--display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 1.1rem; }
.disclaimer { color: var(--muted); font-size: 0.85rem; max-width: 80ch; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
