@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-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: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin-opsz-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; }
/* Layout: one phone-width column. A deep-blue forecast slab leads Home; everything else is quiet paper, white cards and hairlines. */
:root {
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Bricolage Grotesque", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #edf0f6;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --line: #dce2ec;
  --line-2: #c6cfde;
  --ink: #0f1524;
  --ink-2: #444e66;
  --ink-3: #5a667d;

  --accent: #2447c4;
  --accent-ink: #ffffff;
  --accent-soft: #e4eafb;
  --good: #12754a;
  --good-soft: #ddf3e8;
  --bad: #bd2e1a;
  --bad-soft: #fbe6e1;
  --warn: #8a5600;
  --warn-soft: #fff0d1;

  --slab: #1a2c85;
  --slab-ink: #ffffff;
  --slab-ink-2: rgba(255, 255, 255, 0.78);
  --slab-line: rgba(255, 255, 255, 0.2);
  --slab-wash: rgba(255, 255, 255, 0.1);
  --slab-chip: rgba(255, 255, 255, 0.12);
  --slab-neg: #ffb3a6;
  --slab-pos: #9debc5;

  --seg-thumb: #ffffff;
  --sw-off: #8793ad;
  --scrim: rgba(10, 14, 24, 0.5);
  --shadow: 0 1px 2px rgba(15, 21, 36, 0.06), 0 10px 28px rgba(15, 21, 36, 0.08);
  --fab-shadow: 0 6px 16px rgba(36, 71, 196, 0.38);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0a0e18;
  --surface: #131a2b;
  --surface-2: #1a2236;
  --line: #26304a;
  --line-2: #364263;
  --ink: #edf1fa;
  --ink-2: #b6c0d5;
  --ink-3: #8f9bb4;

  --accent: #94a7ff;
  --accent-ink: #0a0e18;
  --accent-soft: #1f2b57;
  --good: #58d39a;
  --good-soft: #123329;
  --bad: #ff917e;
  --bad-soft: #3b1d19;
  --warn: #f2be55;
  --warn-soft: #3a2d10;

  --slab: #21369c;
  --seg-thumb: #2c3a5c;
  --sw-off: #5c6c99;
  --slab-neg: #ffc2b8;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  --fab-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
}
:root[data-theme="dark"] {
  --bg: #0a0e18;
  --surface: #131a2b;
  --surface-2: #1a2236;
  --line: #26304a;
  --line-2: #364263;
  --ink: #edf1fa;
  --ink-2: #b6c0d5;
  --ink-3: #8f9bb4;

  --accent: #94a7ff;
  --accent-ink: #0a0e18;
  --accent-soft: #1f2b57;
  --good: #58d39a;
  --good-soft: #123329;
  --bad: #ff917e;
  --bad-soft: #3b1d19;
  --warn: #f2be55;
  --warn-soft: #3a2d10;

  --slab: #21369c;
  --seg-thumb: #2c3a5c;
  --sw-off: #5c6c99;
  --slab-neg: #ffc2b8;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  --fab-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.4 var(--font-ui);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

.app { max-width: 520px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 2px 12px; }
.top h1 { font: 700 23px/1.1 var(--font-head); letter-spacing: -0.01em; }
.top .date { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

.eyebrow { font: 600 11.5px/1.2 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* money figures: proportional digits on big numbers, tabular only where numbers line up in a column */
.m { font-family: var(--font-ui); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.05; }
.m .cur { font-size: 0.55em; font-weight: 600; opacity: 0.9; margin-right: 0.22em; vertical-align: 0.5em; }
.m .dec { font-size: 0.5em; font-weight: 600; opacity: 0.92; letter-spacing: 0; }
.m .sg { margin-right: 0.04em; }
.m.hero { font-size: 54px; letter-spacing: -0.03em; }
.m.mid { font-size: 36px; letter-spacing: -0.025em; }
.m.sm { font-size: 21px; }
.m.row { font-size: 17px; font-weight: 600; }
.m.row .cur { vertical-align: 0; font-size: 1em; opacity: 1; font-weight: 600; margin-right: 0.18em; }
.m.row .dec { font-size: 1em; opacity: 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Home: the slab ---------- */
.slab { position: relative; background: var(--slab); color: var(--slab-ink); border-radius: 24px; padding: 20px 16px 14px; display: flex; flex-direction: column; gap: 16px; }
.slab .eyebrow, .slab .sub { color: var(--slab-ink-2); }
.slab .sub { font-size: 13px; }
.savings-btn { appearance: none; background: none; border: 0; padding: 0; margin: 0; text-align: left; color: inherit; display: flex; flex-direction: column; gap: 8px; width: 100%; border-radius: 12px; }
.savings-btn:focus-visible, .slab .chip:focus-visible, .chart:focus-visible { outline-color: #fff; }
.edit-chip { position: absolute; top: 16px; right: 16px; font: 600 12.5px/1 var(--font-ui); padding: 7px 11px; border-radius: 999px; background: var(--slab-chip); color: var(--slab-ink); pointer-events: none; }
.end { display: flex; flex-direction: column; gap: 8px; }
.end-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.delta { font: 600 14px/1 var(--font-ui); padding: 7px 11px; border-radius: 999px; background: var(--slab-chip); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--slab-pos); }
.delta.down { color: var(--slab-neg); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); padding: 0 13px; border-radius: 999px; font: 600 13.5px/1 var(--font-ui); min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.slab .chip { border-color: var(--slab-line); color: var(--slab-ink-2); background: var(--slab-chip); }
.slab .chip[aria-pressed="true"] { background: #fff; color: var(--slab); border-color: #fff; }
/* the look-ahead buttons share one row in equal columns (a 2 x 2 block on very narrow phones) */
.slab .chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.slab .chip { padding: 0 4px; white-space: nowrap; text-align: center; }

.chart { position: relative; touch-action: pan-y; -webkit-user-select: none; user-select: none; border-radius: 10px; margin: 0 -4px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 500 11px var(--font-ui); fill: var(--slab-ink-2); }
.chart .grid { stroke: var(--slab-line); stroke-width: 1; }
.chart .zero { stroke: var(--slab-ink-2); stroke-width: 1; opacity: 0.6; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.up { stroke: var(--slab-ink); }
.chart .line.dn { stroke: var(--slab-neg); }
.chart .wash { stroke: none; fill: var(--slab-wash); }
.chart .xh { stroke: var(--slab-ink); stroke-width: 1; opacity: 0.7; }
.chart .dot { fill: var(--slab-ink); stroke: var(--slab); stroke-width: 2; }
.chart .dot.dn { fill: var(--slab-neg); }
.chart .dot.start { fill: var(--slab); stroke: var(--slab-ink); stroke-width: 1.5; }
.chart .payk { fill: var(--slab-pos); }
.readout { min-height: 46px; display: flex; flex-direction: column; gap: 4px; }
.ro-1 { font: 600 14.5px/1.25 var(--font-ui); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ro-1 .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ro-2 { font-size: 13px; color: var(--slab-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ro-2 .key { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; white-space: nowrap; }
.ro-2 .key svg { width: 9px; height: 8px; fill: var(--slab-pos); }
.warnline { color: var(--slab-neg); font-weight: 600; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 10px; }
.card-head h3, .grp-h h3 { font: 700 16px/1.2 var(--font-head); letter-spacing: -0.005em; }
.card-head .muted { font-size: 13px; text-align: right; }
.card p + p, .card .m + p { margin-top: 8px; }
.card p { color: var(--ink-2); font-size: 14.5px; }
.allow { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.allow .per { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.allow.short .m { color: var(--bad); }
.allow.short .per { color: var(--bad); font-weight: 600; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 10px; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.goal-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.goal-row .of { color: var(--ink-3); font-size: 14.5px; }
.split { display: flex; gap: 12px; margin-top: 10px; }
.split > div { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.split small { display: block; color: var(--ink-3); font-size: 12.5px; }
.split b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font: 600 12px/1 var(--font-ui); padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.notice { background: var(--accent-soft); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.notice p { font-size: 14.5px; color: var(--ink); }
.notice.warn { background: var(--warn-soft); }
.notice.warn p { color: var(--ink); }
.notice b { font-weight: 700; }
.btn { appearance: none; border: 0; border-radius: 12px; padding: 0 16px; font: 600 15px/1 var(--font-ui); min-height: 44px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.btn.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.block { width: 100%; }
.link { appearance: none; background: none; border: 0; color: var(--accent); font: 600 14px/1 var(--font-ui); padding: 8px 4px; min-height: 36px; }

/* ---------- lists ---------- */
.card.list { padding: 0; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 58px; border-top: 1px solid var(--line); cursor: pointer; }
.li:first-child { border-top: 0; }
.li:active { background: var(--surface-2); }
.li.dim { opacity: 0.55; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .t small { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.li .r small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.li .chev { color: var(--ink-3); flex: none; }
.li.danger b { color: var(--bad); }
.li.static { cursor: default; }
.li.static:active { background: none; }
/* the savings card keeps all its words on narrow phones: they wrap instead of being cut off */
.card.money .li .t b, .card.money .li .t small { white-space: normal; overflow: visible; text-overflow: clip; }
.grp-h { display: flex; align-items: baseline; gap: 10px; padding: 6px 2px 0; }
.grp-h .muted { font-size: 13px; flex: 1; }
.empty { padding: 14px 16px; color: var(--ink-3); font-size: 14px; }
.sw { appearance: none; border: 0; padding: 0; width: 48px; height: 29px; border-radius: 999px; background: var(--sw-off); position: relative; flex: none; transition: background 0.15s; }
.sw::before { content: ""; position: absolute; inset: -9px -6px; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.sw[aria-checked="true"] { background: var(--accent); }
.sw[aria-checked="true"]::after { transform: translateX(19px); }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sum-grid > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.mh { padding: 10px 16px 8px; background: var(--surface-2); border-top: 1px solid var(--line); font: 700 13px/1 var(--font-head); letter-spacing: 0.02em; color: var(--ink-2); }
.mh:first-child { border-top: 0; }
.day { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
.day.today { background: var(--accent-soft); }
.day .dt { text-align: center; line-height: 1.05; }
.day .dt small { display: block; font: 600 11px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.day .dt b { display: block; font: 700 22px/1.15 var(--font-head); }
.day .evs { display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.ev { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.ev > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ev > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.ev > span.pos { color: var(--good); }
.ev .tag { display: inline-block; white-space: nowrap; font: 600 11px/1 var(--font-ui); font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; color: var(--good); margin-left: 6px; }
.grp { display: flex; flex-direction: column; gap: 8px; }
.day .bal { font: 600 15px/1.3 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.day .bal .lbl { display: none; }
/* a day with several things, or a long name, gets the whole row for its names; the end-of-day balance goes underneath */
.day.multi { grid-template-columns: 46px minmax(0, 1fr); }
.day.multi .bal { grid-column: 2; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 3px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.day.multi .bal .lbl { display: inline; font: 500 12.5px/1.3 var(--font-ui); color: var(--ink-3); }
.footnote { text-align: center; color: var(--ink-3); font-size: 13px; padding: 4px 8px; }

/* ---------- bottom bar ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.nav-in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tab { appearance: none; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--ink-3); font: 600 11px/1 var(--font-ui); min-height: 52px; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--accent); }
.fab { appearance: none; border: 0; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: -16px auto 0; box-shadow: var(--fab-shadow); }
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel { width: 100%; max-width: 520px; height: min(94%, 820px); background: var(--bg); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; animation: rise 0.18s ease-out; padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px max(12px, env(safe-area-inset-left, 0px)) 8px max(12px, env(safe-area-inset-right, 0px)); }
.sheet-bar h2 { font: 700 17px/1.2 var(--font-head); text-align: center; }
.bar-btn { appearance: none; background: none; border: 0; color: var(--accent); font: 500 17px/1 var(--font-ui); padding: 10px 6px; min-height: 44px; justify-self: start; }
.bar-btn.strong { font-weight: 700; justify-self: end; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px max(16px, env(safe-area-inset-left, 0px)) 40px max(16px, env(safe-area-inset-right, 0px)); }
.lead { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.fld { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.fld > .lab { font: 600 11.5px/1.2 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.fld .hint { font-size: 13px; color: var(--ink-3); }
.fld .err { font-size: 13.5px; color: var(--bad); font-weight: 600; }
.inp { width: 100%; min-height: 50px; padding: 12px 14px; font: 500 17px/1.3 var(--font-ui); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; appearance: none; -webkit-appearance: none; text-align: left; }
.inp::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input[type="date"].inp { display: block; }
textarea.inp { min-height: 180px; font: 500 16px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.inp:focus-visible, .amt-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.amt-wrap { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.amt-wrap b { font: 700 26px/1 var(--font-ui); color: var(--ink-3); }
.amt-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; font: 700 32px/1 var(--font-ui); letter-spacing: -0.02em; padding: 14px 0; min-height: 66px; outline: none; color: var(--ink); }
.amt-wrap.sm input { font-size: 22px; min-height: 52px; padding: 8px 0; }
.amt-wrap.sm b { font-size: 20px; }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; appearance: none; border: 0; background: transparent; color: var(--ink-2); padding: 0 6px; border-radius: 9px; font: 600 14.5px/1 var(--font-ui); min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--seg-thumb); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16); }
.pv { margin-top: 16px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.pv-row span { color: var(--ink-2); }
.pv-row b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-row b small { font-weight: 500; color: var(--ink-3); margin-left: 6px; font-size: 12.5px; }
.pv-empty { color: var(--ink-2); font-size: 14.5px; }
.chk { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 15.5px; }
.chk input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sheet-body .btn.danger { margin-top: 28px; width: 100%; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: 14px; width: max-content; max-width: min(calc(100vw - 32px), 440px); display: flex; gap: 14px; align-items: center; font: 500 14px/1.35 var(--font-ui); box-shadow: var(--shadow); }
.toast button { appearance: none; background: none; border: 0; color: inherit; font: 700 14px/1 var(--font-ui); text-decoration: underline; padding: 6px 2px; white-space: nowrap; }

.center { text-align: center; padding: 56px 12px; display: flex; flex-direction: column; gap: 14px; align-items: center; color: var(--ink-2); }
.center h2 { font: 700 20px/1.2 var(--font-head); color: var(--ink); }

/* ---------- phone app: key screen, offline bar, payments, Apple Pay sheet ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.locked .nav { display: none; }
.netbar { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.netbar[data-act] { cursor: pointer; background: var(--accent-soft); font-weight: 600; }
.center p { max-width: 36ch; }
.center .btn.block, .center .fld { width: 100%; max-width: 360px; }
.center .fld { text-align: left; margin-top: 4px; }
.center .link { align-self: center; }
.payrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: baseline; padding: 14px 16px; border-top: 1px solid var(--line); }
.payrow:first-child { border-top: 0; }
.payrow .pt b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.payrow .pt small { display: block; font-size: 13px; color: var(--ink-3); }
.payrow .pa { font: 700 17px/1.2 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbtns { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.pbtns .chip { min-height: 40px; padding: 0 16px; }
.pbtns .chip.skip { margin-left: auto; border-style: dashed; }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow .inp { flex: 1; min-width: 0; font-size: 16px; min-height: 46px; text-overflow: ellipsis; }
.copyrow .btn { min-height: 46px; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: st; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px/26px var(--font-ui); text-align: center; }
.steps b { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .sheet-panel { animation: none; }
  .sw, .sw::after { transition: none; }
}
@media (max-width: 360px) {
  .m.hero { font-size: 46px; }
  .m.mid { font-size: 31px; }
  .sum-grid { gap: 6px; }
}
@media (max-width: 350px) {
  .slab .chips { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phone app only ---------- */
/* the Claude page gets these from its wrapper; here they are our own */
[hidden] { display: none !important; }
img { max-width: 100%; }
html { background: var(--bg); }
.top { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
