/* ============================================================================
   sanesplit — v3 "THE INSTRUMENT"
   One paper family, one ink, the debit/credit pair. Nothing else.
   One type family (the real system stack), two voices: Display and Numeral.
   Six sizes: 13 / 15 / 17 / 22 / 30 / display clamp. Numbers are the interface.
   No frameworks, no webfonts, no build step. Motion is CSS-keyframe only,
   auto-terminating, and fully suppressed under prefers-reduced-motion.
   ============================================================================ */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root{
  --paper:   #F4F1EA;
  --surface: #FCFBF7;
  --sunken:  #ECE8DE;
  --line:    #DDD8CB;
  --line-2:  #BFB9A8;
  --ink:     #161A17;
  --muted:   #575E53;
  --faint:   #79806E;

  --credit:  #0E7B4F;
  --credit-soft: #E2EEE4;
  --debit:   #C2402E;
  --debit-soft:  #F4E3DE;

  --shadow: 0 1px 2px rgba(22,26,23,.05), 0 14px 32px -18px rgba(22,26,23,.25);

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;

  --t1: 13px; --t2: 15px; --t3: 17px; --t4: 22px; --t5: 30px;
  --t6: clamp(32px, 5.4vw, 52px);

  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1100px;
  --pad: clamp(16px, 4vw, 26px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:   #141613;
    --surface: #1C1F1B;
    --sunken:  #0E100D;
    --line:    #2E332C;
    --line-2:  #4A5045;
    --ink:     #EDEBE3;
    --muted:   #A2A896;
    --faint:   #7C8371;
    --credit:  #43BD85;
    --credit-soft: #1B2E24;
    --debit:   #E5674F;
    --debit-soft:  #38221C;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 32px -18px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"]{
  --paper:   #141613;
  --surface: #1C1F1B;
  --sunken:  #0E100D;
  --line:    #2E332C;
  --line-2:  #4A5045;
  --ink:     #EDEBE3;
  --muted:   #A2A896;
  --faint:   #7C8371;
  --credit:  #43BD85;
  --credit-soft: #1B2E24;
  --debit:   #E5674F;
  --debit-soft:  #38221C;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 32px -18px rgba(0,0,0,.6);
}

/* the settlement card inverts the page: ink on paper by day, paper on ink by night */
:root{
  --invert-bg:   #161A17;
  --invert-ink:  #F2EFE7;
  --invert-muted:#A9AFA0;
  --invert-line: rgba(242,239,231,.14);
  --invert-credit:#5BD49B;
  --invert-debit:#F08A75;
}
:root[data-theme="dark"]{
  --invert-bg:   #EDEBE3;
  --invert-ink:  #161A17;
  --invert-muted:#575E53;
  --invert-line: rgba(22,26,23,.14);
  --invert-credit:#0E7B4F;
  --invert-debit:#C2402E;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --invert-bg:   #EDEBE3;
    --invert-ink:  #161A17;
    --invert-muted:#575E53;
    --invert-line: rgba(22,26,23,.14);
    --invert-credit:#0E7B4F;
    --invert-debit:#C2402E;
  }
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top:72px; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation:none !important; transition:none !important; }
}
body{
  margin:0;
  font-family:var(--font);
  font-size:var(--t3); line-height:1.55;
  background:var(--paper); color:var(--ink);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing:antialiased;
}
:root[data-theme="dark"] body{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) body{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}
h1,h2,h3,h4{ margin:0; font-weight:700; line-height:1.08; letter-spacing:-0.025em; }
p{ margin:0; }
a{ color:inherit; }
button{ font:inherit; color:inherit; cursor:pointer; }
svg{ display:block; }
::selection{ background:var(--ink); color:var(--paper); }
:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; border-radius:3px; }
.settle-card :focus-visible, .result-card :focus-visible{ outline-color:var(--invert-ink); }

.container{ max-width:var(--container); margin-inline:auto; padding-inline:var(--pad); }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip-link{
  position:absolute; left:var(--pad); top:-48px; z-index:100;
  background:var(--ink); color:var(--paper);
  padding:10px 16px; border-radius:0 0 var(--r-sm) var(--r-sm);
  text-decoration:none; font-weight:600; transition:top .15s ease;
}
.skip-link:focus{ top:0; }
.noscript-note{
  display:block; padding:14px var(--pad); text-align:center;
  background:var(--debit-soft); color:var(--debit); font-size:var(--t2);
}
.icon{ width:20px; height:20px; stroke:currentColor; stroke-width:1.8; fill:none;
       stroke-linecap:round; stroke-linejoin:round; flex:none; }

/* numeral voice */
.num, .mono{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum";
  letter-spacing:-0.01em;
  font-weight:650;
}

/* micro label voice */
.lbl{
  font-size:11.5px; font-weight:650; letter-spacing:.07em;
  text-transform:uppercase; color:var(--muted);
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.site-header .container{ display:flex; align-items:center; gap:18px; height:58px; }
.brand{
  display:flex; align-items:center; gap:9px;
  text-decoration:none; font-weight:700; font-size:var(--t3); letter-spacing:-0.02em;
  line-height:1;
}
.brand span{ position:relative; top:-0.5px; }
.brand-mark{ width:24px; height:24px; flex:none; }
.site-nav{ margin-left:auto; display:flex; align-items:center; gap:2px; }
.site-nav a{
  text-decoration:none; font-size:var(--t2); color:var(--muted);
  padding:7px 11px; border-radius:var(--r-sm);
}
.site-nav a:hover{ color:var(--ink); background:var(--sunken); }
.theme-toggle{
  margin-left:6px; border:1px solid var(--line); background:transparent;
  border-radius:var(--r-sm); width:34px; height:34px;
  display:inline-flex; align-items:center; justify-content:center; color:var(--muted);
}
.theme-toggle:hover{ color:var(--ink); border-color:var(--line-2); }
.theme-toggle .icon{ width:17px; height:17px; }
:root[data-theme="dark"] .theme-toggle .moon,
.theme-toggle .sun{ display:none; }
:root[data-theme="dark"] .theme-toggle .sun{ display:block; }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-toggle .moon{ display:none; }
  :root:not([data-theme="light"]) .theme-toggle .sun{ display:block; }
}
.install-btn{ margin-left:4px; }

