/* Simcha Finance styles. Colors live in :root — change --accent to re-theme the whole app. */
:root {
  /* "Ledger" look: paper-white sheets, gray header cells, thin gridlines, one muted green accent. */
  --accent: #1f6b4a; --accent-2: #e6f0ea;
  --bg: #f1f3f2; --card: #ffffff; --ink: #1f2328; --muted: #5f6670; --line: #d6dad8; --head: #f4f6f5;
  --pos: #1d7a3e; --neg: #b3261e; --warn: #b7791f;
  --radius: 3px; --shadow: none;
  --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Roboto Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16191b; --card: #1d2124; --ink: #e3e6e8; --muted: #9aa3ab; --line: #343a3f; --head: #24292d; --accent: #6fbf95; --accent-2: #20352b; --pos: #6fcf8f; --neg: #f08a80; --warn: #e0b057; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); }
h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 1rem; margin: 0 0 .6rem; }
h3 { font-size: .9rem; margin: 1rem 0 .4rem; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .pos { color: var(--pos); } .neg { color: var(--neg); }
.grow { flex: 1; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 12px; border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 2px; }
.sidebar a { padding: 9px 12px; border-radius: 10px; color: var(--ink); display: flex; gap: 10px; }
.sidebar a:hover { background: var(--bg); }
.sidebar a.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.brand { font-weight: 700; font-size: 1.05rem; padding: 4px 12px 18px; }
.logo { color: var(--accent); }
.logo.big { font-size: 2.6rem; line-height: 1; }
.view { padding: 28px 32px 60px; max-width: 1100px; width: 100%; outline: none; }
.tabbar { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.eyebrow { margin: 0; color: var(--muted); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.span-2 { grid-column: span 2; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.grid > .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: .85rem; }
.big-num { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.stat-row > div { display: flex; flex-direction: column; }
.stat-row b { font-size: 1.15rem; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; margin-top: 10px; }
.row-end { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.notice { display: block; background: var(--accent-2); color: var(--ink); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
.loading, .empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty p { margin: .3rem 0 .8rem; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 550; white-space: nowrap; min-height: 40px; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger.ghost { background: transparent; color: var(--neg); border-color: transparent; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: .85rem; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1.05rem; padding: 6px 9px; border-radius: 8px; color: var(--ink); min-width: 36px; min-height: 36px; }
.icon-btn:hover { background: var(--bg); }
.icon-btn:disabled { opacity: .3; }
.linklike { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.form label, .auth-card label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); font-weight: 550; margin-bottom: 12px; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 16px; min-height: 42px; }
input[type=color] { padding: 3px; height: 42px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; font-weight: 400 !important; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg label { margin: 0 !important; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg.small { margin: 0; } .seg.small span { padding: 3px 10px; font-size: .8rem; }
.pick { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.pick legend { font-size: .85rem; color: var(--muted); font-weight: 550; margin-bottom: 6px; }
.pick label { margin: 0 !important; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); font-size: 1.2rem; cursor: pointer; }
.pick input:checked + span { border-color: var(--accent); background: var(--accent-2); }
.error { color: var(--neg); min-height: 1.2em; margin: 0; font-size: .9rem; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 8px; padding: 12px; }
.list-meta { margin: -6px 2px 8px; }

/* ---------- transactions ---------- */
.txn-list { padding: 4px 0; }
.card.txn-list { padding: 4px 8px; }
.date-head { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 8px 4px; }
.txn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 8px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.txn:hover { background: var(--bg); }
.txn-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: var(--bg); }
.txn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.txn-payee { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-amt { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tag-warn { color: var(--warn); font-weight: 600; }
.split-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.split-row { display: grid; grid-template-columns: 1fr 110px auto; gap: 6px; margin: 6px 0; }

/* ---------- lists & bars ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.near span { background: var(--warn); } .bar.over span { background: var(--neg); }
.mini-list, .budget-list, .rec-list, .rule-list, .cat-bars { list-style: none; margin: 8px 0 0; padding: 0; }
.mini-list li { padding: 6px 0; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; }
.mini-list li .bar { grid-column: span 2; margin: 4px 0 0; }
.li-row { border-bottom: 1px solid var(--line); } .li-row:last-child { border: 0; }
.budget-row { display: grid; grid-template-columns: 1fr auto; padding: 10px 6px; color: var(--ink); border-radius: 10px; }
.budget-row:hover { background: var(--bg); }
.budget-row .bar { grid-column: span 2; }
.budget-row .b-name { font-weight: 600; }
.budget-edit { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; color: var(--ink) !important; }
.budget-edit input { width: 120px; flex: none; }
.group-h { color: var(--muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.acct-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.acct-row:last-child { border: 0; }
.acct { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 10px 4px; cursor: pointer; color: var(--ink); min-width: 0; }
.rec-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rec-main, .rec-amt { display: flex; flex-direction: column; } .rec-amt { text-align: right; }
.rule-list li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.rule { flex: 1; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; text-align: left; border: 0; background: none; padding: 10px 4px; cursor: pointer; color: var(--ink); }
.rule-move { display: flex; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-left-width: 4px; background: var(--card); border-radius: 10px; padding: 6px 10px; cursor: pointer; color: var(--ink); }
.menu-list { display: flex; flex-direction: column; padding: 6px; }
.menu-list a, .menu-list button { padding: 14px 12px; border: 0; background: none; text-align: left; color: var(--ink); border-radius: 10px; font-size: 1rem; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td:nth-child(2) { white-space: normal; }
.table .num { text-align: right; }
.table tr[data-m] { cursor: pointer; } .table tr.sel { background: var(--accent-2); }
.legend { display: flex; gap: 14px; align-items: center; font-size: .8rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; }
.split-chart { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.cat-bars li a { display: grid; grid-template-columns: 1fr auto; padding: 6px; color: var(--ink); border-radius: 8px; }
.cat-bars li a[href]:hover { background: var(--bg); }
.cat-bars .bar { grid-column: span 2; margin: 3px 0 0; }
.steps { padding-left: 1.2rem; } .steps li { margin: 4px 0; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-2); }
.drop-icon { font-size: 2rem; }
details summary { cursor: pointer; font-weight: 600; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .axis, .donut .axis { font-size: 11px; fill: var(--muted); }
.chart .baseline { stroke: var(--line); }
.donut-big { font-size: 17px; font-weight: 700; fill: var(--ink); }

/* ---------- sheets, toast, sign-in ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; opacity: 0; transition: opacity .2s; padding: 16px; }
.sheet-wrap.open { opacity: 1; }
.sheet { background: var(--card); border-radius: 18px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); transform: translateY(12px); transition: transform .2s; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px 20px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-body { padding: 6px 20px 20px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; opacity: 0; transition: .25s; z-index: 60; max-width: 90vw; text-align: center; font-size: .92rem; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 26px; width: 100%; max-width: 400px; box-shadow: var(--shadow); text-align: center; }
.auth-card label { text-align: left; }
.auth-card h1 { margin: 10px 0 6px; font-size: 1.4rem; }
.hero { text-align: center; max-width: 520px; margin: 8vh auto 0; }
.hero h1 { margin: 12px 0 10px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .view { padding: 16px 14px calc(90px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 1.15rem; color: var(--muted); padding: 4px 0; border-radius: 10px; }
  .tabbar a span { font-size: .68rem; font-weight: 600; margin-top: 1px; }
  .tabbar a.active { color: var(--accent); background: var(--accent-2); }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .span-2 { grid-column: auto; }
  .card { padding: 14px; margin-bottom: 12px; }
  h1 { font-size: 1.35rem; }
  .big-num { font-size: 1.7rem; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: span 2; }
  .two { grid-template-columns: 1fr; }
  .split-chart { grid-template-columns: 1fr; justify-items: center; }
  .split-chart .cat-bars { width: 100%; }
  .sheet-wrap { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .rec-list li { grid-template-columns: 1fr auto; }
  .rec-act { grid-column: span 2; display: flex; gap: 6px; }
  .stat-row { gap: 16px; }
  .page-head .btn { padding: 7px 12px; }
}


/* =====================================================================
   Spreadsheet theme (Oct 2026): everything below re-skins the app to look like a clean ledger.
   ===================================================================== */
body { font-size: 14px; line-height: 1.4; }
h1 { font-size: 1.35rem; font-weight: 650; letter-spacing: 0; }
h2 { font-size: .95rem; font-weight: 650; }
.num, .txn-amt, .big-num, .stat-row b, td.num, th.num, input[type=number] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.big-num { font-size: 1.6rem; font-weight: 600; letter-spacing: 0; }
.stat-row b { font-size: 1.05rem; font-weight: 600; }

/* layout */
.sidebar { padding: 14px 0; gap: 0; background: var(--head); }
.sidebar a { padding: 7px 18px; border-radius: 0; font-size: .92rem; border-left: 3px solid transparent; }
.sidebar a:hover { background: var(--card); }
.sidebar a.active { background: var(--card); color: var(--accent); border-left-color: var(--accent); font-weight: 650; }
.nav-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 18px 4px; }
.brand { padding: 2px 18px 14px; font-size: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.view { padding: 22px 28px 60px; max-width: 1180px; }
.card { border-radius: var(--radius); box-shadow: none; padding: 14px 16px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card .pad, .pad { padding-left: 14px; padding-right: 14px; }
.card.flush .card-head.pad { padding-top: 11px; padding-bottom: 9px; margin: 0; border-bottom: 1px solid var(--line); background: var(--head); }
.card-head { border-bottom: 0; }
.grid { gap: 14px; }
.notice { border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--card); }
.eyebrow { font-size: .8rem; }

/* buttons & inputs: squarer, quieter */
.btn { border-radius: var(--radius); min-height: 36px; padding: 7px 13px; font-weight: 600; }
input, select, textarea { border-radius: var(--radius) !important; }
select.mini { padding: 3px 6px; min-height: 0; font-size: .82rem; max-width: 190px; }
.seg, .seg span, .tabs button, .chip, .menu-list a, .menu-list button, .budget-row, .cat-bars li a, .txn { border-radius: var(--radius); }
.seg input:checked + span { box-shadow: 0 0 0 1px var(--line); }
.tabs button[aria-selected=true] { box-shadow: 0 0 0 1px var(--line); }

/* sheet tabs (like the tabs at the bottom of a spreadsheet, placed on top) */
.sheet-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; }
.sheet-tabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; margin-bottom: -1px; border-radius: var(--radius) var(--radius) 0 0; }
.sheet-tabs button[aria-selected=true] { background: var(--card); border-color: var(--line); color: var(--ink); }

/* grid tables */
.table, .xl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th, .table td, .xl th, .xl td { border: 1px solid var(--line); padding: 5px 8px; }
.table thead th, .xl thead th { background: var(--head); font-weight: 650; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; }
.xl { border-style: hidden; }
.card:not(.flush) > .xl, .sheet-body .xl, .card > .xl.compact, details .xl { border: 1px solid var(--line); border-style: solid; }
.xl tbody th { text-align: left; font-weight: 500; background: var(--card); white-space: nowrap; }
.xl tfoot th, .xl tfoot td { background: var(--head); font-weight: 650; }
.xl td.num, .xl th.num, .table .num { text-align: right; white-space: nowrap; }
.xl td a { color: inherit; display: block; }
.xl td a:hover { color: var(--accent); text-decoration: underline; }
.xl .sticky { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.xl thead .sticky { z-index: 2; }
.xl .b { font-weight: 700; }
.xl.compact th, .xl.compact td { padding: 4px 7px; }
.xl.kv th { width: 40%; color: var(--muted); font-weight: 500; }
.xl tr.click { cursor: pointer; } .xl tr.click:hover td { background: var(--accent-2); }
.xl td.flag { background: color-mix(in srgb, var(--neg) 9%, transparent); }
.xl td.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.xl.ideas td { vertical-align: top; white-space: normal; }
.xl.ideas .small { margin-top: 2px; }
.cell-note { font-size: .68rem; color: var(--muted); font-family: var(--font); font-weight: 400; line-height: 1.1; }
.cell-note.neg { color: var(--neg); }
.cell-btn { all: unset; cursor: pointer; display: block; width: 100%; text-align: right; }
.cell-btn:focus-visible { outline: 2px solid var(--accent); }
.sw { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); padding: 0 4px; border-radius: 2px; vertical-align: 1px; }
.code { font-family: var(--mono); font-size: .75rem; background: var(--head); border: 1px solid var(--line); padding: 8px; overflow-x: auto; white-space: pre; }

/* transactions as ledger rows */
.card.txn-list { padding: 0; overflow: hidden; }
.date-head { display: flex; justify-content: space-between; gap: 8px; background: var(--head); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); padding: 4px 10px; font-size: .72rem; letter-spacing: .03em; margin-top: -1px; }
.date-head .heb { text-transform: none; letter-spacing: 0; font-weight: 500; text-align: right; }
.date-head .heb b { color: var(--accent); font-weight: 650; }
.txn { padding: 6px 10px; gap: 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
.txn:last-child { border-bottom: 0; }
.txn:hover { background: var(--accent-2); }
.txn-icon { width: 4px; height: 30px; border-radius: 0; font-size: 0; }
.txn-payee { font-weight: 550; }
.txn-sub { font-size: .76rem; }
.txn-amt { font-weight: 500; font-size: .9rem; }
.filters { gap: 6px; padding: 8px; grid-template-columns: 2fr repeat(5, 1fr); }

/* bars & charts: flat */
.bar, .bar span { border-radius: 0; height: 6px; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .grid.v { stroke-dasharray: 2 3; }
.dot { border-radius: 0; margin-right: 2px; }
.legend { flex-wrap: wrap; gap: 10px; }
.chip { border-left-width: 3px; }
.sheet-wrap { background: rgba(20,24,28,.4); }
div.sheet { border-radius: 4px; }
.sheet-body .xl { border-radius: 0; }
.sheet-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 8px; }
.toast { border-radius: 4px; }
.auth-card { border-radius: 4px; box-shadow: none; }
.logo { color: var(--accent); }
.drop { border-radius: var(--radius); border-width: 1px; }
.drop-icon { font-size: 1.4rem; color: var(--muted); }
details.split-box summary { font-weight: 600; }
details.split-box .xl { margin: 6px 0; }
.menu-list a, .menu-list button { border-bottom: 1px solid var(--line); border-radius: 0; padding: 13px 12px; }
.menu-list > :last-child { border-bottom: 0; }

/* the dialog element and the table class share the word "sheet": keep the dialog styles on the dialog */
div.sheet { border: 0; }

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .view { padding: 12px 10px calc(84px + env(safe-area-inset-bottom)); }
  .card { padding: 12px; margin-bottom: 10px; }
  .card.flush { padding: 0; }
  .tabbar { padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a { border-radius: 0; font-size: 1rem; }
  .tabbar a i { font-style: normal; font-size: 1.05rem; line-height: 1.2; }
  .tabbar a.active { background: none; box-shadow: inset 0 2px 0 var(--accent); }
  .filters { grid-template-columns: 1fr 1fr; }
  .xl th, .xl td { padding: 5px 6px; }
  .xl { font-size: .8rem; }
  .xl .sticky { max-width: 132px; overflow: hidden; text-overflow: ellipsis; }
  .date-head { font-size: .68rem; }
  .sheet-tabs button { padding: 7px 10px; font-size: .85rem; }
  div.sheet { border-radius: 6px 6px 0 0; }
}

/* ---------- Annual Plan (views/plan.js): like Simcha's own sheet ---------- */
:root { --total: #d9e4f5; }
@media (prefers-color-scheme: dark) { :root { --total: #22324a; } }
.plan-ctl { gap: 8px; flex-wrap: wrap; }
.plan-ctl select { width: auto; min-height: 34px; padding: 4px 8px; }
.plan-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); margin-bottom: 10px; }
.plan-sum > div { display: flex; flex-direction: column; padding: 6px 10px; border-right: 1px solid var(--line); min-width: 0; }
.plan-sum > div:last-child { border-right: 0; }
.plan-sum b { font-family: var(--mono); font-size: 1.05rem; white-space: nowrap; }
.xl.plan { font-variant-numeric: tabular-nums; }
.xl.plan th, .xl.plan td { padding: 3px 7px; }
.xl.plan tr.bar th { background: #000; color: #fff; font-weight: 700; text-align: center; letter-spacing: .02em; padding: 4px 7px; border-color: #000; }
.xl.plan tr.bar th.sticky { text-align: left; background: #000; }
.xl.plan tr.add th, .xl.plan tr.add td { padding-top: 2px; padding-bottom: 2px; }
.xl.plan .add-line { color: var(--accent); font-size: .78rem; font-weight: 600; }
.xl.plan tr.total th, .xl.plan tr.total td { background: var(--total); font-weight: 700; }
.xl.plan tr.deficit th, .xl.plan tr.deficit td { font-style: italic; font-weight: 650; }
.xl.plan tr.deficit .neg, .xl.plan tr.maaser .neg { font-style: italic; }
.xl.plan tr.gap td { border-left: 0; border-right: 0; padding: 4px; background: var(--bg); }
.xl.plan tr.nip th, .xl.plan tr.nip td { color: var(--muted); }
.xl.plan .name-btn { all: unset; cursor: pointer; display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.xl.plan .name-btn:hover { color: var(--accent); text-decoration: underline; }
.xl.plan .cell-btn { min-height: 22px; }
.xl.plan td:has(> .cell-btn[data-edit]) { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.xl.plan .cell-btn[data-edit]:hover { color: var(--accent); }
.cell-input { width: 100%; min-width: 72px; min-height: 0 !important; height: 26px; padding: 1px 4px !important; text-align: right; font-family: var(--mono); font-size: 16px; border: 2px solid var(--accent) !important; }
.xl.plan.mode-plan .c-act, .xl.plan.mode-actual .c-plan, .xl.plan .c-planw { display: none; }
@media (max-width: 760px) { .xl.plan.mode-actual .c-ann { display: none; } .xl.plan.mode-actual .c-planw { display: table-cell; } }
.pick-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.pick-list .chk { display: inline-flex; align-items: center; gap: 5px; font-size: .88rem; margin: 0; }
@media (max-width: 760px) {
  .plan-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-sum > div:nth-child(2) { border-right: 0; }
  .plan-sum > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .plan-sum b { font-size: .95rem; }
  .xl.plan th, .xl.plan td { padding: 3px 5px; }
  .xl.plan .sticky { max-width: 128px; }
  .xl.plan.mode-both .c-pct { display: none; }
}
.pct-note { display: none; }
@media (max-width: 400px) {
  .xl.plan { font-size: .76rem; }
  .xl.plan th, .xl.plan td { padding: 3px 4px; }
  .xl.plan.mode-plan .c-pct { display: none; }
  .xl.plan.mode-plan .pct-note { display: block; }
  .xl.plan .sticky { max-width: 98px; }
  .xl.plan.mode-actual .cell-note { display: none; }
  .tabbar a span { font-size: .62rem; }
}

.plan-line-note { white-space: normal; max-width: 16rem; text-align: left; margin-top: 2px; }


/* ---------- Oct 26 '26 upgrade: color + new screens (Where it goes, Targets, Debts, Forecast) ---------- */
:root {
  --c-blue: #2563eb; --c-violet: #7c3aed; --c-teal: #0d9488; --c-amber: #d97706; --c-rose: #e11d48; --c-green: #16a34a; --c-sky: #0284c7;
  --tint-blue: #eaf1fe; --tint-violet: #f1ebfe; --tint-teal: #e6f6f4; --tint-amber: #fdf3e3; --tint-rose: #fdecef; --tint-green: #e8f6ec;
  --head: #edf3fb;
}
@media (prefers-color-scheme: dark) {
  :root { --tint-blue: #1b2840; --tint-violet: #261f3d; --tint-teal: #15302d; --tint-amber: #35290f; --tint-rose: #3a1a22; --tint-green: #16301f; --head: #222b36; }
}
/* colorful chrome */
.sidebar { background: linear-gradient(180deg, var(--card) 0%, var(--tint-teal) 100%); }
.sidebar a .ni { width: 1.3em; text-align: center; }
.sidebar a.active { background: var(--accent); color: #fff; }
.nav-h { color: var(--c-violet) !important; }
.brand .logo { color: var(--c-teal); }
.page-head h1 { background: linear-gradient(90deg, var(--c-teal), var(--c-blue) 55%, var(--c-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-head h2::before { content: ""; display: inline-block; width: 4px; height: .95em; background: var(--hc, var(--c-teal)); margin-right: 7px; vertical-align: -1px; }
.grid > .card:nth-child(6n+1) { --hc: var(--c-teal); } .grid > .card:nth-child(6n+2) { --hc: var(--c-blue); } .grid > .card:nth-child(6n+3) { --hc: var(--c-amber); }
.grid > .card:nth-child(6n+4) { --hc: var(--c-violet); } .grid > .card:nth-child(6n+5) { --hc: var(--c-rose); } .grid > .card:nth-child(6n+6) { --hc: var(--c-sky); }
.sheet-tabs button[aria-selected=true] { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.xl thead th { background: var(--head); }
.xl tfoot th, .xl tfoot td { background: var(--tint-blue); }
.tabbar a.active { color: var(--c-blue); }
.tabbar a.active i { color: var(--c-teal); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--kc, var(--c-blue)); background: var(--kt, var(--tint-blue)); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: .78rem; color: var(--muted); } .kpi b { font: 600 1.25rem/1.2 var(--mono); } .kpi small { color: var(--muted); font-size: .74rem; }
.k-red { --kc: var(--c-rose); --kt: var(--tint-rose); } .k-amber { --kc: var(--c-amber); --kt: var(--tint-amber); } .k-violet { --kc: var(--c-violet); --kt: var(--tint-violet); }
.k-green { --kc: var(--c-green); --kt: var(--tint-green); } .k-blue { --kc: var(--c-blue); --kt: var(--tint-blue); } .k-teal { --kc: var(--c-teal); --kt: var(--tint-teal); }
a.kpi { color: inherit; } a.kpi:hover { filter: brightness(.97); }

/* chips */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip-row .chip { border-left-width: 1px; border-radius: 0; cursor: pointer; border: 1px solid var(--line); background: var(--card); padding: 5px 11px; font-size: .84rem; }
.chip-row .chip.on { background: var(--c-teal); border-color: var(--c-teal); color: #fff; }

/* category bars (Where it goes) */
.stackline { display: flex; height: 14px; margin: 4px 0 12px; overflow: hidden; border: 1px solid var(--line); }
.stackline span { display: block; height: 100%; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li a { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 6px 2px; color: var(--ink); border-bottom: 1px solid var(--line); }
.hbars li a:hover { background: var(--head); }
.hb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.hb-bar { height: 12px; background: var(--bg); } .hb-bar i { display: block; height: 100%; }
.hb-num { text-align: right; font-family: var(--mono); font-size: .88rem; line-height: 1.1; } .hb-num small { display: block; color: var(--muted); font-size: .72rem; }
.xl.heatmap td.heat { background: color-mix(in srgb, var(--c) calc(var(--h) * 100%), transparent); }
.xl.heatmap td.heat, .xl.merch td, .xl.gap-table td { white-space: nowrap; }
.xl.gap-table tr.row-neg th.sticky { box-shadow: inset 3px 0 0 var(--neg); } .xl.gap-table tr.row-pos th.sticky { box-shadow: inset 3px 0 0 var(--pos); }
.xl td small { font-size: .72rem; }
.block { display: block; }
.chart .grid.zero { stroke: var(--muted); stroke-dasharray: none; opacity: .8; }

/* Targets */
.tcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.tcard { border-top: 4px solid var(--tc); margin: 0 !important; }
.tcard .card-head h2::before { background: var(--tc); }
.t-nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .t-nums b { font: 600 1.5rem/1.1 var(--mono); }
.t-badge { margin-left: auto; font-size: .75rem; padding: 2px 8px; font-weight: 600; background: var(--tint-green); color: var(--pos); }
.st-warn .t-badge { background: var(--tint-amber); color: var(--warn); } .st-over .t-badge { background: var(--tint-rose); color: var(--neg); }
.tbar { position: relative; height: 14px; background: var(--bg); border: 1px solid var(--line); margin: 8px 0 6px; }
.tbar i { display: block; height: 100%; }
.tbar .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.tbar .cap { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--neg); }
.xl.thist { width: 100%; margin: 6px 0; } .xl.thist td a { color: inherit; }
.xl td.cell-over { background: var(--tint-rose); color: var(--neg); } .xl td.cell-ok { background: var(--tint-green); }
.pbar { display: inline-block; width: 90px; height: 8px; background: var(--bg); border: 1px solid var(--line); vertical-align: middle; } .pbar i { display: block; height: 100%; }
/* Debts */
.xl.debts tr th.sticky { box-shadow: inset 4px 0 0 var(--dc); } .dk { margin-right: 6px; }
.xl.debts td, .xl.fc td { white-space: nowrap; }
.xl.fc tr.click { cursor: pointer; } .xl.fc tr.click:hover th, .xl.fc tr.click:hover td { background: var(--head); }
/* dashboard shortcut tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tiles .kpi b { font-size: 1.1rem; }
/* Cash vs Credit tile: full row, two big numbers side by side, small net line */
.tiles .kpi.cc { grid-column: 1 / -1; gap: 4px; }
.kpi.cc .cc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi.cc .cc-row > div { display: flex; flex-direction: column; min-width: 0; }
.tiles .kpi.cc .cc-row b { font-size: 1.7rem; line-height: 1.15; }
.tiles .kpi.cc small b { font: 600 .9rem var(--mono); }
.kpi.cc { cursor: pointer; }
.kpi.cc .cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.kpi.cc .seg { display: inline-flex; border: 1px solid var(--line); background: var(--panel, #fff); }
.kpi.cc .seg button { font: 600 .8rem var(--sans, inherit); padding: 6px 12px; min-height: 32px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.kpi.cc .seg button + button { border-left: 1px solid var(--line); }
.kpi.cc .seg button.on { background: var(--kc, var(--c-blue)); color: #fff; }

@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpis .kpi:last-child:nth-child(odd) { grid-column: span 2; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi b { font-size: 1.08rem; }
  .tcards { grid-template-columns: 1fr; gap: 10px; }
  .hbars li a { grid-template-columns: minmax(96px, 38%) 1fr auto; gap: 8px; }
  .pbar { width: 54px; }
  .hide-m { display: none; }
  .page-head h1 { font-size: 1.4rem; }
}

/* ---------- Installable app pass (Oct 27 2026): phone-only tap areas; desktop unchanged ---------- */
@media (max-width: 760px) {
  .card-head > a { padding: 11px 0 11px 14px; margin: -11px 0; }
  p.small > a[data-month] { display: inline-block; padding: 11px 0; margin: -11px 0; }
}

/* Yom Tov: event months vs a normal month */
.em .card-head { flex-wrap: wrap; gap: 6px; }
.em-tog { margin: 0; }
.em-row { padding: 10px 14px; border-top: 1px solid var(--line); }
.em-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.em-tot { margin-left: auto; font-weight: 600; font-family: var(--mono); }
.em-cats { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .9rem; }
.em-cats b { font-family: var(--mono); font-weight: 600; }
.em-out summary { font-weight: 600; }
.em-out .xl { margin: 8px 0; width: 100%; }

/* ---------- Income vs spending chart (Where it goes → By month), Oct 30 2026 ---------- */
:root { --inc: #2f7d55; --spd: #c9534f; }
@media (prefers-color-scheme: dark) { :root { --inc: #5fae86; --spd: #e07a72; } }
.pb-inc-dot { background: var(--inc); } .pb-spd-dot { background: var(--spd); }
.pb-wrap { display: flex; align-items: flex-start; margin: 8px 0 4px; }
.pb-axis-col { flex: 0 0 42px; }
.pb-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chart.pb-plot, .chart.pb-axis { width: auto; height: auto; max-width: none; display: block; }
.pb-plot .pb-inc { fill: var(--inc); } .pb-plot .pb-spd { fill: var(--spd); }
.pb-plot .pband { fill: transparent; }
.pb-plot .pcol { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pb-plot .pcol:hover .pband { fill: var(--head); }
.pb-plot .pcol.sel .pband { fill: var(--accent-2); stroke: var(--accent); stroke-width: 1; }
.pb-plot .pcol.sel .pm { fill: var(--ink); font-weight: 700; }
.pb-plot .phit:focus { outline: none; } .pb-plot .phit:focus-visible { stroke: var(--accent); stroke-width: 2; }
.pb-plot .pgap { font-family: var(--mono); font-size: 10.5px; font-weight: 600; }
.pb-plot .pgap.pos { fill: var(--pos); } .pb-plot .pgap.neg { fill: var(--neg); }
.pb-plot .py { font-weight: 600; }
.pb-panel { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.pb-ph { font-size: 1rem; margin-bottom: 8px; }
.pb-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.pb-nums > div { border: 1px solid var(--line); background: var(--head); padding: 6px 8px; }
.pb-nums small { display: block; color: var(--muted); font-size: .74rem; }
.pb-nums b { font-family: var(--mono); font-size: 1rem; }
.pb-panel h3 { margin: 12px 0 4px; }

/* ---------- Home, cleaner layout (Nov 4 2026): numbers first, neutral, four blocks ---------- */
.h-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; font-weight: 600; margin: 0 2px 10px; }
.h-head .muted { font-weight: 400; font-size: .82rem; }
.h-card h2 { margin: 0; font-size: .95rem; }
.h-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.h-title a, .h-title .small { font-size: .82rem; }
.h-money { cursor: pointer; padding: 12px 14px; }
.h-money .seg button { padding: 3px 10px; font-size: .78rem; }
.h-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-3 > div { display: flex; flex-direction: column; min-width: 0; }
.h-3 span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.h-3 b { font: 700 1.35rem/1.2 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.h-card .h-note { margin: 6px 0 0; font-size: .78rem; color: var(--muted); }
.h-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 640px) { .h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .h-grid > .card { margin-bottom: 12px; } }
.h-big { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; color: inherit; flex-wrap: wrap; }
.h-big b { font: 700 1.5rem/1.15 var(--mono); letter-spacing: -.03em; }
.h-big .muted { font-size: .85rem; }
.h-rows { margin-top: 12px; display: grid; gap: 10px; }
.h-row { display: grid; grid-template-columns: 1fr auto auto; column-gap: 6px; align-items: baseline; color: inherit; font-size: .9rem; }
.h-row b { font-family: var(--mono); }
.h-row .muted { font-size: .8rem; font-family: var(--mono); }
.h-row .bar { grid-column: 1 / -1; margin-top: 4px; height: 5px; }
.h-sub { margin: 14px 0 4px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.h-list { list-style: none; margin: 0; padding: 0; }
.h-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.h-list li:first-child { border-top: 0; }
.h-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-list b { font-family: var(--mono); white-space: nowrap; }
.h-when { display: inline-block; min-width: 3.4em; color: var(--muted); font-size: .8rem; }
.warn { color: var(--warn); }
.h-txns .txn-sub { font-size: .78rem; }
.h-more { padding: 0; }
.h-more a { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.h-more a:first-child { border-top: 0; }
.h-more a span { flex: 1; }
.h-more a b { font-family: var(--mono); font-weight: 600; }
.h-more a i { color: var(--muted); font-style: normal; }
.h-money .seg { margin: 0; padding: 2px; }
.h-money .seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; border-radius: var(--radius); cursor: pointer; }
.h-money .seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.sidebar a { padding: 7px 12px; font-size: .92rem; }
.sidebar .nav-h { color: var(--muted) !important; }
.menu-list + .h-sub, .page-head + .h-sub { margin-top: 4px; }
details.h-fold > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.h-fold > summary::-webkit-details-marker { display: none; }
details.h-fold > summary h2::before { content: "▸ "; color: var(--muted); }
details.h-fold[open] > summary h2::before { content: "▾ "; }
details.h-fold:not([open]) > summary { margin-bottom: 0; }

/* month-so-far card (Nov 5 2026) */
a.h-3 { color: inherit; }
.h-eom { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, rgba(127,127,127,.25)); color: inherit; }
.h-eom span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.h-eom b { font: 700 1.35rem/1.2 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.h-eom small { grid-column: 1 / -1; font-family: var(--mono); font-size: .8rem; }

/* Nov 5 2026: projected row on the Home month card + the #/month breakdown page (big numbers, minimal) */
a.h-proj { display: block; color: inherit; margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
a.h-proj .h-sub { display: flex; justify-content: space-between; margin: 10px 0 6px; }
a.h-proj .h-sub i { font-style: normal; font-size: 1.1rem; line-height: .8; opacity: .6; }
.h-foot { text-align: center; margin: 18px 0 8px; font-size: .9rem; }
.h-foot a { color: var(--accent, inherit); font-weight: 600; }
.page-head .back { display: inline-block; font-size: .9rem; margin-bottom: 4px; color: var(--accent, inherit); }
.mb-top .h-3 b { font-size: 1.55rem; }
.mb-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.mb-h h2 { margin: 0; font-size: 1.2rem; }
.mb-h b { font: 750 1.6rem/1.2 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.mb-g { display: flex; justify-content: space-between; margin: 16px 0 2px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mb-g span { font-family: var(--mono); }
.mb-list { list-style: none; margin: 0; padding: 0; }
.mb-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mb-list li:first-child { border-top: 0; }
.mb-list li > div { min-width: 0; display: flex; flex-direction: column; }
.mb-list li span { font-size: 1.05rem; }
.mb-list li small { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.mb-list li b { font: 700 1.15rem/1.2 var(--mono); white-space: nowrap; }
.mb-paid, .mb-how { margin: 14px 4px 0; }
.mb-how { margin-bottom: 24px; }
a.h-proj { padding-top: 14px; }
a.h-proj .h-why { margin: 10px 0 0; font-size: .85rem; font-weight: 600; color: var(--accent, inherit); display: flex; justify-content: flex-end; gap: 6px; }
a.h-proj .h-why i { font-style: normal; }

/* Nov 6 2026: End of month = one big number + a tiny breakdown; tap for the list */
.eom-big { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.eom-big.neg { color: var(--neg); } .eom-big.pos { color: var(--pos); }
.eom-parts { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.45; font-variant-numeric: tabular-nums; }
.eom-sheet .eom-big { text-align: center; font-size: 2.8rem; margin-top: 4px; }
.eom-sheet .eom-sub { text-align: center; color: var(--muted); margin: 0 0 12px; }
.eom-sheet h3 { font-size: 1rem; margin: 18px 0 6px; }
.eom-list { list-style: none; margin: 0; padding: 0; }
.eom-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.eom-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.eom-list li small { font-size: .78rem; }
.eom-done { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.eom-more { display: flex; text-align: center; margin: 20px 0 6px; padding: 14px; font-size: 1.05rem; }
.eom-parts span { white-space: nowrap; }

/* Nov 7 2026: End of month uses the Now view's three boxes (Income · Out · Nov 30); the detail sheet is table rows */
.eom-t + .eom-t { margin-top: 14px; }
.eom-t thead + thead th, .eom-t tbody + thead th { border-top-width: 2px; }
.eom-t small { font-size: .74rem; font-weight: 400; }

/* ---------- Nov 7 2026 redesign: Home (so far / still to come / cash vs cards), 12 months, actual vs estimate ---------- */
/* Actuals are solid. Estimates: italic, a little muted, with a small "est." tag. */
.est { font-style: italic; opacity: .68; }
.est-tag { display: inline-block; font: 600 .62rem/1.5 var(--font, inherit); font-style: normal; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--head, rgba(127,127,127,.12)); border-radius: 999px; padding: 0 6px; vertical-align: 2px; margin-left: 4px; }
.h-3 > .hb { display: flex; flex-direction: column; min-width: 0; background: none; border: 0; padding: 0; margin: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.hb:active b { opacity: .5; }
.hm-l { margin: 0 0 4px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hm-row + .hm-l { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.hm .h-title { margin-bottom: 8px; }
.bal-tag { border: 0; border-radius: 999px; padding: 3px 9px; font-size: .72rem; font-weight: 600; background: var(--head, rgba(127,127,127,.12)); color: var(--muted); cursor: pointer; }
.bal-tag.warn { background: #fef3c7; color: #92400e; }
.x-sheet .warn { color: #b45309; font-weight: 600; }
.x-sheet .mb-h { margin-bottom: 2px; }
.x-sheet .txn-list { margin: 0 -4px; }
.x-assume li { padding: 7px 0; }
.x-assume li span { font-size: .9rem; color: var(--muted); }
.x-assume li small { font-size: .9rem; color: var(--ink); margin: 0; }
.x-assume li > div { flex-direction: row; justify-content: space-between; width: 100%; gap: 10px; }
.x-sum { margin-top: 8px; border-top: 1px solid var(--line); }
/* 12 months */
.y-seg { display: inline-flex; margin: 0 0 12px; }
.y-seg button { border: 0; background: transparent; padding: 5px 14px; font-weight: 600; font-size: .82rem; color: var(--muted); border-radius: 999px; cursor: pointer; }
.y-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.y-t { font-size: .8rem; }
.y-t th, .y-t td { padding: 9px 5px !important; }
.y-t th.sticky { font-weight: 600; white-space: nowrap; }
.y-t tr.y-cur th.sticky { font-weight: 800; }
.yc { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-family: var(--mono); color: inherit; cursor: pointer; white-space: nowrap; }
.yc.pos { color: var(--pos); } .yc.neg { color: var(--neg); }
.y-ly { font-family: var(--mono); opacity: .8; }
/* Targets (one system) */
.tg-list li { align-items: center; }
.tg-l { flex: 1; }
.tg-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.tg-bar > i { display: block; height: 100%; background: var(--accent, #4f46e5); border-radius: 3px; }
.tg-bar > i.over { background: var(--neg); }
.tg-n { display: flex; flex-direction: column; align-items: flex-end; }
.tg-n small { color: var(--muted); font-size: .8rem; margin-top: 2px; white-space: nowrap; }
.tg-base { margin: 8px 6px 20px; }

/* stacked cards on phones (Nov 7 2026): tables stay on wider screens */
.phone-only { display: none; }
@media (max-width: 600px) { .wide-only { display: none !important; } .phone-only { display: block; } }
.st-cards { margin: 0 0 16px; }
.st-card { background: var(--card); border-radius: var(--radius, 14px); box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.06)); margin: 0 0 10px; padding: 0 14px; }
.st-card > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; }
.st-card > summary::-webkit-details-marker { display: none; }
.st-name { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-main { display: flex; flex-direction: column; align-items: flex-end; }
.st-main b { font: 700 1.25rem/1.15 var(--mono); white-space: nowrap; }
.st-main small { color: var(--muted); font-size: .72rem; margin-top: 2px; white-space: nowrap; }
.st-special { list-style: none; margin: -6px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.st-special li { font-size: .78rem; background: var(--head, rgba(127,127,127,.1)); border-radius: 999px; padding: 3px 9px; }
.st-more { border-top: 1px solid var(--line); }
.st-more li { padding: 9px 0; }
.st-more li span { font-size: .92rem; color: var(--muted); }
.st-open { margin: 4px 0 12px; }

/* Home main numbers (Nov 7 2026, 7:09 PM: main numbers bigger, labels quieter) */
.hm-main { padding: 14px 14px 16px; }
.hm-main .h-3 b { font-size: 1.62rem; }
.hm-main .h-3 span, .hm .h-3 span { font-size: .66rem; letter-spacing: .07em; }
.hm-main .hb small { font-size: .7rem; color: var(--muted); margin-top: 1px; }
.hm-when { font-size: .78rem; font-weight: 600; color: var(--muted); }
.hm .hm-row b { font-size: 1.08rem; }
.hb-row { display: flex; align-items: baseline; gap: 8px; background: none; border: 0; padding: 0; margin: 0 0 6px; font: inherit; color: inherit; cursor: pointer; }
#home-bills .h-when { margin-right: 10px; min-width: 3.4em; display: inline-block; }
.hm-main .h-3 { gap: 10px; }
.hm-main .h-3 b { font-size: 1.42rem; }
.est { font-synthesis: style; }
.rb-recent { font-family: var(--mono); }
.rb-recent.warn { color: #b45309 !important; }
/* Nov 8 2026 rate-since: old-rate payments greyed + "old rate", off ones bold; Review / Check amount tag */
.rb .mb-list li.rb-row > div, .rb-sheet .mb-list li.tm-row > div { flex: 1; }
.rb .mb-list li.rb-row { gap: 10px; }
.rb-recent .rb-p { font-size: inherit; white-space: nowrap; }
.rb-d { font-style: normal; }
.rb-recent .rb-off, .rb-sheet b.rb-off { font-weight: 700; }
.rb-recent .rb-old, .rb-sheet li.rb-old { opacity: .5; }
.rb-recent.warn .rb-old { color: var(--muted); }
.rb-old em { font-style: normal; font-family: var(--sans, inherit); font-size: .92em; }
.rb-tag { font-size: inherit; }
.rb-sheet .rb-actions { margin-top: 10px; border-top: 1px solid var(--line); }
.rb-sheet .rb-actions2, .rb-sheet #rb-form { border-top: 1px solid var(--line); }
.rb-sheet #rb-form { padding: 8px 0 10px; }
.rb-sheet .mb-list li span small { font-size: inherit; }
.est, b.est, .h-3 b.est, .yc.est { font-style: italic !important; }
.st-col { flex-direction: column; align-items: flex-start; gap: 3px; }
.st-sp { font-weight: 500; font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* This month (Nov 8 2026): #/thismonth — income by source, spending by category, bills paid, still due (est.) */
.hm-go { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: .95rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.hm-go span { flex: 1; }
.hm-go i, .tm-chev { font-style: normal; color: var(--muted); font-size: 1.25rem; line-height: 1; font-weight: 400; }
.hm-go:active { opacity: .6; }
@media (min-width: 640px) { .tm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; } .tm-grid > .card { margin-bottom: 0; } }
.tm-head { display: flex; width: 100%; align-items: baseline; gap: 10px; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tm-head h2 { flex: 1; }
.tm-head:active b { opacity: .5; }
.tm .mb-list li.tm-row > div { flex: 1; }
.tm .mb-list li.tm-row { gap: 10px; }
.tm .mb-list li.tm-row > b { font-size: 1.02rem; }
.tm-check { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 2px; }
.tm-est { border-style: dashed; }
.tm-est .mb-list li b, .tm-est .mb-h b { font-style: italic; }
.tm-est .mb-list li b .est, .tm-est .mb-h b.est { opacity: .68; }
.tm-skip b { font: 500 .85rem/1.2 var(--font, inherit) !important; font-style: normal !important; }
.tm .mb-list li small span { font-size: inherit; }
@media (min-width: 640px) { .tm-grid { grid-template-rows: auto auto 1fr; } #tm-in { grid-column: 1; grid-row: 1; } #tm-paid { grid-column: 1; grid-row: 2; } #tm-due { grid-column: 1; grid-row: 3; } #tm-out { grid-column: 2; grid-row: 1 / span 3; } }
