/* Tally: dark, phone-first. The UI is monochrome and color is kept for data:
   blue = all spending, orange = dining, status colors only for over/ahead/settled. */

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #151518;
  --surface-2: #1e1e23;
  --surface-3: #2a2a31;
  --sheet: #17171b;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f4f4f6;
  --text-2: #b0b0ba;
  --text-3: #80808b;
  --spend: #3987e5;
  --spend-track: rgba(57, 135, 229, 0.2);
  --dining: #d95926;
  --dining-track: rgba(217, 89, 38, 0.22);
  --good: #0ca30c;
  --good-text: #43d05c;
  --warn: #fab219;
  --crit: #d03b3b;
  --crit-text: #ff7b72;
  --focus: #8ab8ff;
  --accent: #0a84ff;
  --accent-hi: #3d9dff;
  --sidebar-w: 236px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --gutter: 16px;
  --tabbar-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }
/* the page never scrolls or zooms sideways: nothing may make it wider than
   the screen, and pinching doesn't zoom (panning still scrolls) */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* a sheet keeps what's in it inside it (pages slide in from beside it) */
.sheet { overflow: hidden; }
.picker { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding-top: calc(var(--safe-t) + 8px);
  padding-bottom: calc(var(--safe-b) + var(--tabbar-h) + 92px); /* room for the floating Add button */
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
#view { outline: none; display: flex; flex-direction: column; gap: 14px; }

/* ---------- header ---------- */

.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 10px 2px 2px; }
.top h1 { margin: 0; font: 700 30px/1.1 var(--font); letter-spacing: -0.02em; text-wrap: balance; }
.top .sub { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2);
  transition: background 0.15s, transform 0.1s;
}
.icon-btn:active { transform: scale(0.94); background: var(--surface-3); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: 0.35; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 15px;
  background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill.warn { color: var(--warn); }
.pill.crit { color: var(--crit-text); }

/* ---------- cards & lists ---------- */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head .aside { font-size: 13px; color: var(--text-3); }
.card-head a, .card-head button.link { font-size: 14px; color: var(--text-2); font-weight: 600; }
.eyebrow { font-size: 11.5px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }

.section-title { margin: 10px 4px -4px; font-size: 13px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; gap: 12px; }
.section-title .link { text-transform: none; letter-spacing: 0; padding: 0; }

.list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 0; min-height: 56px; text-align: left; width: 100%;
  border-top: 1px solid var(--line);
}
.list > .row:first-child, .list > .day + .row { border-top: 0; }
.row:active { background: rgba(255, 255, 255, 0.02); }
.row-main { min-width: 0; }
.row-title, .row-sub { display: block; }
.row-title { font-size: 16px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 16px; white-space: nowrap; }
.row-amt small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); margin-top: 1px; }
.row-amt.in { color: var(--good-text); }
.row-actions { display: flex; gap: 6px; }

.tile {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface-2); font-size: 19px; line-height: 1;
}
.tile svg { width: 19px; height: 19px; fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.day { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 13px; font-weight: 650; color: var(--text-3); letter-spacing: 0.01em; }
.day:first-child { padding-top: 0; }
.day .num { font-weight: 600; }

.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); vertical-align: 1px; margin-left: 6px; }

.empty { text-align: center; padding: 18px 8px 8px; color: var(--text-3); font-size: 15px; }
.empty strong { display: block; color: var(--text-2); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ---------- status ---------- */

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.status svg { width: 14px; height: 14px; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.status.over svg { stroke: var(--crit); }
.status.ahead svg { stroke: var(--warn); }
.status.ok svg { stroke: var(--good); }
.neg { color: var(--crit-text); }
.pos { color: var(--good-text); }

/* ---------- hero: this week ---------- */

.hero { padding: 20px 16px 16px; }
.ring-wrap { position: relative; width: min(240px, 72vw); aspect-ratio: 1; max-width: 100%; margin: 2px auto 18px; touch-action: pan-y; }
.ring-wrap svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; }
.ring-arc { fill: none; stroke-linecap: round; transition: stroke-dasharray 0.8s var(--ease); }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  pointer-events: none;
}
.ring-center .big { font-size: clamp(30px, 11vw, 40px); }
.ring-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.big { font: 650 44px/1.05 var(--round); letter-spacing: -0.03em; margin: 2px 0; }
.big .cents { font-size: 0.5em; color: var(--text-2); letter-spacing: 0; margin-left: 1px; }
.big.neg { color: var(--crit-text); }
.big.neg .cents { color: inherit; opacity: 0.75; }
.ring-sub { font-size: 13px; color: var(--text-3); }

.legend { display: flex; flex-direction: column; gap: 2px; }
.lg {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 4px; border-radius: 12px; text-align: left; width: 100%;
}
.lg + .lg { border-top: 1px solid var(--line); border-radius: 0; }
.lg-key { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.lg-name { font-weight: 600; font-size: 15px; }
.lg-name small { display: block; font-weight: 500; font-size: 13px; color: var(--text-3); margin-top: 1px; }
.lg-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; }
.lg-val small { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); }

.hero-foot { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.note-line { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text-2); background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-md); }
.note-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.note-line.crit svg { stroke: var(--crit); }
.note-line.warn svg { stroke: var(--warn); }
.note-line.good svg { stroke: var(--good); }
.note-line b { color: var(--text); font-weight: 650; }

/* ---------- week strip ---------- */