/* hamburger + mobile menu */
.nav-burger{
  display:none; position:relative;
  width:40px; height:40px; margin-left:4px;
  border:1px solid var(--line); border-radius:var(--r-sm);
  background:transparent; color:var(--ink);
}
.nav-burger span{
  position:absolute; left:11px; right:11px; height:2px; border-radius:2px;
  background:currentColor; top:15px;
  transition:transform .2s ease, top .2s ease;
}
.nav-burger span + span{ top:23px; }
.nav-burger.is-open span:first-child{ top:19px; transform:rotate(45deg); }
.nav-burger.is-open span + span{ top:19px; transform:rotate(-45deg); }
.mobile-nav{
  position:absolute; top:100%; left:0; right:0; z-index:49;
  background:var(--paper); border-bottom:1px solid var(--line);
  box-shadow:var(--shadow);
  display:grid; padding:6px var(--pad) 12px;
}
.mobile-nav[hidden]{ display:none; }
.mobile-nav a{
  text-decoration:none; padding:14px 4px;
  font-weight:600; font-size:var(--t3); color:var(--ink);
  border-bottom:1px solid var(--line);
}
.mobile-nav a:last-child{ border-bottom:0; }
@media (min-width:681px){
  .nav-burger, .mobile-nav{ display:none !important; }
}
@media (max-width:680px){
  .site-nav{ gap:0; }
  .site-nav a{ display:none; }
  .nav-burger{ display:inline-flex; }
  .install-btn{ display:none; }
  .theme-toggle{ width:40px; height:40px; }
}

/* ==========================================================================
   4. INTRO — the living split
   ========================================================================== */
.hero{ background:var(--paper); overflow:hidden; }
.hero .container{
  padding-block:clamp(28px, 5vw, 52px) clamp(18px, 3vw, 28px);
  max-width:var(--container);
}
.hero .hero-grid{
  display:grid; grid-template-columns:minmax(0,11fr) minmax(320px,9fr);
  gap:clamp(24px, 5vw, 72px); align-items:center;
}
@media (max-width:880px){
  .hero .hero-grid{ grid-template-columns:1fr; gap:var(--s5); }
}
.hero h1{
  font-size:var(--t6); font-weight:750; max-width:24ch;
  text-wrap:balance;
}
@media (max-width:680px){
  .hero h1 br{ display:none; }
}
.hero h1 .w{ display:inline-block; }
@media (prefers-reduced-motion: no-preference){
  .hero h1 .w{ animation:w-in .55s cubic-bezier(.2,.8,.25,1) backwards; }
  .hero h1 .w:nth-child(2){ animation-delay:.045s; }
  .hero h1 .w:nth-child(3){ animation-delay:.09s; }
  .hero h1 .w:nth-child(4){ animation-delay:.135s; }
  .hero h1 .w:nth-child(5){ animation-delay:.18s; }
  .hero h1 .w:nth-child(6){ animation-delay:.225s; }
  .hero h1 .w:nth-child(7){ animation-delay:.27s; }
  .hero h1 .w:nth-child(8){ animation-delay:.315s; }
}
@keyframes w-in{ from{ opacity:0; transform:translateY(.5em); } }
/* one green word inside the ink headline — the claim, in the color of money */
.hero h1 .u{ color:var(--credit); }
.hero-cta{ margin-top:var(--s5); }
.hero-sub{
  margin-top:var(--s4); font-size:var(--t3); color:var(--muted);
  max-width:62ch; line-height:1.6;
}
@media (prefers-reduced-motion: no-preference){
  .hero-copy{ animation:hero-in .5s ease backwards; }
  .hero-art{ animation:hero-in .5s ease .12s backwards; }
}
@keyframes hero-in{ from{ opacity:0; transform:translateY(10px); } }

/* the instrument: a typographic sculpture driven by the real engine */
.hero-art{
  position:relative; min-width:0;
  padding:var(--s3) 0 var(--s2);
  touch-action:pan-y;
}
/* editorial annotation, not a UI chip */
.ha-badge{
  display:flex; align-items:center; gap:9px;
  font-size:10.5px; font-weight:700; letter-spacing:.16em; text-transform:uppercase;
  color:var(--faint);
  margin-bottom:var(--s3);
}
.ha-badge::after{ content:""; flex:1; height:1px; background:var(--line); }
.ha-badge-dot{
  width:7px; height:7px; border-radius:50%; background:var(--credit); flex:none;
}
@media (prefers-reduced-motion: no-preference){
  .ha-badge-dot{ animation:badge-pulse 2.4s ease-in-out infinite; }
}
@keyframes badge-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
.ha-total{
  font-size:clamp(38px, 6vw, 58px); font-weight:750; letter-spacing:-0.035em;
  line-height:1;
}
.ha-caption{
  margin-top:6px; font-size:var(--t2); color:var(--muted);
}
.ha-caption strong{ color:var(--ink); font-weight:700; }
.ha-cols{
  display:flex; align-items:flex-end;
  height:clamp(118px, 16vw, 152px); margin-top:var(--s5);
}
/* each person is a pile of real coins: discrete discs with faces, rims and a
   ground shadow, hand-stacked with slight jitter. Division made countable. */
