/* Income & Bills Planner */
:root {
  --bg: #FBF5EA; --bg2: #F4EBDC; --card: #FFFFFF; --ink: #1E2A24; --muted: #66706A; --line: #EADFCB;
  --brand: #23664E; --brand-ink: #FFFFFF; --brand-soft: #E2F1E8;
  --mint: #3FB97F; --mint-soft: #E3F6EA; --coral: #F26B4B; --coral-soft: #FFE8DF;
  --sun: #F5A623; --sun-soft: #FFF3D6; --sky: #2F7FC1; --sky-soft: #E2EFFA; --danger: #C9372C; --danger-soft: #FDE4E1;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 20px rgba(60, 40, 10, .06);
  --r: 18px; --r-sm: 12px;
  --head: 'Fraunces', Georgia, serif; --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 68px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111C17; --bg2: #16241E; --card: #1A2A23; --ink: #F2EDE3; --muted: #A2ADA6; --line: #2A3C33;
    --brand: #6FD3A2; --brand-ink: #0E2219; --brand-soft: #1E3A2E;
    --mint: #5BD195; --mint-soft: #1D3B2D; --coral: #FF8A6B; --coral-soft: #3D2620;
    --sun: #FFC24D; --sun-soft: #3A3018; --sky: #6DB3EE; --sky-soft: #1B3042; --danger: #FF7B70; --danger-soft: #42221F;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111C17; --bg2: #16241E; --card: #1A2A23; --ink: #F2EDE3; --muted: #A2ADA6; --line: #2A3C33;
  --brand: #6FD3A2; --brand-ink: #0E2219; --brand-soft: #1E3A2E;
  --mint: #5BD195; --mint-soft: #1D3B2D; --coral: #FF8A6B; --coral-soft: #3D2620;
  --sun: #FFC24D; --sun-soft: #3A3018; --sky: #6DB3EE; --sky-soft: #1B3042; --danger: #FF7B70; --danger-soft: #42221F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--head); font-weight: 650; letter-spacing: -.01em; line-height: 1.15; margin: 0; font-variation-settings: 'SOFT' 100, 'WONK' 0; }
h1 { font-size: clamp(26px, 5vw, 34px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.app > div, .grid > * { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brandmark img { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.brandmark b { font-family: var(--head); font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brandmark b span { color: var(--coral); }
.top .grow { flex: 1; }
main { padding: 4px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1180px; width: 100%; margin: 0 auto; }
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 12px; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--brand); }
.nav a.on svg { transform: translateY(-1px); }
.nav .nav-brand { display: none; }
@media (min-width: 900px) {
  .app { grid-template-columns: 240px minmax(0, 1fr); }
  .top { display: none; }
  .nav { position: sticky; top: 0; height: 100vh; flex-direction: column; justify-content: flex-start; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 20px 14px; background: var(--bg2); }
  .nav .nav-brand { display: flex; margin: 0 6px 22px; }
  .nav a { flex: none; flex-direction: row; gap: 12px; padding: 11px 14px; font-size: 15px; }
  .nav a.on { background: var(--card); box-shadow: var(--shadow); }
  .nav .nav-foot { margin-top: auto; padding: 10px; font-size: 12.5px; color: var(--muted); }
  main { padding: 28px 32px 48px; }
}
.nav .nav-foot { display: none; }
@media (min-width: 900px) { .nav .nav-foot { display: block; } }

/* ---- building blocks ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  .grid.two > .card + .card, .grid.two > .stack + .stack { margin-top: 0; }
}
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { appearance: none; border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg2); color: var(--ink); text-decoration: none; transition: transform .12s, background .2s; line-height: 1.2; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.coral { background: var(--coral); color: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.small { padding: 7px 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg2); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn svg { width: 20px; height: 20px; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; background: var(--bg2); white-space: nowrap; }
.pill.good { background: var(--mint-soft); color: color-mix(in srgb, var(--mint) 70%, var(--ink)); }
.pill.warn { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 55%, var(--ink)); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.blue { background: var(--sky-soft); color: var(--sky); }

.seg { display: inline-flex; background: var(--bg2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* forms */
label.f { display: block; margin-top: 14px; }
label.f > span, .flabel { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.in { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s; }
.in:focus { border-color: var(--brand); }
.money-in { position: relative; }
.money-in::before { content: '£'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.money-in .in { padding-left: 30px; font-variant-numeric: tabular-nums; }
.money-in.big .in { font-size: 26px; font-weight: 750; padding-top: 10px; padding-bottom: 10px; }
.money-in.big::before { font-size: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 13px; font-size: 14px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.chip img, .chip .ic { width: 20px; height: 20px; border-radius: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; margin-top: 10px; }
details.more { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--brand); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+ '; }
details.more[open] summary::before { content: '– '; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 1px; flex: none; }

/* item icons */
.ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--bg2); }
.ic img { width: 100%; height: 100%; object-fit: cover; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic .ini { color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.ic.sm { width: 30px; height: 30px; border-radius: 9px; }
.ic.sm svg { width: 17px; height: 17px; }
.ic.sm .ini { font-size: 12px; }
.ic.xs { width: 22px; height: 22px; border-radius: 7px; }
.ic.xs svg { width: 13px; height: 13px; }
.ic.xs .ini { font-size: 10px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.li:last-child { border-bottom: 0; }
.li:hover { background: color-mix(in srgb, var(--bg2) 60%, transparent); }
.li .main { flex: 1; min-width: 0; }
.li .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .amt small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.li.paused { opacity: .55; }
.amt.pos { color: color-mix(in srgb, var(--mint) 75%, var(--ink)); }
.amt.out { color: var(--ink); }
.amt.move { color: var(--sky); }
.day-head { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 4px 4px; }

/* home */
.hero { background: var(--brand); color: var(--brand-ink); border-radius: 24px; padding: 22px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero .lab { font-weight: 700; opacity: .85; font-size: 14px; }
.hero .big { font-family: var(--head); font-size: clamp(38px, 9vw, 52px); font-weight: 700; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.hero .sub { opacity: .9; }
.hero .jar { position: absolute; right: 18px; bottom: 14px; width: 74px; opacity: .95; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { background: var(--card); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .lab { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.month { background: var(--bg2); border-radius: 14px; padding: 12px 14px; }
.month b { display: block; font-family: var(--head); font-size: 16px; margin-bottom: 6px; }
.month .r { display: flex; justify-content: space-between; font-size: 14px; font-variant-numeric: tabular-nums; }
.month .r.mv { color: var(--sky); font-weight: 800; margin-top: 4px; }
.tip { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--line); }
.tip svg { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke: var(--sun); }
.tip .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.tip button.link { font-size: 13px; }
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px 16px; background: var(--sun-soft); }
.notice.bad { background: var(--danger-soft); }
.notice.good { background: var(--mint-soft); }
.notice.blue { background: var(--sky-soft); }
.notice b { display: block; }
.notice .em { font-size: 22px; line-height: 1; }

/* chart */
.chart { position: relative; touch-action: pan-y; user-select: none; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tt { position: absolute; top: 0; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 13px; white-space: nowrap; transform: translateX(-50%); box-shadow: var(--shadow); }
.chart .tt b { font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* paydays */
.strategies { display: grid; gap: 10px; }
@media (min-width: 700px) { .strategies { grid-template-columns: repeat(2, 1fr); } }
.strat { text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px; cursor: pointer; }
.strat.on { border-color: var(--brand); background: var(--brand-soft); }
.strat b { display: block; font-family: var(--head); font-size: 17px; margin-bottom: 4px; }
.strat span { font-size: 13.5px; color: var(--muted); }
.strat { position: relative; }
.strat .rec { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; }
.strat.on .rec { background: var(--card); }
.strat[data-strat="best"] b { padding-right: 96px; }
.choice table.cmp tr.on td { font-weight: 800; }
.choice .card-head { align-items: flex-start; }
.payday { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.payday + .payday { margin-top: 12px; }
.payday .ph { display: flex; gap: 12px; align-items: center; }
.payday .date { font-weight: 800; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.split { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg2); margin: 14px 0 8px; }
.split i { display: block; height: 100%; }
.split .k { background: var(--mint); }
.split .m { background: var(--sky); }
.split .x { background: repeating-linear-gradient(45deg, var(--sky), var(--sky) 5px, color-mix(in srgb, var(--sky) 60%, var(--card)) 5px, color-mix(in srgb, var(--sky) 60%, var(--card)) 10px); }
.splitlab { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.splitlab .k b { color: color-mix(in srgb, var(--mint) 70%, var(--ink)); }
.splitlab .m b { color: var(--sky); }
.covers { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.covers .c { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--bg2); border-radius: 999px; padding: 3px 10px 3px 3px; }
.rule { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.match-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; }
.match-row select { max-width: 48%; }
.sel { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 14px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal .d { min-height: 64px; border-radius: 12px; background: var(--bg2); padding: 5px 6px; cursor: pointer; border: 2px solid transparent; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal .d.out { opacity: .35; }
.cal .d.today { border-color: var(--sun); }
.cal .d.sel { border-color: var(--brand); background: var(--card); }
.cal .d.hol .n::after { content: ' •'; color: var(--coral); }
.cal .d .n { font-size: 13px; font-weight: 800; }
.cal .d .dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal .d .dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal .d .net { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: auto; white-space: nowrap; overflow: hidden; }
.cal .d.low .net { color: var(--danger); }
@media (min-width: 700px) { .cal .d { min-height: 92px; } .cal .d .ics { display: flex; gap: 3px; flex-wrap: wrap; } }
.cal .d .ics { display: none; }
.dot-in { background: var(--mint); } .dot-out { background: var(--coral); } .dot-mv { background: var(--sky); }

/* sheet (modal) */
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 15, .45); z-index: 50; opacity: 0; transition: opacity .2s; }
.scrim.show { opacity: 1; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; background: var(--card); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet.show { transform: none; }
.sheet .sh-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.sheet .sh-head h2 { flex: 1; font-size: 20px; }
.sheet .sh-body { overflow: auto; padding: 4px 18px 18px; overscroll-behavior: contain; }
.sheet .sh-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
@media (min-width: 700px) {
  .sheet { left: 50%; top: 50%; bottom: auto; width: min(620px, 94vw); max-height: 88vh; border-radius: 24px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}
.impact { margin-top: 16px; border-radius: 16px; background: var(--bg2); padding: 14px; }
.impact h3 { font-size: 15px; font-family: var(--body); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.impact .rows { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.impact .r { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.impact .r .was { color: var(--muted); text-decoration: line-through; margin-right: 6px; font-weight: 500; }
.up { color: color-mix(in srgb, var(--mint) 75%, var(--ink)); font-weight: 800; }
.down { color: var(--danger); font-weight: 800; }
.suggest { position: relative; }
.suggest .menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.suggest .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 650; }
.suggest .menu button:hover, .suggest .menu button.act { background: var(--bg2); }
.suggest .menu small { color: var(--muted); font-weight: 500; margin-left: auto; }

/* what-if banner */
.whatif { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 15; margin: 0 0 14px; background: repeating-linear-gradient(-45deg, var(--sun-soft), var(--sun-soft) 12px, color-mix(in srgb, var(--sun-soft) 70%, var(--sun)) 12px, color-mix(in srgb, var(--sun-soft) 70%, var(--sun)) 13px); border: 1.5px solid color-mix(in srgb, var(--sun) 60%, transparent); border-radius: 16px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (min-width: 900px) { .whatif { top: 12px; } }
.whatif b { font-family: var(--head); }
.whatif .btns { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.was-chip { font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* auth / landing */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .landing { grid-template-columns: 1.1fr 1fr; } }
.land-art { background: var(--brand); color: #fff; padding: calc(28px + env(safe-area-inset-top)) 24px 32px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
:root[data-theme="dark"] .land-art, :root:not([data-theme="light"]) .land-art { --x: 0; }
.land-art .brandmark b { font-size: 20px; color: #fff; }
.land-art .brandmark b span { color: #FFD866; }
.land-art h1 { color: #FFF4E0; font-size: clamp(32px, 6vw, 52px); margin-top: 28px; max-width: 13em; }
.land-art p.lead { color: #E6F3EC; font-size: 18px; max-width: 32em; margin: 14px 0 0; }
.feats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 34em; }
.feats li { display: flex; gap: 12px; align-items: flex-start; color: #EAF6EF; }
.feats li b { color: #fff; }
.feats .fi { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.feats .fi svg { width: 18px; height: 18px; stroke: #FFD866; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.land-art .float { position: absolute; right: -60px; bottom: -40px; width: 300px; opacity: .14; transform: rotate(-10deg); }
@media (min-width: 960px) { .land-art { padding: 44px 56px; justify-content: center; } }
.land-form { display: grid; place-items: center; padding: 28px 16px 40px; }
.authcard { width: 100%; max-width: 420px; }
.authcard h2 { font-size: 26px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; margin: 18px 0 4px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.gbtn { min-height: 44px; display: flex; justify-content: center; margin-top: 18px; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: 14.5px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 80; pointer-events: none; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.saving { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.saving i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.saving.busy i { background: var(--sun); animation: pulse 1s infinite; }
.saving.err i { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty img { width: 92px; opacity: .9; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg2); }
.steps li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 800; flex: none; }
.steps li.done::before { content: '✓'; background: var(--mint); color: #fff; }
.steps li .main { flex: 1; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.cmp th, table.cmp td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; }
table.cmp th:first-child, table.cmp td:first-child { text-align: left; }
table.cmp th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ben-part { margin-top: 16px; }
.counter { display: inline-flex; align-items: center; gap: 10px; }
.counter button { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-weight: 800; cursor: pointer; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.src { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.hero .sub { padding-right: 84px; }
.card-head { flex-wrap: wrap; }
.card-head .seg button { padding: 6px 11px; font-size: 13px; }
.month .r span { white-space: nowrap; }
.month b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .nav-brand b { white-space: normal; line-height: 1.15; font-size: 17px; }
table.cmp td:not(:first-child) { white-space: nowrap; }
@media (max-width: 480px) { table.cmp { font-size: 13px; } table.cmp th, table.cmp td { padding: 8px 3px; } }
@media (max-width: 959px) { .land-art .feats, .land-art .float { display: none; } .land-art h1 { margin-top: 20px; } .land-art p.lead { font-size: 16.5px; } }

/* import from a spreadsheet */
@media (min-width: 700px) { .sheet.wide { width: min(820px, 96vw); } }
.imp-cta { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); }
.imp-cta > svg { width: 26px; height: 26px; color: #0F9D58; flex: none; }
.imp-cta .main { flex: 1; min-width: 0; }
.imp-ways { display: grid; gap: 10px; margin-top: 14px; }
.imp-way { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: var(--card); }
label.imp-way { cursor: pointer; }
label.imp-way:hover, label.imp-way:focus-visible { border-color: var(--brand); outline: none; }
.imp-way .ic svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.imp-way .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imp-way textarea { margin-top: 8px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.imp-way .row .in { flex: 1; min-width: 0; padding: 9px 12px; font-size: 15px; }
.err.muted { color: var(--muted); }
.imp-notes { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.imp-notes li { margin: 3px 0; }
.imp-colgrid { display: grid; gap: 8px; margin-top: 10px; }
@media (min-width: 700px) { .imp-colgrid { grid-template-columns: 1fr 1fr; } }
.imp-col { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg2); }
.imp-col .main { flex: 1; min-width: 0; }
.imp-col .main div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-col .sel { max-width: 52%; }
.imp-bar { margin-top: 16px; gap: 8px; }
.imp-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.imp-row { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; background: var(--card); transition: opacity .15s; }
.imp-row.flag { border-color: color-mix(in srgb, var(--sun) 60%, var(--line)); background: color-mix(in srgb, var(--sun-soft) 45%, var(--card)); }
.imp-row.off { opacity: .55; }
.imp-row .imp-on { width: 22px; height: 22px; accent-color: var(--brand); margin-top: 6px; flex: none; }
.imp-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.imp-l1 { display: flex; gap: 8px; align-items: center; }
.imp-l1 > .in { flex: 1; min-width: 0; padding: 8px 10px; font-size: 15px; font-weight: 700; }
.imp-l2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.imp-l2 .in { padding: 8px 10px; font-size: 15px; }
.imp-l2 .money-in .in { padding-left: 26px; }
.imp-l2 .money-in::before { left: 11px; }
.imp-l2 > input[type=date] { grid-column: 1 / -1; }
@media (min-width: 700px) { .imp-l2 { grid-template-columns: 1fr 1fr 1fr; } .imp-l2 > input[type=date] { grid-column: auto; } }
.imp-kind { flex: none; }
.imp-kind button { padding: 6px 10px; font-size: 13px; }
.imp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.imp-meta .pill { font-size: 12px; padding: 3px 9px; }

/* Inputs must shrink within paired fields and import sheets. */
.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
.two-col>*,.imp-l2>*,.kpis>*,.landing>*{min-width:0}
.in{min-width:0;max-width:100%}
.sheet .row{max-width:100%}
@media(max-width:360px){.sheet .two-col{grid-template-columns:minmax(0,1fr)}.card{padding:14px}.card-head{flex-wrap:wrap}}