.strip { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.strip-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-2); pointer-events: none; }
.sd { display: grid; grid-template-rows: 80px auto auto; justify-items: center; gap: 4px; padding: 0; border-radius: 10px; min-width: 0; }
.sd-plot { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.sd-bar { width: min(22px, 70%); border-radius: 5px 5px 2px 2px; background: var(--spend); min-height: 0; transition: height 0.6s var(--ease); }
.sd-bar.zero { background: var(--surface-3); height: 3px !important; border-radius: 2px; }
.sd-amt { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; min-height: 14px; }
.sd-lbl { font-size: 12px; font-weight: 650; color: var(--text-3); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.sd.today .sd-lbl { background: var(--text); color: var(--bg); }
.sd.sel .sd-lbl { box-shadow: 0 0 0 2px var(--text-2); }
.sd.future .sd-bar { opacity: 0.35; }
.sd.nobudget .sd-lbl { opacity: 0.45; }

/* ---------- chips, segments ---------- */

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scroll-padding: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--surface-2); color: var(--text-2); font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.chip .e { font-size: 16px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { height: 32px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; padding: 0 8px; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px;
  background: var(--surface-2); color: var(--text); font-weight: 650; font-size: 16px;
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: #fff; }
.btn.primary.green { background: linear-gradient(180deg, #3fdc68, #26b84a); color: #04200c; }
.btn.good { background: rgba(48, 209, 88, 0.16); color: #4be272; }
.btn.danger { color: var(--crit-text); }
.btn.danger.armed { background: var(--crit); color: #fff; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.link { color: var(--text-2); font-weight: 600; font-size: 14px; padding: 6px 2px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 12px;
  font-size: 16px; color: var(--text); outline: none;
  -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--line-2); background: var(--surface-3); }
.input::placeholder { color: var(--text-3); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2380808b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
input[type="date"].input { display: flex; align-items: center; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }
.money-field { position: relative; }
.money-field::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.money-field .input { padding-left: 28px; font-variant-numeric: tabular-nums; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch-row .t { font-size: 16px; }
.switch-row .t small { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--surface-3); transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch input:checked + i { background: var(--good); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }

.error { color: var(--crit-text); font-size: 14px; font-weight: 600; min-height: 0; }
.group { background: var(--surface-2); border-radius: var(--r-md); padding: 4px 14px; }
.group .switch-row + .switch-row, .group .grow + .grow { border-top: 1px solid var(--line); }
.grow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 50px; width: 100%; text-align: left; }
.grow .v { color: var(--text-2); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.grow .v svg { width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- sheet ---------- */

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.25s; z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - var(--safe-t) - 12px);
  background: var(--sheet); border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(100%); transition: transform 0.32s var(--ease);
  display: flex; flex-direction: column;
}
.sheet-open .sheet-backdrop { opacity: 1; }
.sheet-open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-head, .tx-top { touch-action: none; }
.grab { flex: none; padding: 8px 0 2px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.grab::before { content: ""; width: 38px; height: 5px; border-radius: 3px; background: var(--surface-3); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px 10px; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 16px calc(var(--safe-b) + 18px); }

/* ---------- add / edit transaction ---------- */

.tx { display: flex; flex-direction: column; gap: 12px; }
.tx-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.amount {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; padding: 8px 0 4px; border-radius: 18px; min-height: 84px;
}
.amount .figure { font: 650 52px/1 var(--round); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; }
.amount .figure .sym { font-size: 0.6em; color: var(--text-2); margin-right: 2px; }
.amount .figure.empty { color: var(--text-3); }
.amount .caret { display: inline-block; width: 2px; height: 0.8em; margin-left: 3px; background: var(--focus); border-radius: 1px; animation: blink 1s steps(1) infinite; align-self: center; }
.amount:not(.focused) .caret { display: none; }
.amount .lbl { font-size: 13px; color: var(--text-3); font-weight: 600; margin-top: 6px; }
.amount.in .figure { color: var(--good-text); }
@keyframes blink { 50% { opacity: 0; } }

.tx-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px;
  background: var(--surface-2); color: var(--text-2); font-size: 14.5px; font-weight: 600; position: relative;
}
.opt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.opt[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.opt input[type="date"], .opt select { font-size: 16px; position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; -webkit-appearance: none; appearance: none; cursor: pointer; }
.warn-line { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--text); background: rgba(250, 178, 25, 0.12); border-radius: 12px; padding: 9px 12px; }
.warn-line svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--warn); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.split-box { background: var(--surface-2); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.split-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.split-amt { text-align: left; border-radius: 12px; padding: 6px 10px; background: var(--surface-3); border: 1px solid transparent; }
.split-amt.focused { border-color: var(--focus); }
.split-amt small { display: block; font-size: 12px; color: var(--text-3); font-weight: 600; }
.split-amt b { font: 650 22px/1.2 var(--round); font-variant-numeric: tabular-nums; }
.split-quick { display: flex; gap: 6px; }
.split-quick button { height: 40px; min-width: 44px; padding: 0 8px; border-radius: 11px; background: var(--surface-3); font-weight: 650; font-size: 13px; color: var(--text-2); line-height: 1.05; }
.split-quick button small { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-3); }
.split-box .input { background: var(--surface-3); min-height: 42px; }
.split-share { font-size: 13px; color: var(--text-3); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; user-select: none; -webkit-user-select: none; }
.key {
  height: 54px; border-radius: 14px; background: var(--surface-2);
  font: 550 25px/1 var(--round); color: var(--text);
  display: grid; place-items: center;
  transition: background 0.08s, transform 0.08s;
}
.key:active, .key.hit { background: var(--surface-3); transform: scale(0.97); }
.key svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx-sheet .sheet-body { padding-bottom: 0; }
.tx-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; position: sticky; bottom: 0; z-index: 1; background: var(--sheet); padding: 10px 0 calc(var(--safe-b) + 14px); margin-top: -4px; }
.tx-actions.single { grid-template-columns: 1fr; }

/* ---------- charts ---------- */

.chart { width: 100%; overflow: visible; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover + g .bar, .chart g.cur .lbl { font-weight: 700; }
.chart .lbl.cur { fill: var(--text); font-weight: 700; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.chart-legend i.tick { height: 2px; border-radius: 1px; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
table.nums { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.nums th { text-align: right; color: var(--text-3); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
table.nums td { text-align: right; padding: 7px 4px; border-bottom: 1px solid var(--line); }
table.nums th:first-child, table.nums td:first-child { text-align: left; }

/* horizontal meters (categories, trips) */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; width: 100%; text-align: left; }
.bar-row .n { font-size: 15px; font-weight: 550; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.bar-row .v small { font-weight: 500; color: var(--text-3); }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--track, var(--spend-track)); position: relative; overflow: hidden; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 4px; background: var(--c, var(--spend)); transition: width 0.6s var(--ease); }
.meter > i.over { background: var(--crit); }

.waterfall { display: flex; flex-direction: column; gap: 10px; }
.wf { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: baseline; }
.wf .n { font-size: 15px; }
.wf .n small { color: var(--text-3); font-size: 13px; }
.wf .v { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }
.wf .track { grid-column: 1 / -1; position: relative; height: 12px; }
.wf .track i { position: absolute; top: 0; bottom: 0; border-radius: 3px; left: var(--l); width: var(--w); background: var(--c); min-width: 2px; }
.wf.total .n { font-weight: 650; }

/* ---------- stat tiles ---------- */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 18px; padding: 12px; min-width: 0; }
.stat .k { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.stat .v { font: 650 21px/1.2 var(--round); letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- toast, banners, boot ---------- */

#toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + var(--tabbar-h) + 18px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  background: #2c2c33; color: var(--text); border-radius: 14px; padding: 12px 16px;
  font-size: 15px; font-weight: 550; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#toast button { color: var(--focus); font-weight: 700; white-space: nowrap; }
body.sheet-open #toast { bottom: calc(var(--safe-b) + 20px); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; color: var(--text-2); }
.banner b { color: var(--text); }
.banner .btn { height: 34px; font-size: 14px; padding: 0 12px; }

.boot { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--text-3); text-align: center; }
.boot-mark { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--spend-track); border-top-color: var(--spend); animation: spin 0.9s linear infinite; }
.boot p { margin: 0; max-width: 30ch; }
.boot h2 { margin: 0; color: var(--text); font-size: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- sign-in: a screen of its own, no tabs or sidebar ---- */
body.locked .tabbar { display: none; }
body.locked #app { max-width: none; margin: 0; padding: 0; }
body.locked #view { gap: 0; }
.login-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: calc(var(--safe-t) + 24px) max(20px, env(safe-area-inset-right, 0px)) calc(var(--safe-b) + 24px) max(20px, env(safe-area-inset-left, 0px));
  background: radial-gradient(90% 55% at 50% 0%, rgba(10, 132, 255, 0.16), transparent 70%), var(--bg);
}
.login-card {
  width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px;
  padding: 30px 22px 22px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-bottom: 8px; }
.login-brand img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); margin-bottom: 10px; }
.login-brand h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.login-brand p { margin: 0; color: var(--text-2); }
.login-field { position: relative; }
.login-field .input { width: 100%; height: 54px; padding-right: 54px; font-size: 17px; box-sizing: border-box; }
.login-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text-3); }
.login-eye:hover { color: var(--text-2); }
.login-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.login-remember { cursor: pointer; padding: 0 2px; }
.login-big { min-height: 52px; font-size: 17px; gap: 8px; }
.login-big svg { width: 22px; height: 22px; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-card .error:empty { display: none; }
.login-card .error { text-align: center; }
.login-foot { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-3); font-size: 13px; }
.login-foot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-card.shake { animation: login-shake 0.4s var(--ease); }
@keyframes login-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .login-card.shake { animation: none; } }

.rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: r; }
.rules li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15px; color: var(--text-2); counter-increment: r; }
.rules li::before { content: counter(r); width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* ---------- tab bar ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  max-width: 560px; margin: 0 auto;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 8px var(--safe-b);
  background: rgba(14, 14, 17, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--line);
}
@media (min-width: 561px) { .tabbar { border-radius: 22px 22px 0 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; color: var(--text-3); font-size: 11px; font-weight: 600; }
.tabbar a svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--accent-hi); }
.tab-badge { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 8px; height: 8px; border-radius: 4px; background: var(--dining); }
.fab {
  justify-self: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--text); color: var(--bg); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 5px var(--bg);
  transform: translateY(-14px); transition: transform 0.12s;
}
.fab:active { transform: translateY(-14px) scale(0.93); }
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- screen-specific ---------- */