.ha-col{
  min-width:0; position:relative; overflow:visible;
  background:transparent; margin-right:0;
  box-shadow:none;
}
.ha-stack{
  position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:40px; height:100%;
}
.ha-stack::before{ /* grounding shadow */
  content:""; position:absolute; left:50%; bottom:-4px; transform:translateX(-50%);
  width:50px; height:10px; border-radius:50%;
  background:radial-gradient(ellipse at center, rgba(0,0,0,.28) 0%, transparent 68%);
}
.ha-coin{
  position:absolute; left:50%; width:38px; height:12px; margin-left:-19px;
  border-radius:50%;
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--ink) 76%, var(--paper)) 0%,
    var(--ink) 42%,
    color-mix(in srgb, var(--ink) 70%, #000) 100%);
  box-shadow:
    0 1.5px 2px rgba(0,0,0,.35),
    inset 0 1px 1px color-mix(in srgb, var(--paper) 38%, transparent);
}
.ha-coin.is-top{
  box-shadow:
    0 1.5px 2px rgba(0,0,0,.35),
    inset 0 2.5px 3px -1px color-mix(in srgb, var(--paper) 62%, transparent),
    inset 0 0 0 1.5px color-mix(in srgb, var(--paper) 22%, transparent);
}
/* the extra cent: a green coin on top of the taller piles */
.ha-coin.is-cent{
  background:linear-gradient(180deg, #3DBE85 0%, var(--credit) 45%, #0A5A3B 100%);
  box-shadow:
    0 1.5px 2px rgba(0,0,0,.35),
    inset 0 2px 2.5px -1px rgba(255,255,255,.45),
    inset 0 0 0 1.5px rgba(255,255,255,.18);
}
@supports not (background: color-mix(in srgb, red 26%, transparent)){
  .ha-coin{ background:var(--ink); box-shadow:0 1.5px 2px rgba(0,0,0,.35); }
  .ha-coin.is-top{ box-shadow:0 1.5px 2px rgba(0,0,0,.35), inset 0 2px 3px -1px rgba(244,241,234,.5); }
}
@media (prefers-reduced-motion: no-preference){
  .ha-coin.drop{ animation:coin-drop .3s cubic-bezier(.3,1.2,.4,1) backwards; }
}
@keyframes coin-drop{ from{ transform:translateY(-16px); opacity:0; } }
.ha-col.is-off .ha-stack{ opacity:0; }
@media (prefers-reduced-motion: no-preference){
  .ha-col{
    transition:
      width .42s cubic-bezier(.22,.9,.3,1),
      height .42s cubic-bezier(.22,.9,.3,1),
      margin-right .42s cubic-bezier(.22,.9,.3,1),
      opacity .28s ease;
  }
  .ha-col-amt, .ha-cent{ transition:opacity .2s ease; }
}
.ha-col.is-off{ width:0 !important; opacity:0; }
.ha-col-amt{
  position:absolute; left:50%; bottom:100%; transform:translateX(-50%);
  margin-bottom:7px;
  color:var(--ink); font-size:11px; font-weight:700;
  font-variant-numeric:tabular-nums; letter-spacing:-0.01em;
  white-space:nowrap;
}
.ha-cols.is-dense .ha-col-amt{ font-size:9.5px; }
.ha-col.is-off .ha-col-amt{ opacity:0; }
.ha-cent{ display:none; }
.ha-break{
  margin-top:var(--s3); font-size:var(--t2); font-weight:650; letter-spacing:-0.01em;
}
.ha-recon{
  margin-top:2px; font-size:var(--t1); color:var(--credit); font-weight:600;
  font-variant-numeric:tabular-nums;
}
.ha-control{
  display:flex; align-items:center; gap:12px; margin-top:var(--s4);
}
.ha-range-label{
  font-size:11.5px; font-weight:650; letter-spacing:.07em;
  text-transform:uppercase; color:var(--muted); flex:none;
}
#haRange{
  appearance:none; -webkit-appearance:none; flex:1; height:28px;
  background:transparent; cursor:pointer; min-width:0; margin:0;
}
#haRange::-webkit-slider-runnable-track{
  height:2px; background:var(--line-2); border-radius:1px;
}
#haRange::-moz-range-track{
  height:2px; background:var(--line-2); border-radius:1px;
}
#haRange::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:22px; height:22px; border-radius:50%;
  background:var(--ink); border:3px solid var(--paper);
  box-shadow:0 0 0 1px var(--line-2), 0 2px 6px rgba(22,26,23,.3);
  margin-top:-10px;
}
#haRange::-moz-range-thumb{
  width:16px; height:16px; border-radius:50%;
  background:var(--ink); border:3px solid var(--paper);
  box-shadow:0 0 0 1px var(--line-2), 0 2px 6px rgba(22,26,23,.3);
}
#haRange:focus-visible{ outline:none; }
#haRange:focus-visible::-webkit-slider-thumb{
  box-shadow:0 0 0 3px var(--credit), 0 2px 6px rgba(22,26,23,.3);
}
#haRange:focus-visible::-moz-range-thumb{
  box-shadow:0 0 0 3px var(--credit), 0 2px 6px rgba(22,26,23,.3);
}
@media (max-width:880px){
  .hero-art{ padding-block:4px 0; }
  .ha-total{ font-size:34px; }
  .ha-cols{ height:102px; margin-top:var(--s4); }
  .ha-control{ margin-top:var(--s3); }
}
/* a travelling cent finding its home */
.ha-dot{
  position:absolute; z-index:2; width:7px; height:7px; border-radius:50%;
  background:var(--credit); pointer-events:none;
  transition:transform .5s cubic-bezier(.45,0,.55,1), opacity .5s ease;
}
.hero-sub strong{ color:var(--ink); font-weight:600; }

/* ==========================================================================
   5. SECTIONS
   ========================================================================== */
.section{ padding-block:clamp(40px, 6vw, 76px); }
.section + .section{ border-top:1px solid var(--line); }
#tools.section{ padding-top:0; border-top:0; }
.tools-head{
  display:flex; align-items:baseline; gap:14px; flex-wrap:wrap;
  margin:var(--s6) 0 var(--s3);
}
.tools-head h2{ font-size:var(--t4); }
.tools-hint{ font-size:var(--t1); color:var(--faint); font-weight:600; }
.section-head{ margin-bottom:var(--s6); max-width:680px; }
.section-head h2{ font-size:var(--t5); }
.section-head .lede{ margin-top:var(--s3); color:var(--muted); font-size:var(--t3); }

/* ==========================================================================
   6. TOOL SHELL
   ========================================================================== */
