/* One phone column, read like a mixing desk: each payment splits into two channels, tax and you. */
:root {
  --bg: #e9eef0; --panel: #f7f9fa; --ink: #15252c; --muted: #566870; --line: #c9d3d7;
  --tax: #1f49c9; --tax-soft: #dbe3fa; --you: #0d7a68; --you-soft: #d3ece6; --warn: #a2520a;
  --sans: "Helvetica Neue", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #10191d; --panel: #1a262b; --ink: #e6eef0; --muted: #98aab1; --line: #33444b;
  --tax: #8ea9ff; --tax-soft: #22305c; --you: #5fd0ba; --you-soft: #143a33; --warn: #f0b070;
  color-scheme: dark;
} }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; }
[hidden] { display: none !important; }
main { max-width: 520px; margin: 0 auto; padding-top: max(20px, env(safe-area-inset-top, 0px)); padding-bottom: max(48px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 28px; }
h1 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: .02em; }
h2 { font-size: 20px; font-weight: 700; margin: 0; }
p { margin: 0; }
section, .stack { display: grid; gap: 12px; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.note { color: var(--warn); font-size: 14px; }
.amt { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.pot { gap: 4px; }
.big { font-family: var(--mono); font-size: clamp(34px, 11vw, 46px); font-weight: 500; line-height: 1.1; color: var(--tax); overflow-wrap: anywhere; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 12px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head > * { min-width: 0; }
.split { display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: var(--line); }
.split i { display: block; height: 100%; }
.split .t { background: var(--tax); width: 30%; }
.split .y { background: var(--you); width: 70%; }
.move { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px; border-radius: 6px; }
.move.tax { background: var(--tax-soft); }
.move.you { background: var(--you-soft); }
.move .lab { font-size: 14px; display: block; }
.move .val { font-size: 20px; display: block; overflow-wrap: anywhere; }
.move.done .val { text-decoration: line-through; opacity: .65; }
.btns { display: flex; gap: 6px; flex-wrap: wrap; }
button { font: inherit; font-size: 14px; font-weight: 500; min-height: 44px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--tax); outline-offset: 2px; }
label { font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
input, select, textarea { font: inherit; font-size: 16px; padding: 10px; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
summary { cursor: pointer; font-size: 15px; min-height: 24px; }
details[open] summary { margin-bottom: 12px; }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 14px; color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.problems { margin: 0; padding-left: 18px; color: var(--warn); font-size: 14px; display: grid; gap: 4px; }
.problems:empty { display: none; }
#logout { justify-self: start; }
