/* ============================================================
   Property division worksheet
   Palette: engineering paper + two party colours (petrol / heather).
   The one flourish is the balance beam; everything else stays quiet.
   ============================================================ */

:root{
  --paper:      #EDEEE9;
  --surface:    #FBFBF9;
  --surface-2:  #F4F5F1;
  --ink:        #171B19;
  --ink-2:      #585F5A;
  --ink-3:      #8B918C;
  --rule:       #DCDED7;
  --rule-2:     #C6C9C0;
  --you:        #1E4B44;
  --you-tint:   #DDE7E4;
  --her:        #6A5788;
  --her-tint:   #E4DFEC;
  --warn:       #A63A2A;
  --shadow:     0 1px 2px rgba(23,27,25,.05), 0 8px 24px -18px rgba(23,27,25,.35);

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Fraunces", ui-serif, Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}

@media (prefers-color-scheme: dark){
  :root{
    --paper:     #121513;
    --surface:   #191D1B;
    --surface-2: #202523;
    --ink:       #E7EAE6;
    --ink-2:     #A2A9A2;
    --ink-3:     #767D77;
    --rule:      #2B312D;
    --rule-2:    #3C433E;
    --you:       #63BEA9;
    --you-tint:  #1D2E2B;
    --her:       #AC97D4;
    --her-tint:  #272438;
    --warn:      #E4775F;
    --shadow:    0 1px 2px rgba(0,0,0,.35), 0 10px 28px -20px rgba(0,0,0,.9);
  }
}

*, *::before, *::after{ box-sizing:border-box; }

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:450 15px/1.55 var(--sans);
  font-feature-settings:"cv05" 1;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3{ margin:0; font-weight:500; }

button{ font:inherit; color:inherit; cursor:pointer; }

input{ font:inherit; color:inherit; }

:focus-visible{
  outline:2px solid var(--you);
  outline-offset:2px;
  border-radius:2px;
}

code{ font:500 .92em var(--mono); }

/* ---------- masthead ---------- */

.masthead{
  border-bottom:1px solid var(--rule);
  background:var(--surface);
}
.masthead__inner{
  max-width:1420px; margin:0 auto;
  padding:clamp(28px,5vw,52px) var(--gutter) clamp(22px,3vw,30px);
}
.eyebrow{
  margin:0 0 14px;
  font:500 11px/1 var(--mono);
  letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-3);
}
.masthead h1{
  font-family:var(--display);
  font-optical-sizing:auto;
  font-size:clamp(32px,5.2vw,54px);
  font-weight:500;
  line-height:1.02;
  letter-spacing:-.015em;
  max-width:16ch;
}
.lede{
  margin:14px 0 0; max-width:60ch;
  color:var(--ink-2); font-size:15.5px;
}
.masthead__tools{ display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }

.btn{
  border:1px solid var(--rule-2);
  background:var(--surface);
  color:var(--ink);
  padding:7px 13px;
  border-radius:var(--radius);
  font-size:13px; font-weight:500;
  transition:border-color .12s, background .12s;
}
.btn:hover{ border-color:var(--you); background:var(--you-tint); }
.btn--quiet{ border-color:transparent; color:var(--ink-2); }
.btn--quiet:hover{ color:var(--warn); background:transparent; border-color:var(--warn); }
.btn--add{
  border-style:dashed; color:var(--ink-2);
  width:100%; margin-top:10px; padding:9px;
}

/* ---------- shell ---------- */

.shell{
  max-width:1420px; margin:0 auto;
  padding:clamp(20px,3vw,34px) var(--gutter) 80px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 392px;
  gap:clamp(20px,2.4vw,34px);
  align-items:start;
}
.col-inputs{ min-width:0; display:flex; flex-direction:column; gap:clamp(16px,2vw,22px); }

/* ---------- panels ---------- */

