@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin.woff2) format("woff2"); }

/* Tax Moves v2 — base theme + shared tokens. Mobile-first, system fonts, no external assets.
   Shared tokens (used by css/home.css and css/onboarding.css):
   --bg --bg-2 --card --ink --muted --line --accent --accent-ink --accent-soft --coral --coral-soft
   --sky --sky-soft --amber --amber-soft --good --good-soft --danger --focus --shadow --shadow-lg
   --r --r-sm --tap --font --num --ease
   Kind colors: capture = accent, claim = sky, avoid = amber, longrun = muted, deadline = coral. */
:root {
  --bg: #fbf7f0;
  --bg-2: #f3ede2;
  --card: #ffffff;
  --ink: #1f2421;
  --muted: #646c64;
  --line: #ece5d8;
  --accent: #1e7a55;
  --accent-ink: #ffffff;
  --accent-soft: #e1f3e9;
  --coral: #b03a22;
  --coral-soft: #fbe6df;
  --sky: #1c64a0;
  --sky-soft: #e1edf8;
  --amber: #8a4a17;
  --amber-soft: #fff1e4;
  --good: #1d7346;
  --good-soft: #e0f2e7;
  --danger: #b0261e;
  --focus: #1f5fd6;
  --shadow: 0 1px 2px rgba(31, 36, 33, 0.06), 0 6px 20px rgba(31, 36, 33, 0.06);
  --shadow-lg: 0 2px 6px rgba(24, 35, 29, 0.06), 0 22px 48px -18px rgba(24, 35, 29, 0.32);
  --r: 20px;
  --r-sm: 12px;
  --tap: 44px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --num: "tnum" 1, "lnum" 1;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* legacy aliases */
  --warn: var(--coral);
  --warn-soft: var(--coral-soft);
  /* weekend-co tip cards: warm peach with brown ink; sun = paystub highlight */
  --tip: #fff1e4; --tip-ink: #8a4a17; --sun: #f5c451;
  color-scheme: light;
}
/* Dark: its own tuned palette (deep forest greens, warm lights), not an inversion. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --bg-2: #151d1a; --card: #1a2420; --ink: #e8eee9; --muted: #a2afa7; --line: #2b3832;
    --accent: #5ccb92; --accent-ink: #05200f; --accent-soft: #173a2a;
    --coral: #ff8f73; --coral-soft: #3b211a; --sky: #7fbaf0; --sky-soft: #142a3c;
    --amber: #f2b85c; --amber-soft: #33270f; --good: #66d69a; --good-soft: #163527;
    --danger: #ff7b70; --focus: #8ab4ff; --tip: #33240f; --tip-ink: #f3c993; --sun: #b98a1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px -14px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.4), 0 26px 56px -20px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --bg-2: #151d1a; --card: #1a2420; --ink: #e8eee9; --muted: #a2afa7; --line: #2b3832;
  --accent: #5ccb92; --accent-ink: #05200f; --accent-soft: #173a2a;
  --coral: #ff8f73; --coral-soft: #3b211a; --sky: #7fbaf0; --sky-soft: #142a3c;
  --amber: #f2b85c; --amber-soft: #33270f; --good: #66d69a; --good-soft: #163527;
  --danger: #ff7b70; --focus: #8ab4ff; --tip: #33240f; --tip-ink: #f3c993; --sun: #b98a1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px -14px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.4), 0 26px 56px -20px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-tabs { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.015em; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 0.75em; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.92em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
.num, .dollars, .v, .stat .v { font-feature-settings: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.ic, .ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
main:focus { outline: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: var(--app-w); margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.pill {
  min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: 600 0.8rem/1 var(--font); cursor: pointer; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative;
}
.pill::after { content: ""; position: absolute; inset: -4px; }
.pill.ok { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); color: var(--good); }
.pill.warn { border-color: color-mix(in srgb, var(--coral) 50%, var(--line)); color: var(--coral); }
.pill.busy { opacity: 0.75; }
.icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; background: none; border: 0; color: var(--ink); border-radius: var(--r-sm); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--bg-2); }

/* ---------- tabs: bottom bar on mobile, top nav >= 900px ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: var(--app-w); z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 20px -14px rgba(0, 0, 0, 0.25);
}
.tabs[hidden] { display: none; }
.tabs a { display: grid; justify-items: center; align-content: center; gap: 3px; padding: 8px 4px 10px; min-height: 60px; color: var(--muted); text-decoration: none; font: 650 0.74rem/1 var(--font); position: relative; }
.tabs a svg { width: 24px; height: 24px; transition: transform 0.2s var(--ease); }
.tabs a.on { color: var(--accent); }
.tabs a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tabs a.on svg { transform: translateY(-1px) scale(1.06); }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: var(--app-w); margin: 0 auto; padding: 20px 16px 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.eyebrow { font: 700 0.74rem/1.3 var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.tag { display: inline-block; font: 650 0.7rem/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--bg-2); color: var(--muted); }
.back { margin: -6px 0 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 650 0.95rem/1.1 var(--font); text-decoration: none; cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -10px var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 0.85rem; position: relative; }
.btn.small::after { content: ""; position: absolute; inset: -4px 0; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link { font: inherit; font-weight: 650; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0; background: none; border: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; }
.cta.end { justify-content: flex-end; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; font: 700 0.74rem/1 var(--font); padding: 5px 9px; border-radius: 999px; background: var(--bg-2); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.soon { background: var(--coral-soft); color: var(--coral); }
.chip.urgent { background: var(--coral); color: var(--card); }
.chip.past { text-decoration: line-through; opacity: 0.7; }
.kind { display: inline-flex; align-items: center; font: 750 0.7rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 9px; border-radius: 999px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.kind-capture { color: var(--accent); background: var(--accent-soft); }
.kind-claim { color: var(--sky); background: var(--sky-soft); }
.kind-avoid { color: var(--amber); background: var(--amber-soft); }
.kind-longrun, .kind-timing { color: var(--muted); background: var(--bg-2); }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 700 0.74rem/1 var(--font); padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.soft { background: var(--bg-2); color: var(--muted); }

/* ---------- plan header ---------- */
.plan-head { margin: 4px 0 16px; }
.big { font-size: clamp(1.7rem, 7vw, 2.3rem); letter-spacing: -0.03em; font-weight: 850; }
.big .num { color: var(--accent); }
.plan-sub { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 4px; font-size: 0.95rem; }
.plan-sub:empty { display: none; }
.plan-sub span:nth-child(1) { color: var(--sky); font-weight: 600; }
.plan-count { margin-bottom: 0; }

