/* Build phases 6 to 10: Spending, Plan, Report, Home session flow, Coach tools. Tokens only (tokens.css). */

/* ---------- Spending: Budget ---------- */
.pass-bar { margin-bottom: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.pass-bar .pass-what { margin: 0; }
.month-step strong { font-size: 1rem; }
.gut-card h2 { font-size: 1.25rem; }
.gut-card .field.money { width: 200px !important; height: 48px; font-size: 1.25rem; }
.basics-grid { display: grid; gap: var(--s2); }
.basics-row { display: grid; grid-template-columns: 160px 150px 1fr; align-items: center; gap: var(--s3); }
.basics-name { font-weight: 700; }
.btn.small.from-rough { color: var(--text-2); border-color: var(--border-filled); font-weight: 600; }
.diff { font-weight: 700; white-space: nowrap; }
.diff.over { color: var(--debt); }
.diff.under { color: var(--good); }
.banner-inline.good { border-color: var(--good); }
.banner-inline.soft { border-color: var(--border-filled); font-weight: 500; }

/* ---------- Spending: Cash flow calendar ---------- */
.cal-head { margin-bottom: var(--s3); }
.cal-settings .field.money { width: 180px !important; }
.seg.multi button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.cal-grid { padding: var(--s2); margin-bottom: var(--s4); }
.cal-grid .dow, .cal-grid .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid .dow span { font-size: .8125rem; font-weight: 700; color: var(--text-2); padding: 4px 6px; }
.day { min-height: 118px; border: 1.5px solid var(--border-row); border-radius: var(--r-input); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--card); }
.day.blank { border: 0; background: transparent; }
.day.today { border: 2px solid var(--primary); }
.day.low { box-shadow: inset 0 -3px 0 var(--debt); }
.day-top { display: flex; align-items: center; justify-content: space-between; }
.day-n { font-weight: 700; font-size: .875rem; padding-left: 2px; }
.day-top .icon-btn { opacity: .55; width: 24px; height: 24px; }
.day:hover .day-top .icon-btn, .day-top .icon-btn:focus-visible { opacity: 1; }
.chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chip { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 3px; width: 100%; min-width: 0; padding: 2px 6px; border-radius: 8px; font-size: .75rem; font-weight: 600; cursor: pointer;
  background: color-mix(in srgb, var(--needs) 14%, transparent); color: var(--text); border: 1.5px solid transparent; }