.panel{
  background:var(--surface);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.panel__head{
  display:flex; align-items:center; gap:10px;
  padding:15px 20px;
  border-bottom:1px solid var(--rule);
}
.panel__head h2{
  font-family:var(--display);
  font-size:19px; font-weight:500; letter-spacing:-.01em;
}
.panel__total{
  margin-left:auto;
  font:500 13px/1 var(--mono);
  color:var(--ink-2);
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.panel__body{ padding:18px 20px 20px; }
.panel__note{
  margin:0 0 18px; max-width:70ch;
  color:var(--ink-2); font-size:13.5px;
}
.panel--aside{ background:var(--surface-2); }

.tag{
  font:500 10px/1 var(--mono);
  letter-spacing:.1em; text-transform:uppercase;
  padding:4px 7px; border-radius:2px;
  border:1px solid currentColor;
}
.tag--pre{ color:var(--her); }
.tag--post{ color:var(--you); }
.tag--flow{ color:var(--ink-3); }

/* ---------- fields ---------- */

.field-grid{ display:grid; gap:16px 18px; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.field-grid--2{ grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); margin-top:18px; }
.field-grid--4{ grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); margin-top:4px; }
.field{ min-width:0; }
.field__label{
  display:block; margin-bottom:6px;
  font:500 11px/1.3 var(--mono);
  letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-3);
}
.field__hint{ margin:7px 0 0; font-size:12.5px; line-height:1.45; color:var(--ink-3); }
.field__hint--block{ margin:4px 0 14px; max-width:66ch; }

.inline-num{
  display:flex; align-items:center;
  border:1px solid var(--rule-2);
  border-radius:var(--radius);
  background:var(--paper);
  transition:border-color .12s;
}
.inline-num:focus-within{ border-color:var(--you); }
.inline-num .num-in{
  flex:1 1 auto; min-width:0;
  border:0; background:none; outline:none;
  padding:8px 10px;
  font:500 14px/1 var(--mono);
  font-variant-numeric:tabular-nums;
  text-align:right;
}
.inline-num--lg .num-in{ font-size:17px; padding:10px 12px; }
.unit{ padding:0 10px 0 0; font:400 12px/1 var(--mono); color:var(--ink-3); }
.unit--pre{ padding:0 0 0 10px; }

.seg{
  display:inline-flex;
  border:1px solid var(--rule-2);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--paper);
}
.seg button{
  border:0; background:none;
  padding:7px 14px;
  font-size:13px; font-weight:500;
  color:var(--ink-2);
  transition:background .12s, color .12s;
}
.seg button + button{ border-left:1px solid var(--rule-2); }
.seg button:hover{ background:var(--surface-2); }
.seg button.on{ background:var(--you); color:var(--surface); }
.seg--wide{ display:flex; width:100%; }
.seg--wide button{ flex:1; }
#houseSeg{ margin-bottom:4px; }

.preset-row{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.chip{
  border:1px solid var(--rule-2); background:var(--paper);
  padding:5px 10px; border-radius:99px;
  font-size:12.5px; color:var(--ink-2);
}
.chip:hover{ border-color:var(--you); color:var(--you); }

/* ---------- disclosure ---------- */

.disclose{
  margin-top:18px;
  border-top:1px solid var(--rule);
  padding-top:14px;
}
.disclose summary{
  cursor:pointer; list-style:none;
  display:flex; align-items:baseline; gap:10px;
  font:500 11px/1 var(--mono);
  letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-2);
  padding:4px 0;
}
.disclose summary::-webkit-details-marker{ display:none; }
.disclose summary::before{
  content:"+"; display:inline-block; width:12px;
  color:var(--ink-3); font-size:13px;
}
.disclose[open] summary::before{ content:"\2212"; }
.disclose__meta{
  margin-left:auto; text-transform:none; letter-spacing:0;
  color:var(--ink-3); font-variant-numeric:tabular-nums;
}