/* filter chips (replace the old Tools tab) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px 2px; scrollbar-width: thin; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 650 0.88rem/1 var(--font); cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.fchip .n { font: 700 0.72rem/1 var(--font); background: var(--bg-2); color: var(--muted); padding: 3px 6px; border-radius: 999px; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fchip[aria-pressed="true"] .n { background: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }

/* ---------- timeline of checkpoints ---------- */
.timeline { list-style: none; padding: 0; margin: 6px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.checkpoint { margin: 0 0 20px; position: relative; }
.checkpoint[hidden] { display: none; }
.cp-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; position: relative; padding: 6px 0; }
.cp-dot { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--card); border: 3px solid var(--coral); display: grid; place-items: center; color: var(--accent-ink); z-index: 1; transition: background 0.25s var(--ease), border-color 0.25s var(--ease); }
.cp-head.cleared .cp-dot { background: var(--accent); border-color: var(--accent); }
.cp-dot .ic { width: 18px; height: 18px; }
.cp-title { flex: 1; min-width: 0; }
.cp-title h2 { margin: 0; font-size: 1.12rem; }
.cp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.cp-prog { display: grid; gap: 4px; justify-items: end; min-width: 92px; }
.cp-count { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-count strong { color: var(--ink); }
.minibar { display: block; width: 92px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.minibar.wide { width: 100%; }
.minibar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s var(--ease); }
.cp-moves { padding-left: 44px; }

/* ---------- move cards ---------- */
.move { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 14px; margin: 0 0 10px; box-shadow: var(--shadow); transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease); }
.move[hidden] { display: none; }
.move-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.move-val { margin-left: auto; text-align: right; line-height: 1; display: inline-flex; align-items: baseline; gap: 4px; }
.dollars { font-size: 1.45rem; font-weight: 850; color: var(--accent); letter-spacing: -0.02em; }
.move[data-kind="claim"] .dollars { color: var(--sky); }
.move[data-kind="avoid"] .dollars { color: var(--amber); }
.move[data-kind="longrun"] .dollars, .move[data-kind="timing"] .dollars { color: var(--muted); }
.est { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.move h3 { margin: 10px 0 2px; font-size: 1.05rem; display: flex; gap: 6px; }
.done-ic { display: none; color: var(--good); }
.move.is-did .done-ic { display: inline-flex; }
.move-when { margin: 0 0 4px; font-size: 0.84rem; color: var(--muted); }
.move details { margin: 2px 0 2px; }
.move summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 650; color: var(--accent); list-style: none; border-radius: 8px; }
.move summary::-webkit-details-marker { display: none; }
.move summary::after { content: "+"; margin-left: 8px; font-weight: 800; }
.move details[open] summary::after { content: "–"; }
.move details p, .howto { font-size: 0.95rem; }
.howto { padding-left: 1.3em; margin: 0 0 6px; }
.howto li { margin: 0 0 6px; }
.conf { font-size: 0.78rem; color: var(--muted); }
.conf::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.conf-high { color: var(--good); }
.conf-low { color: var(--coral); }
.learn-link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); font-weight: 650; text-decoration: none; color: var(--sky); margin-bottom: 4px; }
.learn-link:hover { text-decoration: underline; }
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st { min-height: var(--tap); border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--ink); font: 650 0.86rem/1.1 var(--font); cursor: pointer; padding: 6px; transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.st:hover { background: var(--bg-2); }
.st:active { transform: scale(0.96); }
.st-did[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.st-notyet[aria-pressed="true"] { background: var(--coral-soft); border-color: var(--coral); color: var(--coral); }
.st-na[aria-pressed="true"] { background: var(--bg-2); border-color: var(--muted); }
.move.is-did { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.move.is-na { opacity: 0.6; }
.move.is-na .dollars { text-decoration: line-through; }

/* ---------- callouts & stats ---------- */
.callout { border-radius: var(--r); padding: 14px 16px; margin: 0 0 14px; background: var(--bg-2); border: 1px solid var(--line); }
.callout strong { display: inline; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { padding-left: 1.2em; margin: 8px 0 0; font-size: 0.9rem; }
.callout.note summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.callout.warn { background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 35%, transparent); }
.callout.warn strong { color: var(--coral); }
.callout.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.empty { text-align: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.stat .k { font-size: 0.78rem; color: var(--muted); font-weight: 650; }
.stat .v { font-size: 1.35rem; font-weight: 850; letter-spacing: -0.02em; }
.stat .d { font-size: 0.74rem; color: var(--muted); }
.stat.warn .v { color: var(--coral); }
.stat.good .v { color: var(--good); }
.gap-row { display: flex; align-items: stretch; gap: 8px; margin: 8px 0; }
.gap-row .stat { flex: 1; }
.gap-arrow { align-self: center; font-weight: 800; color: var(--muted); }

/* bracket bar */
.bbar { position: relative; margin: 36px 0 30px; }
.bbar-track { display: flex; height: 26px; gap: 2px; }
.seg-b:first-child, .seg-b:first-child i { border-radius: 8px 0 0 8px; }
.seg-b:last-child { border-radius: 0 8px 8px 0; }
.seg-b { position: relative; background: color-mix(in srgb, var(--muted) 20%, var(--card)); min-width: 2px; }
.seg-b i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 55%, var(--card)); }
.seg-b.cur { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -2px; }
.seg-b.cur i { background: var(--accent); }
.seg-b .rate { position: absolute; top: calc(100% + 6px); left: 2px; white-space: nowrap; font: 650 0.72rem/1 var(--font); color: var(--muted); }
.bbar-marker { position: absolute; top: -8px; bottom: -4px; width: 0; border-left: 2px solid var(--ink); }
.bbar-marker span { position: absolute; bottom: calc(100% + 2px); transform: translateX(-50%); font: 750 0.78rem/1 var(--font); background: var(--ink); color: var(--bg); padding: 4px 6px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cliffs { list-style: none; padding: 0; margin: 0; }
.cliffs li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.cliffs li:first-child { border-top: 0; }
.cliffs li > div { display: grid; }

/* ---------- You ---------- */
.you-sec-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.you-sec-head h2 { margin: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 10px 0 0; }
.kv div { display: grid; }
.kv dt { font-size: 0.76rem; color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.inline-form label { display: block; font-weight: 650; margin-bottom: 6px; }
.inline-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 180px; width: auto; }

/* ---------- forms (shared) ---------- */
input[type="text"], input[type="date"], input[type="number"], input[type="email"], input[inputmode], select {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: 16px/1.2 var(--font); color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.checkrow input, .chipcheck input, .seg input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }

/* legacy intake wizard (fallback only) */
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin: 0 0 16px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s var(--ease); }
.why { background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 0.92rem; }
.why-k { display: block; font: 750 0.7rem/1.4 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.step-form { margin-top: 14px; }
.field { margin: 0 0 14px; display: grid; gap: 6px; }
.field > label, .field legend, .cell > label, .sub { font-weight: 650; font-size: 0.92rem; }
.hint { font-size: 0.8rem; color: var(--muted); }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset.earner { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 4px; margin: 0 0 16px; background: var(--card); min-width: 0; }
.affix { position: relative; display: block; }
.affix .pre, .affix .post { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.affix .pre { left: 12px; }
.affix .post { right: 12px; }
.affix .pre + input { padding-left: 26px; }
.checkrow { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chipcheck { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.chipcheck:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rows .row-item { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px; margin-bottom: 10px; display: grid; gap: 8px; }
.rows .cells { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: end; }
.step-nav { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; flex-wrap: wrap; }
.livebar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font-size: 0.92rem; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.samples { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.samples legend { font-weight: 700; margin-bottom: 8px; }
.sample-btn { text-align: left; display: grid; gap: 2px; padding: 12px 14px; min-height: var(--tap); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.sample-btn:hover { border-color: var(--accent); }
.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 45%, transparent); } 100% { box-shadow: var(--shadow); } }

/* ---------- celebration + toast ---------- */
.bounce { animation: bounce 0.3s var(--ease); }
@keyframes bounce { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); opacity: 0; animation: burst 0.8s var(--ease) forwards; }
.burst i:nth-child(3n + 1) { background: var(--amber); border-radius: 50%; }
.burst i:nth-child(3n + 2) { background: var(--sky); }
.burst i:nth-child(4n) { background: var(--coral); width: 6px; height: 10px; }
.burst.big i { width: 10px; height: 10px; }
@keyframes burst {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(0.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1); }
}
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; width: min(calc(var(--app-w) - 24px), calc(100vw - 24px)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-in { position: relative; background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 14px 48px 14px 16px; box-shadow: var(--shadow-lg); font-size: 0.93rem; }
.toast-in.big { background: var(--accent); color: var(--accent-ink); }
.toast-in strong { margin-right: 4px; }
.toast-tip { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent); font-size: 0.88rem; opacity: 0.95; }
.toast-x { position: absolute; top: 4px; right: 4px; width: var(--tap); height: var(--tap); border: 0; background: none; color: inherit; font-size: 1.4rem; cursor: pointer; border-radius: var(--r-sm); }

/* ---------- footer & dialog ---------- */
.foot { max-width: var(--app-w); width: 100%; margin: 0 auto; padding: 12px 16px 18px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.foot p { margin: 0; }
.foot a { color: inherit; }
dialog { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); padding: 20px; max-width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .burst { display: none; }
}

/* full-width move cards under each checkpoint */
.timeline::before { display: none; }
.cp-moves { padding-left: 0; }

/* ---------- compact phone frame ----------
   The app always renders as one phone-width column. On wider screens it sits
   centered on a soft backdrop, like a phone, instead of stretching out. */
:root { --app-w: 440px; }
@media (min-width: 480px) {
  html { background: color-mix(in srgb, var(--bg-2), var(--ink) 7%); }
  body {
    max-width: var(--app-w); width: 100%; margin: 0 auto;
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(0, 0, 0, 0.35);
  }
  .tabs { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