.link-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.link-card > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-card .link-val { font: 650 24px/1.15 var(--round); letter-spacing: -0.02em; }
.link-card .muted { font-size: 13.5px; }
.link-card > svg { width: 20px; height: 20px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.list > a.row > svg { width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.plan-now { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.mid { font: 650 28px/1.15 var(--round); letter-spacing: -0.02em; margin-top: 3px; }
.per { font-size: 0.5em; color: var(--text-3); font-weight: 600; margin-left: 2px; letter-spacing: 0; }

.month-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 14px; text-align: center; }
.month-head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.month-head .aside { font-size: 13px; color: var(--text-3); }
.month-total { margin-bottom: 16px; }
.month-total .big { font-size: 38px; }

.split-item + .split-item { border-top: 1px solid var(--line); }
.split-item .row { border-top: 0; }
.split-actions { display: flex; gap: 8px; padding: 0 0 12px 50px; }
.split-quick button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 15px; }

.line-edit { display: grid; grid-template-columns: 1fr 112px 38px; gap: 8px; align-items: center; }
.line-edit .input { min-height: 44px; }
.watch { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.watch .field-row { align-items: end; }
.emoji-in { text-align: center; font-size: 22px; padding: 6px; }

.row.dim { opacity: 0.55; }
.stat .v.neg { color: var(--crit-text); }
.card-head .link { padding: 0; }
.banner { margin-top: 2px; }
.hero .empty { padding-top: 6px; }
.hero .empty + .btn { margin-top: 14px; }
.chart .hit:focus-visible { outline: none; fill: rgba(255, 255, 255, 0.06); }
.bar-row[data-act] { cursor: pointer; }
.meter > i { background: var(--c, var(--spend)); }

/* ================= icons & color ================= */

.tile.tinted { background: color-mix(in srgb, var(--c) 17%, transparent); color: var(--c); }
.tile.tinted svg { stroke: currentColor; }
.tile.xs { width: 26px; height: 26px; border-radius: 8px; }
.tile.xs svg { width: 15px; height: 15px; }
.tile.sm { width: 32px; height: 32px; border-radius: 9px; }
.tile.sm svg { width: 18px; height: 18px; }
.tile.lg { width: 46px; height: 46px; border-radius: 14px; }
.tile.lg svg { width: 24px; height: 24px; }
.tile.xl { width: 58px; height: 58px; border-radius: 17px; flex: none; }
.tile.xl svg { width: 30px; height: 30px; }

.glyph { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--c); flex: none; }
.glyph svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip .glyph { margin-left: -2px; }
.chip.cat[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 24%, var(--surface-2)); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--c); }
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar-row .n { display: flex; align-items: center; gap: 8px; }

.hicon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; flex: none; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.hicon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.empty-ic { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.empty-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }

#toast .toast-ic { display: grid; place-items: center; color: var(--c); margin-right: -4px; }
#toast .toast-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.banner > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.banner > span > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--warn); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

.stat .tile { margin-bottom: 8px; }
.plan-now { gap: 16px 28px; }
.plan-stat { display: flex; align-items: center; gap: 12px; }
.wf .n { display: flex; align-items: center; gap: 10px; }
.link-card > .tile { align-self: center; }

.seg-icons button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-icons button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.seg button.in[aria-pressed="true"] { color: #4be272; }

.hero { background: radial-gradient(120% 70% at 50% -10%, rgba(10, 132, 255, 0.14), transparent 62%), var(--surface); }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; min-height: 46px; padding: 11px 14px 11px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 16px; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
.search input:focus { border-color: var(--line-2); }

.pick-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.pick-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent-hi); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pick-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-btn:active { background: var(--surface-3); }

.date-chips .chip { height: 34px; padding: 0 12px; font-size: 14px; }

.with-ic { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stack-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.group .stack-row + .stack-row, .group .switch-row + .stack-row, .group .stack-row + .switch-row { border-top: 1px solid var(--line); }
.group .input { background: var(--surface-3); }
.watch .with-ic .input { flex: 1; }
.section-title .link { display: inline-flex; align-items: center; gap: 4px; }
.section-title .link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.btn.small svg { width: 15px; height: 15px; }

.cat-head { display: flex; align-items: flex-end; gap: 14px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.icon-grid button { height: 46px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; transition: background 0.12s; }
.icon-grid button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-grid button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--sheet), 0 0 0 5px var(--c); }

/* app-wide list tiles keep the old neutral look unless tinted */
.row .tile:not(.tinted) { font-size: 19px; }

/* ================= date picker ================= */

