@import url("/assets/nav.css");
/* Shared styles -- same palette, fonts and components as the Survival Odds (4% rule) page. */
:root {
  --bg: #eaf3fc; --panel: #ffffff; --panel-soft: #dceafa; --line: #c9dced;
  --ink: #0b1220; --ink-soft: #3d4f68; --ink-muted: #6b7b94;
  --accent: #2a6fdb; --accent-deep: #0f3d78;
  --good: #158a3d; --good-soft: #dcf0e2; --bad: #c23b3b; --bad-soft: #fbe2e2;
  --neutral-soft: #e6ebf2; --track: #e3edf9;
  --shadow: 0 1px 2px rgba(15,61,120,.06), 0 12px 32px rgba(15,61,120,.08);
  --gold: #b7791f; --gold-soft: #fdf3dc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --panel: #121b2c; --panel-soft: #17233a; --line: #263248;
    --ink: #eef3fb; --ink-soft: #c3d0e6; --ink-muted: #8da0be;
    --accent: #6ea3f2; --accent-deep: #a9c9f2;
    --good: #3ec36a; --good-soft: #163826; --bad: #e2685f; --bad-soft: #3a1e1e;
    --neutral-soft: #202c42; --track: #1c2740;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 20px 48px rgba(0,0,0,.45);
    --gold: #f0b857; --gold-soft: #3a2c0f;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: var(--accent-deep); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 34px; padding-bottom: 40px; }

/* ---- type ---- */
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 10px; }
h1 { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: clamp(30px, 6vw, 44px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; margin: 0 0 12px; }
h2 { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 23px; margin: 0 0 4px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.lede { font-size: 17px; color: var(--ink-soft); max-width: 68ch; margin: 0 0 26px; }
.lede b { color: var(--ink); }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }

/* ---- panels ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; margin-bottom: 22px; }
.panel > .sub { color: var(--ink-muted); font-size: 14px; margin: 0 0 18px; }
@media (max-width: 520px) { .panel { padding: 16px; border-radius: 14px; } }

/* ---- controls ---- */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px 26px; margin-bottom: 8px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 9px; }
.field label .val { font-family: "Source Serif 4", Georgia, serif; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.field .hint { font-size: 12.5px; color: var(--ink-muted); margin-top: 6px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: var(--track); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--panel); box-shadow: 0 1px 4px rgba(15,61,120,.35); margin-top: -7px; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--panel); box-shadow: 0 1px 4px rgba(15,61,120,.35); }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--track); }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.numwrap { display: flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.numwrap:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.numwrap span { color: var(--ink-muted); font-weight: 600; }
.numwrap input { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; padding: 10px 6px; width: 100%; outline: none; font-variant-numeric: tabular-nums; }

/* ---- stat cards ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 20px; }
.stat { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat .k { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.stat .v { font-family: "Source Serif 4", Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .n { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.stat.good .v { color: var(--good); } .stat.bad .v { color: var(--bad); } .stat.blue .v { color: var(--accent-deep); }
.stat.big { grid-column: span 2; }
@media (max-width: 520px) { .stat.big { grid-column: auto; } }

/* ---- chart card ---- */
.chart-card { border-radius: 14px; background: var(--panel-soft); border: 1px solid var(--line); padding: 16px 14px 10px; margin-bottom: 18px; position: relative; }
.chart-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 4px 4px; }
.chart-note { font-size: 13px; color: var(--ink-muted); margin: 2px 4px 6px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart text { font-family: "Source Sans 3", system-ui, sans-serif; fill: var(--ink-muted); font-size: 13px; }
.chart-card { overflow-x: auto; }
@media (max-width: 760px) { svg.chart { min-width: 700px; } }
svg.chart .axis { stroke: var(--line); } svg.chart .gridl { stroke: var(--line); stroke-dasharray: 3 4; }

/* ---- tables ---- */
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
table.tbl th { text-align: right; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.tbl tr.you td { background: var(--gold-soft); font-weight: 700; }
.tablewrap { overflow-x: auto; }

/* ---- buttons / cards ---- */
.btn { display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; background: var(--accent); color: #fff; padding: 13px 22px; border-radius: 12px; transition: background .15s, transform .05s; }
.btn:hover { background: var(--accent-deep); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent-deep); border: 1.5px solid var(--accent); }
.btn.ghost:hover { background: var(--neutral-soft); }
.btn.gold { background: #b7791f; } .btn.gold:hover { background: #8f5d14; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); transition: transform .12s; }
.card h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 20px; margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .go { margin-top: auto; font-weight: 700; color: var(--accent-deep); }
.tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; background: var(--good-soft); color: var(--good); }
.tag.paid { background: var(--gold-soft); color: var(--gold); } .tag.soon { background: var(--neutral-soft); color: var(--ink-muted); }
.card.soon { opacity: .75; box-shadow: none; }

/* ---- locked teaser ---- */
.locked { position: relative; border: 1.5px dashed var(--gold); background: var(--gold-soft); border-radius: 16px; padding: 22px; margin-bottom: 22px; }
.locked h3 { font-family: "Source Serif 4", Georgia, serif; font-size: 21px; margin-bottom: 4px; }
.locked .blur { filter: blur(6px); user-select: none; pointer-events: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0 16px; }
.locked .blur .stat { min-width: 130px; flex: 1; background: var(--panel); }
.locked ul { margin: 8px 0 16px 18px; padding: 0; color: var(--ink-soft); } .locked li { margin: 3px 0; }

/* ---- misc ---- */
.callout { background: var(--panel-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 14.5px; color: var(--ink-soft); margin: 0 0 18px; }
.callout.warn { background: var(--gold-soft); border-color: var(--gold); }
.disclaimer { font-size: 12.5px; color: var(--ink-muted); text-align: center; max-width: 70ch; margin: 28px auto 0; }
.prose { max-width: 70ch; } .prose h2 { margin-top: 26px; } .prose p, .prose li { color: var(--ink-soft); }
details.more { margin-top: 10px; } details.more summary { cursor: pointer; font-weight: 700; color: var(--accent-deep); }