.mini-ledger{
  margin:14px 0 0; padding:12px 14px;
  background:var(--surface-2);
  border-radius:var(--radius);
  display:grid; grid-template-columns:1fr auto; gap:5px 16px;
  font:400 13px/1.4 var(--mono);
  font-variant-numeric:tabular-nums;
}
.mini-ledger dt{ color:var(--ink-2); }
.mini-ledger dd{ margin:0; text-align:right; }
.mini-ledger .strong dt, .mini-ledger .strong dd{ color:var(--ink); font-weight:600; }
.mini-ledger .rule{ grid-column:1/-1; height:1px; background:var(--rule-2); margin:3px 0; }

/* ---------- allocation rows ---------- */

.row{
  padding:15px 0;
  border-top:1px solid var(--rule);
}
.row:first-child{ border-top:0; padding-top:2px; }
.row.is-out{ opacity:.44; }

.row__head{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.row__label{
  flex:1 1 190px; min-width:0;
  font-size:14.5px; font-weight:500;
}
.row__label input{
  width:100%; border:0; border-bottom:1px dashed transparent;
  background:none; padding:2px 0; outline:none;
  font-size:14.5px; font-weight:500;
}
.row__label input:hover{ border-bottom-color:var(--rule-2); }
.row__label input:focus{ border-bottom-color:var(--you); }
.row__note{ display:block; margin-top:2px; font:400 12px/1.4 var(--sans); color:var(--ink-3); }
.row__amount{ flex:0 0 158px; }
.chk{
  display:inline-flex; align-items:center; gap:5px;
  font:400 11.5px/1 var(--mono); letter-spacing:.04em;
  color:var(--ink-3); white-space:nowrap; cursor:pointer;
}
.chk input{ accent-color:var(--you); margin:0; }

.row__ctl{ display:flex; align-items:center; gap:12px; margin-top:12px; }

input[type=range].alloc{
  -webkit-appearance:none; appearance:none;
  flex:1 1 auto; min-width:0;
  height:22px; margin:0;
  background:linear-gradient(to right,
    var(--you) 0 var(--fill), var(--her) var(--fill) 100%);
  border:1px solid var(--rule-2);
  border-radius:2px;
  cursor:ew-resize;
}
input[type=range].alloc::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:5px; height:30px;
  background:var(--ink);
  border:2px solid var(--surface);
  border-radius:1px;
  box-shadow:0 0 0 1px var(--ink);
}
input[type=range].alloc::-moz-range-track{ background:transparent; height:22px; }
input[type=range].alloc::-moz-range-thumb{
  width:5px; height:30px;
  background:var(--ink);
  border:2px solid var(--surface);
  border-radius:1px;
  box-shadow:0 0 0 1px var(--ink);
}
.row.neg input[type=range].alloc{
  background:linear-gradient(to right,
    var(--warn) 0 var(--fill), var(--her) var(--fill) 100%);
}

.mini{
  border:1px solid var(--rule-2); background:var(--paper);
  border-radius:var(--radius);
  padding:5px 9px;
  font:500 11px/1 var(--mono); letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-2);
  white-space:nowrap;
}
.mini:hover{ border-color:var(--you); color:var(--you); }

.row__read{
  display:flex; align-items:baseline; gap:10px;
  margin-top:9px;
  font:400 12.5px/1 var(--mono);
  font-variant-numeric:tabular-nums;
  color:var(--ink-3);
}
.row__read .pct{ margin-inline:auto; letter-spacing:.03em; }
.side{ display:inline-flex; align-items:baseline; gap:6px; }
.side b{ font-weight:600; }
.side--you{ color:var(--you); }
.side--her{ color:var(--her); }
.side input{
  width:96px; text-align:right; border:0; border-bottom:1px dashed var(--rule-2);
  background:none; outline:none; padding:1px 0;
  font:600 12.5px/1 var(--mono); font-variant-numeric:tabular-nums;
  color:inherit;
}
.side input:focus{ border-bottom-color:currentColor; }

/* ---------- chattels ---------- */

