/* 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; }
}
