/* Nafa — styles.
   Mobile-first. Light and dark are both selected, not flipped: the dark chart
   colours are the same hues re-stepped for the dark surface, validated as a set
   against that surface. */

:root {
  color-scheme: light;

  --page:        #F4F2EE;
  --surface:     #FCFBF9;
  --surface-2:   #F0EEE9;
  --ink:         #12141C;
  --ink-2:       #52514E;
  --muted:       #898781;
  --line:        #E1E0D9;
  --baseline:    #C3C2B7;
  --brand:       #14192B;
  --on-brand:    #FFFFFF;

  /* chart roles — validated for this surface */
  --series-in:   #2a78d6;   /* money in */
  --series-out:  #eb6834;   /* money out */
  --good:        #0ca30c;
  --warning:     #fab219;
  --serious:     #ec835a;
  --critical:    #d03b3b;
  --delta-good:  #006300;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11,11,11,.05), 0 8px 24px rgba(11,11,11,.06);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page:      #0D0D0D;
    --surface:   #17181A;
    --surface-2: #202124;
    --ink:       #FFFFFF;
    --ink-2:     #C3C2B7;
    --muted:     #898781;
    --line:      #2C2C2A;
    --baseline:  #383835;
    --brand:     #E8E6E1;
    --on-brand:  #14192B;
    --series-in: #3987e5;
    --series-out:#d95926;
    --delta-good:#0ca30c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:      #0D0D0D;
  --surface:   #17181A;
  --surface-2: #202124;
  --ink:       #FFFFFF;
  --ink-2:     #C3C2B7;
  --muted:     #898781;
  --line:      #2C2C2A;
  --baseline:  #383835;
  --brand:     #E8E6E1;
  --on-brand:  #14192B;
  --series-in: #3987e5;
  --series-out:#d95926;
  --delta-good:#0ca30c;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  max-width: 100%;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.spacer { height: 120px; }

/* ── splash ──────────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--brand); color: var(--on-brand);
  transition: opacity .45s ease;
}
.splash.gone { opacity: 0; pointer-events: none; }
.splash-mark img { width: 92px; height: 92px; object-fit: contain; }
.splash-name { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.splash-tag { font-size: 14px; opacity: .72; }

/* ── onboarding ──────────────────────────────────────────────────── */
.onb { position: fixed; inset: 0; z-index: 80; background: var(--page); overflow-y: auto; }
.onb-slide { display: none; padding: 56px 22px 40px; max-width: 560px; margin: 0 auto; min-height: 100%; }
.onb-slide.active { display: block; }
.onb h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.18; margin-bottom: 10px; }
.onb-sub { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin-bottom: 26px; }
.onb-art { position: relative; height: 130px; display: grid; place-items: center; margin-bottom: 24px; }
.onb-coin {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center; font-size: 38px; font-weight: 800;
  position: relative; z-index: 1;
}
.onb-ring {
  position: absolute; width: 128px; height: 128px; border-radius: 50%;
  border: 2px dashed var(--baseline);
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.onb-list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 14px; }
.onb-list li {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  gap: 0 12px; align-items: center;
}
.onb-ic { grid-row: 1 / 3; font-size: 22px; }
.onb-list b { font-size: 15px; font-weight: 700; }
.onb-list em { font-style: normal; color: var(--ink-2); font-size: 13.5px; }
.onb-next { margin-top: 8px; }
.onb-skip { display: block; margin: 14px auto 0; color: var(--muted); }
.onb-dots { position: fixed; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.onb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--baseline); }
.onb-dots i.on { background: var(--brand); width: 18px; border-radius: 3px; }

/* ── layout ──────────────────────────────────────────────────────── */
.app { max-width: 600px; margin: 0 auto; padding: 0 16px; }
.view { display: none; }
.view.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 14px; gap: 12px;
}
.topbar h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hello { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.topbar-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow);
}
.icon-btn.sm { width: 30px; height: 30px; font-size: 18px; box-shadow: none; background: transparent; }
.icon-btn:active { transform: scale(.94); }

.sec-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 22px 0 10px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.sec-head .sec-title { margin-bottom: 10px; }
.count { font-size: 12px; color: var(--muted); }
.lede { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin-top: 4px; }
.fineprint { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 26px; }