.tool-shell{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.tool-tabs{
  display:flex; gap:4px; padding:10px;
  background:var(--sunken);
  border-bottom:1px solid var(--line);
  overflow-x:auto; scrollbar-width:none;
}
.tool-tabs::-webkit-scrollbar{ display:none; }
.tool-tab{
  appearance:none; border:0; background:transparent;
  flex:1 1 0; min-width:104px; min-height:44px;
  padding:9px 16px;
  display:flex; align-items:center; justify-content:center;
  border-radius:var(--r-sm);
  color:var(--muted); font-weight:600; font-size:var(--t2);
  transition:background-color .15s ease, color .15s ease;
}
.tool-tab .t-code{ display:none; }
.tool-tab .t-name{ font-weight:inherit; font-size:inherit; }
.tool-tab[aria-selected="true"]{
  background:var(--surface); color:var(--ink);
  box-shadow:0 1px 2px rgba(22,26,23,.08);
}
.tool-tab:hover:not([aria-selected="true"]){ color:var(--ink); }
.tool-panel{ padding:clamp(16px, 3vw, 28px); }
.tool-panel[hidden]{ display:none; }

/* ---- form primitives ---- */
.field{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.field > label, .field-label{
  font-size:11.5px; font-weight:650; letter-spacing:.07em;
  text-transform:uppercase; color:var(--muted);
}
.field input[type="text"], .field input[type="number"], .field input[type="date"],
.field select, .input{
  font:inherit; color:var(--ink); background:var(--sunken);
  border:1.5px solid transparent; border-radius:var(--r-sm);
  padding:11px 13px; min-width:0; width:100%;
}
.field input:focus, .field select:focus, .input:focus{
  outline:none; border-color:var(--ink); background:var(--surface);
}
.input--amt{ font-variant-numeric:tabular-nums; font-feature-settings:"tnum"; font-weight:650; }
.field .hint{ font-size:var(--t1); color:var(--faint); }
.field.is-invalid input{ border-color:var(--debit); background:var(--debit-soft); }
.field-err{ font-size:var(--t1); color:var(--debit); font-weight:600; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid var(--line-2); background:var(--surface);
  color:var(--ink); border-radius:var(--r-sm); padding:10px 16px;
  font-weight:600; font-size:var(--t2); text-decoration:none;
  transition:transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:hover{ border-color:var(--ink); transform:translateY(-1px); }
.btn:active{ transform:none; }
.btn--primary{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.btn--primary:hover{ opacity:.9; border-color:var(--ink); }
.btn--accent{ background:var(--debit); color:#FDF6EF; border-color:var(--debit); }
.btn--ghost{ border-color:transparent; background:transparent; color:var(--muted); }
.btn--ghost:hover{ color:var(--ink); border-color:var(--line-2); transform:none; }
.btn--sm{ padding:7px 12px; font-size:var(--t1); gap:6px; }
.btn .icon{ width:16px; height:16px; }
.btn[disabled]{ opacity:.4; cursor:not-allowed; transform:none; }

.seg{
  display:inline-flex; background:var(--sunken); border-radius:var(--r-sm);
  padding:3px; gap:3px;
}
.seg button{
  appearance:none; border:0; background:transparent; padding:7px 13px;
  font-size:var(--t1); font-weight:600; color:var(--muted);
  border-radius:7px; min-height:34px;
  transition:background-color .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"]{
  background:var(--surface); color:var(--ink);
  box-shadow:0 1px 2px rgba(22,26,23,.08);
}
.seg button:not([aria-pressed="true"]):hover{ color:var(--ink); }

.chip-row{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  display:inline-flex; align-items:center; gap:7px;
  background:var(--sunken); border:1px solid transparent;
  border-radius:999px; padding:7px 13px; font-size:var(--t2); font-weight:600;
}
.chip button{
  appearance:none; border:0; background:transparent; padding:0; line-height:0;
  color:var(--faint); border-radius:50%;
}
.chip button:hover{ color:var(--debit); }
.chip .icon{ width:14px; height:14px; }

.check-chip{ position:relative; }
.check-chip input{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.check-chip span{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--sunken); color:var(--muted); border:1px solid transparent;
  border-radius:999px; padding:7px 13px; font-size:var(--t2); font-weight:600;
  min-height:34px;
}
.check-chip input:checked + span{ background:var(--ink); color:var(--paper); }
.check-chip input:focus-visible + span{ outline:2px solid var(--ink); outline-offset:2px; }

.stepper{
  display:flex; align-items:stretch; background:var(--sunken);
  border-radius:var(--r-sm); overflow:hidden; width:fit-content;
}
.stepper button{
  appearance:none; border:0; background:transparent; width:44px; min-height:44px;
  font-size:18px; font-weight:700; color:var(--muted);
}
.stepper button:hover{ color:var(--ink); }
.stepper input{
  border:0; background:transparent; width:56px; text-align:center;
  font-variant-numeric:tabular-nums; font-weight:700; font-size:var(--t3); color:var(--ink);
  -moz-appearance:textfield; appearance:textfield;
}
.stepper input::-webkit-outer-spin-button,.stepper input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.stepper input:focus{ outline:none; }
.stepper:focus-within{ outline:2px solid var(--ink); outline-offset:1px; }

/* ==========================================================================
   7. GROUP TOOL
   ========================================================================== */
.split-bar{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center;
  padding-bottom:var(--s4); border-bottom:1px solid var(--line); margin-bottom:var(--s5);
}
.split-bar select{
  font:inherit; font-weight:700; font-size:var(--t3); color:var(--ink);
  background:var(--sunken); border:1.5px solid transparent; border-radius:var(--r-sm);
  padding:8px 10px; max-width:min(46vw, 300px);
}
.split-bar select:focus{ outline:none; border-color:var(--ink); }
.split-bar .spacer{ flex:1; }
.split-actions{ display:flex; gap:6px; flex-wrap:wrap; }

.group-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(18px,3vw,30px); align-items:start; }
@media (min-width:881px){
  /* the summary column tracks the ledger: settlement stays in view while you scroll */
  .group-grid > div:last-child{ position:sticky; top:74px; }
}
@media (max-width:880px){ .group-grid{ grid-template-columns:1fr; } }

.panel-block + .panel-block{ margin-top:var(--s5); }
.block-head{ display:flex; align-items:center; gap:10px; margin-bottom:var(--s3); }
.block-head h3{ font-size:var(--t3); font-weight:700; }
.block-head .count{
  font-variant-numeric:tabular-nums; font-size:var(--t1); color:var(--faint); font-weight:600;
}
.block-head .tail{ margin-left:auto; }

.people-add{ display:flex; gap:8px; margin-top:var(--s3); }
.people-add input{ flex:1; }

/* expense entry */
.exp-form{
  background:var(--paper); border:1px solid var(--line);
  border-radius:var(--r-md); padding:var(--s4); display:grid; gap:var(--s4);
}
.exp-form .row2{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s3); }
@media (max-width:480px){ .exp-form .row2{ grid-template-columns:1fr; } }
.split-mode-fields{ display:grid; gap:2px; }
.smf-row{
  display:flex; align-items:center; gap:10px;
  padding:5px 0; border-bottom:1px solid var(--line);
}
.smf-row:last-of-type{ border-bottom:0; }
.smf-row label{ flex:1; font-size:var(--t2); font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.smf-row input{
  width:110px; text-align:right;
  font-variant-numeric:tabular-nums; font-weight:650;
  background:var(--sunken); border:1.5px solid transparent; border-radius:7px;
  color:var(--ink); padding:7px 10px; font-size:var(--t2);
}
.smf-row input:focus{ outline:none; border-color:var(--ink); background:var(--surface); }
.smf-row .unit{ font-size:var(--t1); color:var(--faint); width:22px; font-weight:600; }
.smf-sum{
  font-variant-numeric:tabular-nums; font-size:var(--t1);
  color:var(--muted); padding-top:8px; font-weight:600;
}
.smf-sum.is-bad{ color:var(--debit); font-weight:700; }
.exp-form-foot{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* journal */
.exp-list{ list-style:none; margin:0; padding:0; display:grid; gap:0; }
.exp-item{
  border-bottom:1px solid var(--line);
  padding:11px 2px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 12px;
  align-items:center;
}
.exp-item:first-child{ border-top:1px solid var(--line); }
.exp-item .e-desc{ font-weight:600; font-size:var(--t2); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.exp-item .e-amt{
  font-variant-numeric:tabular-nums; font-weight:650; font-size:var(--t2); text-align:right;
}
.exp-item .e-meta{ grid-column:1; font-size:var(--t1); color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.exp-item .e-meta .mode{ color:var(--faint); font-weight:600; }
.exp-item .e-act{ grid-column:2; display:flex; gap:2px; justify-content:flex-end; }
.icon-btn{
  appearance:none; border:0; background:transparent; color:var(--faint);
  padding:6px; border-radius:7px; line-height:0; min-width:28px; min-height:28px;
}
.icon-btn:hover{ color:var(--ink); background:var(--sunken); }
.icon-btn .icon{ width:15px; height:15px; }

@media (prefers-reduced-motion: no-preference){
  .exp-item{ animation:row-in .22s ease backwards; }
}
@keyframes row-in{ from{ opacity:0; transform:translateY(4px); } }

.empty-note{
  border:1.5px dashed var(--line-2); border-radius:var(--r-md);
  padding:var(--s5); text-align:center; color:var(--muted); font-size:var(--t2);
  display:grid; gap:var(--s3); justify-items:center;
}

/* balances */
.bal-list{ list-style:none; margin:0; padding:0; display:grid; gap:0; }
.bal-row{
  display:grid; grid-template-columns:minmax(64px,auto) 1fr auto; gap:12px; align-items:center;
  padding:10px 0; border-bottom:1px solid var(--line);
}
.bal-row:last-child{ border-bottom:0; }
.bal-row .b-name{ font-weight:600; font-size:var(--t2); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bal-track{ position:relative; height:6px; background:var(--sunken); border-radius:999px; overflow:hidden; }
.bal-fill{ position:absolute; top:0; bottom:0; border-radius:999px; transition:width .3s ease; }
.bal-fill.pos{ background:var(--credit); }
.bal-fill.neg{ background:var(--debit); }
.bal-row .b-amt{
  font-variant-numeric:tabular-nums; font-weight:650; font-size:var(--t2);
  text-align:right; white-space:nowrap; color:var(--credit);
}
.bal-row .b-amt.neg{ color:var(--debit); }
.bal-legend{ display:flex; gap:18px; margin-top:var(--s3); font-size:var(--t1); color:var(--muted); }
.bal-legend .dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.bal-legend .dot.pos{ background:var(--credit); }
.bal-legend .dot.neg{ background:var(--debit); }

/* ==========================================================================
   8. THE SETTLEMENT — the signature artifact
   ========================================================================== */
.settle-card{
  background:var(--invert-bg); color:var(--invert-ink);
  border-radius:var(--r-lg); padding:var(--s5);
  box-shadow:var(--shadow);
}
.settle-card .s-head{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:var(--s2); }
.settle-card h3{ font-size:var(--t4); font-weight:700; letter-spacing:-0.02em; }
.settle-card .s-count{ font-size:var(--t1); color:var(--invert-muted); font-weight:600; }
.settle-card .info-tip{
  border-color:var(--invert-line); background:transparent; color:var(--invert-muted);
}
.settle-card .info-tip:hover, .settle-card .info-tip[aria-expanded="true"]{
  color:var(--invert-ink); border-color:var(--invert-muted);
}
.settle-list{ list-style:none; margin:0; padding:0; }
.settle-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas: "who amt" "act amt";
  gap:2px 14px; align-items:center;
  padding:13px 0; border-bottom:1px solid var(--invert-line);
}
.settle-item:last-child{ border-bottom:0; }
.settle-item .s-n{ display:none; }
.settle-item .s-who-line{
  grid-area:who; display:flex; align-items:center; gap:8px; min-width:0;
  font-size:var(--t2); font-weight:600;
}
.settle-item .s-who{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.settle-item .s-arrow{ color:var(--invert-muted); width:15px; height:15px; flex:none; }
.settle-item .s-amt{
  grid-area:amt;
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum";
  font-weight:700; font-size:var(--t4); letter-spacing:-0.02em; white-space:nowrap;
  color:var(--invert-ink);
}
.settle-item .s-rec{
  grid-area:act; justify-self:start;
  appearance:none; display:inline-flex; align-items:center; gap:5px;
  border:1px solid var(--invert-line); background:transparent; color:var(--invert-credit);
  border-radius:999px; padding:4px 11px; margin-top:2px;
  font-size:12px; font-weight:700;
}
.settle-item .s-rec:hover{ background:var(--invert-credit); color:var(--invert-bg); border-color:var(--invert-credit); }
.settle-item .s-rec .icon{ width:12px; height:12px; }
@media (prefers-reduced-motion: no-preference){
  .settle-item{ animation:row-in .26s ease backwards; }
  .settle-item:nth-child(2){ animation-delay:.05s; }
  .settle-item:nth-child(3){ animation-delay:.10s; }
  .settle-item:nth-child(4){ animation-delay:.15s; }
  .settle-item:nth-child(5){ animation-delay:.20s; }
  .settle-item:nth-child(n+6){ animation-delay:.24s; }
}
.settle-total{
  display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  border-top:1px solid var(--invert-line); margin-top:2px; padding-top:12px;
  font-size:var(--t1); color:var(--invert-muted); font-weight:600;
}
.settle-total .num{ color:var(--invert-ink); font-size:var(--t2); }
.settle-brand{
  margin-top:var(--s3); font-size:12px; color:var(--invert-muted); font-weight:600;
}
.settle-hint{ margin-top:var(--s3); font-size:var(--t1); color:var(--invert-muted); }
.settle-hint em{ font-style:normal; color:var(--invert-credit); font-weight:700; }
.settle-empty{ font-size:var(--t2); color:var(--invert-muted); padding-block:var(--s2); }
.settle-done{
  display:inline-flex; gap:9px; align-items:center;
  padding:12px 18px; margin:6px 0 2px;
  border:2px solid var(--invert-credit); border-radius:var(--r-sm);
  transform:rotate(-2deg);
  font-weight:800; font-size:var(--t1); letter-spacing:.12em; text-transform:uppercase;
  color:var(--invert-credit);
}
.settle-done .icon{ width:15px; height:15px; }
.settle-foot{ display:flex; flex-wrap:wrap; gap:8px; margin-top:var(--s4); }
.settle-foot .btn{
  background:transparent; color:var(--invert-ink); border-color:var(--invert-line);
}
.settle-foot .btn:hover{ border-color:var(--invert-ink); }
.settle-foot .btn--primary{
  background:var(--invert-ink); color:var(--invert-bg); border-color:var(--invert-ink);
}

/* totals */
.totals-strip{
  display:flex; flex-wrap:wrap; gap:0 var(--s6); row-gap:var(--s3);
  border-block:1px solid var(--line);
  padding-block:var(--s3); margin-bottom:var(--s5);
}
.totals-strip .t-cell{ min-width:0; }
.totals-strip .k{
  font-size:11.5px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); display:block; font-weight:650;
}
.totals-strip .v{
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum";
  font-weight:700; font-size:var(--t4); letter-spacing:-0.02em;
}

/* data block */
.data-note{ font-size:var(--t1); color:var(--muted); margin-bottom:var(--s3); }
.data-actions{ display:flex; flex-wrap:wrap; gap:8px; }

/* ==========================================================================
   9. BILL + RENT
   ========================================================================== */
.calc-grid{ display:grid; grid-template-columns:minmax(0,5fr) minmax(0,4fr); gap:clamp(18px,3vw,30px); align-items:start; }
@media (max-width:880px){ .calc-grid{ grid-template-columns:1fr; } }
.calc-form{ display:grid; gap:var(--s4); }
.tip-chips{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.tip-chips .custom-tip{
  width:84px; text-align:right;
  font-variant-numeric:tabular-nums; font-weight:650;
  background:var(--sunken); border:1.5px solid transparent; border-radius:999px;
  color:var(--ink); padding:7px 13px; font-size:var(--t1);
}
.tip-chips .custom-tip:focus{ outline:none; border-color:var(--ink); background:var(--surface); }
.tip-chip{
  appearance:none; border:1px solid transparent; background:var(--sunken);
  color:var(--muted); border-radius:999px; padding:7px 14px; font-size:var(--t1); font-weight:650;
  font-variant-numeric:tabular-nums; min-height:34px;
}
.tip-chip[aria-pressed="true"]{ background:var(--ink); color:var(--paper); }
.tip-chip:not([aria-pressed="true"]):hover{ color:var(--ink); }

.result-card{
  background:var(--invert-bg); color:var(--invert-ink);
  border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow);
}
.result-card .r-main{ padding:var(--s5) var(--s5) var(--s4); border-bottom:1px solid var(--invert-line); }
.result-card .r-label{
  font-size:11.5px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--invert-muted); font-weight:650;
}
.result-card .r-big{
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum";
  font-weight:750; font-size:clamp(32px,5vw,42px); letter-spacing:-0.03em; margin-top:6px;
}
@media (prefers-reduced-motion: no-preference){
  .result-card .r-big{ animation:num-in .18s ease; }
}
@keyframes num-in{ from{ opacity:.35; transform:translateY(3px); } }
.result-card .r-big .per{ font-size:var(--t2); color:var(--invert-muted); font-weight:600; letter-spacing:0; }
.result-card .r-note{ font-size:var(--t1); color:var(--invert-muted); margin-top:10px; }
.result-rows{ list-style:none; margin:0; padding:10px 0 6px; }
.result-rows li{
  display:flex; justify-content:space-between; gap:12px;
  padding:7px var(--s5); font-size:var(--t2); align-items:baseline;
}
.result-rows li .rk{ color:var(--invert-muted); min-width:0; }
.result-rows li .rv{ font-variant-numeric:tabular-nums; font-weight:650; white-space:nowrap; }
.result-rows li.is-total{ margin-top:8px; padding-top:12px; font-weight:700; border-top:1px solid var(--invert-line); }
.result-rows li.is-total .rk{ color:var(--invert-ink); }
.result-foot{ padding:var(--s4) var(--s5) var(--s5); display:flex; gap:8px; flex-wrap:wrap; }
.result-foot .btn{ background:var(--invert-ink); color:var(--invert-bg); border-color:var(--invert-ink); }

.rent-rows{ display:grid; gap:8px; }
.rent-row{ display:grid; grid-template-columns:minmax(0,1fr) 130px 34px; gap:8px; align-items:center; }
.rent-row input{ min-width:0; }
.rent-table{ width:100%; border-collapse:collapse; font-size:var(--t2); }
.rent-table th{
  font-size:11px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--invert-muted); text-align:left; padding:8px var(--s5);
  border-bottom:1px solid var(--invert-line); font-weight:650;
}
.rent-table th:not(:first-child), .rent-table td:not(:first-child){ text-align:right; }
.rent-table td{ padding:9px var(--s5); border-bottom:1px solid var(--invert-line); }
.rent-table tr:last-child td{ border-bottom:0; }
.rent-table .num{ font-variant-numeric:tabular-nums; font-weight:650; white-space:nowrap; }
.rent-table .delta-neg{ color:var(--invert-debit); }
.rent-table .delta-pos{ color:var(--invert-muted); }

/* ==========================================================================
   10. CONTENT SECTIONS — each its own form
   ========================================================================== */

/* how it settles: ghost numerals, no boxes */
.num-rows{ display:grid; gap:clamp(20px,3.5vw,34px); max-width:760px; }
.num-row{
  display:grid; grid-template-columns:clamp(56px,9vw,84px) minmax(0,1fr);
  gap:0 clamp(14px,3vw,26px); align-items:start;
}
.num-row .n{
  font-size:clamp(40px,7vw,64px); font-weight:750; line-height:.9;
  color:var(--line-2); letter-spacing:-0.04em;
  font-variant-numeric:tabular-nums;
}
.num-row h3{ font-size:var(--t3); margin-bottom:6px; padding-top:6px; }
.num-row p{ color:var(--muted); font-size:var(--t2); max-width:60ch; }
.num-row p code{
  font-family:inherit; font-variant-numeric:tabular-nums; font-weight:650;
  font-size:0.92em; background:var(--sunken); padding:1px 6px; border-radius:5px;
}

/* methods: definition list */
.method-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:clamp(20px,3vw,32px) clamp(24px,4vw,44px); max-width:960px;
}
.method-card{ border-top:2px solid var(--ink); padding-top:var(--s3); }
.method-card .m-code{ display:none; }
.method-card h3{ font-size:var(--t3); }
.method-card p{ color:var(--muted); font-size:var(--t2); margin-top:8px; }
.method-card .m-ex{
  font-variant-numeric:tabular-nums; font-weight:650; font-size:var(--t1);
  color:var(--faint); margin-top:10px;
}

/* comparison */
.compare-wrap{ overflow-x:auto; }
.compare{ width:100%; border-collapse:collapse; font-size:var(--t2); min-width:560px; }
.compare th, .compare td{ padding:12px 16px 12px 0; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.compare thead th{
  font-size:11px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); font-weight:700; border-bottom:1px solid var(--line-2);
}
.compare tbody tr:last-child td{ border-bottom:0; }
.compare td:first-child{ color:var(--muted); font-weight:600; }
.compare .good{ font-weight:650; color:var(--ink); }
.compare .good::before{ content:"✓ "; color:var(--credit); font-weight:700; }
.compare-note{ font-size:var(--t1); color:var(--faint); margin-top:var(--s3); max-width:72ch; }

/* privacy: statement + diagram */
.privacy-grid{
  display:grid; grid-template-columns:minmax(0,6fr) minmax(300px,5fr);
  gap:clamp(24px,5vw,56px); align-items:center;
}
@media (max-width:880px){ .privacy-grid{ grid-template-columns:1fr; } }
.privacy-box{ max-width:56ch; }
.privacy-box h3{ font-size:var(--t4); }
.privacy-box p{ color:var(--muted); margin-top:var(--s3); font-size:var(--t2); }
.privacy-box .p-terms{ margin-top:var(--s4); display:flex; flex-wrap:wrap; gap:8px; }
.p-term{
  font-size:var(--t1); font-weight:600;
  border:1px solid var(--line-2); border-radius:999px;
  padding:5px 12px; color:var(--muted);
}
.privacy-diagram{ width:100%; height:auto; }
.privacy-diagram .box{ fill:var(--surface); stroke:var(--ink); stroke-width:1.5; }
.privacy-diagram .ghost{ fill:none; stroke:var(--line-2); stroke-width:1.5; stroke-dasharray:5 5; }
.privacy-diagram .t{ font-family:var(--font); font-size:13px; font-weight:650; fill:var(--ink); }
.privacy-diagram .tm{ font-family:var(--font); font-size:11.5px; font-weight:600; fill:var(--muted); }
.privacy-diagram .tg{ font-family:var(--font); font-size:11.5px; font-weight:600; fill:var(--faint); }
.privacy-diagram .cross{ stroke:var(--debit); stroke-width:2.2; }
.privacy-diagram .arrow{ stroke:var(--line-2); stroke-width:1.5; stroke-dasharray:5 5; }

/* faq */
.faq{ display:grid; gap:0; max-width:760px; }
.faq details{ border-bottom:1px solid var(--line); }
.faq details:first-child{ border-top:1px solid var(--line); }
.faq summary{
  cursor:pointer; padding:16px 2px; font-weight:600; font-size:var(--t3);
  list-style:none; display:flex; align-items:center; gap:14px;
}
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{
  content:"+"; margin-left:auto; color:var(--faint); font-weight:600; font-size:20px;
  flex:none; width:20px; text-align:center;
}
.faq details[open] summary::after{ content:"–"; }
.faq .faq-a{ padding:0 2px 18px; color:var(--muted); font-size:var(--t2); max-width:66ch; }

/* partner */
.partner-slot{
  border:1px solid var(--line); border-radius:var(--r-md);
  padding:var(--s4) var(--s5); display:flex; gap:14px; align-items:center; flex-wrap:wrap;
  margin-top:var(--s6);
}
.partner-slot .p-tag{
  font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--faint); border:1px solid var(--line-2); border-radius:5px; padding:3px 8px;
  flex:none; font-weight:700;
}
.partner-slot p{ font-size:var(--t1); color:var(--muted); flex:1 1 320px; }
.partner-slot a{ font-weight:650; color:var(--ink); }

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
.site-footer{ border-top:1px solid var(--line); background:var(--paper); }
.site-footer .container{
  padding-block:var(--s7) var(--s6);
  display:flex; flex-wrap:wrap; gap:var(--s5) var(--s7); align-items:flex-start;
}
.foot-brand{ display:flex; flex-direction:column; gap:10px; max-width:320px; }
.foot-brand .brand{ font-size:var(--t3); }
.foot-brand p{ font-size:var(--t1); color:var(--muted); }
.foot-col{ display:flex; flex-direction:column; gap:8px; font-size:var(--t2); }
.foot-col .fc-h{
  font-size:11.5px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); font-weight:700; margin-bottom:2px;
}
.foot-col a{ color:var(--muted); text-decoration:none; }
.foot-col a:hover{ color:var(--ink); text-decoration:underline; }
.foot-meta{
  width:100%; border-top:1px solid var(--line); margin-top:var(--s2); padding-top:var(--s4);
  display:flex; flex-wrap:wrap; gap:10px 24px;
  font-size:var(--t1); color:var(--faint);
}
.foot-meta .net{ color:var(--muted); }

/* ==========================================================================
   12. TOAST / DIALOG / IMPORT / STEPS / TIPS
   ========================================================================== */
.toast-region{ position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:200; display:grid; gap:8px; width:min(92vw,430px); }
.toast{
  background:var(--ink); color:var(--paper);
  border-radius:var(--r-md);
  padding:12px 16px; font-size:var(--t2); font-weight:600; box-shadow:var(--shadow);
  display:flex; align-items:center; gap:12px;
  animation:toast-in .2s ease;
}
.toast .t-undo{
  margin-left:auto; appearance:none; border:1px solid color-mix(in srgb, var(--paper) 40%, transparent);
  background:transparent; color:var(--paper); border-radius:7px;
  padding:4px 10px; font-size:12.5px; font-weight:700;
}
@supports not (border-color: color-mix(in srgb, red 40%, transparent)){
  .toast .t-undo{ border-color:var(--paper); }
}
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px);} }