.chat-head, .chattel{
  display:grid;
  grid-template-columns:minmax(0,1fr) 130px auto auto 30px;
  gap:10px; align-items:center;
}
.chat-head{
  padding-bottom:8px; border-bottom:1px solid var(--rule-2);
  font:500 10.5px/1 var(--mono); letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-3);
}
.chat-head .num{ text-align:right; }
.chattel{
  padding:8px 0;
  border-bottom:1px solid var(--rule);
}
.chattel.is-out{ opacity:.44; }
.chattel input.cname{
  width:100%; border:0; border-bottom:1px dashed transparent;
  background:none; outline:none; padding:3px 0; font-size:14px;
}
.chattel input.cname:hover{ border-bottom-color:var(--rule-2); }
.chattel input.cname:focus{ border-bottom-color:var(--you); }
.chattel .seg button{ padding:5px 11px; font-size:12.5px; }
.chattel .seg button.on[data-who="her"]{ background:var(--her); }
.x{
  border:0; background:none; color:var(--ink-3);
  font-size:15px; line-height:1; padding:4px 6px; border-radius:var(--radius);
}
.x:hover{ color:var(--warn); background:var(--surface-2); }
.chat-foot{
  display:flex; align-items:center; gap:14px; margin-top:12px;
}
.chat-foot .btn--add{ width:auto; margin:0; flex:0 0 auto; }
#chattelSplit{
  margin-left:auto; text-align:right;
  font:400 12.5px/1.5 var(--mono); font-variant-numeric:tabular-nums;
  color:var(--ink-3);
}

/* ---------- support rows ---------- */

.support{
  display:grid; grid-template-columns:minmax(0,1fr) 130px 110px auto;
  gap:10px; align-items:end;
  padding:14px 0; border-top:1px solid var(--rule);
}
.support:first-child{ border-top:0; }
.support .seg button{ padding:7px 10px; font-size:12.5px; }

/* ---------- results rail ---------- */

