/* Calm Money Sole Trader 1.0 — Neat Wren Studio. Calm Money 2.0's stylesheet, copied as it is (through Calm Money Home) so the apps are one
   family (apps/calm-money/app.css; Direction A "Calm cards" with the tinted hero), then a Sole Trader section at the end.
   Tokens on :root (appearance.js sets them from the colour scheme; the values below are Clay light, for the first paint).
   Phone first (<700px: bottom bar, + button, sheets); tablet 700–1099px (icon rail, two columns); desktop ≥1100px
   (sidebar with a Log a spend box, three-column tiles, the big calendar). */

/* ---------- Fonts (bundled, SIL OFL 1.1; licences in fonts/) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); 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: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); 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: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); 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; }
/* Atkinson Hyperlegible without its digits (U+0030–0039): its zero is slashed, so numbers come from Inter, next in the list. */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-002F, U+003A-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: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-002F, U+003A-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: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); 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: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); 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: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/lora-latin-400-normal.woff2") format("woff2"); 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: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/lora-latin-700-normal.woff2") format("woff2"); 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; }

/* ---------- Tokens ---------- */
:root {
  --page: #FFFBF7; --tile: #FFFFFF; --tile-2: #FDF7F2; --side: #FBF1EA; --side-line: #F1E1D6; --tile-line: #F0E4DB; --line: #EFE4DC; --track: #F3E9E1;
  --text: #3D3B3A; --muted: #6C6460; --ink: #A04C2D; --action: #B65733; --action-text: #FFFBF7; --mark: #CB6B47;
  --blush: #F6E1D7; --blush-2: #FBF0EB; --bar: #3D3B3A; --bar-text: #FFFBF7; --bar-muted: #C9C5C2; --line-c: #3D3B3A; --area-c: #CB6B47;
  --ok: #2E6B45; --ok-mark: #4E9A68; --ok-soft: #E3F1E7; --watch: #7A560C; --watch-mark: #BA8521; --watch-soft: #FBF0D6; --over: #9B3D57; --over-mark: #C9627F; --over-soft: #FBE7EC; --topay: #D7745A;
  --cat-groceries: #1F8574; --cat-eating: #7651BF; --cat-transport: #2D6CB0; --cat-home: #3F4FA8; --cat-fun: #B0428C; --cat-health: #16829E; --cat-clothes: #8A6038; --cat-other: #69717A;
  --serif: "Lora", "Iowan Old Style", Georgia, serif; --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --num: "Lora", Georgia, serif;
  --fs: 1; --gap: 12px; --pad: 16px; --row-pad: 9px; --r: 18px;
  --shadow: 0 1px 2px rgba(61, 59, 58, 0.04), 0 6px 18px rgba(61, 59, 58, 0.05);
}
:root[data-theme="dark"] { --shadow: none; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: calc(14.5px * var(--fs)); line-height: 1.4; color: var(--text); background: var(--page); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--ink); }
b, strong { font-weight: 700; }
.i { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: calc(12.5px * var(--fs)); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .am, .tbl td, .pamt, .safe-big, .debt-big, .debt-mid, .sum-item .v, .stat .v { font-variant-numeric: lining-nums tabular-nums; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--tile); padding: 8px 12px; border-radius: 10px; }
.skip:focus { left: 8px; }
.grow { flex: 1; min-width: 0; }
.push { margin-left: auto; }
.center { text-align: center; }
.in { color: var(--ok); font-weight: 700; }
.strike { text-decoration: line-through; color: var(--muted); }

/* ---------- Buttons, inputs, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: calc(14px * var(--fs)); white-space: nowrap; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--action); color: var(--action-text); }
.btn.primary:disabled { opacity: 0.55; cursor: default; }
.btn.line { border: 1.5px solid var(--line); background: var(--tile); }
.btn.ghost, .btn.quiet { color: var(--ink); }
.btn.quiet.danger { color: var(--muted); margin-right: auto; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: calc(13px * var(--fs)); }
.btn.xs { min-height: 30px; padding: 0 9px; font-size: calc(12.5px * var(--fs)); gap: 4px; }
.btn.big { min-height: 50px; padding: 0 22px; font-size: calc(16px * var(--fs)); }
.btn.wide { width: 100%; }
.btn.icon-only { width: 40px; padding: 0; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btn-row.between { justify-content: space-between; margin-top: 0; }
.icon-btn { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border-radius: 10px; color: var(--muted); }
.icon-btn:hover { background: var(--track); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; }
.linkbtn { text-align: left; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: 3px; min-height: 28px; }
.linkbtn.strong { font-weight: 700; text-decoration: none; }
.input { width: 100%; min-height: 42px; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--tile); color: var(--text); }
textarea.input { resize: vertical; }
select.input { padding-right: 28px; }
.input-money { display: flex; align-items: center; gap: 6px; }
.input-money .sym { color: var(--muted); font-weight: 600; }
.field { margin: 0 0 12px; border: 0; padding: 0; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: calc(13.5px * var(--fs)); margin-bottom: 5px; }
.field .help { font-size: calc(12.5px * var(--fs)); color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-row { display: flex; gap: 8px; margin-top: 6px; }
.inline-row .pct { max-width: 90px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--action); flex: none; }
.toggle .t { display: flex; flex-direction: column; font-weight: 600; }
.toggle small { font-weight: 400; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.toggle-inline { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fs)); white-space: nowrap; }
.toggle-inline input { width: 18px; height: 18px; accent-color: var(--action); }
.seg { display: inline-flex; background: var(--track); border-radius: 999px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; border-radius: 16px; }
.seg button, .seg .segr span { min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; }
.seg.sm button { min-height: 28px; padding: 0 9px; font-size: calc(12px * var(--fs)); }
.seg button[aria-pressed="true"], .seg .segr input:checked + span { background: var(--tile); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.segr { position: relative; cursor: pointer; } .segr input { position: absolute; opacity: 0; inset: 0; }
.segr input:focus-visible + span { outline: 3px solid var(--mark); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--tile); font-size: calc(13px * var(--fs)); font-weight: 600; }
.chip.sm { min-height: 30px; padding: 0 10px; font-size: calc(12.5px * var(--fs)); }
.chip[aria-pressed="true"] { border-color: var(--mark); background: var(--blush-2); color: var(--ink); }
.chip .count { background: var(--track); border-radius: 99px; padding: 0 6px; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.check-chip input { width: 16px; height: 16px; accent-color: var(--action); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 36px; }
.sw { width: 34px; height: 20px; border-radius: 99px; background: var(--track); position: relative; display: inline-block; flex: none; border: 1.5px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.sw::after { content: ''; position: absolute; left: 1px; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--tile); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
[aria-checked="true"] > .sw { background: var(--ok-mark); border-color: var(--ok-mark); }
[aria-checked="true"] > .sw::after { left: 15px; }
kbd { font-family: var(--sans); font-size: calc(11.5px * var(--fs)); font-weight: 700; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--tile); }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: calc(11.5px * var(--fs)); font-weight: 700; border-radius: 99px; padding: 1px 8px; background: var(--track); color: var(--muted); vertical-align: 1px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.num { min-width: 26px; height: 26px; justify-content: center; background: var(--blush); color: var(--ink); font-size: calc(13px * var(--fs)); }

/* ---------- Status: colour + icon + word ---------- */
.st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: calc(13px * var(--fs)); line-height: 18px; white-space: nowrap; flex: none; }
.st b { font-weight: 700; }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-watch { background: var(--watch-soft); color: var(--watch); } .st-over { background: var(--over-soft); color: var(--over); }
.st-none { background: var(--track); color: var(--muted); }
.st.sm { font-size: calc(12px * var(--fs)); padding: 2px 8px 2px 5px; line-height: 16px; } .st.sm .i { width: 13px; height: 13px; }
.st.plain { background: none; padding-left: 0; padding-right: 0; }
.cat { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--cc); background: color-mix(in srgb, var(--cc) 14%, var(--tile)); flex: none; }
.cat.sm { width: 25px; height: 25px; border-radius: 7px; } .cat.xs { width: 20px; height: 20px; border-radius: 6px; vertical-align: -5px; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; flex: none; }