.import-banner{
  border:1px solid var(--line); border-left:3px solid var(--credit);
  background:var(--surface);
  border-radius:var(--r-md); padding:var(--s4) var(--s5); margin-bottom:var(--s5);
  display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; box-shadow:var(--shadow);
}
.import-banner .ib-txt{ flex:1 1 260px; font-size:var(--t2); }
.import-banner .ib-txt strong{ font-weight:700; }
.import-banner .ib-txt .mono{ font-size:var(--t1); color:var(--muted); font-weight:600; }

dialog.confirm{
  border:1px solid var(--line-2);
  border-radius:var(--r-md); background:var(--surface);
  color:var(--ink); padding:var(--s5); max-width:400px; width:calc(100vw - 48px); box-shadow:var(--shadow);
}
dialog.confirm::backdrop{ background:rgba(22,26,23,.5); }
dialog.confirm h3{ font-size:var(--t3); margin-bottom:8px; }
dialog.confirm p{ color:var(--muted); font-size:var(--t2); }
dialog.confirm .d-foot{ display:flex; gap:8px; justify-content:flex-end; margin-top:var(--s4); }

/* onboarding steps */
.steps-strip{
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px;
  background:var(--sunken); border-radius:var(--r-md);
  padding:8px 10px; margin-bottom:var(--s5);
}
.step-cell{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px; border-radius:7px; min-width:0;
}
.step-cell .sc-n{
  font-variant-numeric:tabular-nums; font-size:var(--t1); font-weight:700; color:var(--faint);
}
.step-cell .sc-t{ font-size:var(--t1); font-weight:600; color:var(--muted); white-space:nowrap; }
.step-cell .sc-d{ display:none; }
.step-cell.is-current{ background:var(--surface); box-shadow:0 1px 2px rgba(22,26,23,.08); }
.step-cell.is-current .sc-n, .step-cell.is-current .sc-t{ color:var(--ink); }
.step-cell.is-done .sc-n{ color:var(--credit); }
.step-cell.is-done .sc-t{ text-decoration:line-through; text-decoration-color:var(--line-2); }
.steps-dismiss{ margin-left:auto; white-space:nowrap; }

