@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-500.woff2) format("woff2"); }
/* Layout: one editorial column with a ledger card beside the hero, a full-width pour demo, rules as a two-column glossary. */
:root {
  --bg: #EDF1EA; --paper: #F8FAF6; --ink: #13241B; --muted: #4F6258; --line: #CFD8CD; --tank: #DDE5DB;
  --accent: #0E6B58; --accent-ink: #FFFFFF; --warn: #9A5B00; --good: #1B7F46;
  --c0: #257de0; --c1: #f47230; --c2: #00b894; --c3: #f2a600; --c4: #ee7fac; --debt: #d93a3a;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1913; --paper: #15251C; --ink: #E7F0E9; --muted: #9DB1A3; --line: #27392E; --tank: #0F1D16;
    --accent: #5CCFB4; --accent-ink: #072018; --warn: #E0A63E; --good: #4CC27F;
    --c0: #338ced; --c1: #e76624; --c2: #00a888; --c3: #d28e05; --c4: #e24d8b; --debt: #eb6263; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1913; --paper: #15251C; --ink: #E7F0E9; --muted: #9DB1A3; --line: #27392E; --tank: #0F1D16;
  --accent: #5CCFB4; --accent-ink: #072018; --warn: #E0A63E; --good: #4CC27F;
  --c0: #338ced; --c1: #e76624; --c2: #00a888; --c3: #d28e05; --c4: #e24d8b; --debt: #eb6263; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6;
  padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); padding-block: 0 56px; }