/* ---------- Shell ---------- */
.app { min-height: 100vh; }
.col { min-width: 0; }
.side { display: none; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: calc(10px + env(safe-area-inset-top)) 14px 8px; }
.tt { flex: 1 1 0; min-width: 0; }
@media (max-width: 699px) { .focus-t .lbl, .focus-t .sw { display: none; } .focus-t { width: 40px; padding: 0; justify-content: center; } .focus-t[aria-checked="true"] { background: var(--bar); color: var(--bar-text); border-color: var(--bar); } .mode-seg button { min-height: 34px; } .pname { font-size: calc(20px * var(--fs)); } }
.pn-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pname { font-family: var(--serif); font-weight: 700; font-size: calc(21px * var(--fs)); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.edit-name { min-width: 30px; min-height: 30px; }
.pdate { font-size: calc(12.5px * var(--fs)); color: var(--muted); margin-top: 1px; }
.top .grow { display: none; }
.kbox { display: inline-flex; width: 40px; justify-content: center; align-items: center; gap: 9px; height: 40px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 8px 0 12px; background: var(--tile); color: var(--muted); font-size: calc(13.5px * var(--fs)); text-align: left; }
.kbox span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 699px) { .kbox { padding: 0; border-radius: 50%; flex: none; } .kbox span, .kbox kbd { display: none; } .top { gap: 6px; } .kbox, .qbtn, .focus-t { width: 36px; height: 36px; min-height: 36px; } }
.mode-seg { order: 10; flex: 1 1 100%; display: flex; }
.mode-seg button { flex: 1; justify-content: center; }
.focus-t { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--line); font-size: calc(13px * var(--fs)); font-weight: 700; background: var(--tile); white-space: nowrap; }
.qbtn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--tile); font-weight: 700; color: var(--muted); flex: none; }
.demo-line { order: 11; flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.main { padding: 0 14px calc(150px + env(safe-area-inset-bottom)); min-width: 0; }
.main:focus { outline: none; }
/* headings that only take focus so a screen reader lands there (jump links, sub-tab changes) need no ring */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, summary[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.view { display: flex; flex-direction: column; gap: var(--gap); }
.bbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--tile); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.bb { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 600; min-height: 52px; justify-content: center; }
.bb .bi { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; }
.bb .bi .full-mark { position: absolute; right: -2px; top: -4px; }
.bb[aria-current="page"] { color: var(--ink); font-weight: 700; } .bb[aria-current="page"] .bi { background: var(--blush); }
.bl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.fab { position: fixed; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 31; width: 60px; height: 60px; border-radius: 20px; background: var(--action); color: var(--action-text); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(150, 70, 40, 0.32), 0 2px 4px rgba(0, 0, 0, 0.12); }
/* the tour needs scroll room below the last target so it can sit in the space the card leaves (v1.3 approach) */
body.touring { padding-bottom: 100vh; }
body.focus-on .bbar { display: none; }
body.focus-on .fab { bottom: calc(20px + env(safe-area-inset-bottom)); }
body.focus-on .main { padding-bottom: 100px; }

/* sidebar / rail (one markup: CSS decides) */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 2px; }
.logo { display: inline-grid; flex: none; }
.bn { font-family: var(--serif); font-weight: 700; font-size: calc(17px * var(--fs)); line-height: 1.1; }
.bn small { display: block; font-family: var(--sans); font-weight: 400; font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-top: 1px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-i { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 11px; font-size: calc(14px * var(--fs)); color: var(--text); font-weight: 500; text-align: left; }
.nav-i .i { color: var(--muted); }
.nav-i:hover { background: color-mix(in srgb, var(--blush) 55%, transparent); }
.nav-i[aria-current="page"] { background: var(--blush); color: var(--ink); font-weight: 700; } .nav-i[aria-current="page"] .i { color: var(--ink); }
.nav-i .badge { margin-left: auto; }
.nav.foot .nav-i { min-height: 36px; font-size: calc(13.5px * var(--fs)); color: var(--muted); }
.tip { display: none; }
.spacer { flex: 1; }
.rail-add { display: none; }
.logbox { display: none; }
.side-chip { display: none; }

@media (min-width: 700px) {
  .app { display: grid; grid-template-columns: 84px minmax(0, 1fr); background: linear-gradient(to right, var(--side) 83px, var(--side-line) 83px 84px, var(--page) 84px); }
  .side { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: visible; background: var(--side); border-right: 1px solid var(--side-line); padding: 14px 0 12px; z-index: 20; }
  .side .bn, .side .lbl { display: none; }
  .side nav, .side .nav { width: 100%; align-items: center; }
  .nav-i { justify-content: center; width: 60px; min-height: 48px; padding: 0; margin: 0 auto; }
  .nav-i .badge { position: absolute; top: 4px; right: 4px; margin: 0; padding: 0 5px; font-size: 10.5px; }
  .nav-i .full-mark { position: absolute; bottom: 2px; right: 4px; }
  .tip { display: block; position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--bar); color: var(--bar-text); font-size: calc(12.5px * var(--fs)); font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s; z-index: 40; }
  .nav-i:hover .tip, .nav-i:focus-visible .tip, .rail-add:hover .tip, .rail-add:focus-visible .tip { opacity: 1; }
  .rail-add { display: grid; place-items: center; position: relative; width: 46px; height: 46px; border-radius: 14px; background: var(--action); color: var(--action-text); margin: 2px 0 6px; }
  .side { overflow: visible; }
  .bbar, .fab { display: none !important; }
  .top { flex-wrap: nowrap; padding: 14px 20px 10px; gap: 10px; }
  .top .grow { display: block; flex: 1; }
  .tt { flex: 0 1 auto; }
  .kbox { display: inline-flex; width: 42px; padding: 0; justify-content: center; }
  .kbox span, .kbox kbd { display: none; }
  .mode-seg { order: 0; flex: none; }
  .mode-seg button { flex: none; }
  .demo-line { display: none; }
  .side-chip { display: flex; }
  .main { padding: 0 20px 32px; }
  body.focus-on .side nav { display: none; }
}
@media (min-width: 1100px) {
  .app { grid-template-columns: 244px minmax(0, 1fr); background: linear-gradient(to right, var(--side) 243px, var(--side-line) 243px 244px, var(--page) 244px); }
  .side { align-items: stretch; padding: 18px 14px 14px; gap: 12px; overflow-y: auto; }
  .side .bn, .side .lbl { display: block; }
  .side nav, .side .nav { align-items: stretch; }
  .nav-i { justify-content: flex-start; width: 100%; min-height: 39px; padding: 0 10px; margin: 0; }
  .nav-i .badge { position: static; margin-left: auto; padding: 1px 7px; font-size: calc(11.5px * var(--fs)); }
  .nav-i .full-mark { position: static; margin-left: auto; }
  .tip { display: none !important; }
  .rail-add { display: none; }
  .logbox { display: flex; }
  .main { padding: 0 26px 30px; }
  .top { padding: 16px 26px 12px; }
  .kbox { width: clamp(220px, 25vw, 350px); padding: 0 8px 0 12px; justify-content: flex-start; font-size: calc(13px * var(--fs)); }
  .kbox span, .kbox kbd { display: inline; }
}
.full-chip.side-chip { align-items: center; gap: 8px; border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 12px; padding: 8px 10px; font-size: calc(12px * var(--fs)); color: var(--muted); line-height: 1.3; text-align: left; background: var(--tile); width: 100%; }
@media (min-width: 700px) and (max-width: 1099px) { .full-chip.side-chip { width: 60px; padding: 6px; justify-content: center; } .full-chip.side-chip span { display: none; } }
.full-chip.side-chip b { color: var(--ink); }

/* Log a spend box (desktop) */
.logbox { background: var(--tile); border: 1px solid var(--tile-line); border-radius: 14px; padding: 12px; flex-direction: column; gap: 9px; }
.logbox h2 { font-family: var(--serif); font-size: calc(15px * var(--fs)); display: flex; align-items: center; gap: 6px; }
.logbox .amt { display: flex; align-items: center; gap: 4px; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; font-size: calc(18px * var(--fs)); }
.logbox .amt .cur { color: var(--muted); }
.logbox .amt input { border: 0; background: transparent; width: 100%; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; }
.logbox .amt:focus-within { border-color: var(--mark); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mark) 30%, transparent); }
.logbox .cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.logbox .cats button { display: grid; place-items: center; height: 36px; border-radius: 9px; background: color-mix(in srgb, var(--cc) 11%, var(--tile)); color: var(--cc); }
.logbox .cats button.on { outline: 2px solid var(--cc); outline-offset: -2px; background: color-mix(in srgb, var(--cc) 20%, var(--tile)); }
.logbox .row { display: flex; gap: 6px; align-items: center; font-size: calc(12.5px * var(--fs)); color: var(--muted); min-height: 18px; }
.logbox .btn { width: 100%; }