.chip:hover { border-color: var(--border-input); }
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.chip .chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chip .chip-amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip svg.i { width: 12px; height: 12px; }
.chip.in { background: color-mix(in srgb, var(--income) 18%, transparent); }
.chip.save { background: color-mix(in srgb, var(--assets) 18%, transparent); }
.chip.maybe { background: transparent; border: 1.5px dashed var(--border-input); }
.chip.win { background: color-mix(in srgb, var(--goals) 18%, transparent); }
.chip.oncard { background: transparent; border: 1.5px solid var(--border-row); color: var(--text-2); }
.chip.done { box-shadow: inset 3px 0 0 var(--good); }
.chip.partial { box-shadow: inset 3px 0 0 var(--roughly); }
.chip.missed { opacity: .5; text-decoration: line-through; }
.chip.moved-away { opacity: .45; border: 1.5px dashed var(--border-row); }
.chip.guess { border-bottom: 2px dotted var(--border-input); }
.more-chips { all: unset; cursor: pointer; font-size: .75rem; font-weight: 700; color: var(--primary); padding: 0 6px; }
.day-bal { margin-top: auto; font-size: .75rem; font-weight: 700; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.day.low .day-bal, .lowtext { color: var(--debt); }
.cal-list { display: none; }
.list-day { padding: var(--s2) 0; border-bottom: 1px solid var(--border-row); }
.list-day-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.cal-list .chip { font-size: .875rem; padding: 6px 10px; }
.cal-chart { margin-top: var(--s4); }

/* ---------- Spending: Month-end close ---------- */
.close-list { display: flex; flex-direction: column; gap: var(--s3); }
.close-row.closed { opacity: .92; }
.close-month { font-size: 1.0625rem; min-width: 150px; }
.review { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.misses { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.miss { background: var(--bg); border-radius: 999px; padding: 4px 12px; }
.review-table td { height: 44px; }
.review-table td.use-plan { width: 1%; white-space: nowrap; padding-right: 12px; } /* batch 20: Same as plan sits right before the Actual box */
.review-table td.col-first { width: 60%; }
@media (max-width: 760px) { .review-table tr.row td.use-plan { width: auto; flex: 1 1 100%; order: 5; padding-right: 0; } .review-table tr.row td.use-plan:empty { display: none; } } /* on a phone it sits under the box */

/* ---------- Plan ---------- */
.fi-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.fi-big { font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.preset-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.preset-row .label { min-width: 120px; }
.solver { background: var(--bg); border-radius: var(--r-input); padding: var(--s3); }
.deals { display: grid; gap: var(--s2); }
.deal { display: grid; grid-template-columns: 150px 1fr; gap: var(--s3); align-items: center; }
.deal-opts { display: grid; grid-template-columns: repeat(auto-fill, 132px); gap: 6px; } /* batch 37: one track width, so the options line up down the rows (column check) */
.deal-opt { all: unset; box-sizing: border-box; cursor: pointer; border: 2px solid var(--border-input); border-radius: var(--r-button); padding: 4px 10px; font-size: .875rem; font-weight: 600; min-width: 92px; text-align: center; }
.deal-opt[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.deal-opt small { display: block; font-weight: 500; font-size: .75rem; opacity: .85; }
.deal-opt:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.mover { font-weight: 700; }
.slider-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.slider-row input[type="range"] { width: min(360px, 100%); accent-color: var(--primary); height: 28px; }
.ladder { display: grid; gap: var(--s2); }
.rung { display: grid; grid-template-columns: 120px 1fr 120px; gap: var(--s3); align-items: center; }
.rung-bar { height: 12px; border-radius: 6px; background: var(--computed); overflow: hidden; }
.rung-bar span { display: block; height: 100%; background: var(--goals); border-radius: 6px; }

/* ---------- Report ---------- */
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
/* Batch 40 (QUESTIONS 330): the cards this household cannot light, one quiet line each under the shelf. */
.not-for { margin: calc(-1 * var(--s2)) 0 var(--s4); }
.not-for p { margin: 2px 0; }
.metric a.metric-home { color: var(--text-2); text-decoration: none; }
.metric a.metric-home:hover { color: var(--primary); text-decoration: underline; }
.metric a.metric-home::after { content: ' ›'; }
.tab-list { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--s2) 0; }
.home-rows { display: grid; gap: 4px; }
.home-row { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-bottom: 1px solid var(--border-row); }
.home-row a { font-weight: 600; }
.one-pager { max-width: 920px; }
.one-pager .op-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); }
.one-pager textarea { width: 100%; min-height: 96px; border: 2px solid var(--border-input); border-radius: var(--r-input); background: var(--card); color: var(--text); font: inherit; padding: var(--s2); resize: vertical; }
.one-pager .disclaimer { color: var(--text-2); font-size: .875rem; margin-top: var(--s4); }
.op-list { margin: 0; padding-left: 1.2em; }
.op-list li { margin: 4px 0; }

/* ---------- Home (Phase 3: one screen) ---------- */
.session-strip { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); padding: var(--s3) var(--s4); }
.session-strip .who { font-weight: 800; font-size: 1.25rem; }
.session-strip .spacer { flex: 1; }
.time-left { font-weight: 700; font-size: 1.125rem; }
.path { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-bottom: var(--s3); }
.node { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; min-height: 68px; border: 2px solid var(--border-input); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); text-align: center; }
.node:hover { border-color: var(--border-filled); box-shadow: var(--shadow-lift); }
.node:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.node .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); color: var(--chip-text); font-weight: 800; font-size: .875rem; }
.node.done .n { background: var(--good); color: #fff; }
.node.current { border-color: var(--primary); }
.node.current .n { background: var(--primary); color: var(--on-primary); }
.node.open { background: color-mix(in srgb, var(--primary-light) 35%, var(--card)); border-color: var(--primary); }
.node .name { font-size: .75rem; font-weight: 600; line-height: 1.15; color: var(--text-2); }
.node.current .name, .node.open .name { color: var(--text); }
.session-card { margin-bottom: var(--s4); }
.session-card h2, .picture-card h2, .open-items h2 { margin: 0; }
.checklist { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.check-item { display: flex; align-items: center; gap: var(--s3); background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: var(--s3) var(--s4); border: 1.5px solid var(--border-row); }
.check-item .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border-input); display: grid; place-items: center; flex: none; }
.check-item input[type="checkbox"] { width: 26px; height: 26px; flex: none; accent-color: var(--primary); cursor: pointer; }
.check-item.done .box { background: var(--good); border-color: var(--good); color: #fff; }
.check-item .what { font-weight: 700; flex: 1; }
.check-item .auto { font-size: .75rem; color: var(--text-2); }
.picture-card { margin-bottom: var(--s4); }
.picture-card .bar-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.picture-card .pct { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
/* Batch 43 (M9Q): the certainty meter where the Picture % stood, the Picture % one slim line under it; Ask next one slim card. */
.picture-card .cert-label { font-weight: 600; }
.picture-card .cert-small .progress { flex: 0 1 160px; }
/* Batch 57: Answered and Solid, a slim bar split by level (no red; each part has its own fill so it reads without color, and the words sit under it). */
.picture-card .pic-words { font-weight: 600; }
.stack-bar { display: flex; flex: 0 1 200px; min-width: 120px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--computed); }
.stack-bar .seg { display: block; height: 100%; }
.stack-bar .seg + .seg, .stack-key .sw { box-shadow: inset 1px 0 0 var(--card); }
.seg.know, .sw.know { background: var(--good); }
.seg.statement, .sw.statement { background: color-mix(in srgb, var(--good) 55%, var(--card)); }
.seg.rough, .sw.rough { background: repeating-linear-gradient(135deg, var(--roughly) 0 3px, color-mix(in srgb, var(--roughly) 55%, var(--card)) 3px 6px); }
.seg.gut, .sw.gut { background: repeating-linear-gradient(90deg, var(--guess) 0 2px, color-mix(in srgb, var(--guess) 35%, var(--card)) 2px 5px); }
.seg.missing, .sw.missing { background: var(--computed); }
.stack-key { gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.stack-key .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border-row); }
@media (max-width: 600px) { .stack-bar { flex-basis: 100%; } }
.ask-next { margin-bottom: var(--s4); padding-top: 12px; padding-bottom: 12px; }
.ask-next .ask-top { gap: 10px; flex-wrap: wrap; align-items: center; }
.ask-next .ask-q { font-size: 1.0625rem; min-width: 0; }
.ask-next .ask-why { margin: 4px 0 0; }
.ask-next .ask-then { gap: 8px; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 600px) { .ask-next .ask-top > .spacer { display: none; } .ask-next .ask-top > .btn { flex-basis: 100%; justify-content: center; } }
.progress.wide { width: 260px; height: 12px; border-radius: 6px; }
.tag.pace-tag.ahead { background: var(--good); color: #fff; }
.tag.pace-tag.ontrack { background: var(--chip); color: var(--chip-text); }
.tag.pace-tag.catchup { background: var(--warn); color: #fff; }
.section-bars { display: grid; gap: 6px; margin-top: var(--s2); }
.section-bars .row-line { gap: 10px; }
.section-bars .progress { width: 140px; }
.next-things { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.thing { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.thing .gain { font-size: 1.5rem; font-weight: 800; color: var(--good); letter-spacing: -.02em; }
.thing .thing-name { font-weight: 700; font-size: 1.0625rem; }
.thing .btn { margin-top: auto; }
.metric .lock-why { white-space: normal; line-height: 1.35; }
.metric .lock-why a { font-weight: 600; }
.tag.confidence { height: auto; min-height: 24px; }
.fi-big .tag.confidence { vertical-align: middle; }
.open-items { margin-bottom: var(--s4); display: flex; flex-direction: column; gap: 6px; }
.open-row { display: grid; grid-template-columns: 150px 1fr auto; gap: var(--s3); align-items: center; padding: 6px 0; border-top: 1px solid var(--border-row); min-height: 36px; }
.open-row a { font-weight: 600; white-space: nowrap; }
.nw-time { margin-top: var(--s4); }
@media (max-width: 1279px) { .path { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .path { grid-template-columns: repeat(4, minmax(0, 1fr)); } .node .name { display: none; } .next-things { grid-template-columns: 1fr; } .open-row { grid-template-columns: 1fr auto; } .open-row .muted { grid-column: 1 / -1; grid-row: 2; } .progress.wide { width: 100%; } }

/* ---------- Coach tools ---------- */
.tool-list .row-line { padding: 6px 0; border-bottom: 1px solid var(--border-row); }
.tool-list .row-line:last-child { border-bottom: 0; }
.compare td, .compare th { padding: 6px 8px; }
.discovery { max-width: 760px; }
.discovery-grid { display: grid; grid-template-columns: 160px 1fr; gap: var(--s3); align-items: center; }
.discovery-grid .field { width: 100% !important; max-width: 360px; }
.discovery-grid .label:has(+ .why-chips) { align-self: start; padding-top: 8px; } /* batch 34: Goal and Why now sit level with their first row of chips */
textarea.notes-box { width: 100%; min-height: 90px; border: 2px solid var(--border-input); border-radius: var(--r-input); background: var(--card); color: var(--text); font: inherit; padding: var(--s2); resize: vertical; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-list { display: block; }
  .basics-row { grid-template-columns: 1fr 1fr; }
  .basics-row .muted { grid-column: 1 / -1; }
  .fi-card, .report-grid, .one-pager .op-grid { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .shelf .metric { min-width: 0; } .shelf .metric .btn.need { white-space: normal; height: auto; } /* batch 10: a locked card wraps at 390 */
  .deal { grid-template-columns: 1fr; }
  .rung { grid-template-columns: 90px 1fr 80px; }
  .discovery-grid { grid-template-columns: 1fr; }
  .month-step strong { min-width: 110px !important; }
}

@media print {
  .session-strip, .path, .pass-bar, .cal-head { display: none !important; }
  .one-pager textarea { border: 0; min-height: 0; }
}
.topbar .seg { flex-wrap: nowrap; }
.seg.multi { flex-wrap: wrap; }
.cal-head .more-wrap { margin-top: 10px; }
.cal-head .caret { text-align: left; white-space: normal; }
/* Fix pass 4: hit areas for the calendar chips and the top bar segments (these files load after app.css). */
.chip, .more-chips { min-height: 32px; }
.more-chips { display: inline-flex; align-items: center; }
.topbar .seg button { min-height: 32px; }
.day-top .icon-btn { width: 32px; height: 32px; }
/* The Home date box reads like the other boxes: same text, a muted hint when empty, a clear picker button. */
.field input[type="date"].no-date:not(:focus) { color: color-mix(in srgb, var(--text-2) 75%, transparent); }
.field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }

/* Reorganize pass: the Cash flow waterfall, one row, read left to right. */
.waterfall { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s2); margin-bottom: var(--s4); padding: var(--s3) var(--s4); }
.wf-step { display: flex; flex-direction: column; gap: 2px; padding: var(--s2); border-radius: var(--r-input); min-width: 0; }
.wf-step.total { background: color-mix(in srgb, var(--primary-light) 35%, transparent); }
.wf-num { font-size: 1.25rem; font-weight: 700; white-space: nowrap; display: flex; align-items: baseline; gap: 4px; }
.wf-sign { color: var(--text-2); font-weight: 600; }
.wf-step .label.metric-home { color: var(--text-2); text-decoration: none; }
.wf-step .label.metric-home:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 760px) { .waterfall { grid-template-columns: 1fr 1fr; } }
/* Enter once: lines that come from Debt or Protection, and the duplicate flag. */
table.rows tr.row.auto td { background: color-mix(in srgb, var(--debt) 6%, transparent); }
.auto-name { font-weight: 600; padding-left: var(--s2); }
.btn.small.from-btn { border-color: var(--border-filled); color: var(--text); font-weight: 600; }
button.tag.from-tag { border: 0; cursor: pointer; font: inherit; font-size: .8125rem; font-weight: 700; min-height: 32px; }
button.tag.from-tag:hover { filter: brightness(.95); text-decoration: underline; }
table.rows tr.row-note td { height: auto; padding: 6px var(--s3) 10px; background: color-mix(in srgb, var(--warn) 6%, transparent); }
table.rows tr.group-foot td { height: auto; padding: 4px var(--s3) 10px; } /* batch 35: one slim line under a group (Assets: set aside for taxes) */
/* Batch 35: the tips and shifts line on a Job row wraps under the name rather than widening the column; the cell is a
   grid whose room above the name grows with the line below it, so the name stays centered and level with the row. */
td.col-first > .inst-cell > .inst-link.work-line { white-space: normal; max-width: 230px; line-height: 1.25; }
@media (min-width: 761px) {
  td.col-first > .inst-cell:has(> .work-line) { display: grid; grid-template-rows: 1fr auto 1fr; }
  td.col-first > .inst-cell:has(> .work-line)::before { height: auto; }
}
.dup-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.dup-note .tag.warn { white-space: normal; height: auto; min-height: 24px; padding: 4px 10px; }
.reveal-card { margin-bottom: var(--s3); }
/* Polish item 8: the guided close's step indicator. */
.close-steps { list-style: none; display: flex; gap: var(--s2); padding: 0; margin: 0 0 var(--s2); flex-wrap: wrap; }
.close-steps button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 2px solid var(--border-input); border-radius: 999px; cursor: pointer; font-weight: 600; background: var(--card); }
.close-steps .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); font-size: .8125rem; font-weight: 700; }
.close-steps li.on button { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.close-steps li.on .n { background: var(--on-primary); color: var(--primary); }
.close-steps li.done .n { background: var(--good); color: #fff; }
.close-steps button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.close-nav { margin-top: var(--s3); }
.dup-q { font-weight: 700; }

/* Phase 3.5: Report › Statements. */
.statement-bar { margin-bottom: var(--s3); }
.statement { margin-bottom: var(--s3); }
.statement h2 { margin: 0 0 var(--s2); }
.st-head, .st-line, .st-group { display: grid; grid-template-columns: minmax(0, 1fr) 140px 140px 120px; gap: var(--s2); align-items: center; min-height: 36px; border-top: 1px solid var(--border-row); }
.st-head { border-top: 0; font-size: .8125rem; font-weight: 700; color: var(--text-2); min-height: 28px; }
.st-line.total, .st-group.total { font-weight: 700; border-top: 2px solid var(--border-row); }
.st-group > .more-wrap { grid-column: 1; }
.st-group .more-body { grid-column: 1 / -1; }
.st-records { display: grid; gap: 4px; padding: 4px 0 8px var(--s3); }
.st-record { display: grid; grid-template-columns: minmax(0, 1fr) 60px 140px; gap: var(--s2); font-size: .875rem; }
.tie-out { margin-bottom: var(--s4); display: flex; flex-direction: column; gap: 6px; }
.tie-out h2 { margin: 0; }
.tie-line { display: flex; align-items: center; gap: var(--s3); min-height: 32px; }
.tie-line > span:first-child { flex: 1; }
ul.find-days { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
@media (max-width: 760px) {
  .st-head, .st-line, .st-group { grid-template-columns: minmax(0, 1fr) 96px 0 84px; }
  .st-head > :nth-child(3), .st-line > :nth-child(3), .st-group > :nth-child(3) { visibility: hidden; }
}
@media print {
  body.print-statements .shell-page > :not(.statement):not(.tie-out), body.print-statements .report-this { display: none !important; }
  body.print-statements .statement { break-inside: avoid; margin-bottom: 8px; padding: 8px; }
}
.st-group { align-items: start; }
.st-group > .num { line-height: 36px; }
/* Batch 34: every group's Details button one width (DESIGN 1b), and rows that breathe (1c) */
.st-group > .more-wrap > button.caret { width: 100%; max-width: 260px; justify-content: space-between; }
.st-line, .st-group { padding: 3px 0; }
/* Phase 3.5: cash layers. */
.layers-card { display: flex; flex-direction: column; gap: var(--s3); }
.layer-list { display: grid; gap: 6px; }
.layer-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(80px, 1fr) auto auto auto; gap: var(--s3); align-items: center; padding: 6px 0; border-top: 1px solid var(--border-row); }
.layer-bar { height: 10px; border-radius: 5px; background: var(--computed); overflow: hidden; }
.layer-bar span { display: block; height: 100%; background: var(--assets); }
.layer-row.full .layer-bar span { background: var(--good); }
.sleep-row { gap: 8px; padding-top: 6px; border-top: 1px solid var(--border-row); } /* batch 36: the sleep-at-night number under the layers */
.sleep-row .sleep-label { margin: 0 auto 0 0; }
.layers-card > .more-wrap > .caret { width: 230px; box-sizing: border-box; justify-content: space-between; } /* batch 36: History, Income gaps and Backups, one width (DESIGN 1b) */
@media (max-width: 760px) { .layer-row { grid-template-columns: 1fr auto; } .layer-row .layer-bar { grid-column: 1 / -1; } }
/* Phase 3.5: Plan › FOO. */
.foo-path { margin-bottom: var(--s3); }
.foo-stops { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
.foo-stop { flex: 1 1 0; min-width: 84px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-top: 4px solid var(--border-row); border-radius: 4px; font-size: .8125rem; position: relative; }
.foo-stop.done { border-top-color: var(--good); }
.foo-stop.in-progress, .foo-stop.next { border-top-color: var(--goals); }
.foo-stop.here { background: color-mix(in srgb, var(--goals) 10%, transparent); }
.foo-here { font-weight: 700; color: var(--goals); }
.foo-n { font-weight: 800; color: var(--text-2); }
.foo-name { font-weight: 600; }
.foo-dates { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.foo-cols.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
.foo-steps { display: grid; gap: 6px; }
.foo-step { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: var(--s2) var(--s3); }
.foo-step.here { outline: 2px solid var(--goals); }
.foo-step-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-height: 36px; }
.foo-when { min-width: 72px; text-align: right; }
.foo-flag { margin: 4px 0; font-size: .875rem; padding: 4px 10px; border-left: 3px solid var(--goals); }
.foo-part { display: flex; justify-content: space-between; gap: var(--s3); font-size: .9375rem; }
.foo-original ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
@media (max-width: 760px) { .foo-stops { flex-direction: column; } .foo-stop { border-top: 0; border-left: 4px solid var(--border-row); } .foo-stop.done { border-left-color: var(--good); } .foo-stop.in-progress, .foo-stop.next { border-left-color: var(--goals); } .foo-cols.two { grid-template-columns: 1fr; } }
/* Phase 3.5: calendar markers and drag to move. */
.day-marks { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.day-mark { font-size: .6875rem; line-height: 1.2; padding: 1px 6px; border-left: 3px solid var(--goals); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-mark.close { border-left-color: var(--report, var(--text-2)); }
.day-mark.holiday { border-left-color: var(--needs); }
.day-mark.shabbat { border-left-color: var(--assets); }
.day.drop { outline: 2px dashed var(--goals); outline-offset: -2px; }
.chip[draggable="true"] { cursor: grab; -webkit-user-drag: element; } /* all: unset on .chip drops the browser default */
.chip[role="button"]:focus-visible { outline: 2px solid var(--focus, var(--goals)); outline-offset: 1px; }
.st-offtop { margin: 4px 0 10px; font-size: .9375rem; }

/* ---------- Scorecard (Phase 3, batch 2) and the holes on Home ---------- */
.hole-row, .ok-row { margin-bottom: var(--s3); }
.hole-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.hole-head .rank { font-weight: 800; color: var(--text-2); min-width: 32px; }
@media (max-width: 600px) { .hole-head > .row-line.coach-only { flex-basis: 100%; } } /* batch 34: on a phone the rating switch starts its own line on every card, so the switches line up */
.hole-name { font-size: 1.125rem; }
.hole-head .spacer, .hole-line .spacer, .holes-card .spacer { flex: 1; }
.hole-body { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: flex-start; margin-top: var(--s3); }
.hole-num { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.hole-num .amount { font-weight: 700; }
.reason { line-height: 1.35; }
.strong-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 6px var(--s3); border-top: 1px solid var(--border-row); min-height: 40px; }
.strong-row .reason { font-size: .875rem; }
.how-list { margin: 8px 0 0; padding-left: 1.2em; font-size: .9375rem; line-height: 1.4; }
.how-list li { margin: 4px 0; }
.holes-card { margin-bottom: var(--s4); }
.holes-list { display: grid; gap: 6px; margin-top: var(--s2); }
.hole-line { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border-row); min-height: 40px; }
.hole-line .rank { font-weight: 800; color: var(--text-2); }
.hole-line .gain { font-weight: 800; color: var(--good); }
.card.inner { box-shadow: none; border: 1.5px solid var(--border-row); }
@media (max-width: 760px) { .hole-body { gap: var(--s3); } .hole-num { min-width: 45%; } }

/* ---------- The agenda (Phase 3, batch 3): the panel on Home, the docked bar on every tab, the review gate ---------- */
.tracker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; background: var(--card); border-top: 2px solid var(--primary); box-shadow: 0 -2px 12px rgba(0,0,0,.12); padding: 6px var(--s5); max-height: 70vh; overflow: auto; }
.tracker[hidden] { display: none; }
.tracker-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-height: 36px; }
.tracker-head .spacer { flex: 1; }
.tracker-body { padding: 6px 0 8px; }
body:has(.tracker:not([hidden])) main.shell-page { padding-bottom: 72px; }
.agenda-head { display: flex; align-items: center; gap: var(--s2); margin: 6px 0 4px; }
.check-item.compact { padding: 6px var(--s3); }
.check-item .field { flex: none; }
.suggest-list { display: grid; gap: 6px; margin-top: 6px; }
.suggest-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--border-row); }
.review-list { display: grid; gap: 6px; }
.review-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border-row); min-height: 44px; }
.review-what { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.decide { display: inline-flex; gap: 6px; }
.fi-lines { gap: 2px; margin-top: 4px; }
.foo-step.locked { opacity: .85; }
.foo-lock { color: var(--text-2); font-size: .875rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
/* Batch 8: at phone width an agenda row stacks: the box and the words on one line, full width; its buttons wrap below. */
@media (max-width: 760px) {
  .check-item { flex-wrap: wrap; row-gap: 8px; }
  .check-item > div { flex: 1 1 calc(100% - 40px) !important; }
  .check-item .field { max-width: 100%; }
}
@media (max-width: 760px) { .tracker { bottom: 58px; padding: 6px 12px; } body:has(.tracker:not([hidden])) main.shell-page { padding-bottom: 120px; } }

/* The ladder (M75) */
.ladder-card { margin-bottom: var(--s4); }
.ladder-card .ladder-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.ladder-card .bar-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: 6px; }
.rungs { display: grid; gap: 4px; margin-top: var(--s2); }
.rung { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--border-row); min-height: 40px; }
.rung .box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-input); display: grid; place-items: center; flex: none; font-size: .8rem; }
.rung.marker .box { border-radius: 6px; }
.rung.won .box { background: var(--good); border-color: var(--good); color: #fff; }
.rung.day0 { min-height: 28px; padding: 2px 0; border-top: 0; }
.rung.day0 .box { width: 14px; height: 14px; margin: 0 4px; border-style: dashed; }
.rung .spacer { flex: 1; }

/* The person filter (F2) */
.person-bar { flex-wrap: wrap; }

/* Custom payoff order (F3): drag rows */
.drag-row { border: 1.5px solid var(--border-row); border-radius: 8px; padding: 6px 10px; background: var(--card); min-height: 44px; cursor: grab; }
.drag-row.dragging { opacity: .5; }
.drag-row.over { border-color: var(--primary); box-shadow: var(--shadow); }
.drag-row .drag-handle { color: var(--text-2); letter-spacing: -2px; }
.drag-row .rank { font-weight: 800; color: var(--text-2); min-width: 18px; }

/* Batch 5 (E): the per-bill share rows on About you › Home and shared bills. */
.shared-bill-row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; min-height: 44px; }
.shared-bill-row > label { min-width: 220px; }