.col-results{ min-width:0; }
.rail{
  position:sticky; top:18px;
  background:var(--surface);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.rail__eyebrow{
  margin:0 0 4px;
  font:500 10.5px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase;
  color:var(--ink-3);
}
.rail__scale{ padding:18px 20px 16px; border-bottom:1px solid var(--rule); }

/* the beam */
.scale{ position:relative; height:104px; margin:6px 0 2px; }
.scale__beam{
  position:absolute; left:6%; right:6%; top:30px; height:3px;
  background:var(--ink);
  transform:rotate(var(--tilt,0deg));
  transform-origin:50% 50%;
  transition:transform .35s cubic-bezier(.22,.9,.3,1);
}
.scale__beam::after{
  content:""; position:absolute; left:50%; top:50%;
  width:9px; height:9px; margin:-4.5px 0 0 -4.5px;
  background:var(--ink); border-radius:50%;
}
.pan{
  position:absolute; top:1px; width:0; height:0;
  transform:rotate(calc(-1 * var(--tilt,0deg)));
}
.pan--you{ left:0; }
.pan--her{ right:0; }
.pan i{
  position:absolute; left:-34px; top:0;
  width:68px; display:block;
  border-top:1px solid var(--ink-3);
}
.pan i::after{
  content:""; position:absolute; left:0; top:26px;
  width:68px; height:16px;
  border:1.5px solid currentColor;
  border-top:0;
  border-radius:0 0 26px 26px;
}
.pan i::before{
  content:""; position:absolute; left:50%; top:0;
  width:1px; height:26px; background:var(--ink-3);
}
.pan--you i{ color:var(--you); }
.pan--her i{ color:var(--her); }
.pan--you i::after{ background:var(--you-tint); }
.pan--her i::after{ background:var(--her-tint); }

.scale__post{
  position:absolute; left:50%; top:31px; bottom:14px; width:2px;
  margin-left:-1px; background:var(--rule-2);
}
.scale__fulcrum{
  position:absolute; left:50%; bottom:8px;
  width:0; height:0; margin-left:-11px;
  border-left:11px solid transparent;
  border-right:11px solid transparent;
  border-bottom:15px solid var(--ink-3);
}
.scale__fulcrum::after{
  content:""; position:absolute; left:-34px; top:15px;
  width:70px; height:2px; background:var(--ink-3);
}
.scale__legend{ display:flex; justify-content:space-between; gap:12px; margin-top:6px; }
.legend{ display:flex; flex-direction:column; gap:3px; }
.legend em{
  font:500 10.5px/1 var(--mono); letter-spacing:.08em; text-transform:uppercase;
  font-style:normal; color:var(--ink-3);
}
.legend b{ font:600 16px/1 var(--mono); font-variant-numeric:tabular-nums; }
.legend--you b{ color:var(--you); }
.legend--her{ text-align:right; }
.legend--her b{ color:var(--her); }

/* headline numbers */
.rail__headline{ border-bottom:1px solid var(--rule); }
.headline{
  padding:16px 20px;
  border-top:1px solid var(--rule);
}
.headline:first-child{ border-top:0; }
.headline__label{
  display:flex; align-items:baseline; gap:8px;
  font:500 10.5px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-3);
}
.headline__dir{
  margin-left:auto;
  font:500 10.5px/1 var(--mono); letter-spacing:.08em;
}
.headline--her .headline__dir{ color:var(--her); }
.headline--you .headline__dir{ color:var(--you); }
.headline--flat .headline__dir{ color:var(--ink-3); }
.headline__value{
  display:block; margin-top:7px;
  font-family:var(--display); font-optical-sizing:auto;
  font-size:clamp(28px,3.4vw,36px); font-weight:500;
  line-height:1; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
}
.headline--her .headline__dir{
  margin-left:auto;
  font:500 10.5px/1 var(--mono); letter-spacing:.08em;
}
.headline--her .headline__dir{ color:var(--her); }
.headline--you .headline__dir{ color:var(--you); }
.headline--flat .headline__dir{ color:var(--ink-3); }
.headline__value{ color:var(--her); }
.headline--you .headline__dir{
  margin-left:auto;
  font:500 10.5px/1 var(--mono); letter-spacing:.08em;
}
.headline--her .headline__dir{ color:var(--her); }
.headline--you .headline__dir{ color:var(--you); }
.headline--flat .headline__dir{ color:var(--ink-3); }
.headline__value{ color:var(--you); }
.headline--flat .headline__dir{
  margin-left:auto;
  font:500 10.5px/1 var(--mono); letter-spacing:.08em;
}
.headline--her .headline__dir{ color:var(--her); }
.headline--you .headline__dir{ color:var(--you); }
.headline--flat .headline__dir{ color:var(--ink-3); }
.headline__value{ color:var(--ink-2); }
.headline__sub{ margin:8px 0 0; font-size:12.5px; line-height:1.45; color:var(--ink-2); }

.rail__block{ padding:16px 20px; border-bottom:1px solid var(--rule); }
.rail__block:last-child{ border-bottom:0; }
.rail__block h3{
  font:500 10.5px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase;
  color:var(--ink-3); margin-bottom:12px;
}

.ledger{ font:400 12.5px/1 var(--mono); font-variant-numeric:tabular-nums; }
.ledger__row{
  display:grid; grid-template-columns:minmax(0,1fr) 82px 82px;
  gap:8px; padding:5px 0; align-items:baseline;
}
.ledger__row span:not(:first-child){ text-align:right; }
.ledger__row .lbl{
  font-family:var(--sans); font-size:13px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ledger__head{
  color:var(--ink-3); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase;
  border-bottom:1px solid var(--rule-2); padding-bottom:6px; margin-bottom:3px;
}
.ledger__head .you{ color:var(--you); }
.ledger__head .her{ color:var(--her); }
.ledger__sec{
  margin-top:12px; padding-top:8px; border-top:1px solid var(--rule);
  font:500 10.5px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-3);
}
.ledger__sec:first-child{ margin-top:0; border-top:0; padding-top:0; }
.ledger__row--total{
  border-top:1px solid var(--rule-2); margin-top:5px; padding-top:7px;
  font-weight:600;
}
.ledger__row--target{ color:var(--ink-3); }
.ledger__row--gap b{ font-weight:600; }
.ledger__row.dim{ color:var(--ink-3); }