.card {
  background: var(--surface); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card.list { padding: 4px 0; }

/* ── chips ───────────────────────────────────────────────────────── */
.scope-row { overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.scope-row::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: nowrap; }
.chips.wrap { flex-wrap: wrap; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line);
}
.chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* ── the month card ──────────────────────────────────────────────── */
.month-card { padding-bottom: 14px; }
.month-nav { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.month-nav.inline { justify-content: flex-end; }
.big-figure { text-align: center; padding: 12px 0 14px; }
.bf-label { display: block; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.bf-value { display: block; font-size: clamp(26px, 9.5vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin-top: 4px; }
.bf-value.neg { color: var(--critical); }
.bf-sub { display: block; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.io-row { display: flex; gap: 8px 18px; justify-content: center; padding-top: 4px; flex-wrap: wrap; }
.io { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.io b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot-in { background: var(--series-in); }
.dot-out { background: var(--series-out); }
.io-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; background: var(--surface-2); gap: 2px; }
.io-bar i { display: block; height: 100%; border-radius: 4px; }

/* ── buffer meter ────────────────────────────────────────────────── */
.buf-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 10px; flex-wrap: wrap; }
.buf-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.buf-months { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; transition: width .5s ease; }
.buf-note { font-size: 12.5px; color: var(--ink-2); margin-top: 9px; line-height: 1.5; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.status.crit { color: var(--critical); }
.status.warn { color: var(--serious); }
.status.good { color: var(--delta-good); }

/* ── rows / lists ────────────────────────────────────────────────── */
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.card.list .row:last-child { border-bottom: 0; }
.row > span:not([class]) { flex: 1; }
.row b { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row.danger span { color: var(--critical); }
.row:active { background: var(--surface-2); }
.row-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 16px; flex: 0 0 auto; }
.row-main { flex: 1; min-width: 0; display: block; }
.row-t { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.row-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.row-amt.in { color: var(--delta-good); }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* category mini-bars on Home */
.catline { padding: 9px 2px; }
.catline:not(:last-child) { border-bottom: 1px solid var(--line); }
.catline-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.catline-top > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catline-top b { margin-left: auto; flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.catline-bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 7px; overflow: hidden; }
.catline-bar i { display: block; height: 100%; border-radius: 3px; background: var(--series-out); }

/* ── ledger ──────────────────────────────────────────────────────── */
.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.search-row input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
}
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 4px 6px; }
.day-head span { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day-head b { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ── charts ──────────────────────────────────────────────────────── */
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.chart-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.legend { display: flex; gap: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; gap: 2px; height: 122px; width: 100%; justify-content: center; }
.bar {
  width: 42%; max-width: 22px; border-radius: 4px 4px 0 0;
  transition: height .45s ease; position: relative;
}
.bar.in { background: var(--series-in); }
.bar.out { background: var(--series-out); }
.bar-x { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-col.on .bar-x { color: var(--ink); font-weight: 700; }

.line-wrap { position: relative; }
.line-wrap svg { display: block; width: 100%; height: 132px; overflow: visible; }
.gridline { stroke: var(--line); stroke-width: 1; }
.zeroline { stroke: var(--baseline); stroke-width: 1; stroke-dasharray: 3 3; }
.axis-lab { fill: var(--muted); font-size: 10px; }
.line-path { fill: none; stroke: var(--series-in); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.line-dot { fill: var(--series-in); stroke: var(--surface); stroke-width: 2; }
.line-lab { fill: var(--ink); font-size: 10.5px; font-weight: 700; }

.hbar { padding: 8px 0; }
.hbar:not(:last-child) { border-bottom: 1px solid var(--line); }
.hbar-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.hbar-top > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-top b { margin-left: auto; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.hbar-top em { font-style: normal; color: var(--muted); font-size: 12px; }
.hbar-track { height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 7px; }
.hbar-track i { display: block; height: 100%; border-radius: 4px; background: var(--series-out); }

.tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--ink); color: var(--page);
  padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.45;
  white-space: nowrap; box-shadow: var(--shadow); transform: translate(-50%, -100%);
}
.tip b { font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }

/* ── grow / findings ─────────────────────────────────────────────── */
.finding {
  background: var(--surface); border-radius: var(--r-lg); padding: 15px 16px;
  box-shadow: var(--shadow); margin-bottom: 10px;
  border-left: 3px solid var(--muted); width: 100%; text-align: left; display: block;
}
.finding.crit { border-left-color: var(--critical); }
.finding.warn { border-left-color: var(--serious); }
.finding.info { border-left-color: var(--series-in); }
.finding.good { border-left-color: var(--good); }
.f-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.f-sev { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.finding.crit .f-sev { color: var(--critical); }
.finding.warn .f-sev { color: var(--serious); }
.finding.info .f-sev { color: var(--series-in); }
.finding.good .f-sev { color: var(--delta-good); }
.f-body { font-size: 14.5px; line-height: 1.55; }
.f-body b { font-variant-numeric: tabular-nums; }
.f-link { font-size: 12.5px; color: var(--muted); margin-top: 9px; display: flex; align-items: center; gap: 5px; }

.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.calc-tile {
  background: var(--surface); border-radius: var(--r-md); padding: 15px 14px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; text-align: left;
}
.calc-tile span { font-size: 20px; }
.calc-tile b { font-size: 14px; font-weight: 700; }

.tier-filter { margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.m-card {
  background: var(--surface); border-radius: var(--r-md); padding: 14px 15px;
  box-shadow: var(--shadow); margin-bottom: 9px; width: 100%; text-align: left; display: block;
}
.m-card h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.m-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.tier {
  display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 7px; border-radius: 5px; margin-bottom: 7px;
}
.tier-strong   { background: rgba(12,163,12,.14);  color: var(--delta-good); }
.tier-moderate { background: rgba(42,120,214,.14); color: var(--series-in); }
.tier-mixed    { background: rgba(236,131,90,.18); color: var(--serious); }
.tier-math     { background: var(--surface-2);     color: var(--ink-2); }

.m-sec { margin-top: 18px; }
.m-sec h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 7px; }
.m-sec p { font-size: 14.5px; line-height: 1.62; color: var(--ink); }
.m-sec ul { margin: 0; padding-left: 18px; }
.m-sec li { font-size: 14.5px; line-height: 1.6; margin-bottom: 7px; }
.m-source { font-size: 12.5px; color: var(--muted); line-height: 1.55; font-style: italic; }
.m-claim { font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; }

/* ── tabs / fab ──────────────────────────────────────────────────── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: center;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 4px calc(8px + var(--safe-b));
  max-width: 600px; margin: 0 auto;
}
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); flex: 1; }
.tabs button span { font-size: 17px; line-height: 1; }
.tabs button em { font-style: normal; font-size: 10.5px; font-weight: 600; }
.tabs button.active { color: var(--ink); }
.tab-gap { visibility: hidden; }
.fab {
  position: fixed; z-index: 45; bottom: calc(30px + var(--safe-b));
  left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  font-size: 26px; font-weight: 300; line-height: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  display: grid; place-items: center;
}
.fab:active { transform: translateX(-50%) scale(.93); }

/* ── sheets ──────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.42); animation: fade .2s ease; }
.sheet {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  max-height: 92vh; overflow-y: auto;
  background: var(--page); border-radius: 24px 24px 0 0;
  animation: rise .28s cubic-bezier(.2,.8,.3,1);
  max-width: 600px; margin: 0 auto;
}
@keyframes rise { from { transform: translateY(100%); } }
.sheet-inner { padding: 8px 18px calc(28px + var(--safe-b)); }
.grab { width: 38px; height: 4px; border-radius: 2px; background: var(--baseline); margin: 6px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .btn { flex: 1; }

.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.amount-row { display: flex; gap: 10px; align-items: center; }
.amount-row input {
  flex: 1; min-width: 0; font-size: 38px; font-weight: 800; letter-spacing: -.03em;
  border: 0; background: transparent; padding: 4px 0; outline: none;
}
.amount-row select {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 9px 10px; font-weight: 700; font-size: 13px;
}
.conv-hint { font-size: 12.5px; color: var(--muted); min-height: 18px; margin-bottom: 12px; }

.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); outline: none;
}
.fld input:focus, .fld select:focus { border-color: var(--ink-2); }
.fld .hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; font-style: normal; line-height: 1.5; }
.fld-row { display: flex; gap: 10px; }
.fld-row .fld { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.cat {
  padding: 10px 4px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); display: flex; flex-direction: column;
  align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--ink-2);
  text-align: center; line-height: 1.2;
}
.cat span { font-size: 18px; }
.cat.on { border-color: var(--brand); background: var(--surface-2); color: var(--ink); }

.btn {
  display: block; width: 100%; padding: 14px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700; text-align: center;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); margin-bottom: 12px; }
.btn-danger { background: transparent; color: var(--critical); border: 1px solid var(--critical); }
.btn-plain { color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 4px; }

.toast {
  position: fixed; z-index: 70; bottom: calc(96px + var(--safe-b)); left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: var(--page);
  padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); animation: fade .2s ease; max-width: 88vw; text-align: center;
}

.calc-out {
  background: var(--surface-2); border-radius: var(--r-md);
  padding: 14px; margin-top: 16px; font-size: 14.5px; line-height: 1.6;
}
.calc-out .big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: block; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.calc-out .muted { color: var(--muted); font-size: 12.5px; line-height: 1.5; display: block; margin-top: 8px; }

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