/* ---------- Screen parts ---------- */
.page-head { display: flex; flex-direction: column; gap: 10px; }
.ph-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: calc(24px * var(--fs)); line-height: 1.15; flex: 1; min-width: 0; }
.ph-actions { display: flex; gap: 8px; align-items: center; }
.subtabs { margin: 0 -14px; }
.subtabs-inner { display: flex; gap: 6px; overflow-x: auto; padding: 2px 14px 4px; scrollbar-width: none; }
.subtabs-inner::-webkit-scrollbar { display: none; }
.subtab { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--tile); font-weight: 600; font-size: calc(13.5px * var(--fs)); white-space: nowrap; flex: none; }
.subtab[aria-current="page"] { background: var(--bar); color: var(--bar-text); border-color: var(--bar); }
.subtab[aria-current="page"] .full-mark { color: var(--bar-text); background: transparent; }
@media (min-width: 700px) { .subtabs { margin: 0; } .subtabs-inner { padding: 2px 0 4px; } }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--tile-line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.sum-item { background: var(--tile); padding: 11px 14px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sum-item.big { grid-column: 1 / -1; }
.sum-item .k { font-size: calc(12px * var(--fs)); font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.sum-item .v { font-variant-numeric: lining-nums proportional-nums !important; font-family: var(--num); font-weight: 700; font-size: calc(20px * var(--fs)); line-height: 1.15; }
.sum-item.big .v { font-size: calc(26px * var(--fs)); }
.sum-big .cur { font-size: 0.62em; vertical-align: 0.38em; margin-right: 1px; } .sum-big .pence { font-size: 0.5em; color: var(--muted); }
.sum-item .n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.summary.compact .sum-item .v { font-size: calc(17px * var(--fs)); }
@media (min-width: 700px) { .summary { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .sum-item.big { grid-column: auto; } .summary.compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 699px) { .summary.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } .summary.compact .sum-item { padding: 9px 10px; } }
.trend-n { display: inline-flex; align-items: center; gap: 4px; }
.card, .tile { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--pad); min-width: 0; position: relative; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2, .h3 { font-family: var(--serif); font-size: calc(17px * var(--fs)); flex: 1; min-width: 0; }
.h3 { font-size: calc(15.5px * var(--fs)); margin-bottom: 4px; }
.card-sub { color: var(--muted); font-size: calc(13px * var(--fs)); margin-bottom: 10px; }
.card-note { margin-top: 10px; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--muted); padding: 4px 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary .i { transition: transform 0.15s; }
details[open] > summary .i { transform: rotate(180deg); }
.fold-card > summary, details.card > summary { display: flex; align-items: center; gap: 8px; min-height: 30px; font-weight: 700; }
.fold-card > summary h2 { font-family: var(--serif); font-size: calc(17px * var(--fs)); flex: 1; }
.fold-card[open] > summary { margin-bottom: 10px; }
details.card:not(.fold-card) > summary { justify-content: space-between; }
details.how > summary { color: var(--ink); font-weight: 700; font-size: calc(13.5px * var(--fs)); display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.banner, .quiet-banner, .edit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 14px; padding: 10px 14px; background: var(--blush-2); border: 1px solid var(--tile-line); }
.banner strong { display: block; } .banner span { color: var(--muted); font-size: calc(13px * var(--fs)); }
.banner.slim { padding: 6px 8px 6px 14px; } .banner.slim strong { display: inline; margin-right: 4px; }
.quiet-banner { background: var(--tile); font-size: calc(13.5px * var(--fs)); color: var(--muted); padding: 8px 12px; }
.whats-new ul { list-style: disc; padding-left: 20px; margin: 8px 0 4px; display: grid; gap: 4px; }
.whats-new h2 { font-family: var(--serif); font-size: calc(17px * var(--fs)); }
.away ol { list-style: decimal; padding-left: 22px; margin: 10px 0; display: grid; gap: 4px; }
.upsell-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: calc(13px * var(--fs)); margin-top: 8px; }
.version-line { text-align: center; padding: 8px 0; }
.jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; flex-wrap: wrap; }