.picker-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.22s; }
.picker {
  position: fixed; z-index: 56; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: #1c1c21; border-radius: 26px 26px 0 0; padding: 14px 16px calc(var(--safe-b) + 18px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(100%); transition: transform 0.28s var(--ease);
}
#picker-root.open .picker-backdrop { opacity: 1; }
#picker-root.open .picker { transform: translateY(0); }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.picker-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.picker-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.picker-quick .chip { height: 34px; font-size: 14px; }
.picker-month { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 8px; }
.picker-month strong { font-size: 16px; }
.picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pd-head { text-align: center; font-size: 12px; font-weight: 650; color: var(--text-3); padding: 4px 0 6px; }
.pd { height: 46px; border-radius: 13px; font: 600 17px/1 var(--round); color: var(--text); font-variant-numeric: tabular-nums; transition: background 0.1s; }
.pd:active, .pd:hover { background: var(--surface-3); }
.pd.today { color: var(--accent-hi); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pd.future { color: var(--text-3); }
.pd.sel, .pd.sel:hover { background: var(--accent); color: #fff; box-shadow: none; }
.picker-grid.dom .pd { background: var(--surface-2); }
.picker-grid.dom .pd.sel { background: var(--accent); }

/* ================= navigation ================= */

.tabbar .brand, .tabbar .nav-settings, .fab-label { display: none; }
.tabbar a[data-tab="week"] { order: 1; }
.tabbar a[data-tab="activity"] { order: 2; }
.tabbar a[data-tab="overview"] { order: 3; }
.tabbar a[data-tab="plan"] { order: 4; }
.tabbar a[data-tab="owed"] { order: 5; }
/* phones and tablets: five equal tabs, and Add floats just above the bar on its right end, under the thumb.
   Placed against the bar itself (fixed, so it holds absolutely placed children in every browser), it follows
   the bar's 560px / 760px widths; 100% + 15px is 14px above the bar's 1px top border. */
@media (max-width: 959px) {
  .tabbar .fab {
    position: absolute; right: 16px; bottom: calc(100% + 15px);
    transform: none; z-index: 40;
  }
  .tabbar .fab:active { transform: scale(0.93); }
}
.tabbar svg circle { fill: none; }
.fab { background: linear-gradient(160deg, #46a6ff, #0a6cff 72%); color: #fff; box-shadow: 0 8px 22px rgba(10, 132, 255, 0.42), 0 0 0 5px var(--bg); }

.layout { display: flex; flex-direction: column; gap: 14px; }
.layout > .col, .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.narrow { display: flex; flex-direction: column; gap: 14px; }
.trip-grid { display: grid; gap: 14px; }

.hero { container-type: inline-size; }
@container (min-width: 600px) {
  .hero-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; }
  .hero-grid .ring-wrap { margin: 0; width: 250px; }
}

/* ================= tablet ================= */

@media (min-width: 700px) {
  #app { max-width: 760px; }
  .tabbar { max-width: 760px; }
  .sheet { max-width: 620px; }
  .trip-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* ================= desktop: sidebar + two columns ================= */

@media (min-width: 960px) {
  body { padding-left: var(--sidebar-w); }
  body.locked { padding-left: 0; }
  body.locked #app { max-width: none; padding: 0; }
  body.locked #toast { left: 50%; }
  #app { max-width: 1200px; padding: 28px 40px 60px; }
  #view { gap: 18px; }
  .phone-only { display: none !important; }
  .top h1 { font-size: 32px; }

  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: var(--sidebar-w); max-width: none; height: auto; margin: 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: calc(var(--safe-t) + 22px) 14px 20px; border-top: 0; border-right: 1px solid var(--line); border-radius: 0;
    background: #0f0f12;
  }
  .tabbar .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; font-size: 20px; font-weight: 750; letter-spacing: -0.02em; order: 0; }
  .tabbar .brand img { width: 30px; height: 30px; border-radius: 9px; }
  .tabbar .fab {
    order: 0; transform: none; width: 100%; height: 44px; border-radius: 13px; margin: 0 0 14px;
    display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 18px rgba(10, 132, 255, 0.35);
  }
  .tabbar .fab:active { transform: scale(0.98); }
  .tabbar .fab svg { width: 20px; height: 20px; }
  .fab-label { display: inline; font-weight: 700; font-size: 15px; }
  .tabbar a, .tabbar .nav-settings {
    order: 1; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 11px;
    font-size: 15px; font-weight: 600; color: var(--text-2);
  }
  .tabbar a:hover, .tabbar .nav-settings:hover { background: var(--surface); color: var(--text); }
  .tabbar a[aria-current="page"] { background: rgba(10, 132, 255, 0.14); color: var(--accent-hi); }
  .tabbar a svg, .tabbar .nav-settings svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .nav-settings { display: flex; align-items: center; margin-top: auto; order: 10; }
  .tab-badge { top: 9px; left: 30px; }

  .layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .layout.week { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .layout.activity { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .sticky-col { position: sticky; top: 24px; }
  .col .chips { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .seg-icons { max-width: 560px; }
  .narrow { max-width: 720px; }
  .stats { max-width: 720px; }
  .ring-wrap { width: 260px; }

  /* sheets become centered dialogs */
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto; margin: 0;
    width: min(540px, calc(100vw - var(--sidebar-w) - 48px)); max-width: none; max-height: min(88vh, 900px);
    border-radius: 24px; opacity: 0; transform: translate(-50%, -46%) scale(0.97);
    transition: transform 0.24s var(--ease), opacity 0.2s;
  }
  .sheet-open .sheet { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { visibility: hidden; height: 12px; padding: 0; }
  .sheet-body { padding-bottom: 20px; }
  .tx-sheet .sheet-body { padding-bottom: 0; }
  .tx-actions { padding-bottom: 16px; }

  .picker { top: 50%; left: 50%; right: auto; bottom: auto; width: 400px; border-radius: 22px; padding-bottom: 18px; opacity: 0; transform: translate(-50%, -46%) scale(0.97); transition: transform 0.22s var(--ease), opacity 0.18s; }
  #picker-root.open .picker { transform: translate(-50%, -50%); opacity: 1; }

  #toast { left: calc(50% + var(--sidebar-w) / 2); bottom: 28px; }
  body.sheet-open #toast { bottom: 28px; }
}

.nowrap { white-space: nowrap; }

.with-ic small { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); margin-top: 2px; line-height: 1.35; }
.with-ic b { font-weight: 650; }
.with-ic > .tile { flex: none; }

/* Bottom bar waits for the viewport to settle on launch (see revealWhenStable). */
.tabbar { opacity: 0; transform: translateY(10px); transition: opacity 0.25s ease, transform 0.3s var(--ease); }
body.ready .tabbar { opacity: 1; transform: none; }
.banner.update > span > svg { stroke: var(--accent-hi); }

/* ================= import ================= */

.desk-only { display: none; }
.import-pill { height: 38px; padding: 0 14px; border-radius: 19px; color: var(--accent-hi); }
.import-pill svg { width: 16px; height: 16px; }

.imp { display: flex; flex-direction: column; gap: 12px; }
.imp-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 26px 16px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.imp-drop strong { font-size: 17px; margin-top: 6px; }
.imp-drop span { font-size: 14px; color: var(--text-3); max-width: 34ch; }
.imp-drop:hover, body.file-over .imp-drop { border-color: var(--accent); background: rgba(10, 132, 255, 0.08); }
.imp-drop.busy { opacity: 0.6; pointer-events: none; }
.imp-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.imp-or::before, .imp-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.imp-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.imp-file { min-width: 0; }
.imp-file b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-file small { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.imp-views .chip b { font-weight: 750; margin-left: 2px; }
.imp-hint { margin: -4px 2px 0; font-size: 13.5px; }
.imp-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.imp-tools .link { display: inline-flex; align-items: center; gap: 6px; }
.imp-tools .link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.imp-opts .field-row { align-items: end; }

.imp-list { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; padding: 2px 12px; }
.imp-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.imp-row:first-child { border-top: 0; }
.imp-row:not(.on) .imp-t, .imp-row:not(.on) .imp-amt { color: var(--text-3); }
.imp-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.imp-l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.imp-t { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-amt.in { color: var(--good-text); }
.imp-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--text-3); }
.imp-cat { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: 13px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; }
.imp-cat .glyph, .imp-cat .glyph svg { width: 15px; height: 15px; }
.imp-badge { font-weight: 600; }
.st-likely .imp-badge { color: var(--warn); }
.st-imported .imp-badge { color: var(--text-3); }
.st-invalid .imp-badge { color: var(--crit-text); }

.imp-check { position: relative; width: 26px; height: 26px; flex: none; cursor: pointer; }
.imp-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.imp-check i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; transition: background 0.12s, border-color 0.12s; }
.imp-check i svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.imp-check input:checked + i { background: var(--accent); border-color: var(--accent); }
.imp-check input:checked + i svg { opacity: 1; }
.imp-check input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.imp-check input:disabled + i { opacity: 0.3; }
.imp-foot { grid-template-columns: auto 1fr; }
.st-settle .imp-badge { color: var(--good-text); display: inline-flex; align-items: center; gap: 5px; }
.imp-badge svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.imp-acct-tag { max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-accts { padding: 2px 14px; }
.imp-acct { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; }
.imp-acct + .imp-acct { border-top: 1px solid var(--line); }
.imp-acct-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-acct-n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.imp-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 22px 8px; color: var(--text-2); }
.imp-empty > svg { width: 26px; height: 26px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.imp-empty p { margin: 0; max-width: 38ch; font-size: 14.5px; line-height: 1.45; }

.pick-list { display: flex; flex-direction: column; max-height: 62vh; overflow-y: auto; margin: 0 -4px; }
.pick-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; text-align: left; font-size: 16px; font-weight: 550; }
.pick-item:hover { background: var(--surface-2); }
.pick-item[aria-pressed="true"] { background: rgba(10, 132, 255, 0.14); }
.pick-item > svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-hi); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 960px) {
  .desk-only { display: initial; }
  .sheet.wide { width: min(860px, calc(100vw - var(--sidebar-w) - 48px)); }
  .imp-row { grid-template-columns: auto 1fr; }
  .imp-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
  .imp-l1 { display: contents; }
  .imp-t { grid-column: 1; }
  .imp-amt { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 16px; }
  .imp-l2 { grid-column: 1; }
}


/* ================= overview ================= */

/* Overview tab: trends by week, month and year, insights, places, recurring
   charges. Builds on the shared cards, lists, chips and chart styles in app.css. */

.ov-note { align-items: center; }
.ov-note > span { flex: 1; min-width: 0; }
.ov-note .link { flex: none; padding: 0 2px; min-height: 44px; }

.ov-refresh.busy svg { animation: ov-spin 0.9s linear 0.6s infinite; } /* no spin for quick refreshes */
@keyframes ov-spin { to { transform: rotate(360deg); } }

.ov-seg button { height: 38px; font-size: 15px; }

/* ---------- chart ---------- */

.ov-chart .ov-selband { fill: var(--surface-2); }
.ov-chart .ov-back { opacity: 0.4; }
.ov-chart .ov-budget { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.ov-chart .ov-avg { stroke: var(--text-3); stroke-width: 1.25; stroke-dasharray: 4 4; }
.ov-chart .ov-pace { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.chart-legend .ov-lg-back { opacity: 0.4; }
.chart-legend .ov-lg-dash { width: 14px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--text-3); }

/* ---------- the picked period ---------- */

.ov-total { margin-bottom: 4px; }
.ov-total .big { font-size: 38px; }
.ov-under { font-size: 14px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ov-under b { color: var(--text); font-weight: 650; }

.ov-deltas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ov-delta {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 11px;
  border-radius: 15px; background: var(--surface-2); color: var(--text-2);
  font-size: 13.5px; font-weight: 600; line-height: 1.25;
}
.ov-delta .ar { font-size: 9px; }
.ov-delta.up .ar { color: var(--warn); }
.ov-delta.down .ar { color: var(--good-text); }
.ov-caption { margin: 6px 2px 0; font-size: 12.5px; color: var(--text-3); }

/* Three tiles in a row, equal widths. A tile never gets narrower than its
   figure: on a narrow phone the figures shrink a little, and if one still
   doesn't fit, the last tile wraps to its own row instead of cutting it off. */
.ov-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* labels may take two lines on a phone; the figures line up at the bottom */
.ov-stat { flex: 1 1 0; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface-2); border-radius: var(--r-md); padding: 10px; }
.ov-stat .k { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--text-3); }
.ov-stat .v { display: block; margin-top: 2px; font: 650 clamp(16px, 5vw, 19px)/1.25 var(--round); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ov-lines { margin-top: 16px; }
.ov-sect { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; min-height: 28px; }
.ov-sect .link { padding: 0; min-height: 44px; margin: -8px 0; }
/* links in card heads ("Latest", "Show all spending"): a 44px target that
   doesn't make the head any taller */
.ov-detail .card-head .link, .ov-chart-card .card-head .link { min-height: 44px; margin: -12px 0; padding: 0 4px; }
.ov-cats, .ov-lines { gap: 2px; }
/* category rows and budget lines are filters: roomy targets, the picked one tinted */
.ov-cats .bar-row, .ov-lines .bar-row { padding: 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 12px; }
.ov-cats button.bar-row:active, .ov-lines button.bar-row:active { background: var(--surface-2); }
.ov-cats .bar-row[aria-pressed="true"], .ov-lines .bar-row[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.ov-foot { margin: 10px 0 0; font-size: 13px; }

/* ---------- insights ---------- */

.ov-ins { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ov-ins:first-child { border-top: 0; padding-top: 0; }
.ov-ins > .tile { margin-top: 1px; }
.ov-ins-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ov-ins-title { font-size: 15.5px; font-weight: 620; line-height: 1.3; text-wrap: pretty; min-width: 0; }
.ov-ins-val { flex: none; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ov-ins p { margin: 3px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2); text-wrap: pretty; }
.ov-ins .btn { margin-top: 10px; }

.ov-more { display: block; width: 100%; min-height: 44px; margin: 4px 0 -8px; text-align: center; }

/* ---------- places ---------- */

.row-amt small.ov-trend { font-weight: 650; }
.row-amt small.ov-trend.up { color: var(--warn); }
.row-amt small.ov-trend.down { color: var(--good-text); }
.row-amt small.ov-trend.new { color: var(--accent-hi); }
.row-amt small.ov-trend.back { color: var(--text-2); }

/* ---------- recurring charges ---------- */

.ov-rec-note { margin-bottom: 8px; }
.ov-rec { row-gap: 6px; }
.ov-rec-foot { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ov-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 8px;
  font-size: 12.5px; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.ov-badge > span { font-size: 9px; }
.ov-badge.up { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.ov-badge.down { color: var(--good-text); background: color-mix(in srgb, var(--good) 16%, transparent); }
.ov-tracked { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; margin: -6px 0; font-size: 13.5px; color: var(--text-3); }
.ov-tracked svg { width: 15px; height: 15px; fill: none; stroke: var(--good); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ov-add { margin-left: auto; }
.row.ov-rec:active { background: none; }

/* ---------- desktop: chart and period on the left, the lists on the right ---------- */

@media (min-width: 960px) {
  .layout.ov { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .ov-seg { max-width: 420px; }
}


/* ================= trips & funds (prefunding) ================= */

/* Trips & funds: money put aside ahead of time (plan.js, editors.js, tx-sheet.js).
   Teal marks prefunding; status colors only for on track / short / over. */

/* Plan segment: "Trips" on phones, "Trips & funds" where there's room */
.fu-wide { display: none; }
@media (min-width: 600px) { .fu-wide { display: inline; } }

/* two numbers side by side: balance and what's going in */
.fu-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fu-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fu-stats b { font: 650 20px/1.2 var(--round); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-stats b small { font: 500 13px/1 var(--font); letter-spacing: 0; color: var(--text-3); }
.fu-stats b.neg { color: var(--crit-text); }
.fu-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fu-notes:empty { display: none; }
/* inline links in a note: a 44px tap target that doesn't stretch the line */
.fu-link { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; padding: 0 4px; vertical-align: middle; font-size: inherit; color: var(--accent-hi); }

/* the prefunding block inside a trip card */
.fu-pot { display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; }
.fu-pot .note-line { background: var(--surface-3); }
.fu-add { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 10px; min-height: 44px; color: var(--accent-hi); }
.fu-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* one-line pace: "$400/mo · on track for Nov 5" */
.fu-pace { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.fu-pace svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: var(--text-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fu-pace.good svg { stroke: var(--good); }
.fu-pace.warn svg { stroke: var(--warn); }

/* fund card */
.card.fund { display: flex; flex-direction: column; gap: 14px; }
.card.fund > .card-head { margin-bottom: 0; }
.fu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fu-head .mid.neg { color: var(--crit-text); }
.fu-rate { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; min-width: 0; }
.fu-rate b { font: 650 18px/1.2 var(--round); letter-spacing: -0.01em; }
.fu-rate .per { font-size: 13px; }
.fu-rate small { font-size: 12.5px; color: var(--text-3); }
.fu-note { margin: -6px 0 0; font-size: 13.5px; }
.fu-recent { display: flex; flex-direction: column; gap: 4px; }
.fu-recent .muted { margin: 4px 0 0; font-size: 14px; }
.fu-recent .row { min-height: 52px; }

/* editor */
.fu-fields { display: flex; flex-direction: column; gap: 14px; margin-top: -6px; }
.fu-goal { margin: -4px 2px 0; font-size: 14px; }
.fu-goal b { color: var(--text); font-weight: 650; }
.fu-suggest { display: flex; align-items: center; gap: 12px; }
.fu-suggest .btn { flex: none; min-height: 44px; }
.fu-suggest .hint { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.fu-since { margin: -4px 2px 0; font-size: 12.5px; color: var(--text-3); }

/* expense sheet: what's left in the pot */
.fu-tx-note { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 9px 12px; }
.fu-tx-note svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--c, var(--accent-hi)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fu-tx-note.warn { color: var(--text); background: color-mix(in srgb, var(--warn) 12%, var(--surface-2)); }
.fu-tx-note.warn svg { stroke: var(--warn); }


/* ================= notifications ================= */

/* ================= notifications (Settings) ================= */

/* the device part is redrawn on its own; it spaces its group and note like .form */
.nt-device-box { display: flex; flex-direction: column; gap: 14px; }
.nt-device .switch-row { padding: 8px 0; }
.nt-device .t b { font-weight: 650; }
.nt-btns { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0 14px; }
.nt-btns .btn { flex: 1 1 auto; }
.nt-btns .btn:not(.primary) { background: var(--surface-3); }
.nt-btns .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.nt-foot { margin: -4px 4px 0; font-size: 13px; }

.nt-kind + .nt-kind { border-top: 1px solid var(--line); }
.nt-kind .switch-row { padding: 6px 0; }
/* options line up with the text after the icon tile (32px + 12px gap) */
.nt-opts { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 14px 44px; }
.nt-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nt-lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
/* big choices: each at least as wide as its words, the rest shared out;
   set off from the group like its inputs, the pick marked like a chip */
.nt-seg { background: var(--surface-3); grid-auto-columns: minmax(max-content, 1fr); }
.nt-seg button { height: 44px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.nt-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.nt-time { max-width: 240px; }
.nt-opts .note-line { font-size: 13.5px; background: var(--surface-3); padding: 9px 12px; }
/* Seven days in one row only fit at 44px each on a wider sheet; below that
   they sit in two rows (4 + 3), each day still a full-size target. */
.nt-days button { min-width: 44px; }
@media (max-width: 440px) {
  .nt-days { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 370px) {
  .nt-opts { padding-left: 0; }
  .nt-seg button { padding: 0 3px; font-size: 13.5px; }
}

/* ================= time picker ================= */

/* one-tap times: full-size touch targets (the date picker's are smaller) */
.pt-quick .chip { height: 44px; border-radius: 22px; }
.pt-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin: 2px 2px 6px; }
.pt-label > span { font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.pt-ampm { width: 140px; flex: none; }
.pt-ampm button { height: 44px; }
.picker-grid.pt-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pt-grid .pd { background: var(--surface-2); font-size: 16px; }
.pt-grid .pd.sel { background: var(--accent); }
.pt-grid + .pt-label { margin-top: 12px; }
.pt-done { margin-top: 16px; }

/* Activity showing one place (from the Overview): a full-size chip that clears it, long names cut short */
.chip.act-place { height: 44px; border-radius: 22px; max-width: 100%; }
.chip.act-place span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* import: friends paying you back */
.imp-row .imp-badge.imp-pb { display: inline-flex; align-items: center; gap: 4px; color: var(--good-text); }
.imp-row:not(.on) .imp-badge.imp-pb { color: var(--text-3); }

.fu-suggest .hint.warn { color: var(--crit-text); font-weight: 600; }
.ov-weekly svg { stroke: var(--text-3); }

/* week: bills still due this week, shown so money that's spoken for doesn't look free */
.ring-soon { stroke-opacity: 0.38; }
.ring-after { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.sd-plot { position: relative; }
.sd-soon { position: absolute; left: 50%; transform: translateX(-50%); width: min(22px, 70%); border: 1.5px dashed var(--warn); border-radius: 6px; background: rgba(250, 178, 25, 0.1); box-sizing: border-box; }
.strip-key { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.sd-soon-key { width: 14px; height: 10px; border: 1.5px dashed var(--warn); border-radius: 3px; background: rgba(250, 178, 25, 0.1); }
.row-amt svg { display: inline-block; width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; fill: none; stroke: var(--good); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tag.late { background: rgba(250, 178, 25, 0.16); color: var(--warn); }

/* loading states show only after 0.6 s, so quick loads don't flash */
.load-late { animation: load-late 0s linear 0.6s both; }
@keyframes load-late { from { visibility: hidden; } to { visibility: visible; } }

/* ---- r4-settings ---- */
/* ---------- round 4: import rules, Venmo requests, Shortcuts & widget, Face ID (settings) ---------- */

.set-hint { margin: 0 4px; font-size: 13px; line-height: 1.45; }
.set-hint code, .sc-steps code { font-size: 12.5px; padding: 1px 5px; border-radius: 6px; background: var(--surface-3); color: var(--text); word-break: break-all; }
.set-list > * + * { border-top: 1px solid var(--line); }

/* import rules: the row edits, ↑ ↓ reorder (first match wins) */
.ir-row { display: flex; align-items: center; gap: 6px; }
.ir-main { flex: 1; min-width: 0; grid-template-columns: 1fr; }
.ir-main .with-ic > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ir-move { display: flex; gap: 4px; flex: none; }
.ir-move .icon-btn { width: 44px; height: 44px; font-size: 18px; font-weight: 700; }
.ir-move .icon-btn:disabled { opacity: 0.3; cursor: default; }
.ir-cat .tile { width: 22px; height: 22px; }

/* import sheet */
.imp-badge.imp-rule { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-hi); }
.imp-always { font-size: 13px; padding: 4px 0; min-height: 30px; text-align: left; }

/* Venmo */
.vm-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.split-actions { flex-wrap: wrap; }
.split-box .vm-btn { align-self: flex-start; background: var(--surface-3); }
.vm-sum { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 16px; }
.vm-sum svg { width: 22px; height: 22px; flex: none; margin-top: 1px; fill: none; stroke: var(--good); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vm-sum small { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.vm-at { position: relative; display: flex; align-items: center; min-width: 0; }
.vm-at > span { position: absolute; left: 12px; color: var(--text-3); font-size: 16px; pointer-events: none; }
.vm-at .input { padding-left: 28px; font-size: 16px; width: 100%; }
.vm-foot { margin: 0; font-size: 13px; text-align: center; }
.vm-person-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 10px; min-height: 56px; }
.vm-person-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.vm-name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vm-person-row .icon-btn { width: 44px; height: 44px; }

/* Shortcuts & widget */
.sc-box { display: flex; flex-direction: column; gap: 12px; }
.key-row .btn, .key-row + .grow { flex: none; }
.key-row .t { min-width: 0; }
.key-naming .t { font-size: 15px; color: var(--text-2); }
.key-fresh { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--good); }
.key-fresh-head { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.key-fresh-head small { display: block; font-size: 13px; color: var(--text-3); }
.key-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; letter-spacing: 0.01em; user-select: all; -webkit-user-select: all; }
.sc-guides { display: flex; flex-direction: column; gap: 8px; }
.sc-guide { background: var(--surface-2); border-radius: var(--r-md); }
.sc-guide summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 14px; cursor: pointer; }
.sc-guide summary::-webkit-details-marker { display: none; }
.sc-guide summary > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--text-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.sc-guide[open] summary > svg { transform: rotate(90deg); }
.sc-guide summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-md); }
.sc-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.sc-body .set-hint { margin: 0; }
.sc-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.sc-steps b { color: var(--text); font-weight: 650; }
.sc-code { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--surface-3); }
.sc-code code { flex: 1; min-width: 0; padding: 0; background: none; font-size: 13px; word-break: break-all; }
.sc-code .btn { flex: none; min-height: 36px; }
.sc-btn { margin-top: 8px; min-height: 40px; }

/* ---- r4-flow ---- */
/* Round 4, module flow: Sunday check-in and the cash-flow calendar. */

/* Plan has five sections: on a phone, the icon sits over a short label so all five fit 375px. */
@media (max-width: 599px) {
  .seg-many button { flex-direction: column; height: 48px; gap: 2px; padding: 0 2px; font-size: 11.5px; }
  .seg-many button svg { width: 18px; height: 18px; }
}

/* ---------- Week: check-in card ---------- */
.checkin-card { width: 100%; text-align: left; color: inherit; }
.checkin-card .ci-cta { font-size: 16px; font-weight: 600; color: var(--text); }

/* ---------- check-in sheet ---------- */
.checkin { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.ci-sec { display: flex; flex-direction: column; gap: 10px; }
.ci-sec + .ci-sec { border-top: 1px solid var(--line); padding-top: 18px; }
.ci-h { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ci-h .muted { font-size: 13.5px; font-weight: 500; }
.ci-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ci-big .big { font-size: 36px; margin: 0; }
.ci-bars { margin: 4px 0 2px; }
.ci-sub { margin-top: 6px; }
.checkin .split-actions { padding-left: 50px; }
.checkin .split-actions .btn { min-height: 40px; }

/* ---------- Plan › Cash flow ---------- */
.cash-now { margin: -4px 0 6px; }
.cash-now .big { font-size: 40px; }
.cash-sum .row .link { font-size: 14px; font-weight: 600; color: var(--accent-hi); }
.cash-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cash-notes .muted { margin: 2px 0 0; font-size: 13.5px; }
.cash-events .row-amt small.neg, .cc-detail .neg { color: var(--crit-text); }
.cf-quick { margin-bottom: 8px; }

/* month calendar: 7 columns, each day a big tap target */
.cc-month { margin-top: -4px; }
.cc-month .icon-btn[disabled] { opacity: 0.3; pointer-events: none; }
.cc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cc-head { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 2px 0 4px; }
.cc-day {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  min-height: 56px; padding: 5px 1px 4px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); overflow: hidden; min-width: 0;
}
.cc-day.off { background: transparent; color: var(--text-3); }
.cc-day.low { background: color-mix(in srgb, var(--warn) 16%, var(--surface-2)); }
.cc-day.neg { background: color-mix(in srgb, var(--crit) 20%, var(--surface-2)); }
.cc-day.today .cc-n { color: var(--accent-hi); font-weight: 750; }
.cc-day[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent-hi); }
.cc-n { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-chip {
  max-width: 100%; padding: 1px 3px; border-radius: 5px;
  font-size: 10px; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: clip;
}
.cc-chip.in { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good-text); }
.cc-chip.out { background: color-mix(in srgb, var(--crit) 22%, transparent); color: var(--crit-text); }
.cc-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); margin-top: 3px; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.cc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cc-legend i.in { background: var(--good); }
.cc-legend i.out { background: var(--crit); }
.cc-legend i.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.cc-hint { margin: 12px 0 0; font-size: 14px; }
.cc-detail { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cc-detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cc-detail-head .muted { font-size: 14px; }
.cc-detail > .muted { margin: 8px 0 0; }

/* running balance */
.cash-chart .cash-line { fill: none; stroke: var(--accent-hi); stroke-width: 2; stroke-linejoin: round; }
.cash-chart .cash-area { fill: var(--accent); opacity: 0.12; }
.cash-chart .cash-zero { stroke: var(--crit); stroke-width: 1; stroke-dasharray: 4 3; }
.cash-chart .cash-pay { fill: var(--good); stroke: var(--surface); stroke-width: 2; }
.cash-chart .cash-low { stroke: var(--surface); stroke-width: 2; }
.cash-chart .cash-low.good { fill: var(--text-2); }
.cash-chart .cash-low.warn { fill: var(--warn); }
.cash-chart .cash-low.crit { fill: var(--crit); }

/* ---- r4-review ---- */
/* Overview: month and year in review, suggested budgets (round 4, module A) */

/* ← August → */
.rv-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; }
.rv-step .icon-btn { width: 44px; height: 44px; flex: none; }
.rv-when { flex: 1; min-width: 0; text-align: center; }
.rv-when b { display: block; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.rv-when span { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; }

.rv-years { margin-top: -4px; margin-bottom: 14px; }
.rv-years .chip { height: 44px; border-radius: 22px; font-variant-numeric: tabular-nums; }

.rv-chart { margin-bottom: 8px; }
.rv-chart .lbl { fill: var(--text-3); }

.rv-hl { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.rv-hl li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; color: var(--text); }
.rv-hl svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rv-card .list .row { min-height: 52px; }

/* suggested budgets */
.rv-lead { margin: -6px 0 12px; font-size: 14px; line-height: 1.4; }
.rv-sg { padding: 12px 0; border-top: 1px solid var(--line); }
.rv-sg:first-child { border-top: 0; padding-top: 2px; }
.rv-sg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rv-sg-head .n { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; font-weight: 600; }
.rv-sg-head .v { flex: none; white-space: nowrap; font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rv-sg-head .v b { color: var(--text); font-weight: 650; }
.rv-sg.down .v b { color: var(--good-text); }
.rv-sg.keep .v { color: var(--text-3); }
.rv-sg p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.rv-suggest .btn.block { margin-top: 14px; min-height: 48px; }
.rv-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- scan ---- */
.scan-intro { margin: 0 0 12px; font-size: 14px; }
.scan-group { margin-bottom: 18px; }
.scan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.scan-head h3 { flex: 1; margin: 0; font-size: 17px; }
.scan-hint { margin: 0 0 8px; font-size: 13px; }
.scan-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.scan-row:first-child { border-top: 0; }
.scan-row.dim { opacity: 0.7; }
.scan-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.scan-main b { font-size: 15px; line-height: 1.3; }
.scan-main small { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.scan-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.scan-acts .btn { min-height: 36px; }
.tag.new { background: rgba(10, 132, 255, 0.18); color: var(--accent-hi); }
.scan-gone-toggle { display: block; margin: 4px auto 12px; }
.scan-acts.wide { margin-top: 14px; }

/* ---- settings: a menu of groups, each on its own page ---- */
.set-menu { margin-bottom: 14px; }
.set-menu .grow { min-height: 58px; }
.set-menu .with-ic small { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; }
.set-menu .v { color: var(--text-3); font-size: 15px; display: flex; align-items: center; gap: 4px; }
.set-menu .v.set-badge { color: var(--accent-hi); font-weight: 600; }
.set-single > .section-title:first-child { display: none; }

/* ---- motion ---- */
/* one sheet page to the next: forward slides in from the right, back from the left */
.sheet.nav-fwd .sheet-body, .sheet.nav-fwd .sheet-head h2 { animation: nav-fwd 0.3s var(--ease) both; }
.sheet.nav-back .sheet-body, .sheet.nav-back .sheet-head h2 { animation: nav-back 0.3s var(--ease) both; }
@keyframes nav-fwd { from { opacity: 0; transform: translateX(32px); } }
@keyframes nav-back { from { opacity: 0; transform: translateX(-32px); } }

/* a new tab: the screen fades up, its cards one after another */
#view.view-enter > * { animation: view-in 0.36s var(--ease) both; }
#view.view-enter > :nth-child(2) { animation-delay: 0.04s; }
#view.view-enter > :nth-child(3) { animation-delay: 0.08s; }
#view.view-enter > :nth-child(4) { animation-delay: 0.12s; }
#view.view-enter > :nth-child(n + 5) { animation-delay: 0.16s; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

/* the Settings menu and Scan findings arrive in turn */
/* (only as a sheet opens: not again each time it redraws) */
.sheet.fresh .set-menu, .sheet.fresh .scan-group { animation: view-in 0.34s var(--ease) both; }
.sheet.fresh .set-menu:nth-of-type(2), .sheet.fresh .scan-group:nth-of-type(2) { animation-delay: 0.05s; }
.sheet.fresh .set-menu:nth-of-type(3), .sheet.fresh .scan-group:nth-of-type(3) { animation-delay: 0.1s; }
.sheet.fresh .scan-group:nth-of-type(n + 4) { animation-delay: 0.14s; }

/* things you press give a little */
.grow, .row, .scan-row, .chip, .pill, .seg button { transition: transform 0.12s ease, background-color 0.15s ease, opacity 0.15s ease; }
.grow:active, button.row:active, .chip:active, .pill:active { transform: scale(0.985); }
.set-menu .grow:active { background: rgba(255, 255, 255, 0.04); }
.tabbar a { transition: color 0.2s ease; }
.tabbar a svg { transition: transform 0.25s var(--ease); }
.tabbar a:active svg { transform: scale(0.86); }
.tabbar a[aria-current] svg { animation: tab-pop 0.36s var(--ease); }
@keyframes tab-pop { 40% { transform: scale(1.16); } }

/* a finding you dismissed folds away */
.scan-row.leaving { opacity: 0; transform: translateX(40px); height: 0 !important; padding-top: 0; padding-bottom: 0; overflow: hidden; transition: opacity 0.2s ease, transform 0.24s var(--ease), height 0.26s var(--ease), padding 0.26s var(--ease); }

/* toasts and banners ease in */
.banner { animation: view-in 0.3s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .sheet.nav-fwd .sheet-body, .sheet.nav-back .sheet-body, .sheet.nav-fwd .sheet-head h2, .sheet.nav-back .sheet-head h2,
  #view.view-enter > *, .sheet.fresh .set-menu, .sheet.fresh .scan-group, .tabbar a[aria-current] svg, .banner { animation: none; }
  .grow:active, button.row:active, .chip:active, .pill:active, .tabbar a:active svg { transform: none; }
}
.ov-rec-note .ov-add-all { flex: none; white-space: nowrap; margin-left: auto; align-self: center; }

/* ---- import: savings account, search ---- */
.imp-acct-main { display: flex; flex-direction: column; min-width: 0; }
.imp-acct-main .imp-acct-n { margin-top: 1px; }
.imp-save-tag { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); background: transparent; border: 1px solid var(--line-2); flex: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.imp-save-tag:active { transform: scale(0.96); }
.imp-save-tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.imp-save-tag.on { color: #04200c; background: var(--good); border-color: var(--good); }
.imp-search { position: relative; display: flex; align-items: center; margin: 4px 0 10px; }
.imp-search > svg { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.imp-search .input { width: 100%; padding-left: 38px; padding-right: 44px; box-sizing: border-box; }
.imp-search .icon-btn { position: absolute; right: 4px; }
.imp-savings-note { margin-bottom: 8px; }

/* ---- savings ---- */
.sv-hint { margin: 10px 0 0; font-size: 13.5px; }
.sv-card .btn { margin-top: 12px; }
.sv-hero { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sv-big { font: 700 34px/1.1 var(--round); letter-spacing: -0.02em; }
.sv-big.pos { color: var(--good-text); }
.sv-big.neg, .sv-stat b.neg { color: var(--crit-text); }
.sv-plan { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13.5px; }
.sv-meter { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.sv-meter i { display: block; height: 100%; width: var(--w); background: var(--good); border-radius: 4px; transition: width 0.5s var(--ease); }
.sv-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 84px; margin-top: 16px; }
.sv-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; min-width: 0; }
.sv-bar i { display: block; width: 100%; max-width: 18px; height: max(2px, calc(var(--h) * 0.7)); border-radius: 4px 4px 2px 2px; background: var(--good); opacity: 0.55; }
.sv-bar.neg i { background: var(--crit); }
.sv-bar.now i { opacity: 1; }
.sv-bar span { font-size: 11px; color: var(--text-3); }
.sv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; }
.sv-stat { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sv-stat b { font: 650 17px/1.2 var(--round); }

/* the bank's own name for a transaction you renamed */
.tx-bank { display: flex; align-items: center; gap: 6px; margin: -4px 4px 2px; font-size: 13px; color: var(--text-3); }
.tx-bank[hidden] { display: none; }
.tx-bank svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx-bank b { color: var(--text-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-bank .link { margin-left: auto; flex: none; }

/* savings: regular transfers, covered or not */
.sv-tr { margin-top: 12px; }
.sv-tr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sv-tr-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.sv-tr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sv-tr-t b { font-size: 15px; }
.sv-tr-t small { font-size: 13px; color: var(--text-3); }
.sv-tr-row .btn { flex: none; }

/* a bill with no categories to pick from yet */
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.bi-nocat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