/* Batch 6, priority 1: history arrows, arrive-and-highlight, counters */
.history-btns .icon-btn.tiny { min-width: 32px; min-height: 32px; }
.glow { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; animation: glowpulse 1.6s ease-in-out 2; }
@keyframes glowpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 92, 255, .45); } 50% { box-shadow: 0 0 0 8px rgba(31, 92, 255, 0); } }
.toast.arrive { bottom: auto; top: 72px; left: 50%; right: auto; transform: translateX(-50%); max-width: min(760px, calc(100vw - 32px)); flex-wrap: wrap; }
.count-btn { font-weight: 700; }
tr.row.left td.col-first { box-shadow: inset 3px 0 0 var(--warn); }
.only-left { font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; }

/* Batch 6, items 4 and 5: the slim path, the done line */
.path-slim { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: var(--s3); }
.path-slim .dot { all: unset; box-sizing: border-box; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-input); display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: var(--card); }
.path-slim .dot.done { background: var(--good); border-color: var(--good); color: #fff; }
.path-slim .dot.current, .path-slim .dot.open { border-color: var(--primary); color: var(--primary); }
.path-slim .dot:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.path-slim .link-line { width: 10px; height: 2px; background: var(--border-input); }
.path-slim .path-name { font-weight: 700; margin-left: 8px; }
.done-line { margin-bottom: 6px; white-space: normal; text-align: left; max-width: 100%; padding-top: 4px; padding-bottom: 4px; height: auto; } /* a long "N steps done: …" line wraps at phone width (no sideways scroll) */

/* Batch 6, items 13 to 26: institutions, one unit per table, no sideways scroll, no scroll inside scroll */
.inst-row { padding: 6px 0; border-top: 1px solid var(--border-row); }
.inst-here { margin: 6px 0 0 12px; padding: 6px 10px; border-left: 3px solid var(--border-row); }
.inst-cell { display: inline-flex; flex-direction: column; }
.inst-cell select, .inst-cell label.field { max-width: 100%; }
.shortcuts-link { font-weight: 600; }
table.rows input, table.rows select, table.rows label.field, table.rows .seg { max-width: 100%; }
table.rows th { white-space: normal; }
.section-title, tr.row, .glow, section.section { scroll-margin-top: 120px; } /* item 24: nothing lands under the sticky bars */
@media (max-width: 760px) {
  table.rows th { top: 44px; }
  table.rows { table-layout: fixed; }
  table.rows td, table.rows th { padding: 0 4px; overflow: hidden; }
  table.rows td.col-actions .actions { flex-wrap: wrap; }
  .inst-cell label.field, .inst-cell select { width: 100% !important; }
  .section-title, tr.row, .glow, section.section { scroll-margin-top: 60px; }
}

/* Batch 6, items 27 to 30: the calendar */
.chip { cursor: pointer; }
.chip .drag-handle { cursor: grab; color: var(--text-2); letter-spacing: -2px; padding-right: 2px; flex: none; }
body.cal-dragging, body.cal-dragging * { user-select: none !important; }
.chip.guess { border-bottom: 0; }
.chip .guess-badge { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .65rem; font-weight: 800; flex: none; }
.chip.spread { background: color-mix(in srgb, var(--needs, var(--primary)) 14%, transparent); border: 1.5px dashed var(--border-input); font-weight: 700; }
.day-totals { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .72rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.day-totals .tot { display: inline-flex; align-items: center; gap: 3px; }
.day-totals .dot, .filter-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); display: inline-block; }
.day-totals .tot.in .dot, .filter-chip.in .dot { background: var(--income); }
.day-totals .tot.out .dot, .filter-chip.out .dot { background: var(--needs, var(--primary)); }
.day-totals .tot.debt .dot { background: var(--debt); }
.day-totals .tot.save .dot, .filter-chip.save .dot { background: var(--assets); }
.filter-chip[aria-pressed="false"] { opacity: .55; }
.cal-list.force-list { display: block !important; }
.day { cursor: pointer; }
.cal-filters { padding: 0 var(--s2); }