/* info tips */
.tip-wrap{ position:relative; display:inline-flex; }
.info-tip{
  appearance:none; border:1px solid var(--line-2); background:transparent;
  color:var(--muted); width:20px; height:20px; border-radius:50%;
  font-size:12px; font-weight:700; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; padding:0;
}
.info-tip:hover, .info-tip[aria-expanded="true"]{ color:var(--ink); border-color:var(--ink); }
.tip-pop{
  position:absolute; top:calc(100% + 8px); left:-8px; z-index:30;
  width:min(280px, 76vw);
  background:var(--ink); color:var(--paper);
  border-radius:var(--r-sm); padding:11px 13px;
  font-size:var(--t1); font-weight:500; line-height:1.5; box-shadow:var(--shadow);
}
.settle-card .tip-pop{ background:var(--invert-ink); color:var(--invert-bg); }
.tip-pop[hidden]{ display:none; }

/* ==========================================================================
   13. PRINT — the settlement statement
   ========================================================================== */
@media print{
  .site-header, .hero, .site-footer, .tool-tabs, .exp-form, .people-add,
  .split-actions, .settle-foot, .result-foot, .toast-region, .partner-slot,
  .section--content, .import-banner, .theme-toggle, .exp-item .e-act,
  .block-head .tail, .empty-note button, .steps-strip, .info-tip, .tip-pop,
  .data-actions, .data-note, .s-rec{ display:none !important; }
  body{ background:#fff; color:#000; }
  .tool-shell{ border:0; box-shadow:none; }
  .settle-card, .result-card{
    background:#fff !important; color:#000 !important;
    border:1.5px solid #000; box-shadow:none;
  }
  .settle-item .s-amt, .settle-card h3{ color:#000 !important; }
  .settle-item{ border-bottom-color:#ccc; }
  a[href]::after{ content:""; }
}