/* rows */
.rows { display: flex; flex-direction: column; }
.rows > li { display: flex; align-items: center; gap: 10px; padding: var(--row-pad) 0; border-top: 1px solid var(--line); min-height: 44px; flex-wrap: nowrap; }
.rows > li:first-child { border-top: 0; }
.rows.tight > li { padding: 5px 0; min-height: 38px; }
.rows .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rows .nm small { display: block; color: var(--muted); font-size: calc(12px * var(--fs)); white-space: normal; }
.rows .am { font-weight: 700; white-space: nowrap; }
.rows .w3 { width: 36px; text-align: right; }
.rows > li.done .text { text-decoration: line-through; color: var(--muted); }
.check { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); background: var(--tile); display: grid; place-items: center; color: transparent; }
.check[aria-checked="true"] { background: var(--ok-mark); border-color: var(--ok-mark); color: #fff; }
.check:disabled { opacity: 0.4; }
.kind-i { width: 30px; display: grid; place-items: center; color: var(--muted); flex: none; }
.day-h { display: flex; justify-content: space-between; font-size: calc(12.5px * var(--fs)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 14px 0 2px; }
.list-total { margin: 10px 0 0; }
.filters { display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 42px; color: var(--muted); }
.search input { border: 0; background: transparent; flex: 1; min-width: 0; outline: none; color: var(--text); min-height: 38px; }
.search:focus-within { border-color: var(--mark); }
.cat-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cat-chips .chip { flex: none; }
.menu-list ul { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border-top: 1px solid var(--line); text-align: left; min-height: 56px; }
.menu-list li:first-child .menu-item { border-top: 0; }
.menu-item .title { display: block; font-weight: 700; } .menu-item .sub { display: block; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setting:first-of-type { border-top: 0; }
.setting .t { flex: 1 1 240px; font-weight: 600; min-width: 0; }
.setting .t small { display: block; font-weight: 400; color: var(--muted); font-size: calc(12.5px * var(--fs)); margin-top: 2px; }
.setting.stack { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.setting.stack > .seg { align-self: flex-start; }
.setting.stack .t { flex: none; }
.setting > .input, .setting > select.input { max-width: 280px; }
.setting > .input-money { max-width: 200px; }
#catsCard .rows .input { max-width: 240px; min-height: 38px; }
.tile-order { counter-reset: t; display: flex; flex-direction: column; }
.tile-order li { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tile-order li:first-child { border-top: 0; }
.tile-order .nm { flex: 1; min-width: 160px; font-weight: 600; }
.install-steps { list-style: decimal; padding-left: 20px; display: grid; gap: 4px; margin: 6px 0; }
.qa { border-top: 1px solid var(--line); }
.qa:first-child { border-top: 0; }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; font-weight: 600; min-height: 44px; }
.qa-body { padding: 0 0 12px; color: var(--text); }
.qa-body p + p { margin-top: 6px; }
.howto-steps { list-style: decimal; padding-left: 22px; display: grid; gap: 5px; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; }
.fold > summary h2 { font-family: var(--serif); font-size: calc(17px * var(--fs)); }

/* ---------- Overview ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); grid-auto-flow: row dense; align-items: stretch; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { padding: 13px var(--pad) 14px; display: flex; flex-direction: column; }
.th { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; min-height: 26px; flex-wrap: wrap; }
.th h2 { font-family: var(--serif); font-size: calc(16.5px * var(--fs)); line-height: 1.2; }
.th .sub { font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.go { margin-left: auto; color: var(--ink); font-weight: 700; font-size: calc(12.5px * var(--fs)); display: inline-flex; align-items: center; gap: 1px; min-height: 30px; padding: 0 2px; white-space: nowrap; }
.tb { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.overview-foot { display: flex; justify-content: flex-end; }
.edit-bar { justify-content: space-between; }
.grid.editing .tile { outline: 2px dashed color-mix(in srgb, var(--mark) 50%, transparent); outline-offset: -2px; }
.tile-edit { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
/* Safe to spend: the tinted hero */
.hero { border-color: color-mix(in srgb, var(--ok-mark) 32%, transparent); background: linear-gradient(160deg, var(--ok-soft), color-mix(in srgb, var(--ok-soft) 30%, var(--tile)) 75%); }
.hero.tint-watch { border-color: color-mix(in srgb, var(--watch-mark) 40%, transparent); background: linear-gradient(160deg, var(--watch-soft), color-mix(in srgb, var(--watch-soft) 30%, var(--tile)) 75%); }
.hero.tint-over { border-color: color-mix(in srgb, var(--over-mark) 40%, transparent); background: linear-gradient(160deg, var(--over-soft), color-mix(in srgb, var(--over-soft) 30%, var(--tile)) 75%); }
.safe-big { font-variant-numeric: lining-nums proportional-nums !important; font-family: var(--num); font-weight: 700; font-size: calc(52px * var(--fs)); line-height: 1; letter-spacing: -0.02em; }
.safe-big .cur, .wiz-big .cur { font-size: 0.58em; vertical-align: 0.48em; margin-right: 2px; font-weight: 600; }
.safe-big .pence { font-size: 0.42em; color: var(--muted); font-weight: 600; }
.safe-big .sp { display: inline-block; width: 0.15em; }
.safe-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 10px 0 8px; }
.safe-line { font-size: calc(15px * var(--fs)); }
.daydots { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 2px; }
.daydots i { width: 13px; height: 13px; border-radius: 50%; background: color-mix(in srgb, var(--ok-mark) 28%, var(--tile)); }
.daydots i.t { background: var(--ok-mark); } .daydots i.p { background: none; border: 2px dashed var(--ok-mark); }
.tint-watch .daydots i { background: color-mix(in srgb, var(--watch-mark) 28%, var(--tile)); } .tint-watch .daydots i.t { background: var(--watch-mark); } .tint-watch .daydots i.p { border-color: var(--watch-mark); background: none; }
.tint-over .daydots i { background: color-mix(in srgb, var(--over-mark) 28%, var(--tile)); } .tint-over .daydots i.t { background: var(--over-mark); } .tint-over .daydots i.p { border-color: var(--over-mark); background: none; }
.how { margin-top: 8px; }
.breakdown { display: flex; flex-direction: column; margin-top: 8px; font-size: calc(13px * var(--fs)); }
.breakdown li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.breakdown li:first-child { border-top: 0; }
.breakdown li span:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown .ind { padding-left: 12px; color: var(--muted); }
.breakdown .total { border-top: 1.5px solid var(--text); padding-top: 5px; }
.breakdown.compact { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: calc(12.5px * var(--fs)); }
.breakdown.compact li { border-top: 0; padding: 1px 0; }
.breakdown.compact .total { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.card.how > summary { color: var(--ink); }
/* Right now: one thing only */
.now { display: flex; align-items: center; gap: 12px 14px; background: var(--bar); color: var(--bar-text); border-radius: 16px; padding: 10px 12px; flex-wrap: wrap; }
.now .k { font-size: calc(11px * var(--fs)); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bar-muted); }
.now .w { font-family: var(--serif); font-size: calc(19px * var(--fs)); font-weight: 700; line-height: 1.2; }
.now .grow { flex: 1 1 220px; }
.now .more { font-size: calc(12.5px * var(--fs)); color: var(--bar-muted); white-space: nowrap; }
.now .btn { min-height: 42px; }
.now .btn.done { background: var(--bar-text); color: var(--bar); }
.now .btn.later { color: var(--bar-text); border: 1.5px solid color-mix(in srgb, var(--bar-text) 40%, transparent); }
.now .dot { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--bar-text) 14%, transparent); display: grid; place-items: center; flex: none; }
.now.calm .w { font-size: calc(16px * var(--fs)); }
@media (max-width: 699px) { .now .more { display: none; } .now .btn { flex: 1; min-height: 48px; } .now .grow { flex-basis: calc(100% - 60px); } }
/* on track */
.ot { display: flex; flex-direction: column; }
.ot li { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 7px 0; border-top: 1px solid var(--line); align-items: center; }
.ot li:first-child { border-top: 0; padding-top: 0; }
.ot .ar { font-weight: 700; text-align: left; font-size: calc(14px * var(--fs)); min-height: 28px; }
.ot .why { grid-column: 1 / -1; color: var(--muted); font-size: calc(12.5px * var(--fs)); line-height: 1.3; }
/* 3 small things */
.three { display: flex; flex-direction: column; gap: 6px; }
.three li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 10px 4px 9px; border-radius: 12px; background: var(--tile-2); border: 1px solid var(--line); }
.three li.done .t { text-decoration: line-through; color: var(--muted); }
.three .sugg { color: var(--muted); font-size: calc(11.5px * var(--fs)); }
.three-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; flex-wrap: wrap; }
/* bills, budgets, goals, debts */
.bills-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.bills-head .num { font-family: var(--num); font-size: calc(22px * var(--fs)); }
.pbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--track); gap: 2px; }
.pbar i { display: block; height: 100%; } .pbar .paid { background: var(--ok-mark); } .pbar .topay { background: var(--topay); }
.pbar.thin { height: 8px; margin: 9px 0 6px; } .pbar.thin i { border-radius: 99px; }
.pbar.inline { display: flex; width: 100%; max-width: 260px; height: 8px; margin-top: 4px; }
.sum-item .n > span:has(> .pbar.inline) { flex: 1 1 100%; }
.leg { display: flex; gap: 4px 14px; font-size: calc(12.5px * var(--fs)); color: var(--muted); flex-wrap: wrap; margin: 7px 0 4px; }
.leg b { color: var(--text); }
.leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.pots { display: flex; flex-direction: column; gap: 4px; }
.pot { display: grid; grid-template-columns: 25px minmax(60px, 0.9fr) minmax(70px, 1fr) auto; align-items: center; gap: 8px; min-height: 34px; }
.pot .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pot .st { justify-self: end; }
.pot .pamt { display: none; }
body[data-mode="standard"] .pot { grid-template-columns: 25px minmax(0, 1fr) auto; grid-template-areas: 'i n s' 'b b a'; row-gap: 3px; padding: 3px 0; }
body[data-mode="standard"] .pot > .cat { grid-area: i; } body[data-mode="standard"] .pot .nm { grid-area: n; } body[data-mode="standard"] .pot .st { grid-area: s; } body[data-mode="standard"] .pot .pace-bar { grid-area: b; } 
body[data-mode="standard"] .pot .pamt { grid-area: a; display: block; font-size: calc(12px * var(--fs)); color: var(--muted); white-space: nowrap; }
.pace-bar { position: relative; height: 8px; border-radius: 99px; background: var(--track); }
.pace-bar.lg { height: 12px; margin: 8px 0 4px; }
.pace-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--cc); }
.pace-bar.over i { background: repeating-linear-gradient(135deg, var(--over-mark) 0 6px, color-mix(in srgb, var(--over-mark) 55%, var(--tile)) 6px 9px); width: 100% !important; }
.pace-bar .pace { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: 0.55; border-radius: 2px; }
.pace-key { display: flex; align-items: center; gap: 6px; font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-top: 8px; }
.pace-key span { display: inline-block; width: 2px; height: 11px; background: var(--text); opacity: 0.55; }
.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.goal { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 2px; }
.goal .gn { font-weight: 700; font-size: calc(13px * var(--fs)); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.goal .ga { font-size: calc(12px * var(--fs)); color: var(--muted); }
.ring { display: block; margin: 0 auto 4px; }
.ring-t { font-family: var(--num); font-weight: 700; font-size: 14px; fill: var(--text); }
.ring-s { font-family: var(--sans); font-size: 10.5px; fill: var(--muted); }
.debt-name { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.debt-big { font-family: var(--num); font-weight: 700; font-size: calc(30px * var(--fs)); line-height: 1; }
.debt-mid { font-family: var(--num); font-weight: 700; font-size: calc(22px * var(--fs)); }
.cats-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.big2 { font-family: var(--num); font-weight: 700; font-size: calc(22px * var(--fs)); }
.catstack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 6px 0 6px; background: var(--track); }
.catstack i { display: block; height: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs)); }
.tbl th { text-align: left; font-size: calc(11px * var(--fs)); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 8px 5px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; padding-right: 0; white-space: nowrap; }
.tbl .kind { display: inline-flex; align-items: center; gap: 4px; }
.tbl tr.step td { background: var(--blush-2); border-radius: 10px; padding: 6px 8px; }
.step-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-today .tbl td:nth-child(3) { color: var(--muted); }
@media (max-width: 1399px) { .t-today .tbl th:nth-child(3), .t-today .tbl td:nth-child(3) { display: none; } }
/* focus mode */
.focus-wrap { display: grid; gap: var(--gap); max-width: 560px; width: 100%; margin: 0 auto; }
.focus-note { text-align: center; }
@media (min-width: 1100px) { .focus-log { display: none; } }

