@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900; src: url(../assets/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-display: swap; font-weight: 300 900; src: url(../assets/fonts/figtree-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Tereka (formerly Financial Cups) — styles
   Palette: zobo (hibiscus) burgundy, palm-gold, warm paper. Type: Bricolage Grotesque + Figtree. */

:root {
  --paper: #FAF4EC;
  --paper-2: #F3E9DC;
  --card: #FFFDF9;
  --ink: #2A1C21;
  --muted: #6F5F63;
  --line: #E6D8C8;
  --zobo: #6E1838;
  --zobo-2: #8E2A4E;
  --gold: #E3A21A;
  --gold-soft: #F7E3B5;
  --good: #1F7A4F;
  --bad: #B3261E;
  --bad-soft: #FBE3E0;
  --cup-body: #FFFFFF;
  --cup-rim: #2A1C21;
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 9px;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1C1316;
    --paper-2: #24191D;
    --card: #2A1E23;
    --ink: #F6EDE6;
    --muted: #BFAEA9;
    --line: #3E2E34;
    --zobo: #E58AA9;
    --zobo-2: #F0A6BF;
    --gold: #F0B53B;
    --gold-soft: #4A3818;
    --good: #5CC08E;
    --bad: #FF8A80;
    --bad-soft: #4A1E1E;
    --cup-body: #382A2F;
    --cup-rim: #F6EDE6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #1C1316;
    --paper-2: #24191D;
    --card: #2A1E23;
    --ink: #F6EDE6;
    --muted: #BFAEA9;
    --line: #3E2E34;
    --zobo: #E58AA9;
    --zobo-2: #F0A6BF;
    --gold: #F0B53B;
    --gold-soft: #4A3818;
    --good: #5CC08E;
    --bad: #FF8A80;
    --bad-soft: #4A1E1E;
    --cup-body: #382A2F;
    --cup-rim: #F6EDE6;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--zobo); text-underline-offset: 3px; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt { margin-top: 1.6rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- announcement + top bar ---------- */
#announce { background: var(--zobo); color: #fff; font-size: .92rem; }
#announce p { margin: 0; padding: 9px 16px; text-align: center; }
#announce a { color: var(--gold-soft); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #announce { background: #4A1026; } #announce a { color: var(--gold); } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--zobo); font: 800 1.4rem/1 var(--display); letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 30px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.topbar nav a:hover { background: var(--paper-2); }
.topbar nav a[aria-current] { background: var(--ink); color: var(--paper); }

/* ---------- buttons + inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--zobo); color: #fff; }
.btn-primary:hover { background: var(--zobo-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-small { color: #2A0E18; } }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-small { color: #2A0E18; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-link { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--zobo); text-decoration: underline; font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.money-input {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 0 14px; transition: border-color .15s ease;
}
.money-input:focus-within { border-color: var(--zobo); }
.money-input span { font-weight: 700; color: var(--muted); }
.money-input input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; }
.money-input.big input { font: 700 1.6rem/1 var(--display); padding: 16px 0; letter-spacing: -0.01em; }
.money-input.big span { font: 700 1.6rem/1 var(--display); }
.text-input { width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 1rem; outline: none; }
.text-input:focus { border-color: var(--zobo); }
::placeholder { color: var(--muted); opacity: .55; font-weight: 500; }

.field { margin: 0 0 1.25rem; border: 0; padding: 0; }
.field > label, .field legend, .field .spaced { display: block; font-weight: 600; margin-bottom: 8px; }
.field .spaced { margin-top: 1rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.error { color: var(--bad); font-weight: 600; font-size: .92rem; margin: 8px 0 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--zobo); }
.sub { padding: 4px 0 10px 30px; }
.sub label { display: block; font-size: .92rem; margin-bottom: 6px; }
.field.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.field.two label { display: block; font-weight: 600; margin-bottom: 8px; }
.field.two.names { grid-template-columns: 1fr 1fr; }
.field.two.names .hint { grid-column: 1 / -1; margin-top: -4px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); }

/* ---------- cup text colour: the cup hue, deepened (light) or lifted (dark) so text passes contrast ---------- */
[style*="--c:"] { --ct: color-mix(in srgb, var(--c) 68%, #000); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [style*="--c:"] { --ct: color-mix(in srgb, var(--c) 45%, #fff); } }
:root[data-theme="dark"] [style*="--c:"] { --ct: color-mix(in srgb, var(--c) 45%, #fff); }

/* ---------- cup drawing ---------- */
.cup .cup-body { fill: var(--cup-body); }
.cup .cup-rim, .cup .cup-handle { stroke: var(--cup-rim); }
.cup .liquid { transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.cup .cup-drip { fill: var(--bad); }
.cup-sm { width: 52px; height: 52px; }
.cup-md { width: 100%; max-width: 104px; height: auto; aspect-ratio: 1; }
.cup-lg { width: 140px; height: 140px; }
@media (prefers-reduced-motion: reduce) { .cup .liquid { transition: none; } }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(36px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(2.6rem, 6.8vw, 5rem); font-weight: 800; letter-spacing: -0.035em; color: var(--zobo); line-height: .98; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-form { margin: 26px 0 18px; max-width: 460px; }
.hero-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.hero-out { min-height: 3.1em; margin: 10px 0 14px; color: var(--muted); font-size: .98rem; }
.hero-out strong { color: var(--ink); }
.promise { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; color: var(--muted); }
.promise li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 1px; }
.hero-cups {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 32px;
  padding: clamp(18px, 3vw, 32px) clamp(12px, 2vw, 24px);
  box-shadow: 0 30px 60px -40px rgba(110, 24, 56, .45);
}
.hc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.hc-name { font-weight: 600; font-size: .86rem; }
.hc-amt { font: 700 1rem/1.1 var(--display); color: var(--ct); font-variant-numeric: tabular-nums; }

.band { padding: 8px 0 56px; }
section.wrap { margin-bottom: 64px; }
.section-lede { color: var(--muted); max-width: 40em; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(s); font: 800 2.4rem/1 var(--display); color: var(--gold); display: block; margin-bottom: 10px; }
.steps p { color: var(--muted); margin: 0; }

.cup-glossary { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
.cup-glossary li { display: flex; gap: 12px; align-items: flex-start; }
.cup-glossary h3 { margin: 4px 0 2px; color: var(--ct); }
.cup-glossary p { margin: 0; font-size: .92rem; color: var(--muted); }

.sheets-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; background: var(--ink); color: var(--paper); border-radius: 32px; padding: clamp(24px, 5vw, 56px); }
.sheets-band p { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.sheets-band .btn-ghost { border-color: var(--paper); color: var(--paper); }
.sheets-band .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.sheet-mock { margin: 0; background: #fff; color: #222; border-radius: 12px; overflow: hidden; font-size: .88rem; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); transform: rotate(-1.2deg); }
.sheet-mock table { width: 100%; border-collapse: collapse; }
.sheet-mock th { background: #6E1838; color: #fff; text-align: left; padding: 9px 10px; font-weight: 600; }
.sheet-mock td { padding: 9px 10px; border-top: 1px solid #e8e8e8; font-variant-numeric: tabular-nums; }
.sheet-mock tr.over td:nth-child(n+3) { background: #FCDCDC; color: #B3261E; font-weight: 600; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font: 600 1.1rem/1.3 var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; font-weight: 400; color: var(--zobo); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); max-width: 66ch; }

.story { display: grid; grid-template-columns: 120px 1fr; gap: 28px; max-width: 900px; }
.story-mark { color: var(--zobo); background: var(--gold-soft); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; }
.story-mark svg { width: 64px; height: auto; }
.story .pull { font: 600 1.4rem/1.35 var(--display); color: var(--zobo); letter-spacing: -0.01em; }
.story p { max-width: 62ch; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
#counts-toggle { flex-basis: 100%; }
.counts-toggle { font-weight: 400; padding: 0; gap: 8px; flex-wrap: wrap; }
.counts-toggle input { width: 16px; height: 16px; }

/* ---------- plan ---------- */
#view-plan, #view-track { padding: 28px 0 80px; }
.stepper { list-style: none; padding: 0; margin: 0 0 24px; display: flex; gap: 8px; counter-reset: st; font-size: .92rem; flex-wrap: wrap; }
.stepper li { counter-increment: st; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-weight: 600; }
.stepper li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: .8rem; }
.stepper li[aria-current] { background: var(--ink); color: var(--paper); }
.stepper li[aria-current]::before { background: var(--gold); color: #2A1C21; }
.stepper li.done::before { content: '✓'; background: var(--good); color: #fff; }
.stepper a { color: inherit; }
.plan-head { max-width: 680px; margin-bottom: 24px; }
.plan-head p { color: var(--muted); font-size: 1.05rem; }
.plan-head strong { color: var(--ink); }

.income-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.receipt { --r-bg: #2A1C21; --r-fg: #FAF4EC; position: sticky; top: 90px; background: var(--r-bg); color: var(--r-fg); border: 0; }
.receipt .muted { color: color-mix(in srgb, var(--r-fg) 70%, transparent); }
.lines { margin: 0 0 14px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed color-mix(in srgb, var(--r-fg) 25%, transparent); font-variant-numeric: tabular-nums; }
.lines dt { color: color-mix(in srgb, var(--r-fg) 80%, transparent); }
.lines dd { margin: 0; font-weight: 600; }
.lines dd.neg { color: #F5A3A3; }
.lines .total { border-bottom: 0; padding-top: 16px; align-items: baseline; }
.lines .total dt { color: var(--r-fg); font-weight: 600; }
.lines .total dd { font: 800 2rem/1 var(--display); color: var(--gold); letter-spacing: -0.02em; }
.tag { font-size: .72rem; background: var(--good); color: #fff; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.tier { background: color-mix(in srgb, var(--r-fg) 10%, transparent); border-radius: var(--radius); padding: 14px 16px; margin-top: 8px; }
.tier p { margin: 4px 0 0; font-size: .93rem; color: color-mix(in srgb, var(--r-fg) 80%, transparent); }
.warn { background: #F5A3A322; border-left: 3px solid #F5A3A3; padding: 10px 12px; margin-top: 12px; font-size: .92rem; border-radius: 6px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .receipt { --r-bg: #120B0D; border: 1px solid var(--line); } }
:root[data-theme="dark"] .receipt { --r-bg: #120B0D; border: 1px solid var(--line); }
.alloc-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 20px; }
.alloc-bar span { background: var(--c); flex-basis: 0; transition: flex-grow .25s ease; }
.sliders { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slider-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px 12px; }
.slider-row.is-locked { background: var(--paper-2); }
.sr-top { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: start; }
.sr-emoji { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); }
.sr-name label { font: 700 1.08rem/1.2 var(--display); }
.sr-name p { margin: 2px 0 0; font-size: .86rem; color: var(--muted); }
.sr-val { text-align: right; }
.sr-val output { display: block; font: 800 1.6rem/1 var(--display); color: var(--ct); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sr-amt { font-size: .88rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.lock { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.lock svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.lock svg rect { fill: none; }
.lock .shackle { transform: translate(4px, -1px); transition: transform .15s ease; }
.lock[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.lock[aria-pressed="true"] svg { stroke: var(--paper); }
.lock[aria-pressed="true"] svg rect { fill: var(--paper); }
.lock[aria-pressed="true"] .shackle { transform: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; margin: 14px 0 2px; height: 28px; background: none; cursor: pointer; --fill: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--c) var(--fill), var(--paper-2) var(--fill)); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--paper-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--c); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: var(--card); border: 4px solid var(--c); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 4px solid var(--c); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input[type=range] { filter: brightness(1.25); } }
input[type=range]:disabled { cursor: not-allowed; opacity: .5; }
.sr-range { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; margin-top: 18px; padding: 14px 0; background: linear-gradient(to top, var(--paper) 75%, transparent); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.total-ok { margin: 0; font-weight: 700; color: var(--good); }
.total-ok::before { content: '✓ '; }

.done-head .btn-row { margin-top: 16px; }
.done-cups { list-style: none; padding: 26px 14px; margin: 8px 0 24px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; }
.done-cups li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.done-cups strong { font-size: .92rem; margin-top: 6px; }
.dc-amt { font: 700 1.05rem/1.2 var(--display); color: var(--ct); font-variant-numeric: tabular-nums; }
.dc-pct { font-size: .78rem; color: var(--muted); }
.done-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 16px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: .92rem; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.big-total { font: 800 2.2rem/1 var(--display); letter-spacing: -0.02em; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.big-total span { font: 500 1rem var(--body); color: var(--muted); letter-spacing: 0; }
.over-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.over-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-variant-numeric: tabular-nums; }
.over-list li span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 8px; }
.milestones { list-style: none; padding: 0; margin: 0; }
.milestones li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.milestones strong { color: var(--zobo); }
.ritual { padding-left: 1.2em; margin: 0; }
.ritual li { padding: 4px 0; }

/* ---------- tracker ---------- */
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); min-width: 7.5em; text-align: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; line-height: 1; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.small { width: 44px; height: 44px; font-size: 1.1rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 16px; }
.kpis div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpis dt { font-size: .86rem; color: var(--muted); }
.kpis dd { margin: 2px 0 0; font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpis dd.neg { color: var(--bad); }
.insight { background: var(--gold-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }
.insight.over { background: var(--bad-soft); }
.insight.good { background: color-mix(in srgb, var(--good) 15%, transparent); }
.track-grid { display: grid; grid-template-columns: minmax(300px, 1fr) 1.3fr; gap: 20px; align-items: start; }
.track-grid.lower { margin-top: 20px; grid-template-columns: 1.3fr 1fr; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .9rem; font-weight: 600; cursor: pointer; background: var(--card); }
.chip input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.track-cups { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.track-cups li { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.track-cups li.is-over { border-color: var(--bad); background: var(--bad-soft); }
.tc-body { flex: 1; min-width: 0; }
.tc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.tc-top span { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.tc-top small { font-weight: 400; color: var(--muted); }
.meter { height: 6px; background: var(--paper-2); border-radius: 999px; margin: 8px 0 6px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.is-over .meter span { background: var(--bad); }
.tc-status { margin: 0; font-size: .84rem; color: var(--muted); }
.is-over .tc-status { color: var(--bad); font-weight: 700; }
.txns { list-style: none; padding: 0; margin: 0; }
.txns li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.txns strong { display: block; font-weight: 600; }
.txns small { color: var(--muted); }
.tx-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-amt.pos { color: #1F8A5B; }
.kpis .kpi-sub { display: block; margin-top: 4px; font-size: .78rem; }
.extra-income { margin-top: 16px; }
.extra-income form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.sync .btn-row { margin: 8px 0 4px; }

.empty { text-align: center; max-width: 520px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; }
.empty p { color: var(--muted); }

#toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; max-width: min(92vw, 520px);
  font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,.25); transition: transform .3s ease; z-index: 60;
}
#toast:not(.show) { visibility: hidden; transition: transform .3s ease, visibility 0s .3s; }
#toast.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---------- sharing: Cup Grid, payday status, Year in Cups ---------- */
.share-panel { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.share-panel h2 { margin-top: 0; }
.grid-preview { background: var(--paper-2); border-radius: var(--radius); padding: 14px; }
.gp-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 320px; }
.gp-cells i { aspect-ratio: 1; border-radius: 4px; }
.gp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 0 0; font-size: .86rem; font-variant-numeric: tabular-nums; }
.gp-legend b { font-weight: 400; margin-right: 4px; }
.share-actions { display: flex; flex-direction: column; gap: 10px; }
.share-actions .btn { width: 100%; }
.share-actions p { margin: 2px 0 0; }
.year-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius-lg); background: #E4DAF6; color: #241519; text-decoration: none; border: 2px solid #241519; }
.year-banner:hover { background: #DCCFF3; }
.year-banner strong { font-family: var(--display); }
.yb-cups { display: grid; grid-template-columns: repeat(2, 12px); gap: 3px; flex: none; }
.yb-cups i { width: 12px; height: 12px; border-radius: 3px; }
.yb-go { margin-left: auto; font: 800 1.4rem/1 var(--display); }
.year-head .eyebrow { margin: 0 0 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--zobo); }
.year-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 16px; margin: 10px 0 8px; min-height: 120px; }
.year-card { flex: 0 0 auto; width: min(62vw, 240px); padding: 0; border: 0; background: none; border-radius: 18px; overflow: hidden; scroll-snap-align: start; cursor: pointer; box-shadow: 0 10px 24px -12px rgba(36, 21, 25, .45); }
.year-card img { display: block; width: 100%; height: auto; }
.year-card:focus-visible { outline: 3px solid var(--zobo); outline-offset: 3px; }
.year-actions { margin-bottom: 8px; }
.year-empty h1 { max-width: 16ch; }
.btn-row.center { justify-content: center; }
@media (max-width: 720px) { .share-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---------- account menu ---------- */
.topbar nav { align-items: center; }
#account:empty { display: none; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .92rem; background: var(--zobo); color: #fff; }
.acct { position: relative; margin-left: 4px; }
.acct summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .92rem; }
.acct summary::-webkit-details-marker { display: none; }
.acct img, .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--gold); color: #2A1C21; font-weight: 800; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 2px; z-index: 30; }
.acct-menu a, .acct-menu button { text-align: left; background: none; border: 0; padding: 9px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--paper-2); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
.acct-menu p { margin: 0 8px 6px; }
.acct-menu p:last-child { margin-top: 4px; }

/* ---------- done-page extras, paste, history ---------- */
.done-grid.extras { margin-top: 20px; grid-template-columns: 1fr 1fr; }
.select { appearance: auto; padding-right: 10px; }
.paste { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; display: grid; gap: 10px; }
.paste label { font-weight: 600; }
.paste textarea { resize: vertical; font-family: inherit; font-size: .92rem; }
.pasted { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.pasted li { display: grid; grid-template-columns: auto 1fr 150px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pasted .check { padding: 0; }
.kpis small { font: 500 .85rem var(--body); color: var(--muted); letter-spacing: 0; }
.hist-chart { margin-bottom: 20px; }
.hc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chips.small .chip span { padding: 6px 10px; font-size: .82rem; }
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { width: 100%; height: auto; }
.chart-wrap .grid { stroke: var(--line); stroke-width: 1; }
.chart-wrap .axis { fill: var(--muted); font-size: 12px; font-family: var(--body); }
.chart-wrap .budget { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.chart-wrap .over-lab { fill: var(--bad); font-size: 11px; font-weight: 700; font-family: var(--body); }
.chart-wrap .bar:hover path { opacity: .85; }
#view-history { padding: 28px 0 80px; }
#view-history > .panel { margin-bottom: 20px; }
.months { list-style: none; padding: 0; margin: 0; }
.months a { display: grid; grid-template-columns: 9.5em 1fr auto 11em; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 8px; }
.months a:hover { background: var(--paper-2); }
.m-name { font-weight: 700; }
.m-bar { height: 8px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.m-bar span { display: block; height: 100%; background: var(--zobo); border-radius: inherit; }
.is-over .m-bar span { background: var(--bad); }
.m-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-amt small { font-weight: 400; color: var(--muted); }
.m-status { font-size: .88rem; color: var(--good); font-weight: 600; text-align: right; }
.is-over .m-status { color: var(--bad); }
.is-empty .m-status, .is-empty .m-name { color: var(--muted); font-weight: 500; }
.plan-changes { list-style: none; padding: 0; margin: 0; }
.plan-changes li { display: grid; grid-template-columns: 9.5em 12em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.plan-changes .muted { font-size: .86rem; }

/* ---------- insights opt-in ---------- */
.stack { display: grid; gap: 20px; align-content: start; }
.insights h2 { margin-bottom: .3em; }
.small-link { min-height: 0; padding: 0; font-size: inherit; }
.done-grid.extras .insights { grid-column: 1 / -1; }
.ins-more { margin: -4px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ins-more summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.ins-more summary::-webkit-details-marker { display: none; }
.ins-more summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--zobo); transition: transform .2s ease; }
.ins-more[open] summary::after { transform: rotate(45deg); }
.ins-more summary .small { font-weight: 400; }
.ins-more > p { margin: 0 0 10px; }
.ins-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 14px; }
.ins-grid label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.ins-grid .select { text-overflow: ellipsis; }
@media (max-width: 720px) {
  .ins-grid { grid-template-columns: 1fr; gap: 10px; }
  .insights .field.two { grid-template-columns: 1.4fr 1fr; } /* state and age stay side by side: both are short */
  .insights .select { padding-top: 10px; padding-bottom: 10px; }
}


/* ---------- blog ---------- */
.blog-head { padding: 40px 0 8px; max-width: 720px; }
.blog-head h1, .article-head h1 { font: 800 clamp(2rem, 5vw, 3.2rem)/1.02 var(--display); letter-spacing: -0.035em; color: var(--zobo); margin: 6px 0 14px; }
.eyebrow { margin: 0; font-weight: 700; font-size: .85rem; letter-spacing: .02em; color: var(--muted); }
.blog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 24px 0 64px; }
.post-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .12s ease; }
.post-card:hover { border-color: var(--ct, var(--zobo)); }
.post-card:focus-visible { outline: 3px solid var(--zobo); outline-offset: 2px; }
.post-card:active { transform: translateY(1px); }
.post-cup .cup { width: 64px; height: 64px; }
.post-text { display: grid; gap: 4px; }
.post-kicker { font-weight: 700; font-size: .82rem; color: var(--ct, var(--muted)); }
.post-title { font: 700 1.2rem/1.2 var(--display); letter-spacing: -0.01em; }
.post-sub { color: var(--muted); font-size: .95rem; }
.post-meta { color: var(--muted); font-size: .85rem; margin: 0; }
.skeleton { background: linear-gradient(90deg, var(--paper-2), var(--card), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--radius-lg); }
.post-card.skeleton { height: 120px; border: 0; }
.skeleton-title { height: 96px; margin: 32px 0 20px; }
.skeleton-body { height: 420px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.back { margin: 24px 0 0; }
.back a { color: var(--muted); font-weight: 600; text-decoration: none; }
.back a:hover { color: var(--zobo); }
.article { max-width: 680px; margin: 0 auto; padding-bottom: 72px; }
.article-head { padding: 16px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.article-head .eyebrow { color: var(--ct, var(--muted)); }
.article-head .lede { margin: 0 0 12px; }
.prose { font-size: 1.12rem; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); letter-spacing: -0.015em; line-height: 1.2; margin: 1.8em 0 .6em; color: var(--ink); }
.prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.3rem; } .prose h4 { font-size: 1.1rem; }
.prose a { color: var(--zobo); text-underline-offset: 3px; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.4em auto; }
.prose figure { margin: 1.4em 0; } .prose figure img { margin: 0 auto; }
.prose figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: 8px; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); font-style: italic; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; } .prose li { margin-bottom: .4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.article-cta h2 { margin: 0 0 4px; font: 800 1.35rem/1.15 var(--display); color: var(--zobo); }
.article-cta p { margin: 0; color: var(--muted); }
.next-post { display: grid; gap: 4px; margin-top: 16px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); }
.next-post:hover { border-color: var(--zobo); }
@media (max-width: 720px) {
  .blog-list { grid-template-columns: minmax(0, 1fr); }
  .post-card { grid-template-columns: 48px minmax(0, 1fr); padding: 16px; }
  .post-cup .cup { width: 48px; height: 48px; }
  .article-cta { flex-direction: column; align-items: stretch; }
  .prose { font-size: 1.06rem; }
}
@media (max-width: 440px) {
  .topbar { gap: 8px; }
  .topbar nav a { padding: 8px 6px; font-size: .84rem; }
  .brand svg { width: 30px; height: 26px; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero, .income-grid, .done-grid, .track-grid, .track-grid.lower, .sheets-band { grid-template-columns: minmax(0, 1fr); }
  .text-input[type=date] { min-width: 0; }
  .receipt { position: static; }
  .cup-glossary { grid-template-columns: repeat(2, 1fr); }
  .done-cups { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar { padding-block: 10px; }
  .brand span { display: none; }
  .topbar nav a { padding: 8px 10px; font-size: .92rem; }
  .steps, .sliders, .cup-glossary { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .track-cups { grid-template-columns: 1fr; }
  .over-list { columns: 1; }
  .story { grid-template-columns: 1fr; }
  .story-mark { width: 84px; height: 84px; }
  .story-mark svg { width: 46px; }
  .field.two, .field.two.names { grid-template-columns: 1fr; }
  .done-grid.extras { grid-template-columns: minmax(0, 1fr); }
  .acct-name { display: none; }
  .acct summary { padding: 3px; }
  .pasted li { grid-template-columns: auto 1fr; }
  .pasted li select { grid-column: 1 / -1; }
  .months a { grid-template-columns: 1fr auto; row-gap: 6px; }
  .m-bar { grid-column: 1 / -1; grid-row: 2; }
  .m-status { grid-column: 1 / -1; text-align: left; }
  .plan-changes li { grid-template-columns: 1fr; gap: 2px; }
  .topbar nav { gap: 0; }
  .hero-cups { gap: 14px 6px; border-radius: 24px; }
  .hc-name { font-size: .76rem; }
  .hc-amt { font-size: .88rem; }
  .sheet-mock { transform: none; font-size: .8rem; }
  .sheet-mock td, .sheet-mock th { padding: 7px 6px; }
}

/* ================================================================ PDF report (.rp) */
#print-root { display: none; }
.rp { --ink: #2A1C21; --muted: #6F5F63; --line: #E6D8C8; --cup-body: #fff; --cup-rim: #2A1C21; color: #2A1C21; font-family: var(--body); }
.rp-page { width: 210mm; height: 297mm; padding: 15mm 15mm 12mm; background: #FFFDF9; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.rp-top { display: flex; justify-content: space-between; align-items: center; font-size: 9pt; color: #6F5F63; padding-bottom: 6mm; border-bottom: 1px solid #E6D8C8; }
.rp-brand { display: flex; align-items: center; gap: 6px; font: 800 11pt/1 var(--display); color: #6E1838; }
.rp-mark { width: 18px; height: 18px; color: #6E1838; display: inline-block; vertical-align: -3px; }
.rp-title { padding: 8mm 0 5mm; }
.rp-title.small { padding: 6mm 0 4mm; }
.rp-title h1 { font: 800 30pt/1 var(--display); letter-spacing: -0.03em; color: #6E1838; margin: 0 0 3mm; }
.rp-title p { font-size: 11pt; color: #6F5F63; margin: 0; }
.rp-title.small h1 { font-size: 22pt; }
.rp-income { display: grid; grid-template-columns: 1fr auto; gap: 8mm; align-items: stretch; background: #2A1C21; color: #FAF4EC; border-radius: 5mm; padding: 5mm 6mm; }
.rp-income dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(28mm, 1fr)); gap: 3mm; align-content: center; }
.rp-income dt { font-size: 8pt; opacity: .7; }
.rp-income dd { margin: 1mm 0 0; font-weight: 700; font-size: 11pt; font-variant-numeric: tabular-nums; }
.rp-income dd.neg { color: #F5A3A3; }
.rp-take { display: flex; flex-direction: column; justify-content: center; text-align: right; border-left: 1px solid rgba(250,244,236,.2); padding-left: 7mm; }
.rp-take span { font-size: 8.5pt; opacity: .8; }
.rp-take strong { font: 800 22pt/1.05 var(--display); color: #E3A21A; letter-spacing: -0.02em; }
.rp-take small { font-size: 8pt; opacity: .7; }
.rp-bar { display: flex; gap: 1.2mm; height: 4mm; margin: 6mm 0 5mm; border-radius: 2mm; overflow: hidden; }
.rp-bar span { flex-basis: 0; }
.rp-cups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm; }
.rp-cups li { border: 1px solid #E6D8C8; border-radius: 4mm; padding: 4mm; display: flex; flex-direction: column; gap: 2mm; border-top: 1.2mm solid var(--c); }
.rp-cups .cup-sm { width: 13mm; height: 13mm; }
.rp-cups h3 { font: 700 10.5pt/1.15 var(--display); margin: 0; display: flex; justify-content: space-between; }
.rp-cups h3 span { color: color-mix(in srgb, var(--c) 72%, #000); }
.rp-amt { font: 800 14pt/1.1 var(--display); margin: 1mm 0 0; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rp-amt small { display: block; font: 400 8pt var(--body); color: #6F5F63; }
.rp-yr { font-size: 8.5pt; color: #6F5F63; margin: 0; font-variant-numeric: tabular-nums; }
.rp-desc { font-size: 7.5pt; color: #6F5F63; margin: 1mm 0 0; line-height: 1.35; }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm; margin-top: 6mm; }
.rp-cols h2, .rp-h2, .rp-notes h2 { font: 700 12pt/1.2 var(--display); margin: 0 0 2.5mm; color: #2A1C21; }
.rp-list { margin: 0; padding: 0; list-style: none; font-size: 9pt; line-height: 1.45; }
.rp-list li { padding: 1.8mm 0; border-bottom: 1px solid #E6D8C8; }
.rp-list strong { color: #6E1838; }
.rp-steps { counter-reset: rs; }
.rp-steps li { counter-increment: rs; display: flex; gap: 3mm; }
.rp-steps li::before { content: counter(rs); font: 800 10pt/1.3 var(--display); color: #E3A21A; }
.rp-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 6mm; padding-top: 4mm; border-top: 1px solid #E6D8C8; font-size: 7.5pt; color: #6F5F63; }
.rp-foot span:first-child { display: flex; align-items: center; gap: 4px; font-weight: 600; color: #6E1838; white-space: nowrap; }
.rp-foot .rp-mark { width: 12px; height: 12px; }
.rp-foot span:last-child { white-space: nowrap; }
.rp-monthline { font-size: 10pt; margin: 0 0 4mm; display: flex; gap: 3mm; align-items: flex-end; }
.rp-monthline span { flex: 0 0 60mm; border-bottom: 1px solid #2A1C21; height: 5mm; }
.rp-table, .rp-year { width: 100%; border-collapse: collapse; font-size: 9pt; }
.rp-table th, .rp-year th { text-align: left; font-weight: 600; font-size: 8pt; color: #6F5F63; padding: 2mm; border-bottom: 1.5px solid #2A1C21; }
.rp-table td { padding: 0 2mm; height: 9mm; border-bottom: 1px solid #E6D8C8; font-variant-numeric: tabular-nums; }
.rp-table td + td + td { border-left: 1px dashed #E6D8C8; }
.rp-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid #2A1C21; }
.rp-table i, .rp-year i { display: inline-block; width: 2.6mm; height: 2.6mm; border-radius: 0.7mm; margin-right: 2mm; vertical-align: 0; }
.rp-h2 { margin-top: 8mm !important; }
.rp-note { font-size: 8.5pt; color: #6F5F63; margin: 0 0 3mm; }
.rp-year th { text-align: center; padding: 1.5mm 0; }
.rp-year th:first-child { text-align: left; }
.rp-year td { padding: 1.3mm 0; border-bottom: 1px solid #E6D8C8; text-align: center; }
.rp-year td:first-child { text-align: left; white-space: nowrap; padding-right: 3mm; }
.rp-year b { display: inline-block; width: 4.2mm; height: 4.2mm; border: 1.2px solid #B9A9A0; border-radius: 1.2mm; vertical-align: middle; }
.rp-notes { margin-top: 6mm; flex: 1 1 0; display: flex; flex-direction: column; min-height: 0; margin-bottom: 4mm; }
.rp-notes div { flex: 1; background: repeating-linear-gradient(to bottom, transparent 0 7.5mm, #E6D8C8 7.5mm 7.8mm); }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  .rp-page { break-after: page; page-break-after: always; }
  .rp-page:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.note { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.note p { margin: 0 0 12px; }
@media (max-width: 440px) {
  #account .btn-small { min-height: 36px; padding: 0 12px; font-size: .84rem; white-space: nowrap; }
}
@media (max-width: 400px) {
  .topbar nav a[data-nav="history"], .topbar nav a[data-nav="blog"] { display: none; } /* reachable from the tracker, the account menu and the footer */
}
@media (max-width: 340px) {
  .topbar nav { min-width: 0; flex: 1 1 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav a { padding: 8px 4px; font-size: .8rem; }
  #account .btn-small { padding: 0 9px; }
}
.sheet-mock { max-width: 100%; overflow-x: auto; }

/* ---------- press ---------- */
.press { padding: 40px 0 80px; max-width: 900px; }
.press h1 { font: 800 clamp(2rem, 5vw, 3rem)/1.02 var(--display); letter-spacing: -0.035em; color: var(--zobo); margin: 6px 0 12px; }
.press h2 { font: 800 1.5rem/1.2 var(--display); margin: 44px 0 12px; }
.press .boiler { font-size: 1.08rem; line-height: 1.65; }
.facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; } .facts dd { margin: 0; }
.logo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.logo-grid figure { margin: 0; }
.logo-grid figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.logo-grid figcaption a { color: var(--zobo); font-weight: 600; }
.tile { height: 160px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; gap: 28px; padding: 24px; border: 1px solid var(--line); }
.tile img { max-width: 70%; max-height: 64px; }
.tile-icon img { max-height: 84px; max-width: 30%; }
.tile-light { background: #FBF3E6; } .tile-zobo { background: #7A1638; border-color: #7A1638; } .tile-white { background: #fff; }
.swatches { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatches li { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.swatches span { height: 72px; border-radius: var(--radius); }
.swatches b { color: var(--ink); }
@media (max-width: 720px) {
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .logo-grid, .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .logo-grid { grid-template-columns: minmax(0, 1fr); } }
.article-note { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.planned-total { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: .95rem; max-width: 460px; }
.planned-total strong { color: var(--zobo); }
.planned-total:not([hidden]) + .plans-total { margin-top: 8px; }
.planned-note { margin: 10px 0 0; }

/* ================================================================ habit: folds, Today card, scan */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Collapsible sections (<details>): a labelled row that opens in place. */
.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.folds { display: grid; gap: 10px; margin-top: 28px; }
.fold > summary { list-style: none; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 2px; justify-content: center; min-height: 60px; padding: 14px 56px 14px 18px; border-radius: inherit; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--zobo); border-bottom: 2.5px solid var(--zobo); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.fold[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.fold > summary:hover { background: var(--paper-2); }
.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fold-title { font: 700 1.08rem/1.25 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.fold-sub { font-size: .88rem; color: var(--muted); line-height: 1.35; }
.fold-body { padding: 4px 18px 20px; }
.fold-body > :first-child { margin-top: 0; }
.fold-body .panel { background: none; border: 0; border-radius: 0; padding: 0; }
.fold-body h2 { font-size: 1.15rem; margin-bottom: .35em; }
.fold-solo .fold-body > .panel > h2:first-child { display: none; }
.fold-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px 32px; }
.fold-cols > .panel + .panel { border-top: 1px solid var(--line); padding-top: 18px; }
@media (min-width: 721px) { .fold-cols > .panel + .panel { border-top: 0; padding-top: 0; } }
.fold .share-panel { margin: 0; }
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }

/* ---------- cups-ready page ---------- */
.done-head { margin-bottom: 18px; }
.done-head h1 { margin-bottom: .25em; }
.done-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 18px 14px 6px; }
.takehome { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 6px 6px; color: var(--muted); font-size: .95rem; }
.takehome strong { font: 800 1.7rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.done-card .done-cups { background: none; border: 0; padding: 12px 0 16px; margin: 0; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.done-actions .btn-primary { flex: 1 1 260px; max-width: 360px; min-height: 54px; font-size: 1.08rem; }
.done-actions .year-banner { flex-basis: 100%; }
#view-plan .year-banner { margin-top: 18px; }

/* ---------- tracker: Today card ---------- */
.today { position: relative; background: var(--ink); color: var(--paper); border-radius: 26px; padding: 18px 18px 18px; margin: 0 0 22px; box-shadow: 0 24px 50px -36px rgba(110, 24, 56, .7); }
.today-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.today-date { margin: 0; font: 600 .95rem/1.2 var(--body); letter-spacing: 0; color: color-mix(in srgb, var(--paper) 75%, transparent); }
.streak { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; background: color-mix(in srgb, var(--paper) 12%, transparent); color: var(--paper); }
.streak.on { background: var(--gold); color: #2A1C21; }
.streak i { width: 9px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #B3261E; box-shadow: inset 0 -3px 0 #E8673A; }
.today-big { margin: 0 0 6px; font: 600 1.1rem/1.3 var(--display); color: color-mix(in srgb, var(--paper) 85%, transparent); }
.today-big strong { display: block; font: 800 clamp(2.4rem, 11vw, 3.2rem)/1.05 var(--display); letter-spacing: -0.035em; color: var(--gold); font-variant-numeric: tabular-nums; margin: 2px 0; }
.today-big.over strong { color: #F5A3A3; }
.today-status { margin: 4px 0 14px; font-size: .95rem; color: color-mix(in srgb, var(--paper) 78%, transparent); }
.today-status.done::before { content: '✓ '; color: var(--gold); font-weight: 800; }
.quick { display: flex; gap: 8px; }
.quick .money-input { flex: 1; min-width: 0; background: var(--paper); border-color: transparent; }
.quick .money-input input { color: var(--ink); padding: 12px 0; }
.quick .money-input span { color: var(--muted); }
.quick .btn-primary { background: var(--gold); color: #2A1C21; padding: 0 20px; }
.quick .btn-primary:hover { background: #F0B53B; }
.today .no-spend { width: 100%; margin-top: 10px; border-color: color-mix(in srgb, var(--paper) 55%, transparent); color: var(--paper); }
.today .no-spend:hover { background: var(--paper); color: var(--ink); }
.today-nudge { margin-top: 14px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--paper) 30%, transparent); }
.today-nudge p { margin: 0 0 6px; font-size: .92rem; color: color-mix(in srgb, var(--paper) 85%, transparent); }
.today-nudge .btn-small { background: var(--paper); color: var(--ink); }
.today-nudge .btn-row { flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.push-state { margin: 4px 0 12px; }
.push-state p { margin: 0 0 6px; }
.push-state.on { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--green, #2f7d4f) 12%, transparent); }
.push-state.on p { margin: 0; flex: 1 1 220px; }
.today-nudge .btn-link { color: var(--gold); min-height: 38px; font-size: .92rem; }
/* Dark mode: the card lifts off the page instead of inverting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .today { background: #3A1724; color: var(--ink); border: 1px solid #5A2A3B; }
  :root:not([data-theme="light"]) .today .quick .money-input { background: var(--paper); }
  :root:not([data-theme="light"]) .today .quick .money-input input { color: var(--ink); }
  :root:not([data-theme="light"]) .today .no-spend { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 55%, transparent); }
  :root:not([data-theme="light"]) .today .no-spend:hover { background: var(--ink); color: var(--paper); }
  :root:not([data-theme="light"]) .today-nudge .btn-small { background: var(--ink); color: var(--paper); }
  :root:not([data-theme="light"]) .streak:not(.on) { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); }
  :root:not([data-theme="light"]) .today-date, :root:not([data-theme="light"]) .today-big, :root:not([data-theme="light"]) .today-status, :root:not([data-theme="light"]) .today-nudge p { color: color-mix(in srgb, var(--ink) 82%, transparent); }
}
:root[data-theme="dark"] .today { background: #3A1724; color: var(--ink); border: 1px solid #5A2A3B; }
:root[data-theme="dark"] .today .no-spend { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 55%, transparent); }
:root[data-theme="dark"] .today-nudge .btn-small { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .streak:not(.on) { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); }
:root[data-theme="dark"] .today-date, :root[data-theme="dark"] .today-big, :root[data-theme="dark"] .today-status, :root[data-theme="dark"] .today-nudge p { color: color-mix(in srgb, var(--ink) 82%, transparent); }

/* ---------- tracker: log form extras ---------- */
.log-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.btn-scan { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.btn-scan svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.log-alt + .hint { margin-top: 4px; }
.scan-status { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--paper-2); }
.scan-status p { margin: 0; font-weight: 600; font-size: .95rem; }
.scan-status p + .hint { font-weight: 400; margin-top: 4px; }
.scan-status .good { color: var(--good); }
.scan-status progress { width: 100%; height: 8px; margin-top: 8px; accent-color: var(--zobo); }
.log-note { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--gold-soft); font-weight: 600; font-size: .95rem; }
#log-form { scroll-margin-top: 76px; }
#log-form.is-prefilled .money-input { border-color: var(--gold); }
.time-input { max-width: 180px; }
.track-lower { margin-top: 20px; margin-bottom: 14px; }
#track-more { margin-top: 0; }

/* ---------- home: shorter ---------- */
.cups-band .fold { margin-top: 16px; }
.cups-band .cup-glossary { margin-top: 8px; }
.faq .more-faq { border-bottom: 0; }
.faq .more-faq > summary { color: var(--zobo); }
.faq .more-faq > summary::after { content: '+'; }
.faq .more-faq[open] > summary { border-bottom: 1px solid var(--line); }
.more-story { margin: 0 0 1em; }
.more-story > summary { cursor: pointer; color: var(--zobo); font-weight: 600; padding: 6px 0; list-style: none; }
.more-story > summary::-webkit-details-marker { display: none; }
.more-story > summary::after { content: ' +'; }
.more-story[open] > summary::after { content: ' −'; }
.more-story p { margin-top: .6em; }
@media (max-width: 720px) {
  section.wrap { margin-bottom: 34px; }
  .hero { padding: 24px 0 28px; gap: 20px; }
  .hero .lede { font-size: 1.02rem; }
  .hero-cups { padding: 14px 10px; gap: 10px 4px; }
  .hero-cups .cup-md { max-width: 60px; }
  .promise { gap: 4px 14px; font-size: .88rem; }
  .hero-form { margin: 18px 0 12px; }
  .hero-out { min-height: 2.6em; margin: 8px 0 10px; }
  .band { padding: 0 0 8px; }
  .steps { gap: 12px; margin-top: 12px; }
  .steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding-top: 12px; border-top-width: 2px; }
  .steps li::before { grid-row: span 2; font-size: 1.8rem; margin: 0; }
  .steps h3 { margin: 0 0 2px; }
  .steps p { font-size: .95rem; }
  .sheets-band { padding: 22px 20px; gap: 18px; border-radius: 24px; }
  .sheets-band .sheet-mock { display: none; } /* an illustration; the copy says the same thing */
  #cups-fold .fold-sub { display: none; }
  .faq summary { padding: 14px 36px 14px 0; font-size: 1.02rem; }
  .faq summary::after { top: 10px; }
  .story { gap: 0; }
  .story-mark { display: none; }
  .story .pull { font-size: 1.2rem; }
  .today-big strong { font-size: 2.6rem; }
  .done-cups .cup-md { max-width: 64px; }
  .done-cups strong { font-size: .84rem; margin-top: 2px; }
  .dc-amt { font-size: .92rem; }
  .done-actions .btn-primary { flex-basis: 100%; max-width: none; }
  .done-actions .btn-ghost { flex: 1; }
  #view-plan, #view-track { padding-top: 20px; }
  .stepper { margin-bottom: 16px; }
}
.extra-income .txns + form { border-top: 0; padding-top: 4px; }

/* ---------- goals (planning only) ---------- */
#view-goals { padding-top: 24px; padding-bottom: 56px; }
.goals-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.goals-head h1 { font: 800 clamp(2rem, 6vw, 2.8rem)/1 var(--display); letter-spacing: -0.03em; margin: 4px 0 8px; color: var(--zobo); }
.goals-head p { margin: 0; max-width: 38em; }
#view-goals .panel { margin-bottom: 16px; }
.g-ack { border: 2px solid var(--zobo); }
.notdo { margin: 8px 0 12px; padding-left: 1.2em; }
.notdo li { margin: 6px 0; }
.g-notdo h2, .g-ack h2 { margin-top: 0; }
.goal-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.goal-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius-lg); color: inherit; text-decoration: none; }
.goal-card:hover { border-color: var(--c); }
.gc-emoji { font-size: 1.9rem; text-align: center; }
.gc-body { display: grid; gap: 4px; min-width: 0; }
.gc-body small { color: var(--muted); }
.gc-body .meter { margin-top: 4px; }
.gc-amt { text-align: right; font: 800 1.15rem/1.1 var(--display); }
.gc-amt small { display: block; font: 500 .78rem var(--body); color: var(--muted); }
.cup-sum { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.cup-sum li { display: grid; grid-template-columns: 12px auto 1fr auto; gap: 10px; align-items: center; }
.cup-sum li > span:nth-child(3) { text-align: right; font-weight: 700; }
.cup-sum small { color: var(--muted); font-weight: 500; }
.cs-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.warn-tag { grid-column: 2 / -1; font-style: normal; font-size: .82rem; color: var(--bad); font-weight: 700; }
.tpl-grid { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl-grid a { display: grid; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); color: inherit; text-decoration: none; min-height: 118px; }
.tpl-grid a:hover { border-color: var(--zobo); }
.tpl-grid span { font-size: 1.8rem; }
.tpl-grid small { color: var(--muted); }
.back { display: inline-block; margin: 0 0 12px; font-weight: 700; }
.g-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.g-result { position: sticky; top: 76px; }
.g-name-row { display: flex; gap: 10px; }
.g-emoji { flex: 0 0 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 1.6rem; cursor: pointer; }
.g-emojis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-emojis button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 1.3rem; cursor: pointer; }
#view-goals input[type=range] { width: 100%; accent-color: var(--zobo); min-height: 32px; }
.g-quick { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.g-quick .btn { min-height: 32px; padding: 0 6px; font-size: .88rem; }
.g-big { font: 800 clamp(2rem, 7vw, 2.6rem)/1 var(--display); letter-spacing: -0.03em; margin: 6px 0 4px; color: var(--zobo); }
.g-big span { font: 600 1rem var(--body); color: var(--muted); letter-spacing: 0; }
.g-sub { margin: 0 0 12px; color: var(--muted); }
.g-result h2 { margin: 0; }
.g-split { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .92rem; }
.g-split > span { white-space: nowrap; }
.sw-put, .sw-grow { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.sw-put { background: var(--muted); }
.sw-grow { background: var(--zobo); }
.g-kind { background: var(--gold-soft); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.g-kind ul { margin: 6px 0 0; padding-left: 1.2em; }
.g-kind .btn-link { padding: 0; min-height: 0; }
.g-cup { border-left: 4px solid var(--c); padding: 4px 0 4px 12px; }
.g-whatif { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.g-whatif-row { display: flex; align-items: center; gap: 10px; }
.g-whatif .money-input { flex: 1; }
.g-disclaim { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 12px; }
.g-assume summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.g-assume ul { font-size: .86rem; color: var(--muted); padding-left: 1.2em; }
.warn { background: var(--gold-soft); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; font-size: .92rem; }
.warn.red { background: #FBE3E3; color: #6B0F12; border: 1px solid #E8A7A7; }
.g-chart { margin: 8px 0 12px; position: relative; }
.g-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { fill: var(--muted); font: 500 13px var(--body); }
.ch-band { fill: var(--zobo); opacity: .14; }
.ch-mid { fill: none; stroke: var(--zobo); stroke-width: 2.5; stroke-linejoin: round; }
.ch-put { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.ch-target { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.ch-cross { stroke: var(--ink); stroke-width: 1; opacity: .35; }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-tip { position: absolute; top: 4px; width: 150px; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 8px 10px; font-size: .8rem; line-height: 1.35; pointer-events: none; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.ch-legend i { display: inline-block; width: 16px; height: 0; vertical-align: middle; margin-right: 6px; border-top: 2.5px solid var(--zobo); }
.ch-legend .lg-band { height: 10px; border: 0; background: var(--zobo); opacity: .25; border-radius: 2px; }
.ch-legend .lg-put { border-top: 2px dashed var(--muted); }
.ch-legend .lg-target { border-top: 2px dotted var(--gold); }
.learn-table { display: grid; gap: 0; margin: 12px 0; font-size: .92rem; }
.lt-row { display: grid; grid-template-columns: 1.1fr .9fr 1.6fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lt-head { font-size: .8rem; color: var(--muted); font-weight: 600; }
.lt-r { font-weight: 700; font-variant-numeric: tabular-nums; }
.flags { padding-left: 1.2em; }
.flags li { margin: 4px 0; }
.btn.danger { color: var(--bad); }
.g-sticky { display: none; }
@media (max-width: 760px) {
  .g-sticky:not(:empty) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: 16px; background: var(--zobo); color: #FBF3E6; text-decoration: none; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }
  .g-sticky strong { font: 800 1.3rem/1 var(--display); }
  .g-sticky span { margin-left: auto; font-size: .85rem; opacity: .85; }
  #view-goals:has(.g-sticky:not(:empty)) { padding-bottom: 90px; }
  .g-grid { grid-template-columns: minmax(0, 1fr); }
  .g-result { position: static; }
  .lt-row { grid-template-columns: 1fr 1fr; }
  .lt-row > :last-child { grid-column: 1 / -1; color: var(--muted); }
  .lt-head > :last-child { display: none; }
}

/* goals: plain-language pieces */
.lg-lead { font-size: 1.02rem; }
.lg-tip { background: var(--gold-soft); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0 14px; }
.learn-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.learn-cards li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.learn-cards p { margin: 0; }
.lc-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.lc-e { font-size: 1.8rem; line-height: 1; }
.lc-head h3 { margin: 0; font-size: 1.02rem; }
.lc-what { font-size: .86rem; color: var(--muted); }
.lc-ten { background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: .92rem; }
.lc-ten span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.lc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-tags span { font-size: .8rem; background: var(--paper-2); border-radius: 999px; padding: 4px 10px; }
.lg-lesson { background: var(--card); border-left: 4px solid var(--gold); padding: 10px 14px; margin: 14px 0 8px; }
.g-pres { display: grid; gap: 8px; margin: 8px 0; }
.g-pre { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--card); }
.g-pre input { position: absolute; opacity: 0; pointer-events: none; }
.g-pre:has(input:checked) { border-color: #16827F; box-shadow: 0 0 0 2px #16827F inset; }
.g-pre:has(input:focus-visible) { outline: 3px solid var(--gold); }
.gp-e { font-size: 1.6rem; text-align: center; }
.gp-t small { display: block; color: var(--muted); }
.gp-n { font-weight: 700; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.g-own summary { cursor: pointer; font-weight: 700; font-size: .9rem; margin: 4px 0; }
.g-say { margin: 4px 0 0; font-size: 1.02rem; }
.g-plain { margin: 10px 0; }
.g-plain.small { font-size: .9rem; color: var(--muted); }
.g-note { background: var(--paper-2); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: .94rem; }
.g-h { font-weight: 800; margin: 16px 0 8px; }
/* staircase for short goals */
.g-stairs { margin: 14px 0 6px; }
.g-stairs ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.g-stairs li { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sb-bar { width: 100%; height: var(--h); background: #16827F; opacity: .55; border-radius: 6px 6px 2px 2px; }
.g-stairs li.done .sb-bar { opacity: 1; background: var(--zobo); }
.sb-amt { font-size: .66rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.g-stairs li:not(.done):not(:first-child):not(:nth-child(3n)) .sb-amt { visibility: hidden; }
.g-stairs li.done .sb-amt { color: var(--zobo); font-size: .78rem; }
.sb-m { font-size: .66rem; color: var(--muted); margin-top: 4px; }
/* where the money comes from */
.gf-bar { display: flex; gap: 2px; height: 22px; border-radius: 8px; overflow: hidden; }
.gf-you { background: var(--muted); opacity: .55; }
.gf-grow { background: var(--zobo); }
.gf-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; margin: 6px 0 0; }
.gf-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k-you { background: var(--muted); opacity: .55; }
.k-grow { background: var(--zobo); }
.k-goal { background: none !important; border-left: 3px dashed var(--gold); border-radius: 0 !important; width: 3px !important; height: 14px !important; }
/* three ways it could go */
.g-scen { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.g-scen li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.sc-l { grid-column: 1 / -1; font-size: .9rem; }
.sc-track { position: relative; height: 14px; background: var(--paper-2); border-radius: 7px; }
.sc-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--zobo); border-radius: 7px; }
.g-scen li:nth-child(1) .sc-bar { opacity: .55; }
.g-scen li:nth-child(3) .sc-bar { opacity: .85; }
.sc-goal { position: absolute; top: -4px; bottom: -4px; border-left: 3px dashed var(--gold); }
.g-scen strong { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }

/* ---------- effortless tracking: check-in, quick phrase, voice, levels, bills, weekly wrap ---------- */
.checkin { margin: 10px 0 14px; padding: 12px; border-radius: 18px; background: color-mix(in srgb, currentColor 8%, transparent); }
.ci-q { margin: 0 0 10px; font-size: .95rem; }
.ci-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ci-btn { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, currentColor 30%, transparent); background: transparent; color: inherit; font: 700 .9rem/1.15 var(--body); cursor: pointer; min-height: 76px; }
.ci-btn span { font-size: 1.5rem; line-height: 1; }
.ci-btn small { font: 500 .7rem/1.2 var(--body); opacity: .75; text-align: center; }
.ci-btn:hover, .ci-btn:focus-visible { background: var(--gold); color: #2A1C21; border-color: var(--gold); }
.ci-amt { margin-top: 12px; }
.ci-amt label { font-weight: 700; font-size: .92rem; }
.ci-row { display: flex; gap: 8px; margin-top: 6px; }
.ci-row .money-input { flex: 1; min-width: 0; background: var(--paper); border-color: transparent; }
.ci-row .money-input input { color: var(--ink); padding: 12px 0; }
.ci-row .btn-primary { background: var(--gold); color: #2A1C21; }
.ci-amt .hint { opacity: .8; margin: 6px 0 0; font-size: .82rem; color: inherit; }
.checkin.done { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.checkin.done p { margin: 0; font-size: .95rem; }
.checkin.done .btn-link { color: var(--gold); min-height: 36px; }
.quick .money-input input::placeholder { font-size: .95rem; }
.mic { flex: 0 0 48px; border-radius: 14px; border: 0; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; cursor: pointer; display: grid; place-items: center; }
.mic svg { width: 22px; height: 22px; }
.mic.on { background: #E8673A; color: #fff; animation: micpulse 1s infinite; }
@keyframes micpulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
.q-msg { margin: 8px 0 0; font-size: .9rem; opacity: .85; }
.q-card { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--paper); color: var(--ink); border-left: 5px solid var(--c); }
.q-card p { margin: 0 0 6px; }
.q-card .btn-row { gap: 6px; }
.level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: .85rem; }
.lv-name { font-weight: 800; }
.lv-bar { flex: 1 1 80px; height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.lv-bar span { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.lv-next { opacity: .8; }
.bills { margin-top: 16px; }
.bills form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.bills .txns + form { border-top: 0; padding-top: 4px; }
.b-ideas { margin-bottom: 10px; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: 600 .86rem var(--body); color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--zobo); }
.week-wrap { margin: 0 0 16px; border: 2px solid var(--gold); }
.week-wrap summary { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.week-wrap summary::-webkit-details-marker { display: none; }
.week-wrap summary span { color: var(--muted); font-size: .88rem; }
.wrap-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.wrap-list li { font-size: .95rem; }
@media (max-width: 400px) { .ci-btn { min-height: 70px; font-size: .84rem; } .ci-btn small { display: none; } }

/* ---------- challenges, badges, payday moment ---------- */
.ch-list, .ch-pick, .badges { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.ch-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.ch-card.ch-won { border-color: var(--good); }
.ch-card.ch-lost { opacity: .75; }
.ch-e { font-size: 1.7rem; text-align: center; }
.ch-card small { display: block; color: var(--muted); }
.ch-bar { display: block; height: 6px; border-radius: 3px; background: var(--paper-2); margin-top: 6px; overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: var(--gold); }
.ch-pick { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ch-join { width: 100%; text-align: left; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; padding: 12px; border-radius: var(--radius-lg); border: 1.5px dashed var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
.ch-join:hover { border-color: var(--gold); border-style: solid; }
.ch-join span { grid-row: span 2; font-size: 1.5rem; }
.ch-join small { color: var(--muted); font-size: .84rem; }
.ch-cap { margin: 8px 0; }
.badges { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.badges li { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--gold-soft); font-weight: 700; font-size: .88rem; }
.badges li span { font-size: 1.3rem; }
.pm-chip { display: block; width: 100%; margin: 6px 0 10px; padding: 10px 14px; border-radius: 14px; border: 0; background: var(--gold); color: #2A1C21; font: 800 .95rem var(--body); cursor: pointer; text-align: left; }
.payday-moment { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(20, 8, 12, .6); animation: pmfade .3s ease-out; }
@keyframes pmfade { from { opacity: 0; } }
.pm-card { position: relative; overflow: hidden; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 28px; padding: 26px 20px 20px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.pm-card h2 { font: 800 clamp(1.6rem, 6vw, 2.2rem)/1.05 var(--display); letter-spacing: -0.03em; color: var(--zobo); margin: 6px 0 6px; }
.pm-total { font: 800 1.6rem var(--display); margin: 0 0 14px; }
.pm-total span { font: 600 1rem var(--body); color: var(--muted); }
.pm-cups { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
.pm-cups li { display: grid; justify-items: center; gap: 2px; font-size: .78rem; animation: pmpop .5s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d); }
.pm-cups strong { font-size: .8rem; }
.pm-cups span { color: var(--muted); font-weight: 700; }
@keyframes pmpop { from { transform: scale(.4); opacity: 0; } }
.pm-tip { background: var(--gold-soft); border-radius: 14px; padding: 10px 12px; font-size: .92rem; }
.pm-card .btn-primary { width: 100%; min-height: 52px; font-size: 1.05rem; }
.pm-confetti { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; }
.pm-confetti span { position: absolute; top: -30px; left: calc(var(--i) * 5.5%); font-size: 1.3rem; animation: pmfall 2.2s ease-in calc(var(--i) * 0.07s) both; }
@keyframes pmfall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(420px) rotate(260deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pm-confetti { display: none; } .pm-cups li { animation: none; } }


/* ---------------------------------------------------------------- Oct 2026 review: simpler tracker */
.g-grid > *, .money-input input { min-width: 0; }
.table-scroll { overflow-x: auto; max-width: 100%; }
/* light cup colours get dark text when picked (contrast 4.5:1+) */
.chip input[value="give"]:checked + span, .chip input[value="project"]:checked + span, .chip input[value="fun"]:checked + span { color: #2A0E18; }
.welcome-back { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 18px; padding: 12px 16px; border-radius: var(--radius); background: var(--gold-soft); }
.welcome-back p { margin: 0; font-weight: 700; }
.period-range { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.insight.warn-soft { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.share-month { margin: -6px 0 18px; }
.share-month .muted { font-weight: 500; font-size: .85em; }
.quick-alt { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; }
.today .quick-alt .btn-link { color: inherit; opacity: .85; font-size: .92rem; padding: 6px 0; }
.repair-chip { background: transparent; border: 1.5px dashed currentColor; }
.reconnect-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; margin: 0 0 14px; border-radius: var(--radius); background: var(--bad-soft); }
.reconnect-bar p { margin: 0; flex: 1 1 220px; }
.track-folds { margin-top: 18px; }
.spends { margin-top: 0; }
.backup .warn { margin: 8px 0; }
.ajo-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.ajo-card { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ajo-card p { margin: 4px 0 0; }
.wrapped .wr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.wr-lines { padding-left: 1.3em; display: grid; gap: 8px; font-size: 1.05rem; }
.pm-payday { display: grid; gap: 6px; margin: 0 0 14px; font-weight: 600; font-size: .95rem; }
.planned-note { margin-top: 12px; }

/* ---------------------------------------------------------------- cup views: Jeje / Steady / Full Option */
.view-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.vp { display: grid; gap: 2px; padding: 12px 8px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.vp strong { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.02em; }
.vp small { color: var(--muted); font-weight: 600; }
.vp.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.vp.on small { color: inherit; opacity: .8; }
.view-blurb { margin: 0 0 14px; }
.view-more { margin: 10px 0 0; }
.view-chip { text-decoration: none; display: inline-block; }
.q-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.q-cup { border: 2px solid var(--c); background: transparent; color: inherit; border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.q-cup.on, .q-cup:hover { background: var(--c); color: #fff; }
.q-more { margin: 4px 0 0; }
.hero-cups:has(> .hc:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; }
.welcome { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; }
.welcome p { margin: 0 0 4px; }
.welcome a { color: inherit; }
.toast-undo { margin-left: 10px; background: none; border: 0; color: var(--gold, #E3A21A); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
#toast { pointer-events: auto; }
.checkin.later .ci-q { margin: 6px 0 10px; }
.research { margin-top: 14px; }
.pm-cups:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-cups:has(> li:nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
