/* Torres Ledger — editorial minimalism */

:root {
  --bg: #ffffff;
  --surface: #f7f6f3;
  --line: #eaeaea;
  --line-soft: rgba(0, 0, 0, 0.05);
  --ink: #111111;
  --ink-2: #2f3437;
  --muted: #787774;
  --accent: #2742df;
  --accent-soft: #e1e6fe;
  --pos: #346538;
  --pos-soft: #edf3ec;
  --neg: #9f2f2d;
  --neg-soft: #fdebec;
  --warn: #956400;
  --warn-soft: #fbf3db;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --z-sheet-backdrop: 40;
  --z-sheet: 50;
  --z-toast: 60;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select { font: inherit; color: inherit; }
input::placeholder { color: #8f8d89; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- App frame ---------- */

#app { max-width: 640px; margin: 0 auto; padding: 0 20px calc(96px + env(safe-area-inset-bottom)); }

header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin: 0 -20px; padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.wordmark { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.wordmark span { color: var(--muted); font-style: italic; font-weight: 400; }

.sync-btn { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 4px 2px; }
.sync-btn svg { width: 14px; height: 14px; }
.sync-btn.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Views ---------- */

main { padding-top: 24px; }
.view { display: none; }
.view.active { display: block; animation: viewin 280ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.view-title { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.view-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 10px; }
.section-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.section-head .link { font-size: 13px; color: var(--muted); }
.section-head .link:hover { color: var(--ink); }

/* ---------- Home ---------- */

.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav button { padding: 8px; color: var(--muted); border-radius: 6px; }
.month-nav button:hover { color: var(--ink); background: var(--surface); }
.month-nav svg { width: 18px; height: 18px; display: block; }

.hero { margin-top: 28px; }
.hero-label { font-size: 13px; color: var(--muted); }
.hero-amount { font-family: var(--mono); font-size: 52px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-amount.over { color: var(--neg); }
.hero-meta { display: flex; gap: 24px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.hero-meta b { color: var(--ink); font-weight: 600; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin-top: 26px; }
.spark i { flex: 1; background: var(--line); border-radius: 2px 2px 0 0; min-height: 2px; transition: height 500ms cubic-bezier(0.16, 1, 0.3, 1); }
.spark i.today { background: var(--accent); }
.spark-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 36px; width: 100%; text-align: left; }
.stat-row > div { padding: 16px 4px; }
.stat-row > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.stat-row .k { font-size: 12px; color: var(--muted); }
.stat-row .v { font-family: var(--mono); font-size: 17px; font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-row .v.neg { color: var(--neg); }

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

.insight { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.insight:last-child { border-bottom: 0; }
.insight .dot { margin-top: 6px; }
.insight[data-static] { cursor: default; }
.insight-main { flex: 1; min-width: 0; }
.insight-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.insight-body { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.insight > svg { width: 15px; height: 15px; color: #c9c7c2; flex: none; margin-top: 5px; }

.meter { height: 3px; background: var(--surface); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 2px; transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1); }

.hcomp { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hcomp:last-child { border-bottom: 0; }
.hcomp-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.hcomp-note { font-size: 12.5px; color: var(--muted); margin-top: 7px; }

/* ---------- Home modules ---------- */

.mod-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 36px; }
.mod { padding: 16px 4px 14px; text-align: left; display: block; }
.mod:nth-child(even) { border-left: 1px solid var(--line); padding-left: 18px; }
.mod:nth-child(n+3) { border-top: 1px solid var(--line); }
.mod .k { font-size: 12px; color: var(--muted); }
.mod .v { font-family: var(--mono); font-size: 19px; font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mod-sub { font-size: 12px; color: var(--muted); margin-top: 1px; min-height: 16px; }
.mod-spark { margin-top: 8px; min-height: 20px; }
.mod-spark svg { display: block; width: 100%; }

.mini-chip { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; padding: 2px 8px; border-radius: 9999px; white-space: nowrap; display: inline-block; margin-right: 6px; }
.mini-chip.ok { background: var(--pos-soft); color: var(--pos); }
.mini-chip.no { background: var(--warn-soft); color: var(--warn); }

.bill-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bill-row:last-child { border-bottom: 0; }
.bill-date { flex: none; width: 40px; text-align: center; line-height: 1.15; padding: 4px 0; border: 1px solid var(--line); border-radius: 7px; }
.bill-date span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.bill-date b { display: block; font-size: 15px; font-weight: 600; font-family: var(--mono); }

/* ---------- Charts ---------- */

.chart-wrap { position: relative; touch-action: pan-y; }
.chart-wrap svg { display: block; width: 100%; height: 100%; }
.big-chart { height: 150px; margin-top: 24px; }
.nw-line { height: 56px; margin-top: 14px; }
.chart-tip {
  position: absolute; top: -6px; transform: translateY(-100%);
  background: var(--ink); color: #fff; border-radius: 6px; padding: 4px 9px;
  font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 120ms;
  display: flex; gap: 7px; align-items: baseline; z-index: 5;
}
.chart-tip span { color: rgba(255, 255, 255, 0.65); font-size: 11px; }
.chart-rule { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity 120ms; }

.note { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 12px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 7px; }
.legend i.dash { background: repeating-linear-gradient(90deg, #9b9995 0 3px, transparent 3px 6px); }
.legend b { color: var(--ink); font-weight: 600; }

.alloc-bar { display: flex; gap: 2px; height: 12px; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.alloc-bar i { display: block; min-width: 3px; }
.alloc-legend { margin-top: 6px; }
.alloc-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alloc-row:last-child { border-bottom: 0; }
.alloc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alloc-pct { color: var(--muted); font-size: 12.5px; width: 38px; text-align: right; }

/* ---------- Who's spending ---------- */

.owner-bar { display: flex; gap: 2px; height: 12px; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.owner-bar i { display: block; min-width: 3px; }
.owner-n { color: var(--muted); font-size: 12px; font-weight: 400; }
.alloc-legend button.alloc-row { width: 100%; text-align: left; }

.hist-note { font-size: 12.5px; color: var(--muted); padding: 12px 0 2px; line-height: 1.5; }

/* ---------- Monthly trend bars ---------- */

.trend { display: flex; gap: 10px; align-items: flex-end; margin-top: 24px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trend .col i { display: block; width: 100%; background: var(--line); border-radius: 3px 3px 0 0; }
.trend .col i.cur { background: var(--accent); }
.trend .tv { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 14px; }
.trend .tm { font-size: 11px; color: var(--muted); }

/* ---------- Grow ---------- */

.seg { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-top: 18px; }
.seg button { padding: 10px 0 11px; font-size: 14.5px; color: var(--muted); position: relative; }
.seg button.on { color: var(--ink); font-weight: 600; }
.seg button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

.kid { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 22px; }
.kid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kid-head h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }

.link-list { border-top: 1px solid var(--line); }
.link-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.link-row input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.link-row .row-main { display: block; }

/* ---------- Advisor brief ---------- */

.brief { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-top: 22px; padding: 14px 0 18px; }
.brief-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.brief-head span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.brief-head .link { font-size: 12px; color: var(--muted); }
.brief-body { font-family: var(--serif); font-size: 16.5px; line-height: 1.65; white-space: pre-wrap; letter-spacing: 0.002em; }

/* ---------- Rows / lists ---------- */

.rows > * { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.rows > *:last-child { border-bottom: 0; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-amt { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.row-amt.pos { color: var(--pos); }
.row-amt .sub { display: block; font-size: 11.5px; color: var(--muted); font-family: var(--sans); }

.date-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 22px 0 6px; border-bottom: 1px solid var(--line); }

/* ---------- Budget bars ---------- */

.budget-row { display: block; padding: 15px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.budget-row:last-child { border-bottom: 0; }
.budget-top { display: flex; align-items: baseline; gap: 10px; }
.budget-top .name { font-size: 15px; font-weight: 500; flex: 1; display: flex; align-items: center; gap: 9px; }
.budget-top .figs { font-family: var(--mono); font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.budget-top .figs b { color: var(--ink); font-weight: 500; }
.bar { height: 3px; background: var(--surface); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 2px; width: 0; transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1); }
.bar i.over { background: var(--neg); }
.bar i.accent { background: var(--accent); }

/* ---------- Chips / tags ---------- */

.chip {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
  padding: 3px 9px; border-radius: 9999px; white-space: nowrap;
}

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px; margin: 0 -20px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.filter-chip { font-size: 13px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 9999px; color: var(--muted); white-space: nowrap; flex: none; }
.filter-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Forms ---------- */

.search {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 15px; outline: none; -webkit-appearance: none;
}
.search:focus { border-color: var(--ink); background: var(--bg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border-radius: 6px; padding: 11px 20px;
  font-size: 14.5px; font-weight: 500; transition: background 200ms, transform 100ms;
}
.btn:hover { background: #333; }
.btn:active { transform: scale(0.98); }
.btn.quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.quiet:hover { background: var(--line); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); font-size: 16px; outline: none; -webkit-appearance: none;
}
.field input:focus, .field select:focus { border-color: var(--ink); }
.field input.num { text-align: right; }

/* ---------- Debt ---------- */

.slider-wrap { margin: 18px 0 6px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 18px; }
.plan-grid > div { padding: 18px 4px; }
.plan-grid > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.plan-grid .k { font-size: 12px; color: var(--muted); }
.plan-grid .big { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.plan-grid .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Advisor ---------- */

.thread { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 16px; }
.msg { max-width: 92%; font-size: 15px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--surface); border: 1px solid var(--line); padding: 10px 15px; border-radius: 14px 14px 4px 14px; }
.msg.ai { align-self: flex-start; }
.msg.ai .body { white-space: pre-wrap; }
.msg .who { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.msg a, .brief-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg.think .body::after { content: "…"; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 14px; }

.composer {
  position: fixed; bottom: calc(64px + env(safe-area-inset-bottom)); left: 0; right: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: none;
}
.composer.show { display: block; }
.composer .inner { max-width: 640px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 10px; }
.composer input { flex: 1; }
.composer .send { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.composer .send svg { width: 17px; height: 17px; }
.composer .send:active { transform: scale(0.94); }

/* ---------- Bottom nav ---------- */

nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs .inner { max-width: 640px; margin: 0 auto; display: flex; }
nav.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 7px; color: #9b9995; font-size: 10px; letter-spacing: 0.01em; }
nav.tabs button svg { width: 21px; height: 21px; }
nav.tabs button.on { color: var(--ink); }

/* ---------- Sheet ---------- */

.backdrop { position: fixed; inset: 0; background: rgba(17, 17, 17, 0.32); z-index: var(--z-sheet-backdrop); opacity: 0; transition: opacity 220ms; pointer-events: none; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
  background: var(--bg); border-radius: 16px 16px 0 0; border-top: 1px solid var(--line);
  transform: translateY(105%); transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 24px calc(28px + env(safe-area-inset-bottom));
  max-height: 82dvh; overflow-y: auto;
}
.sheet.show { transform: none; }
.sheet .inner { max-width: 592px; margin: 0 auto; }
.grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 18px; }
.sheet h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.sheet .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.cat-opt { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; text-align: left; }
.cat-opt.on { border-color: var(--ink); background: var(--surface); font-weight: 600; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.toggle-row .hint { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 9999px; transition: background 200ms; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(18px); }

/* ---------- PIN ---------- */

#lock {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px;
}
#lock.hide { display: none; }
#lock .mark { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
#lock .mark span { font-style: italic; font-weight: 400; color: var(--muted); }
#lock .tag { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.pips { display: flex; gap: 14px; margin-bottom: 34px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); transition: background 150ms; }
.pips i.full { background: var(--ink); }
.pips.err { animation: shake 350ms; }
.pips.err i { border-color: var(--neg); }
.pips.err i.full { background: var(--neg); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.pad button { height: 72px; border-radius: 50%; font-size: 26px; font-weight: 400; font-family: var(--mono); transition: background 120ms, transform 100ms; }
.pad button:active { background: var(--surface); transform: scale(0.94); }
.pad .ghost { visibility: hidden; }
.pad .aux { font-size: 14px; font-family: var(--sans); color: var(--muted); }

/* ---------- States ---------- */

.empty { text-align: center; padding: 60px 24px; }
.empty .art { font-family: var(--serif); font-size: 40px; font-style: italic; color: var(--line); line-height: 1; }
.empty h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-top: 14px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 42ch; margin: 6px auto 20px; }

.skel { border-radius: 6px; background: linear-gradient(90deg, var(--surface) 25%, #efeeeb 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed; bottom: calc(84px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: 9999px;
  opacity: 0; transition: opacity 220ms, transform 220ms; z-index: var(--z-toast); pointer-events: none;
  max-width: 88vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: var(--neg); }

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

@media (min-width: 700px) {
  .hero-amount { font-size: 64px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