.wrap { max-width: 1060px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(38px, 7vw, 72px); font-weight: 800; }
h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; max-width: 62ch; }
a { color: var(--accent); }
.mono { font-family: var(--f-mono); }
.eyebrow { font: 500 12px var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 20px; max-width: 54ch; }
.strong { font-weight: 600; }
section { padding-block: 72px 8px; display: flex; flex-direction: column; gap: 20px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font: 500 14px var(--f-mono); }
.nav a { color: var(--ink); text-decoration: none; }
.nav .links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; padding-block: 36px 24px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero .copy { display: flex; flex-direction: column; gap: 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { font: 600 16px var(--f-body); padding: 12px 20px; border-radius: 8px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.ledger { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 6px 6px 0 var(--ink); }
.ledger .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ledger .big { font: 800 30px var(--f-display); letter-spacing: -0.02em; }
.ledger .row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.ledger .row i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.ledger .row b { font-weight: 600; }
.ledger .row .amt { font: 500 14px var(--f-mono); }
.ledger .row .sub { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
.ledger .bar { grid-column: 2 / -1; height: 6px; background: var(--tank); border-radius: 3px; overflow: hidden; }
.ledger .bar span { display: block; height: 100%; background: var(--c); }
.tag { font: 500 11px var(--f-mono); color: var(--muted); }

.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.pull { font: 700 clamp(22px, 3vw, 30px) var(--f-display); letter-spacing: -0.02em; line-height: 1.15; border-left: 6px solid var(--accent); padding-left: 16px; max-width: 28ch; }
.sf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .sf { grid-template-columns: minmax(0, 1fr); } }
.sf > div { background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }

dl.rules { margin: 0; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0 28px; }
dl.rules dt { font: 700 20px var(--f-display); padding: 16px 0; border-top: 1.5px solid var(--ink); letter-spacing: -0.01em; }
dl.rules dd { margin: 0; padding: 16px 0; border-top: 1.5px solid var(--ink); max-width: 60ch; }
@media (max-width: 640px) { dl.rules { grid-template-columns: minmax(0, 1fr); } dl.rules dt { padding-bottom: 0; border-bottom: 0; } dl.rules dd { border-top: 0; padding-top: 4px; } }

/* demo */
.demo { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 18px; box-shadow: 8px 8px 0 var(--ink); }
.ctrls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 28px; }
.ctrl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctrl label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.ctrl label b { font: 500 15px var(--f-mono); color: var(--accent); }
dl.rules { margin: 0; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0 28px; }
dl.rules dt { font: 700 20px var(--f-display); padding: 16px 0; border-top: 1.5px solid var(--ink); letter-spacing: -0.01em; }
dl.rules dd { margin: 0; padding: 16px 0; border-top: 1.5px solid var(--ink); max-width: 60ch; }
@media (max-width: 640px) { dl.rules { grid-template-columns: minmax(0, 1fr); } dl.rules dt { padding-bottom: 0; border-bottom: 0; } dl.rules dd { border-top: 0; padding-top: 4px; } }

/* demo */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps > div { border-top: 1.5px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.steps .n { font: 500 13px var(--f-mono); color: var(--muted); }

.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1.5px solid var(--ink); padding: 14px 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--ink); }
.faq summary { cursor: pointer; font: 700 19px var(--f-display); letter-spacing: -0.01em; list-style-position: outside; }
.faq summary .q { font: 500 13px var(--f-mono); color: var(--muted); margin-right: 8px; }
.faq .a { padding-top: 8px; max-width: 62ch; }
.faq .a .tag { margin-right: 8px; }
footer { margin-top: 72px; border-top: 1.5px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
footer p { max-width: 80ch; }

.notbudget { font-size: 19px; border-left: 6px solid var(--c1); padding-left: 14px; max-width: 54ch; }
code { font: 14px var(--f-mono); background: var(--tank); padding: 1px 6px; border-radius: 4px; }
.books { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.books li { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--line); padding-left: 14px; }
.books span { color: var(--muted); font-size: 15px; }
.code { position: relative; }
.code pre { margin: 0; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; padding: 16px; overflow-x: auto; font: 14px/1.5 var(--f-mono); box-shadow: 5px 5px 0 var(--ink); }
.code button { position: absolute; top: 10px; right: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.facts > div { border-top: 1.5px solid var(--ink); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.facts span { color: var(--muted); font-size: 15px; }


/* ---- who it is for ---- */
.fors { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 40px; }
.fors > div { border-top: 3px solid var(--accent); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fors .no { border-top-color: var(--warn); }
.fors ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the demo ---- */
.demo { position: relative; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 22px; box-shadow: 8px 8px 0 var(--ink); }
.top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 36px; align-items: stretch; }
@media (max-width: 760px) { .top { grid-template-columns: minmax(0, 1fr); } }
fieldset.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
fieldset.group legend { font: 500 12px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.ctrl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ctrl label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.ctrl label b { font: 500 15px var(--f-mono); color: var(--accent); }
.ctrl input[type=range], .when input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.warn { color: var(--warn); font-size: 14px; margin: 0; }

.score { display: flex; flex-direction: column; gap: 14px; justify-content: center; background: var(--bg); border: 1.5px solid var(--ink); border-radius: 10px; padding: 18px 20px; min-width: 0; }
.sc { display: flex; flex-direction: column; gap: 2px; }
.sc .k { font: 500 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sc b { display: inline-block; align-self: flex-start; transform-origin: left center; font-family: var(--f-display); font-weight: 800; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sc.date b { color: var(--accent); }
.sc .s { font-size: 14px; color: var(--muted); }
.score .why { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.bump { animation: bump .5s ease-out; }
@keyframes bump { 0% { transform: scale(1.1); } 100% { transform: none; } }

.levhead { margin: 0; font-size: 15px; max-width: none; }
.levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 10px; }
.lev { text-align: left; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.lev:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ink); }
.lev.best { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent); }
.lev .lh { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lev .lh em { font: 600 11px var(--f-mono); font-style: normal; color: var(--accent-ink); background: var(--accent); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.lev .la { font: 500 13px var(--f-mono); color: var(--muted); }
.lev .lw { font: 800 24px var(--f-display); letter-spacing: -.02em; color: var(--accent); margin-top: 4px; }
.lev .ls { font-size: 13px; color: var(--muted); }

.twists { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.twists summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.twistbody { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.blurb { font-size: 14px; color: var(--muted); margin: 0; min-height: 3em; }
.sw { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.sw input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
select { font: 14px var(--f-body); background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.seg label { padding: 7px 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.seg label + label { border-left: 1.5px solid var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
button.small { font: 600 14px var(--f-body); padding: 6px 14px; border-radius: 6px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }

/* the month controls stay in view while the flow below plays out */
.when { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 4px; background: var(--paper); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); padding-block: 12px 6px; }
.monthrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mnow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.mnow b { font: 700 24px var(--f-display); white-space: nowrap; }
.mn { font: 500 13px var(--f-mono); color: var(--muted); white-space: nowrap; }
.play { font: 600 15px var(--f-body); padding: 9px 18px; border-radius: 8px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-block: 1.5px solid var(--ink); }
.stat { padding: 12px 14px 12px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--line); }
.stat .k { font: 500 12px var(--f-mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.stat .v { font: 800 26px var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .s { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

.lower { display: flex; flex-direction: column; gap: 22px; }

/* ---- the buckets: tanks with a water level, a stream into whichever one is filling, and arrows carrying the overflow on ---- */
.flow { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 112px; }
.tapline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tap { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 18px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--bg); white-space: nowrap; }
.tap b { font: 800 26px var(--f-display); color: var(--accent); letter-spacing: -.02em; line-height: 1.2; }
.tap span { font-size: 14px; color: var(--muted); }
.tap-note { font-size: 13px; color: var(--warn); margin: 0; max-width: none; }
.stages { display: flex; align-items: stretch; }
.stage { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.stage.multi { flex: 2 1 0; }
.tiern { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tks { display: flex; gap: 10px; flex: 1; }
.tk { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); }
.tk.idle { border-style: dashed; }
.tk.full, .tk.paid { border-color: var(--good); }
.tk.recv { border-color: var(--accent); }
.tkh { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tkh b { font-weight: 600; font-size: 15px; line-height: 1.25; }
.pill { font: 600 11px var(--f-mono); padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.full { color: var(--good); } .pill.fill { color: var(--accent); } .pill.wait { color: var(--muted); }
.vessel { position: relative; height: 170px; overflow: hidden; background: var(--tank); border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 14px 14px; }
.water { position: absolute; inset: auto 0 0 0; height: var(--lvl); background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 72%, #000)); transition: height .6s cubic-bezier(.3, .8, .3, 1); }
.playing .water { transition-duration: .45s; }
.water::before { content: ""; position: absolute; left: -20px; right: -20px; top: -5px; height: 10px; background: radial-gradient(circle at 10px 10px, var(--c) 6px, transparent 7px) repeat-x; background-size: 20px 10px; animation: slosh 2.4s linear infinite; }
.tk.empty .water::before { display: none; }
@keyframes slosh { to { transform: translateX(20px); } }
.stream { position: absolute; top: 0; left: 50%; width: 8px; margin-left: -4px; height: calc(100% - var(--lvl)); border-radius: 0 0 4px 4px; background: repeating-linear-gradient(180deg, var(--c) 0 10px, color-mix(in srgb, var(--c) 40%, transparent) 10px 20px); background-size: 100% 20px; animation: fall .5s linear infinite; }
@keyframes fall { to { background-position-y: 20px; } }
.tkv { font: 800 22px var(--f-display); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tks-sub, .tk small { font-size: 12px; color: var(--muted); line-height: 1.35; min-height: 2.7em; }
.took { font: 600 14px var(--f-mono); color: var(--accent); min-height: 1.4em; font-variant-numeric: tabular-nums; }
.link { flex: 0 0 56px; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-inline: 4px; color: var(--muted); }
.link .arrow { width: 100%; height: 22px; clip-path: polygon(0 28%, 66% 28%, 66% 0, 100% 50%, 66% 100%, 66% 72%, 0 72%); background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.link.on .arrow { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, color-mix(in srgb, var(--accent) 35%, transparent) 8px 14px); background-size: 14px 100%; animation: flowx .5s linear infinite; }
@keyframes flowx { to { background-position-x: 14px; } }
.link .amt { font: 600 12px var(--f-mono); color: var(--ink); min-height: 1.3em; }
.endnote { font-size: 14px; color: var(--muted); }
.endnote.leak { color: var(--warn); font-weight: 600; }

@media (max-width: 760px) {
  .stages { flex-direction: column; }
  .stage.multi { flex: 1 1 auto; }
  .tks { flex-direction: column; }
  .vessel { height: 16px; border: 1.5px solid var(--ink); border-radius: 8px; }
  .water { inset: 0 auto 0 0; width: var(--lvl); height: 100%; transition-property: width; background: var(--c); }
  .water::before, .stream { display: none; }
  .link { flex-basis: auto; flex-direction: row; gap: 8px; padding-block: 6px; }
  .link .arrow { width: 22px; height: 40px; transform: rotate(90deg) scale(.6, 1); margin-block: -8px; }
  .tk small { min-height: 0; }
}

.miles { min-width: 0; }

.log { margin: 6px 0 0; padding: 0; list-style: none; columns: 2 360px; column-gap: 36px; font-size: 15px; line-height: 1.35; }
.log li { display: grid; grid-template-columns: 20px 62px minmax(0, 1fr); gap: 0 8px; align-items: baseline; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.log li::before { content: "○"; }
.log li.done { color: var(--ink); }
.log li.done::before { content: "✓"; color: var(--good); font-weight: 700; }
.log li.fin { color: var(--ink); }
.log li.fin .t { font-weight: 700; }
.log .m { grid-column: 2; font: 500 13px var(--f-mono); }
.log .t { grid-column: 3; min-width: 0; }
.demo .tag { max-width: none; font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) { .score { order: -1; } }
.log li { break-inside: avoid; }
@media (prefers-reduced-motion: reduce) { .water, .playing .water { transition: none; } .water::before, .stream, .link.on .arrow { animation: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover, .lev:hover { transform: none; } .bump { animation: none; } }
.yearline { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); pointer-events: none; }
.yearline span { position: absolute; right: 4px; bottom: 2px; font: 600 10px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--tank); padding: 0 4px; border-radius: 3px; }
.tk.reached .yearline span { background: var(--good); color: var(--bg); }
@media (max-width: 760px) { .yearline { top: 0; bottom: 0 !important; left: var(--yl); right: auto; border-top: 0; border-left: 2px dashed var(--ink); } .yearline span { display: none; } }

/* ---- hero card: rows rise, bars fill, numbers count up. CSS runs from the first paint (no flash of the finished card); hero.ts replays it now and then ---- */
@media (prefers-reduced-motion: no-preference) {
  .ledger.anim .top, .ledger.anim .big { animation: rise .5s ease-out both; }
  .ledger.anim .row { animation: rise .55s ease-out both; }
  .ledger.anim .r1 { animation-delay: .15s; } .ledger.anim .r2 { animation-delay: .35s; } .ledger.anim .r3 { animation-delay: .55s; }
  .ledger.anim .bar span { animation: fillw 1s cubic-bezier(.3, .8, .3, 1) var(--d, .7s) both; }
  .ledger.anim .r1 .amt { animation: pop .45s ease-out 1.5s both; }
  .ledger.anim [data-to] { animation: show 1ms linear var(--at, 0s) both; }
  .ledger.anim .r2 .bar { animation: glow 1.1s ease-out 2.5s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fillw { from { width: var(--from, 0%); } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
@keyframes show { from { opacity: 0; } to { opacity: 1; } }
@keyframes glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.share { font: 500 11px var(--f-mono); color: var(--muted); }

/* ---- the app, shown: real screens in a tabbed viewer. Without JS all three simply stack. ---- */
.bridge { font-size: 17px; margin: 0; max-width: none; }
.bridge a { font-weight: 600; white-space: nowrap; }
.appview { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 14px; box-shadow: 8px 8px 0 var(--ink); }
.apptabs { display: flex; gap: 8px; flex-wrap: wrap; }
.apptabs button { font: 600 15px var(--f-body); padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.apptabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.appview figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.appview figure[hidden] { display: none; }
.shot { max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #EDF1EA; }
.shot img { display: block; width: 100%; height: auto; }
.appview figcaption { font-size: 15px; color: var(--muted); }
#app .tag { max-width: none; font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) { .shot img { width: 900px; max-width: none; } .shot { max-height: 520px; } }
