:root {
  --bg: #f7f5ef; --card: #ffffff; --ink: #1c1f1a; --muted: #5d645a; --line: #e2ded2;
  --green: #00843d; --green-ink: #006b31; --gold: #f4c300; --bar-bg: #ece8dc;
  --ok-bg: #e7f4ec; --alert-bg: #fdf1d6;
  --series-1: #2a78d6; --series-2: #eb6834; --series-neg: #e34948; --series-gray: #898781;
  --grid: #e9e7df; --axis: #c3c2b7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121411; --card: #1b1e1a; --ink: #ecefe8; --muted: #a2aa9e; --line: #2d312b;
    --green: #2fb36a; --green-ink: #5fd08f; --gold: #f4c300; --bar-bg: #262a24;
    --ok-bg: #16301f; --alert-bg: #3a2f12;
    --series-1: #3987e5; --series-2: #d95926; --series-neg: #e66767; --series-gray: #898781;
    --grid: #2c2f2a; --axis: #3d423a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--green-ink); }
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  max-width: 46rem; margin: 0 auto; padding: 1rem; border-bottom: 3px solid var(--gold); }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--green); }
.top nav a { margin-left: 1rem; font-weight: 600; text-decoration: none; }
main { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.lede { font-size: 1.05rem; }
.muted { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0 0; }
fieldset { border: 0; padding: 0; margin: 1.5rem 0 0; }
legend { font-weight: 700; margin-bottom: .6rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--green); background: var(--ok-bg); }
.choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice input { margin-top: .3rem; accent-color: var(--green); }
.row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.pill:has(input:checked) { border-color: var(--green); background: var(--ok-bg); }
.pill input { accent-color: var(--green); }
input[type=text] { width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); }
button, .button { display: inline-block; margin-top: 1.5rem; font: inherit; font-weight: 700; padding: .75rem 1.3rem;
  border: 0; border-radius: 10px; background: var(--green); color: #fff; cursor: pointer; text-decoration: none; }
button.secondary { background: var(--bar-bg); color: var(--ink); }
.tag { font-style: normal; font-size: .75rem; background: var(--gold); color: #1c1f1a; padding: .05rem .4rem;
  border-radius: 6px; white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
.alert, .ok { border-radius: 10px; padding: .25rem 1rem; margin: 1rem 0; }
.alert { background: var(--alert-bg); } .ok { background: var(--ok-bg); }
.bars { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.bars li { margin-bottom: 1rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.bar { height: .7rem; background: var(--bar-bg); border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; min-width: 2px; }
.split { font-size: .85rem; margin-top: .2rem; }
.review { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.review button { margin-top: 0; }
.post h2 { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.post blockquote { margin: .75rem 0; padding: .25rem 1rem; border-left: 4px solid var(--gold); color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.foot { max-width: 46rem; margin: 0 auto; padding: 0 1rem 2rem; color: var(--muted); font-size: .85rem; }
.brandwrap { display: flex; flex-direction: column; line-height: 1.2; }
.tagline { font-size: .85rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.res { list-style: none; padding: 0; margin: 0; }
.res li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.res li:last-child { border-bottom: 0; }
.res a { font-weight: 700; }
.res p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.top nav a { margin-left: 0; }

main.wide { max-width: 52rem; }
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.jump a { font-size: .9rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.issue { margin-top: 2rem; }
.issue > h2 { margin: 0 0 .75rem; font-size: 1.4rem; border: 0; padding: 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; margin: 0 0 1rem; }
.stat h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.takeaway { margin: 0 0 .9rem; font-size: 1.02rem; }
.chart { width: 100%; outline-offset: 4px; }
.chart svg { display: block; overflow: visible; }
.chart text { font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; fill: var(--muted); }
.chart text.tick { font-variant-numeric: tabular-nums; }
.chart text.ann { font-size: 11px; }
.chart text.endlabel { fill: var(--ink); font-weight: 700; font-size: 13px; }
.chart text.cat { fill: var(--ink); font-size: 13px; }
.chart text.cat.strong { font-weight: 700; }
.chart .mark.hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.key-line { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.key-rect { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.stat details { margin-top: .6rem; font-size: .9rem; }
.stat summary { cursor: pointer; color: var(--green-ink); font-weight: 600; }
.stat details table { margin-top: .5rem; font-variant-numeric: tabular-nums; }
.stat details .table-wrap { max-height: 16rem; overflow: auto; }
.source { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }
.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .6rem; font-size: .85rem; box-shadow: 0 4px 14px rgba(0,0,0,.12); max-width: 16rem; }
.tip-head { color: var(--muted); font-size: .8rem; margin-bottom: .2rem; }
.tip-row { display: flex; align-items: center; gap: .45rem; }
.tip-key { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.tip-label { color: var(--muted); }
.key-band { width: 14px; height: 10px; border-radius: 2px; display: inline-block; opacity: .25; }
.field { display: block; margin: 0 0 .9rem; font-weight: 600; }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: .3rem; font: inherit; font-weight: 400;
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.field textarea { resize: vertical; }
.check { display: flex; gap: .5rem; align-items: flex-start; margin: .5rem 0 .6rem; }
.check input { margin-top: .35rem; accent-color: var(--green); }
.indent { margin-left: 1.6rem; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 .75rem; }
.optin-toggle { margin-bottom: 0; }
.optin-body { display: none; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 1rem .9rem .4rem; }
.optin:has(.optin-toggle input:checked) .optin-body { display: block; }
.optin:has(.optin-toggle input:checked) .optin-toggle { border-radius: 10px 10px 0 0; }
blockquote.note { margin: .75rem 0; padding: .5rem 1rem; border-left: 4px solid var(--gold); background: var(--bg); border-radius: 0 10px 10px 0; }
blockquote.note p { margin: .25rem 0; }
blockquote.note footer { color: var(--muted); font-size: .85rem; }
.note-review { display: block; }
.note-review button { margin: 0 .4rem 0 0; }