.notes{ margin:0; padding:0; list-style:none; font-size:13px; line-height:1.5; }
.notes li{ padding:7px 0 7px 15px; position:relative; color:var(--ink-2); border-top:1px solid var(--rule); }
.notes li:first-child{ border-top:0; padding-top:0; }
.notes li::before{
  content:""; position:absolute; left:0; top:14px;
  width:5px; height:5px; border:1px solid var(--ink-3);
}
.notes li:first-child::before{ top:7px; }
.notes b{ font:600 13px var(--mono); font-variant-numeric:tabular-nums; color:var(--ink); }

/* ---------- disclaimer ---------- */

.disclaimer{
  border-top:1px solid var(--rule-2);
  padding-top:18px; margin-top:4px;
  font-size:12.5px; line-height:1.6; color:var(--ink-3);
  max-width:80ch;
}
.disclaimer p{ margin:0 0 8px; }
.disclaimer strong{ color:var(--ink-2); }
.disclaimer__meta{ font-size:12px; }

/* ---------- mobile summary bar ---------- */

.minibar{ display:none; }

@media (max-width:1080px){
  .shell{ grid-template-columns:minmax(0,1fr); }
  .col-results{ order:-1; }
  .rail{ position:static; }
  .minibar{
    display:flex; gap:18px; justify-content:center;
    position:fixed; left:0; right:0; bottom:0; z-index:20;
    padding:9px var(--gutter) calc(9px + env(safe-area-inset-bottom));
    background:var(--surface);
    border-top:1px solid var(--rule-2);
    font:500 12.5px/1.3 var(--mono); font-variant-numeric:tabular-nums;
    box-shadow:0 -6px 20px -16px rgba(0,0,0,.6);
  }
  .minibar span{ display:flex; flex-direction:column; gap:2px; text-align:center; }
  .minibar em{ font:400 9.5px/1 var(--mono); letter-spacing:.08em; text-transform:uppercase; font-style:normal; color:var(--ink-3); }
  body{ padding-bottom:64px; }
}

@media (max-width:640px){
  .chat-head{ display:none; }
  .chattel{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"name name" "val who" "ex del";
    padding:12px 0;
  }
  .chattel .cname-wrap{ grid-area:name; }
  .chattel .cval{ grid-area:val; }
  .chattel .cwho{ grid-area:who; justify-self:end; }
  .chattel .cex{ grid-area:ex; }
  .chattel .cdel{ grid-area:del; justify-self:end; }
  .support{ grid-template-columns:1fr 1fr; }
  .row__ctl{ flex-wrap:wrap; }
  .row__amount{ flex:1 1 120px; }
}

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

/* ---------- print ---------- */