/* ---------- Money left until payday chart ---------- */
.mchart, .mchart2, .six { width: 100%; min-height: 150px; }
.trend, .six svg, .mchart2 svg { display: block; font-family: var(--sans); overflow: visible; }
.trend .grid, .six .grid { stroke: var(--line); stroke-width: 1; }
.trend .grid.base, .six .grid.base { stroke: color-mix(in srgb, var(--text) 30%, transparent); }
.trend .tick { stroke: color-mix(in srgb, var(--text) 35%, transparent); }
.ylab, .xlab { font-size: 11px; fill: var(--muted); }
.xlab.is-today { fill: var(--ink); font-weight: 700; } .xlab.is-pay { fill: var(--ok); font-weight: 700; }
.trend .ln { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.trend .ln-actual { stroke: var(--line-c); stroke-width: 2.4; }
.trend .ln-proj { stroke: var(--line-c); stroke-width: 2.2; stroke-dasharray: 5 5; opacity: 0.75; }
.trend .m-today { stroke: var(--mark); stroke-width: 1.5; } .trend .m-pay { stroke: var(--ok-mark); stroke-width: 1.6; stroke-dasharray: 3 3; }
.trend .mlab { font-size: 11.5px; font-weight: 700; } .m-today-t { fill: var(--ink); } .m-pay-t { fill: var(--ok); }
.trend .bill { stroke: var(--tile); stroke-width: 2; fill: var(--cc); } .trend .bill.due { fill: var(--tile); stroke: var(--cc); stroke-width: 2.4; }
.trend .endpt { fill: var(--line-c); } .trend .nowpt { fill: var(--mark); stroke: var(--tile); stroke-width: 2; }
.trend .endlab, .trend .nowlab { font-size: 12px; font-weight: 700; fill: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: calc(12px * var(--fs)); color: var(--muted); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { width: 18px; height: 0; border-top: 2.4px solid var(--line-c); display: inline-block; }
.lg-dash { width: 18px; height: 0; border-top: 2.2px dashed var(--line-c); opacity: 0.8; display: inline-block; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-dot.paid { background: var(--cat-home); } .lg-dot.due { border: 2.2px solid var(--cat-home); background: var(--tile); }
.lg-box { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-box.in { background: var(--ok-mark); } .lg-box.out { background: var(--topay); } .lg-box.plan { background: var(--track); border: 1.5px solid var(--muted); } .lg-box.act { background: var(--cat-home); }
.verdict { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.chart-seg { margin-left: auto; }
.t-trend .th { row-gap: 6px; }
@media (max-width: 699px) { .t-trend .th .chart-seg { order: 5; margin-left: 0; width: 100%; display: flex; } .t-trend .chart-seg button { flex: 1; justify-content: center; } }
.six .bar-in { fill: var(--ok-mark); } .six .bar-out { fill: var(--topay); } .six .bar-in.cur, .six .bar-out.cur { opacity: 0.7; }
.six .kept-line { fill: none; stroke: var(--line-c); stroke-width: 2; } .six .kept-pt { fill: var(--line-c); }

/* ---------- Spending, bills, goals, debts ---------- */
.budget-list { display: flex; flex-direction: column; }
.budget { padding: 12px 0; border-top: 1px solid var(--line); }
.budget:first-child { border-top: 0; padding-top: 2px; }
.row-top { display: flex; align-items: center; gap: 8px; }
.row-top .nm { flex: 1; min-width: 0; } .row-top .nm small { display: block; color: var(--muted); font-size: calc(12px * var(--fs)); }
.meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.wait-list > li { flex-wrap: wrap; }
.wait-list .nm { flex: 1 1 150px; }
.wait-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 699px) { .wait-acts { width: 100%; justify-content: flex-end; } }
.wait-list .wait-left { display: inline-flex; align-items: center; gap: 4px; }
.ready-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 700; font-size: calc(12.5px * var(--fs)); }
.filter-bar { margin: 0; }
.subs-line { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--blush-2); border: 1px solid var(--tile-line); }
.goal-list { display: flex; flex-direction: column; }
.goal-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.goal-row:first-child { border-top: 0; padding-top: 2px; }
.goal-row .ring { margin: 0; }
.goal-row .grow { flex: 1 1 220px; display: grid; gap: 3px; }
.acts { display: flex; align-items: center; gap: 6px; flex: none; }
.debt-list { display: flex; flex-direction: column; }
.debt-row { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.debt-row:first-child { border-top: 0; }
.debt-row .grow { flex: 1 1 240px; display: grid; gap: 2px; }
.payoff { display: grid; gap: 6px; margin-bottom: 8px; }
.acc-list .am { min-width: 80px; text-align: right; }

/* ---------- Calendar ---------- */
.mtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
@media (min-width: 700px) { .mtabs { margin: 0; padding: 2px 0; } }
.mt { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px 0 9px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--tile); font-size: calc(14px * var(--fs)); white-space: nowrap; flex: none; }
.mt small { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 500; }
.mt .mtd { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mt-ok .mtd { background: var(--ok-mark); color: #fff; } .mt-watch .mtd { background: var(--watch-mark); color: #fff; } .mt-fc .mtd { border: 2px dashed color-mix(in srgb, var(--muted) 65%, transparent); } .mt-now .mtd { background: var(--mark); }
.mt[aria-pressed="true"] { border-color: var(--mark); background: var(--blush-2); } .mt[aria-pressed="true"] b { color: var(--ink); }
@media (max-width: 699px) { .mt small { display: none; } }
.calwrap { display: grid; gap: 12px; }
.cal-top { display: flex; align-items: center; gap: 12px; }
.cal-top .mtabs { flex: 0 1 auto; min-width: 0; }
.cal-top .cal-sum { flex: none; }
.cal-sum { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; font-size: calc(13.5px * var(--fs)); color: var(--muted); }
.cal-sum b { color: var(--text); font-variant-numeric: tabular-nums; } .cal-sum b.in { color: var(--ok); }
@media (min-width: 1100px) { .calwrap { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; } }
.cal.big { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.cal.big .dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal.big .dow span { padding: 8px 10px; font-size: calc(12px * var(--fs)); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cal.big .wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal.big .d { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 5px 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; align-items: stretch; border-radius: 0; }
.cal.big .d:nth-child(7n) { border-right: 0; } .cal.big .wk:last-child .d { border-bottom: 0; }
.cal.big .d .n { font-size: calc(13px * var(--fs)); display: flex; align-items: center; gap: 6px; min-height: 22px; }
.cal.big .d.out { background: color-mix(in srgb, var(--tile-2) 70%, var(--tile)); } .cal.big .d.out .n { color: var(--muted); }
.cal.big .d.today { box-shadow: inset 0 0 0 2px var(--mark); background: var(--blush-2); }
.cal.big .d.today .n b { background: var(--action); color: var(--action-text); border-radius: 99px; padding: 1px 7px; }
.cal.big .d.pay { background: color-mix(in srgb, var(--ok-soft) 65%, var(--tile)); }
.cal.big .d[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.cal.big .d.today[aria-selected="true"] { box-shadow: inset 0 0 0 3px var(--mark); }
.tag { font-size: calc(10.5px * var(--fs)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); }
.tag.pay { color: var(--ok); }
.ch { display: flex; align-items: center; gap: 3px; min-height: 22px; border-radius: 7px; padding: 1px 5px 1px 3px; font-size: calc(10.8px * var(--fs)); font-weight: 600; white-space: nowrap; overflow: hidden; min-width: 0; }
.ch .t { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .ch .a { font-variant-numeric: tabular-nums; }
.ch.bill { background: color-mix(in srgb, var(--cc) 12%, var(--tile)); color: var(--text); border-left: 3px solid var(--cc); }
.ch.bill.paid { background: var(--tile-2); color: var(--muted); border-left-color: color-mix(in srgb, var(--cc) 45%, var(--tile)); }
.ch.bill.paid .i { color: var(--ok); }
.ch.pay { background: var(--ok-soft); color: var(--ok); border-left: 3px solid var(--ok-mark); }
.ch.note, .ch.review { background: var(--tile); color: var(--text); border: 1px dashed color-mix(in srgb, var(--muted) 60%, transparent); white-space: normal; line-height: 1.25; padding: 2px 5px; display: block; }
.ch.note .t2 { display: inline; } .ch.note .i, .ch.review .i { vertical-align: -1px; color: var(--muted); }
.ch.note .tm { color: var(--muted); }
.ch.note.done { text-decoration: line-through; color: var(--muted); }
.ch.debt { background: color-mix(in srgb, var(--text) 7%, var(--tile)); color: var(--text); border-left: 3px solid var(--text); }
.more-n { font-size: calc(10.5px * var(--fs)); color: var(--muted); }
.sp { margin-top: auto; font-size: calc(11px * var(--fs)); color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.cal.small { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); padding: 8px 8px 10px; box-shadow: var(--shadow); }
.cal.small .dw { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: calc(11.5px * var(--fs)); font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.cal.small .gr { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.pc { min-height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: calc(15px * var(--fs)); font-weight: 600; }
.pc.out { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 400; }
.pc.pay { background: var(--ok-soft); color: var(--ok); }
.pc.today { box-shadow: inset 0 0 0 2px var(--mark); }
.pc[aria-selected="true"] { background: var(--action); color: var(--action-text); }
.pc[aria-selected="true"] .pd.r { border-color: var(--action-text); background: transparent; } .pc[aria-selected="true"] .pd.f { box-shadow: 0 0 0 1.5px var(--action-text); } .pc[aria-selected="true"] .pd.sq { background: var(--action-text); }
.pds { display: flex; gap: 3px; height: 7px; }
.pd { width: 7px; height: 7px; border-radius: 50%; display: block; }
.pd.f { background: var(--cc); } .pd.r { border: 1.8px solid var(--cc); } .pd.sq { border-radius: 2px; background: var(--muted); transform: rotate(45deg) scale(0.85); }
.plg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-top: 8px; padding: 0 4px; }
.plg span { display: flex; align-items: center; gap: 5px; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.day-card .day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.day-card h2 { font-family: var(--serif); font-size: calc(17px * var(--fs)); }
.agenda { display: flex; flex-direction: column; margin-top: 8px; }
.agenda li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.agenda li:first-child { border-top: 0; }
.agenda .nm { flex: 1 1 100px; min-width: 0; } .agenda .nm small { display: block; color: var(--muted); font-size: calc(12px * var(--fs)); }
.agenda .am { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.day-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.lgd { display: grid; gap: 7px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.lgd span { display: flex; align-items: center; gap: 6px; }
.lgd .ch { width: 22px; min-height: 14px; height: 14px; padding: 0; display: inline-block; }

/* ---------- Notes ---------- */
.notes-list .text { white-space: normal; word-break: break-word; }
.notes-list .icon-btn[aria-pressed="true"] { color: var(--watch); background: var(--watch-soft); }

/* ---------- Insights ---------- */
.period-bar { display: flex; align-items: center; gap: 8px; }
.period-title { flex: 1; text-align: center; min-width: 0; }
.period-title h2 { font-family: var(--serif); font-size: calc(20px * var(--fs)); }
.period-meta { display: flex; justify-content: center; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.ptag { background: var(--blush); color: var(--ink); font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.ptag.forecast { background: var(--watch-soft); color: var(--watch); }
.period-now { display: flex; justify-content: center; margin-top: 4px; }
.period-kinds { justify-content: center; margin-top: 8px; }
.custom { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.custom label { display: grid; gap: 2px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.barrow { display: block; width: 100%; text-align: left; padding: 6px 0; }
.barrow .btop { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.barrow .name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.barrow .meta { color: var(--muted); font-size: calc(12.5px * var(--fs)); white-space: nowrap; }
.barrow .track { height: 9px; border-radius: 99px; background: var(--track); overflow: hidden; }
.barrow .track span { display: block; height: 100%; border-radius: 99px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 600; }
.inout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .inout { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--tile-2); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 600; }
.stat .v { font-variant-numeric: lining-nums proportional-nums !important; font-family: var(--num); font-weight: 700; font-size: calc(20px * var(--fs)); }
.stat.kept { background: var(--ok-soft); } .stat.kept .k { color: var(--ok); }
.pv-list { display: flex; flex-direction: column; }
.pv-list li { display: grid; grid-template-columns: minmax(90px, 0.8fr) minmax(70px, 1.4fr) 150px 120px; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.pv-list li:first-child { border-top: 0; }
.pv-list .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.pv-list .am { font-weight: 700; white-space: nowrap; font-size: calc(13px * var(--fs)); }
.pv-track { position: relative; height: 12px; }
.pv-plan { position: absolute; left: 0; top: 0; bottom: 0; background: var(--track); border-right: 2px solid var(--muted); border-radius: 4px 0 0 4px; }
.pv-act { position: absolute; left: 0; top: 3px; bottom: 3px; background: var(--cat-home); border-radius: 99px; }
.pv-act.over { background: var(--over-mark); }
.pv-bills { margin-top: 10px; font-size: calc(13.5px * var(--fs)); }
@media (max-width: 699px) { .pv-list li { grid-template-columns: minmax(70px, 1fr) minmax(50px, 1fr) auto; } .pv-list .am { text-align: right; } .pv-list li > .st { display: none; } }
.wins-top { margin-bottom: 8px; }
.wins-list .i { color: var(--watch-mark); }

/* ---------- Settings ---------- */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px; }
.mode-card { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; background: var(--tile); cursor: default; }
.mode-card input { position: absolute; opacity: 0; }
label.mode-card { cursor: pointer; position: relative; }
.mode-card.on { border-color: var(--mark); background: var(--blush-2); }
.mode-card:focus-within { outline: 3px solid var(--mark); outline-offset: 2px; }
.mode-card small { color: var(--muted); font-size: calc(12px * var(--fs)); line-height: 1.35; }
.mode-pv { display: grid; gap: 4px; background: var(--page); border: 1px solid var(--tile-line); border-radius: 10px; padding: 8px; margin-bottom: 4px; }
.mode-pv i { display: block; height: 7px; border-radius: 4px; background: var(--track); }
.mode-pv .bar { height: 14px; background: var(--bar); } .mode-pv .big { height: 18px; width: 55%; background: var(--ok-soft); } .mode-pv .big.s { width: 45%; height: 14px; }
.mode-pv .l { width: 85%; } .mode-pv .l.s { width: 60%; } .mode-pv .chk { height: 11px; width: 75%; border-left: 11px solid var(--ok-mark); }
.mode-pv .row { height: 6px; background: linear-gradient(90deg, var(--track) 70%, transparent 70% 78%, var(--muted) 78%); opacity: 0.8; }
.mode-pick { border: 0; padding: 0; margin: 8px 0; } .mode-pick legend { font-weight: 700; margin-bottom: 4px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--tile); cursor: pointer; }
.swatch[aria-pressed="true"] { border-color: var(--mark); background: var(--blush-2); }
.swatch .swp { width: 100%; height: 44px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; position: relative; border: 1px solid var(--line); }
.swatch .swp i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.swatch .swp.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.swatch .nm { font-size: calc(12px * var(--fs)); font-weight: 600; text-align: center; }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.font-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--tile); text-align: left; }
.font-opt[aria-pressed="true"] { border-color: var(--mark); background: var(--blush-2); }
.font-opt .fn { font-weight: 700; } .font-opt .fd { font-size: calc(12px * var(--fs)); color: var(--muted); }
.icon-note { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--tile-2); margin: 4px 0 8px; }
.icon-note p { margin-top: 2px; }
.adj-note { margin-top: 6px; }

/* ---------- Demo ---------- */
.full-mark { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; flex: none; font-family: var(--sans); font-size: calc(12px * var(--fs)); font-weight: 700; line-height: 1; color: var(--ink); background: var(--blush); border-radius: 999px; padding: 3px 8px 3px 4px; white-space: nowrap; }
.full-mark svg { width: 15px; height: 15px; flex: none; }
.full-mark.icon { padding: 2px; background: transparent; }
.full-chip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--line); background: var(--tile); color: var(--ink); border-radius: 999px; padding: 3px 10px 3px 6px; font-size: calc(13px * var(--fs)); font-weight: 600; min-height: 32px; white-space: nowrap; }
.full-chip svg { width: 16px; height: 16px; flex: none; }
.locked-btn .full-mark { background: transparent; padding: 0; }
.preview { display: flex; flex-direction: column; gap: var(--gap); }
.preview-banner { background: var(--tile); border: 1.5px solid var(--mark); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; justify-items: start; box-shadow: var(--shadow); }
.pb-kicker { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.preview-under { display: flex; flex-direction: column; gap: var(--gap); opacity: 0.6; filter: saturate(0.6); pointer-events: none; user-select: none; }
.lock-card { display: grid; gap: 8px; justify-items: start; }
.lock-card h2 { font-family: var(--serif); font-size: calc(20px * var(--fs)); display: flex; align-items: center; gap: 6px; }
.legend-line { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: calc(14px * var(--fs)); margin-top: 4px; }
.compare th, .compare td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.compare thead th { border-top: 0; font-family: var(--serif); font-size: calc(16px * var(--fs)); padding-top: 0; }
.compare th[scope="row"] { text-align: left; font-weight: 500; padding-left: 0; }
.compare col.c-demo { width: 27%; } .compare col.c-full { width: 22%; }
.compare .full-col { background: var(--blush-2); color: var(--ink); }
.compare thead th.full-col { border-radius: 10px 10px 0 0; padding-top: 8px; }
.compare .tick { color: var(--ok); } .compare .dash { color: var(--muted); } .compare .lim { font-size: calc(13px * var(--fs)); color: var(--text); }
.tour-unlock { margin: 8px 0 10px; }

/* ---------- Dialogs, the + sheet, quick actions ---------- */
dialog { color: var(--text); }
.dlg { border: 0; padding: 0; border-radius: 20px; background: var(--tile); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.dlg::backdrop, .sheet::backdrop, .cmdk::backdrop { background: rgba(38, 36, 42, 0.45); }
.dlg-inner { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); overflow: auto; max-height: calc(100vh - 24px); position: relative; }
.dlg-inner h2 { font-family: var(--serif); font-size: calc(20px * var(--fs)); margin-bottom: 12px; padding-right: 40px; display: flex; align-items: center; gap: 8px; }
.dlg-close { position: absolute; top: 10px; right: 10px; z-index: 1; }
.dlg .actions, .sheet .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.more-opts { margin: 4px 0 10px; } .more-opts > summary { color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; }
.more-opts-body { padding-top: 6px; }
.wiz-steps { display: flex; gap: 6px; margin-bottom: 12px; } .wiz-steps span { flex: 1; height: 5px; border-radius: 99px; background: var(--track); } .wiz-steps span.on { background: var(--mark); }
.wiz-bill { display: grid; grid-template-columns: 1fr 100px 70px; gap: 6px; margin-bottom: 6px; }
.wiz-big { font-size: calc(46px * var(--fs)); margin: 4px 0 12px; }
.choice-list { display: grid; gap: 8px; margin: 12px 0; }
.choice { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); width: 100%; }
.choice .title { font-weight: 700; } .choice .sub { color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.choice-note { font-size: calc(13px * var(--fs)); color: var(--muted); background: var(--tile-2); border-radius: 12px; padding: 10px 12px; }
.map-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin: 10px 0; }
.sample-rows { font-size: 12px; color: var(--muted); background: var(--tile-2); border-radius: 10px; padding: 8px; overflow-x: auto; }
.tips { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.nudge h2 .i { color: var(--watch-mark); }
.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; background: var(--tile); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18); }
.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-inner { padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); overflow: auto; max-height: 94vh; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-family: var(--serif); font-size: calc(20px * var(--fs)); }
.closeb { background: var(--track); border-radius: 50%; }
.qline { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; margin: 8px 0 10px; color: var(--muted); }
.qline input { border: 0; background: transparent; flex: 1; min-width: 0; outline: none; min-height: 40px; color: var(--text); }
.qline:focus-within { border-color: var(--mark); }
.sheet-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 2px 0 12px; }
.sheet-tabs button { min-height: 64px; border-radius: 14px; border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: calc(12.5px * var(--fs)); font-weight: 600; background: var(--tile); padding: 4px; text-align: center; line-height: 1.15; }
.sheet-tabs button[aria-selected="true"] { border-color: var(--mark); background: var(--blush-2); color: var(--ink); font-weight: 700; }
.bigamt { display: flex; align-items: center; gap: 4px; min-height: 60px; border: 2px solid var(--mark); border-radius: 16px; padding: 0 16px; }
.bigamt .cur { font-family: var(--num); font-size: calc(24px * var(--fs)); color: var(--muted); }
.bigamt input { border: 0; background: transparent; font-family: var(--num); font-size: calc(34px * var(--fs)); font-weight: 700; width: 100%; min-width: 0; outline: none; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.qs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px; }
.qchip { min-height: 40px; border-radius: 99px; border: 1.5px solid var(--line); font-weight: 600; font-size: calc(14px * var(--fs)); }
.qchip[aria-pressed="true"] { border-color: var(--mark); background: var(--blush-2); color: var(--ink); }
.frm { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.fld { display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 10px; font-size: calc(14px * var(--fs)); color: var(--muted); min-width: 0; }
.fld select, .fld input { border: 0; background: transparent; flex: 1; min-width: 0; outline: none; color: var(--text); min-height: 40px; }
.fld:focus-within { border-color: var(--mark); }
.hint { margin: 2px 0 6px; }
.cgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.cgrid button { min-height: 62px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: calc(12px * var(--fs)); font-weight: 600; background: color-mix(in srgb, var(--cc) 9%, var(--tile)); border: 1.5px solid transparent; padding: 4px; text-align: center; line-height: 1.15; }
.cgrid button .i { color: var(--cc); }
.cgrid button.on { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 17%, var(--tile)); }
.after { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: calc(13px * var(--fs)); min-height: 4px; flex-wrap: wrap; }
.note-form { display: grid; gap: 10px; }
.note-form .field { margin: 0; }
.note-form .actions { margin-top: 0; }
@media (min-width: 700px) {
  .sheet { margin: auto; width: min(560px, calc(100vw - 32px)); border-radius: 20px; max-height: 88vh; }
  .sheet-inner { max-height: 88vh; padding-top: 14px; }
  .grab { display: none; }
}
.cmdk { border: 0; padding: 0; margin: 80px auto auto; width: min(640px, calc(100vw - 32px)); border-radius: 20px; background: var(--tile); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); overflow: hidden; }
.cmdk .in { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk .in input { border: 0; background: transparent; flex: 1; font-size: calc(18px * var(--fs)); outline: none; color: var(--text); min-width: 0; }
.cmd-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 4px 10px 8px; }
.cmd-list .sec { padding-top: 8px; }
.cmd-h { font-size: calc(11px * var(--fs)); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 0 10px 6px; }
.cmd-i { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px; border-radius: 12px; cursor: pointer; }
.cmd-i .nm { flex: 1; min-width: 0; } .cmd-i small { display: block; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.cmd-i > .i { color: var(--muted); }
.cmd-i[aria-selected="true"] { background: var(--blush); box-shadow: inset 3px 0 0 var(--mark); }
.cmd-empty { padding: 14px; }
.cmdk .foot { display: flex; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: calc(12px * var(--fs)); color: var(--muted); background: var(--tile-2); flex-wrap: wrap; }
.cmdk .foot span { display: flex; align-items: center; gap: 4px; }
#sheetResults { margin: 0 -6px 8px; padding: 0; max-height: 60vh; }

/* ---------- Toast, update notice, tour ---------- */
.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: var(--bar); color: var(--bar-text); padding: 10px 16px; border-radius: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast .btn { color: var(--bar-text); text-decoration: underline; min-height: 30px; padding: 0 4px; }
@media (min-width: 700px) { .toast { bottom: 28px; } }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--bar); color: var(--bar-text); padding: 8px 8px 8px 16px; border-radius: 16px; width: min(460px, calc(100vw - 24px)); }
.update-bar .btn { background: var(--bar-text); color: var(--bar); }
.update-bar .icon-btn { color: var(--bar-text); }
@media (min-width: 700px) { .update-bar { bottom: 24px; } }
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-highlight { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(38, 36, 42, 0.55); outline: 3px solid var(--mark); pointer-events: none; transition: all 0.2s; }
.tour-card { position: fixed; left: 12px; right: 12px; max-width: 400px; margin: 0 auto; background: var(--tile); border-radius: 18px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
.tour-card h2 { font-family: var(--serif); font-size: calc(19px * var(--fs)); margin: 2px 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-card p { color: var(--muted); margin-bottom: 10px; }
.tour-count { font-size: calc(12px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
@media (min-width: 700px) { .tour-card { left: auto; right: auto; width: 380px; margin: 0; left: calc(50% - 190px); } }

/* ---------- ADHD-friendly: bigger targets ---------- */
body[data-mode="adhd"] .btn.sm { min-height: 40px; }
body[data-mode="adhd"] .rows > li { min-height: 50px; }
body[data-mode="adhd"] .chip { min-height: 38px; }
body[data-mode="adhd"] .icon-btn { min-width: 40px; min-height: 40px; }
body[data-mode="adhd"] .check { width: 32px; height: 32px; }



/* ---------- Shared with Calm Money Home (its section, the parts Calm Week uses) ---------- */
.est { display: inline-block; font-size: calc(11.5px * var(--fs)); font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--watch-soft); color: var(--watch); vertical-align: 1px; }
.btn.danger, .danger { color: var(--over) !important; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); font-weight: 700; font-size: calc(13px * var(--fs)); min-height: 30px; align-self: flex-start; }
.ph-sub { color: var(--muted); font-size: calc(13.5px * var(--fs)); margin-top: -4px; }
.version-line a { color: var(--ink); }
.quiet-banner.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.quiet-banner.warn { color: var(--watch); background: var(--watch-soft); border-color: transparent; }
.quiet-banner + .quiet-banner { margin-top: 6px; }
.card .quiet-banner { margin-top: 10px; }
.choice-note { margin-top: 10px; }
.more-hint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-style: dashed; }
.more-hint .grow { flex: 1 1 220px; display: grid; gap: 2px; }
.inout.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.linkish { text-align: left; color: var(--text); font-weight: 600; }
.linkish:hover { color: var(--ink); text-decoration: underline; }
.seg.wide { display: flex; width: 100%; }
.seg.wide > button, .seg.wide > .segr { flex: 1; }
.seg.wide > button, .seg.wide .segr span { justify-content: center; width: 100%; }
.seg.wrap.status-seg { display: flex; }
.mp-one { margin: 0 0 10px; }
.saved-row { margin-top: 14px; }
.sp-h { margin-top: 16px; }
.addbox .input.sm-in { min-height: 38px; padding: 6px 10px; font-size: calc(13.5px * var(--fs)); }
.addbox .box-row { display: flex; gap: 6px; align-items: center; }
.addbox .box-row .amt { flex: 1; min-width: 0; height: 38px; font-size: calc(15px * var(--fs)); }
.addbox .seg.sm button { min-height: 30px; }

.hero.tint-none { border-color: color-mix(in srgb, var(--mark) 30%, transparent); background: linear-gradient(160deg, var(--blush-2), color-mix(in srgb, var(--blush-2) 30%, var(--tile)) 75%); }
.afford-big .big2 { font-size: calc(40px * var(--fs)); line-height: 1; }
.afford-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.afford-tbl { margin: 8px 0; }
.qa summary .i { flex: none; }
.qa-body { color: var(--muted); }
.howto-steps strong { color: var(--text); }
#contact a:not(.btn) { font-weight: 600; overflow-wrap: anywhere; }
.install-steps strong { font-weight: 700; }

/* Nothing may push the page sideways: grid and flex children shrink, wide tables scroll inside their card */
.view > *, .preview > *, .preview-under > *, .card, .tile, .field { min-width: 0; }
.input { min-width: 0; max-width: 100%; }
input[type="date"].input { min-width: 0; width: 100%; }
.tour-card { max-height: calc(100vh - 24px); overflow: auto; }
#moneyCard .h3 { margin: 4px 0 8px; }

/* ======================================================================
   Sole Trader: its own components, drawn with Calm Money 2.0's tokens
   ====================================================================== */
.intro { color: var(--muted); font-size: calc(14px * var(--fs)); max-width: 62ch; }
.hero.tint-calm { border-color: color-mix(in srgb, var(--mark) 30%, transparent); background: linear-gradient(160deg, var(--blush-2), color-mix(in srgb, var(--blush-2) 30%, var(--tile)) 75%); }
.hero.tint-ok { border-color: color-mix(in srgb, var(--ok-mark) 32%, transparent); background: linear-gradient(160deg, var(--ok-soft), color-mix(in srgb, var(--ok-soft) 30%, var(--tile)) 75%); }
.st-calm { background: var(--track); color: var(--text); }
.kick { font-size: calc(13.5px * var(--fs)); margin-bottom: 8px; } .kick b { color: var(--ink); }
body.starting .app { grid-template-columns: minmax(0, 1fr) !important; background: var(--page) !important; }
body.starting .side, body.starting .bbar, body.starting .fab, body.starting .top { display: none !important; }
.start { min-height: calc(100vh - 40px); display: grid; place-items: center; padding: 24px 0; }
.start-in { max-width: 560px; width: 100%; display: grid; gap: 14px; justify-items: center; text-align: center; }
.start-in h1 { font-family: var(--serif); font-size: calc(34px * var(--fs)); }
.lede { font-size: calc(16px * var(--fs)); line-height: 1.5; }
.start-choices, .pick-list { display: grid; gap: 10px; width: 100%; margin: 6px 0; }
.start-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--tile); width: 100%; min-height: 76px; box-shadow: var(--shadow); }
.start-opt > .i { color: var(--ink); } .start-opt b { display: block; font-size: calc(16px * var(--fs)); } .start-opt small { display: block; color: var(--muted); font-size: calc(13px * var(--fs)); margin-top: 2px; }
.start-opt.primary { border-color: var(--mark); background: var(--blush-2); }
.start-opt:hover { border-color: var(--mark); }
.card.band { background: var(--blush-2); }
.btn-row.end { justify-content: flex-end; }
.tbl-wrap { overflow-x: auto; margin: 0 -2px; }
.lock-card.soft { padding: 6px 0; }
.big-logo svg { width: 72px; height: 72px; }
.tour-card .btn-row.between { flex-wrap: wrap; }
.quiet-banner > span { flex: 1 1 0; min-width: 0; }
.page-head h1 { flex: 1 0 auto; max-width: 100%; }
.ph-actions { flex-wrap: wrap; }
.dlg-inner form > p.muted { margin-bottom: 10px; }
.pot-row { display: flex; align-items: center; gap: 14px; }
.pot-row .safe-big { font-size: calc(40px * var(--fs)); }
.inout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.inout > div { display: flex; flex-direction: column; gap: 2px; background: var(--tile-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.inout .k { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 700; } .inout .v { font-family: var(--num); font-weight: 700; font-size: calc(16px * var(--fs)); overflow-wrap: anywhere; font-variant-numeric: lining-nums tabular-nums; } .inout .v.strong { color: var(--ink); }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.pot-btn { min-height: 30px; }
.list-card .rows .nm { white-space: normal; }
.year-pick .input { min-height: 34px; padding: 4px 10px; width: auto; }
.cat-help { display: grid; gap: 8px; margin: 6px 0 10px; } .cat-help li { display: flex; gap: 10px; align-items: flex-start; } .cat-help small { display: block; color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.how-grid { margin-top: 8px; gap: 16px; } @media (max-width: 699px) { .how-grid { grid-template-columns: minmax(0, 1fr); } }
.form-card .field { max-width: 420px; }
.form-card .setting.stack { border-top: 0; padding-top: 4px; }
.qtbl { min-width: 620px; } .qtbl th small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; } .qtbl tr.sub td:first-child { padding-left: 6px; color: var(--muted); } .qtbl tr.not td { color: var(--muted); font-style: italic; } .qtbl tr.tot td { border-top: 1.5px solid var(--text); font-weight: 700; }
.rate-grid { display: grid; gap: 4px 16px; } @media (min-width: 900px) { .rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field.rate.changed .input { border-color: var(--watch-mark); background: var(--watch-soft); }
.input-unit { display: flex; align-items: center; gap: 6px; } .input-unit .unit, .input-unit .sym { color: var(--muted); font-weight: 600; }
.mtd-card .tips { margin-bottom: 8px; }
.dates-card .tips li b { color: var(--text); }
.card.soft { background: var(--tile-2); }
.addbox .amt { height: 40px; }
.addbox select.input.sm-in { padding: 4px 8px; }
.q-cards { display: grid; gap: var(--gap); } .q-one { padding: 12px var(--pad); } .q-one.now { border-color: var(--mark); }
.q-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .q-top b { font-family: var(--serif); font-size: calc(18px * var(--fs)); }