/* Batch 6, items 31 to 33: FOO tiles with cards, partial bars, done steps folded */
.foo-stop { border-top: 4px solid var(--border-row); overflow: visible; }
.foo-stop .foo-fill { position: absolute; top: -4px; left: 0; height: 4px; background: var(--goals); border-radius: 2px; max-width: 100%; }
.foo-stop.done .foo-fill { background: var(--good); width: 100% !important; }
.foo-stop.locked .foo-fill, .foo-stop.off .foo-fill { background: var(--border-input); }
.foo-tile { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.foo-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.foo-card { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 20; width: 280px; background: var(--card); border: 1.5px solid var(--border-input); border-radius: var(--r-card); box-shadow: var(--shadow-lift); padding: 8px 10px; font-size: .8125rem; }
.foo-card p { margin: 4px 0 0; }
.foo-stop:hover .foo-card, .foo-stop:focus-within .foo-card { display: block; }
.foo-stop:last-child .foo-card, .foo-stop:nth-last-child(2) .foo-card { left: auto; right: 0; }
@media (max-width: 760px) { .foo-card { width: min(280px, 80vw); } }

/* Batch 7, item 7: the ladder's dollars beside its share */
.ladder-next .amounts { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ladder-next .bar-row { flex-wrap: wrap; } .ladder-next .amounts { flex-basis: 100%; } }

/* Batch 7, item 9: the parking lot pinned open as a slim column at the right edge (1280 and up; a popover below that) */
.parking-dock { position: fixed; top: 60px; right: 0; bottom: 0; width: 340px; z-index: 35; background: var(--card); border-left: 2px solid var(--border-row); box-shadow: var(--shadow-lift); padding: var(--s3) var(--s4); overflow: auto; }
.parking-dock[hidden] { display: none; }
body.parking-pinned main.shell-page, body.parking-pinned .banner { padding-right: 356px; }
body.parking-pinned .topbar { padding-right: 0; }
.parking-panel .notes { max-height: none; }
.parking-panel .notes li { flex-wrap: wrap; row-gap: 4px; }
.parking-panel .notes li .text { flex-basis: 100%; }
.parking-panel .notes li.filed .text { text-decoration: line-through; }
.parking-panel .notes li .tag { white-space: nowrap; }
@media (max-width: 1279px) { .parking-dock { display: none !important; } body.parking-pinned main.shell-page, body.parking-pinned .banner { padding-right: var(--s5); } }
@media (max-width: 760px) { body.parking-pinned main.shell-page, body.parking-pinned .banner { padding-right: 12px; } }

/* Batch 7, item 2: the End session preview shows real state, so a circle is a status, not a dead control */
.check-item.preview .box { border-style: dashed; }
.check-item.preview.done .box { border-style: solid; }

/* Batch 7, item 11: a card's first question in the row; the debt fields follow only on Carries */
.card-first .seg button { min-height: 32px; padding: 0 8px; font-size: .8125rem; }

/* Batch 8 (B8): the checkbox on every row is always there, slim; the section header has one; the bulk bar sticks to the bottom. */
.list-wrap .check-cell { display: table-cell; width: 24px; padding: 0 2px; }
.list-wrap .check-cell input[type="checkbox"] { width: 16px; height: 16px; }
table.rows tr.group td.check-cell { background: var(--bg); }
.bulk-host { position: sticky; top: auto; bottom: 0; z-index: 4; }
.bulk-bar { border-radius: 0; flex-wrap: wrap; border-top: 2px solid var(--border-row); }
/* Batch 8 (B10): the sticky header is solid; rows pass under it. */
table.rows th { background-color: var(--card); background-image: linear-gradient(var(--card), var(--card)); box-shadow: 0 2px 0 var(--border-row); z-index: 3; }
/* Batch 8 (B11): names wrap. */
label.field.name-field { height: auto; min-height: var(--row-input, 36px); align-items: stretch; }
textarea.name-box { field-sizing: content; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.3; padding: 6px 0; min-height: 24px; font: inherit; border: 0; background: transparent; color: inherit; width: 100%; }
table.rows td.col-line, table.rows td.col-first { white-space: normal; }
/* Batch 8 (B7): the period chip inside the amount. */
.per-chip { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 28px; padding: 0 6px; border-radius: var(--r-button); border: 1.5px solid var(--border-input); background: var(--card); color: var(--text-2); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.per-chip:hover, .per-chip:focus-visible { border-color: var(--primary); color: var(--text); }
/* Batch 8 (B5): Getting it (a clock) and the Will get it button in a row. */
.tag.getting { background: var(--chip); color: var(--chip-text); display: inline-flex; align-items: center; gap: 4px; }
.tag.getting .i, .later-btn .i, .will-get .i { width: 14px; height: 14px; }
.will-get { min-height: 28px; font-size: .75rem; padding: 0 8px; color: var(--text-2); }
.status-cell { white-space: nowrap; }
.cat-note { white-space: nowrap; }
.cat-lines .list { box-shadow: none; border: 1.5px solid var(--border-row); }
.cat-lines .section-title h2 { font-size: 1rem; }
/* Batch 8 (B5): on About you the per-field Will get it shows on hover or focus; one section button covers the rest. */
.profile-card .park-btns { opacity: 0; transition: opacity .15s ease; }
.profile-card .stack:hover .park-btns, .profile-card .stack:focus-within .park-btns, .profile-card .gate:hover .park-btns, .profile-card .gate:focus-within .park-btns, .profile-card .park-btns:focus-within { opacity: 1; }
@media (hover: none) { .profile-card .park-btns { opacity: 1; } }
/* Batch 8 (C12, C13, D181): What's missing as links under one heading; Back and Forward as real buttons; step 8 slim. */
.missing-head { font-size: .8125rem; font-weight: 700; color: var(--text-2); margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .02em; }
.missing-groups ul.missing { margin-bottom: 4px; }
a.missing-link { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.history-btns .btn { padding: 0 8px; min-width: 36px; }
.history-btns .btn .i { margin: 0; }
.foo-step.optional .foo-step-head { min-height: 32px; }
.foo-step.optional .foo-slim { margin: 2px 0 0 28px; }
/* Batch 8: the Will get it button keeps the debt table inside 1280: the clock alone when the screen is narrow. */
@media (max-width: 1300px) { .will-get { padding: 0 6px; } .will-get .will-get-text { display: none; } .payoff { min-width: 168px; } }
.status-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; } /* the Will get it button sits under the status, so the column never widens */
/* Batch 10: tap chips (a pressed one is filled and has a check), the side panel, faded typical amounts, the docked arrive bar. */
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--border-input); background: var(--card); color: var(--text); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 0 var(--border-row); }
.pick:hover { border-color: var(--primary); }
.pick:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pick[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.pick .i { width: 14px; height: 14px; }
.why-chip-wrap { display: inline-flex; align-items: center; gap: 2px; }
.star-btn { all: unset; box-sizing: border-box; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--border-input); background: var(--card); color: var(--amber, #B26A00); font-size: 1rem; cursor: pointer; }
.star-btn[aria-pressed="true"] { background: var(--amber, #B26A00); border-color: var(--amber, #B26A00); color: #fff; }
.star-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.why-field .label { font-weight: 700; }
.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-grid .pick { justify-content: center; padding: 4px 0; min-height: 32px; }
label.field.money.faded input::placeholder { color: var(--text-2); opacity: .55; font-style: italic; }
label.field.money.faded { border-style: dashed; }
.use-typical { white-space: nowrap; }
.typical-note { font-weight: 400; white-space: normal; }
.else-bucket label.field.money { width: 120px !important; }
.link-btn { all: unset; cursor: pointer; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.slim-note { display: flex; align-items: center; gap: 10px; padding: 6px 12px; margin: 0 0 8px; border-radius: var(--r-card); background: var(--computed); border: 1.5px solid var(--border-row); font-size: .875rem; }
.slim-note span { flex: 1; }
.side-panel { position: fixed; top: 60px; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 60; background: var(--card); color: var(--text); border-left: 2px solid var(--border-input); box-shadow: var(--shadow-lift); display: flex; flex-direction: column; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1.5px solid var(--border-row); }
.side-head h2 { flex: 1; margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.side-body { overflow: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.panel-sec h3 { margin: 0 0 8px; font-size: .9375rem; }
.timing-sentence { margin: 0; font-size: 1rem; }
.who-detail { padding-left: 4px; }
@media (max-width: 760px) {
  .side-panel { top: auto; left: 0; right: 0; width: auto; max-height: 82vh; border-left: 0; border-top: 2px solid var(--border-input); border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.arrive-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 12px; margin: 0 0 10px; border-radius: var(--r-card); background: var(--primary-dark); color: #fff; font-size: .875rem; }
.arrive-bar .btn { border-color: #fff; color: #fff; background: transparent; box-shadow: none; }
.arrive-bar .icon-btn { color: #fff; }
:root:not([data-theme="light"]) .arrive-bar { color: #E4E7EC; }
body.side-open main.shell-page, body.side-open .banner { padding-right: calc(min(440px, 100vw) + 16px); } /* batch 10: the inspector sits beside the page, never over it */
@media (max-width: 760px) { body.side-open main.shell-page { padding-right: 12px; } }


/* Batch 11 (item 5f): the institution in a row is a small link ("+ Add bank") that turns into a label once picked. */
.inst-link { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.inst-link.set { color: var(--text-2); text-decoration: none; font-weight: 600; }
.inst-link.set:hover { color: var(--primary); text-decoration: underline; }
.inst-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.inst-link { display: inline-flex; align-items: center; gap: 2px; }
.inst-link svg, .inst-link .icon { width: 12px; height: 12px; flex: none; }
/* Batch 11 (item 5a): the credit cards as one linked row on Debt. */
.cards-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 10px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--card); color: var(--text); text-decoration: none; min-height: 44px; flex-wrap: wrap; }
.cards-row:hover { border-color: var(--primary); }
.cards-row:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.cards-row .rank { font-weight: 700; color: var(--text-2); }
.cards-row .cards-row-go { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 700; }
.payoff-alone { display: block; margin-top: 2px; white-space: normal; line-height: 1.25; }
.apr-guess .field.pct input::placeholder { opacity: .55; }
.use-guess { white-space: nowrap; }
/* Batch 11 (item 3): the debt-free card on Home. Slim: one line of numbers, the chips, the milestones folded. */
.debt-hero { margin-bottom: var(--s4); padding: 12px 16px; border-left: 4px solid var(--primary); }
.debt-hero .hero-top { flex-wrap: wrap; row-gap: 8px; }
.debt-hero .hero-date { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.debt-hero .hero-date.hero-wide { font-size: 1rem; font-weight: 700; max-width: 260px; }
.debt-hero .hero-num { font-size: 1.0625rem; font-weight: 700; }
.debt-hero .hero-chips { gap: 6px; flex-wrap: wrap; }
.chip-btn { min-height: 34px; padding: 0 12px; border: 1.5px solid var(--primary); border-radius: 999px; background: var(--card); color: var(--primary); font: inherit; font-weight: 700; font-size: .875rem; cursor: pointer; }
.chip-btn:hover { background: var(--primary); color: var(--on-primary); }
.chip-btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.chip-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.chip-btn .chip-sub { font-weight: 500; }
.hero-then { margin: 4px 0 0; }
.foo-worth { margin: 4px 0 0 28px; color: var(--text); }
.debt-hero .hero-whatif { margin-top: 8px; flex-wrap: wrap; }
.hero-marks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-mark { display: inline-flex; align-items: center; gap: 6px; }
.hero-mark .box { width: 18px; height: 18px; border: 1.5px solid var(--border-input); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.hero-mark.done .box { background: var(--good); border-color: var(--good); color: #fff; }
.hero-mark.next span:nth-child(2) { font-weight: 700; }
@media (max-width: 760px) { .debt-hero .hero-top > .spacer { display: none; } }
/* Batch 11 (item 4): each FOO step's headline, then "Name · specifics", then "→ what you get". */
.foo-names { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.foo-names .foo-sub, .foo-names .foo-get { white-space: normal; line-height: 1.3; }
.foo-names .foo-get { color: var(--text-2); font-weight: 600; }
.foo-card .foo-sub { font-weight: 600; margin: 2px 0; }
.foo-card .foo-get { font-weight: 600; margin: 0 0 6px; }
/* Batch 11 (item 7): the save-more slider fills from its zero mark to the thumb. */
input.zero-slider { -webkit-appearance: none; appearance: none; background: transparent; height: 28px; }
input.zero-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background:
  linear-gradient(to right, transparent calc(var(--zero) - 1px), var(--text-2) calc(var(--zero) - 1px), var(--text-2) calc(var(--zero) + 1px), transparent calc(var(--zero) + 1px)) 0 -5px / 100% 16px no-repeat,
  linear-gradient(to right, var(--border-input) var(--lo), var(--primary) var(--lo), var(--primary) var(--hi), var(--border-input) var(--hi)); }
input.zero-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--primary); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--primary); cursor: pointer; }
input.zero-slider::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--border-input) var(--lo), var(--primary) var(--lo), var(--primary) var(--hi), var(--border-input) var(--hi)); }
input.zero-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 2px solid var(--card); cursor: pointer; }
input.zero-slider:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.compare td.how-cell { width: 40px; text-align: right; }
.compare td.how-cell [data-tip]:hover::after, .compare td.how-cell [data-tip]:focus-visible::after { left: auto; right: 0; transform: none; } /* batch 37: the last column's tip opens to the left, so it stays on screen (the overflow at 1440) */
/* batch 19: the guessed APR box is the same width as every other APR box, so the column lines up */
.use-guess { padding: 0 10px; }
/* Batch 11 (item 7): Current vs Proposed fits at phone width: the label takes its own line above the numbers. */
@media (max-width: 760px) {
  table.compare, table.compare tbody { display: block; width: 100%; }
  table.compare thead { display: none; }
  table.compare tr { display: grid; grid-template-columns: 1fr 1fr 1fr 36px; align-items: center; border-bottom: 1px solid var(--border-row); padding: 4px 0; }
  table.compare td { display: block; height: auto; border: 0; padding: 2px 4px; white-space: normal; overflow-wrap: anywhere; }
  table.compare td:first-child { grid-column: 1 / -1; font-weight: 700; }
  table.compare td.num { text-align: left; }
  table.compare td.num::before { display: block; font-size: .75rem; color: var(--text-2); font-weight: 600; }
  table.compare td:nth-child(2)::before { content: 'Current'; }
  table.compare td:nth-child(3)::before { content: 'Proposed'; }
  table.compare td:nth-child(4)::before { content: 'Difference'; }
}
/* The institution link sits under the name; the cell keeps equal room above the name, so every box in the row stays
   centered and level whether or not the name wraps. */
td.col-first > .inst-cell > .inst-link { white-space: nowrap; line-height: 1.1; padding: 0; min-height: 16px; }
td.col-first > .inst-cell:has(> .inst-link)::before { content: ''; display: block; height: 18px; }
.inst-cell > label.field.name-field { flex: none; height: auto !important; }
.inst-cell > label.field.name-field textarea.name-box { height: auto; }
/* Batch 12 (item 5): the gap card. Calm: the brand blue edge, never red. */
.gap-card { margin-bottom: var(--s4); padding: 12px 16px; border-left: 4px solid var(--primary); }
.gap-card .gap-head { font-size: 1.25rem; }
.gap-levers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.gap-lever { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1.4fr) auto minmax(90px, auto) 60px; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border-row); }
.gap-lever .gap-closes { font-weight: 700; text-align: right; }
@media (max-width: 700px) { .gap-lever { grid-template-columns: 1fr auto; } .gap-lever .gap-how { grid-column: 1 / -1; } }
/* Batch 12 (item 6): Your next 3 moves on the one-pager. */
.op-moves { margin: 4px 0 14px; }
.op-moves h3 { margin: 0 0 6px; }
.op-moves-list { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 1.0625rem; }
.op-moves-list a { color: var(--text); text-decoration-color: var(--primary); text-underline-offset: 3px; }
/* Batch 27: income by type (Tips and shifts on a Job row) */
.work-block .work-title { font-weight: 650; color: var(--text); display: block; margin-bottom: 4px; }
.work-block .work-group + .work-group { padding-top: 10px; border-top: 1px dashed var(--border-row); }
.work-block .month-taps { flex-wrap: wrap; }
.work-result .stack { gap: 2px; }
/* Batch 60 (QUESTIONS 422): each kind of night is its own slim box, its name taps on top, Copy and the bin at the end */
.work-night { border: 1px solid var(--border-row); border-radius: var(--r-input); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.work-night-head .spacer { flex: 1 1 auto; }
.work-night .form-grid { margin: 0; }

/* Batch 33 (QUESTIONS 288): the raise taps take two columns of a row's details; a phone's details are one column */
.raise-taps { grid-column: span 2; }
@media (max-width: 760px) { .raise-taps { grid-column: auto; } }
/* Batch 28: who sees this. A calm line under a marked row (a lock, the mark in words, where it does not show), and the
   one line a list or a page shows when it keeps rows from this viewer. Never a warning color. */
table.rows tr.row-note.seen-only td { background: none; padding-top: 0; }
.seen-line { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.85rem; color: var(--text-2); background: none; border: 0; padding: 2px 0; margin-right: 12px; }
button.seen-line { cursor: pointer; }
button.seen-line:hover .seen-word { text-decoration: underline; }
.seen-line svg { width: 14px; height: 14px; flex: none; }
.seen-line .seen-word { font-weight: 600; color: var(--text); }
.private-line { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.private-line svg { width: 14px; height: 14px; flex: none; }

/* Batch 49: About you › People (households of any size). One grid, so every row's boxes line up down the column. */
.people-table { display: grid; grid-template-columns: minmax(170px, 200px) minmax(0, 1fr) 96px minmax(110px, 180px) 40px; gap: 8px 12px; align-items: center; } /* batch 58: Born */
.people-row { display: contents; }
.people-head .label { padding-bottom: 2px; }
.people-sum { margin: 0; }
.split-block .picks { flex-wrap: wrap; }
.split-pcts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .people-table { grid-template-columns: minmax(0, 1fr) 40px; }
  .people-row > :nth-child(2), .people-row > :nth-child(3), .people-row > :nth-child(4) { grid-column: 1 / 2; }
  .people-head { display: none; }
}
.people-row .person-name { padding: 6px 0; }
/* Batch 58: the birth-year chip and the Taxes link sit at the start of their cells; the chip is one width down the column. */
.people-row .birth-chip { justify-self: start; min-width: 84px; justify-content: space-between; }
.people-row .tax-link { justify-self: start; }
.birth-pop .picks { flex-wrap: wrap; }
/* Batch 49: one width for the Owner chip down a table, so a short name (Dev) and a long one (Joint, Riley) leave the next column level. */
table.rows tr.row .owner-chip { min-width: 84px; justify-content: space-between; }
/* Batch 58: one adult's part of a shared row, on the slim line under it. */
tr.row-note .part-line { margin-right: 12px; }

/* Recalculating (Nov 25 2026): one calm card. Sapphire edge, no red, no amber: nothing here is a warning. */
.rc-card { margin-bottom: var(--s4); padding: 12px 16px; border-left: 4px solid var(--primary); }
.rc-card .rc-dates { display: grid; grid-template-columns: 170px 20px 130px 1fr; gap: 4px 16px; align-items: end; margin-top: 8px; }
.rc-card .rc-date { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.rc-card .rc-old { color: var(--text-2); font-weight: 600; }
.rc-card .rc-arrow { font-size: 1.2rem; color: var(--text-2); padding-bottom: 2px; }
.rc-card .rc-line { margin: 0; align-self: center; }
.rc-card .rc-turn { margin-top: 10px; align-items: center; flex-wrap: wrap; }
.rc-order { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 6px; }
.rc-order li { padding-left: 4px; }
.rc-order li > span { vertical-align: baseline; }
.rc-order .rc-name { font-weight: 600; display: inline-block; width: 300px; }
.rc-order .muted { display: inline-block; width: 110px; }
.rc-order .rc-paid { margin-left: 12px; }
.rc-script ul { margin: 4px 0; padding-left: 20px; }
.rc-letter .rc-quote { font-size: 1.1rem; margin: 6px 0 10px; font-style: italic; }
.rc-done .rc-done-head { font-size: 1.15rem; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chips .chip-btn { height: auto; min-height: 34px; padding: 6px 12px; text-align: left; white-space: normal; border-radius: 16px; }
.rc-area { width: 100%; height: auto; padding: 6px 8px; }
.rc-area textarea { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; resize: vertical; outline: none; }
/* Home › Exercises (run Finish everything partly built, Part 7): a page with no sub-tab of its own shows its title; the
   letter keeps its one title on the section head. */
.page-head.ex-head h1 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 1.5rem; }
[data-sec="ex:calm-letter"] .exercise > h3 { display: none; }
.ex-group { margin-top: var(--s4, 16px); }
.audit .audit-add { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; margin: 8px 0 12px; }
.audit .audit-add-btn { padding-top: 22px; }
.audit .audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.audit .audit-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) 90px 230px minmax(160px, 2fr) 36px; gap: 8px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-row); }
.audit .audit-cost { text-align: right; font-weight: 600; }
.audit .audit-repeats ul { margin: 4px 0 0; padding-left: 20px; }
@media (max-width: 720px) {
  .rc-card .rc-dates { grid-template-columns: 1fr 20px 1fr; }
  .rc-card .rc-line { grid-column: 1 / -1; }
  .rc-order .rc-name { width: auto; display: block; }
  .rc-order .muted { width: auto; }
  .rc-order .rc-paid { margin-left: 0; display: block; }
  .audit .audit-row { grid-template-columns: 1fr auto; }
  .audit .audit-row .seg, .audit .audit-later { grid-column: 1 / -1; }
}
/* The FI variants (run of Nov 25 2026): the views on Plan › Goals, the stress table, the pod. The FIRE statuses
   (run of Nov 27 2026): the markers on the FOO timeline and the status card on Home. */
.dest-card { display: flex; flex-direction: column; gap: var(--s3); }
.dest-what { margin: 0; }
.dest-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); align-items: start; }
.dest-fact { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.dest-num { font-size: 1.25rem; overflow-wrap: anywhere; }
.dest-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: flex-start; }
.dest-line { margin: 0; }
.dest-assumes { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 4px; }
.dest-fat { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dest-fat-row { display: grid; grid-template-columns: 150px 1fr; gap: var(--s3); align-items: center; }
.dest-fat-name { font-weight: 600; display: flex; flex-direction: column; }
.dest-fat-note { font-weight: 400; }
.dest-apart { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.dest-apart-body { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 8px; }
.coast-card.coast-below { border: 1px solid var(--border-row); }
.dest-card .picks, .dest-fat .picks { flex-wrap: wrap; }
table.rows.mini.dest-stress td.dest-cur { font-weight: 700; outline: 2px solid var(--goals); outline-offset: -2px; border-radius: 4px; }
.dest-foo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dest-foo li { display: grid; grid-template-columns: 36px 1fr auto 150px; gap: var(--s3); align-items: center; padding: 6px 8px; border: 1px solid var(--border-row); border-radius: 8px; }
.dest-foo li.here { border-color: var(--goals); border-width: 2px; }
.dest-foo-names { display: flex; flex-direction: column; min-width: 0; }
.dest-foo-when { text-align: right; }
.dest-foo li.dest-status { border-style: dashed; background: color-mix(in srgb, var(--goals) 6%, transparent); }
.dest-foo li.dest-status.reached { border-color: var(--good); }
.dest-status-num { white-space: nowrap; }
.foo-marks { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: var(--s3); }
.foo-marks .foo-mark { padding: 4px 10px; border: 1px dashed var(--goals); border-radius: 999px; font-size: .8125rem; }
.foo-marks .foo-mark.reached { border-color: var(--good); }
.foo-mark-name { font-weight: 700; }
.status-opts-h { margin: var(--s3) 0 4px; font-size: 1rem; }
.status-opts { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-direction: column; gap: 6px; }
.status-opts li { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--border-row); border-radius: 8px; }
.status-opts li a { min-height: 28px; font-weight: 600; }
.status-stay { font-weight: 600; margin: 0 0 var(--s3); }
.coast-card { border: 2px solid var(--good); margin-bottom: var(--s3); }
.coast-card h2 { margin: 0; }
@media (max-width: 760px) {
  .dest-facts { grid-template-columns: 1fr; }
  .dest-fat-row { grid-template-columns: 1fr; gap: 4px; }
  .dest-foo li { grid-template-columns: 30px 1fr; }
  .dest-foo li .tag, .dest-foo-when, .dest-status-num { grid-column: 2; text-align: left; justify-self: start; }
  /* the two small tables keep their headers on a phone and fit the screen: the FI number column gives way */
  table.rows.mini.dest-stress thead, table.rows.mini.dest-pod thead { display: table-header-group; }
  table.rows.mini.dest-stress, table.rows.mini.dest-pod { display: table; width: 100%; font-size: .8125rem; }
  table.rows.mini.dest-stress tbody, table.rows.mini.dest-pod tbody { display: table-row-group; }
  table.rows.mini.dest-stress th, table.rows.mini.dest-stress td { padding: 4px 3px; white-space: normal; }
  table.rows.mini.dest-stress th:nth-child(2), table.rows.mini.dest-stress td:nth-child(2) { display: none; }
  table.rows.mini.dest-pod th:nth-child(4), table.rows.mini.dest-pod td:nth-child(4) { display: none; }
}

/* Recalculating, follow-up (Nov 25 2026): a date that moves sooner is a win (green edge), and the calm Coming soon card. */
.rc-card.rc-win { border-left-color: var(--good); }
.rc-card .rc-win-head { font-size: 1.15rem; }
.coming-soon { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 10px 12px; margin: 4px 0 8px; border: 1.5px dashed var(--border-filled); border-radius: var(--r-input); }

/* Lifestyle creep and enough (run Not built, groups 1 to 5, Part 3): Budget and Goals. */
.creep-big { font-size: 1.35rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.creep-wrap { max-width: 100%; overflow-x: auto; }
.creep-table { width: 100%; }
.creep-table td, .creep-table th { padding: 6px 8px; }
.creep-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.creep-mutant { font-weight: 600; }
.pareto-row { display: grid; grid-template-columns: minmax(90px, 1.4fr) 2fr auto auto; gap: 4px 12px; align-items: center; }
.pareto-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pareto-name { overflow-wrap: anywhere; }
.pareto-bar { display: block; height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.pareto-bar i { display: block; height: 100%; background: var(--primary); }
.rough-btn { white-space: nowrap; }
@media (max-width: 520px) { .pareto-row { grid-template-columns: 1fr auto auto; } .pareto-bar { grid-column: 1 / -1; grid-row: 2; } .creep-table td, .creep-table th { padding: 6px 4px; } .creep-table .creep-mutant { display: flex; width: max-content; margin: 4px 0 0 !important; } }
/* Joy and enough (run Finish everything partly built, Part 8): the curve rows and the rich-life cards. */
.curve-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 6px 12px; align-items: center; }
.curve-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.joy-table .seg button { min-width: 32px; }
.rich-item { padding: 12px; }
@media (max-width: 520px) { .curve-row { grid-template-columns: 1fr auto; } .curve-row .seg { grid-column: 1 / -1; } }