@media print{
  :root{
    --paper:#fff; --surface:#fff; --surface-2:#fff;
    --ink:#000; --ink-2:#333; --ink-3:#555;
    --rule:#ccc; --rule-2:#999; --shadow:none;
  }
  body{ background:#fff; padding:0; }
  .masthead__tools, .btn, .mini, .x, .minibar{ display:none !important; }
  .shell{ grid-template-columns:1fr; padding-top:12px; }
  .col-results{ order:-1; break-inside:avoid; }
  .rail{ position:static; }
  .panel{ break-inside:avoid; box-shadow:none; }
  .disclose{ display:block; }
  .disclose > *:not(summary){ display:block !important; }
  input, .seg{ border-color:#999 !important; }
}

/* ---------- odds and ends ---------- */

.rname-static{ display:block; }
.num-in[readonly]{ color:var(--ink-2); cursor:default; }
.row__amount.inline-num:has(.num-in[readonly]){ background:var(--surface-2); border-style:dashed; }

.stot{ text-align:right; }
.stot__v{
  padding:8px 0;
  font:600 14px/1 var(--mono); font-variant-numeric:tabular-nums;
  color:var(--ink-2);
}

/* ============ INCOME, SUPPORT & BUYOUT ============ */

.panel--flow .panel__total{ font-variant-numeric:tabular-nums; }

.flow-pair{
  display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; margin-bottom:14px;
}
.flow-h{
  font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-3); margin:20px 0 10px; padding-top:14px; border-top:1px solid var(--rule);
}
.flow-h:first-of-type{ border-top:0; padding-top:0; }

.flow-range{
  -webkit-appearance:none; appearance:none; width:100%; height:20px;
  background:transparent; margin:6px 0 2px; cursor:pointer;
}
.flow-range::-webkit-slider-runnable-track{ height:4px; border-radius:2px; background:var(--rule); }
.flow-range::-moz-range-track{ height:4px; border-radius:2px; background:var(--rule); }
.flow-range::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:16px; height:16px; margin-top:-6px;
  border-radius:50%; background:var(--you); border:2px solid var(--surface);
  box-shadow:0 1px 3px rgba(0,0,0,.25);
}
.flow-range::-moz-range-thumb{
  width:16px; height:16px; border-radius:50%; background:var(--you);
  border:2px solid var(--surface); box-shadow:0 1px 3px rgba(0,0,0,.25);
}

/* The buyout slider is the decision this panel exists for, so it is the loud one. */
.field--hero{
  background:var(--surface-2); border:1px solid var(--rule);
  border-radius:8px; padding:14px 16px; margin:6px 0 14px;
}
.flow-range--hero{ height:26px; }
.flow-range--hero::-webkit-slider-runnable-track{ height:6px; border-radius:3px;
  background:linear-gradient(90deg,var(--her-tint),var(--you-tint)); }
.flow-range--hero::-moz-range-track{ height:6px; border-radius:3px;
  background:linear-gradient(90deg,var(--her-tint),var(--you-tint)); }
.flow-range--hero::-webkit-slider-thumb{ width:22px; height:22px; margin-top:-8px; }
.flow-range--hero::-moz-range-thumb{ width:22px; height:22px; }
.flow-ends{
  display:flex; justify-content:space-between; align-items:baseline;
  font-size:11.5px; color:var(--ink-3); margin-top:2px;
}
.flow-ends b{ color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }

.chk--block{ display:flex; margin:10px 0; }

.flow-cards{
  display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:18px;
}
.flow-card{ border:1px solid var(--rule); border-radius:8px; padding:12px 14px; }
.flow-card h4{
  margin:0 0 8px; font-size:11.5px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-3);
}
.flow-card--you{ background:var(--you-tint); border-color:var(--you); }
.flow-card--her{ background:var(--her-tint); border-color:var(--her); }
.flow-card .mini-ledger{ margin:0; }

.flow-verdict{
  margin:14px 0 0; padding:12px 14px; border-left:3px solid var(--you);
  background:var(--surface-2); font-size:13px; line-height:1.55; color:var(--ink-2);
}
.flow-verdict b{ color:var(--ink); }

@media (max-width: 760px){
  .flow-pair, .flow-cards{ grid-template-columns:1fr; }
}

/* ============ PARTNER NAMES ============ */
.names{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px;
}
.names__f{ display:flex; align-items:center; gap:7px; }
.names__f span{
  font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-3);
}
.names__f input{
  width:150px; padding:5px 8px; border:1px solid var(--rule); border-radius:5px;
  background:var(--surface); color:var(--ink); font:inherit; font-size:13px;
}
.names__f input:focus{ outline:none; border-color:var(--you); }
.names__v{ color:var(--ink-3); }
.names__hint{ font-size:11.5px; color:var(--ink-3); }
@media (max-width: 700px){ .names__hint{ flex-basis:100%; } }
