/* Cima Books — cream paper, deep navy ink, pine accent. Newsreader for the voice and the money; Source Sans 3 for the
   interface (both SIL Open Font License, self-hosted in /fonts). Company colors are validated categorical slots
   (light and dark checked separately with the dataviz validator) and always sit beside the company name. Status colors
   always come with an icon and a label. Dark mode is its own set of steps, not an inversion. */
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f6f2ea;
  --card: #fffdf9;
  --surface: #f8f4ec;
  --line: #e9e3d7;
  --line-strong: #d9d1c2;
  --ink: #12223a;
  --ink-2: #4c586a;
  --ink-3: #868b93;
  --accent: #0e5e52;
  --accent-hover: #0b4f45;
  --accent-ink: #0b5246;
  --accent-soft: #e3efe9;
  --accent-track: #cfe3dc;
  --bar: #0f6b5d;
  --bar-partial: #a6cfc4;
  --gold: #9a7120; --goal-text: #fffdf9;
  --co1: #008a78; --co2: #e0692c; --co3: #5161d4; /* company identity slots 1–3 (by creation order); 4–8 in product.css */
  --good: #23873c; --good-ink: #1b6a30; --good-soft: #e4f1e6;
  --warn: #d4960f; --warn-ink: #7a5200; --warn-soft: #faefd5;
  --crit: #c63f3b; --crit-ink: #9d2c2a; --crit-soft: #f8e5e2;
  /* hero (Wallet-style card) */
  --hero-a: #12223a; --hero-b: #0f3a3a; --hero-ink: #f6f2ea; --hero-ink-2: rgba(246, 242, 234, .72); --hero-line: rgba(246, 242, 234, .14);
  --h1: #1a9e80; --h2: #c47a18; --h3: #8079e6; /* validated vs the navy hero */
  --ring-good: #6fcfb5; --ring-warn: #e3bd6a;
  --shadow: 0 1px 1px rgba(18, 34, 58, .04), 0 2px 10px rgba(18, 34, 58, .05);
  --shadow-lift: 0 10px 30px rgba(18, 34, 58, .18);
  --radius: 18px;
  --tabbar-h: 66px;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --ui: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga";
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #14181d; --card: #1b2026; --surface: #20262d; --line: #2a3139; --line-strong: #39424c;
    --ink: #f1ede4; --ink-2: #b8b3a7; --ink-3: #868a90;
    --accent: #3aae99; --accent-hover: #48c0aa; --accent-ink: #84d6c4; --accent-soft: #16302b; --accent-track: #1f4a42;
    --bar: #3aae99; --bar-partial: #255a50; --gold: #d8b468; --goal-text: #14181d;
    --co1: #26a08d; --co2: #d8692f; --co3: #7584e6;
    --good: #43b05c; --good-ink: #7fd38f; --good-soft: #15291b; --warn: #e2a72a; --warn-ink: #f0c362; --warn-soft: #2d2410;
    --crit: #e0605b; --crit-ink: #f29a94; --crit-soft: #321a19;
    --hero-a: #1d2c40; --hero-b: #133a37;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .money { font-variant-numeric: tabular-nums lining-nums; }
.money { font-family: var(--display); font-optical-sizing: auto; letter-spacing: -.01em; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 20px); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
}
.top-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.entity-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); cursor: pointer;
  color: var(--ink); font-weight: 600; max-width: 62vw; box-shadow: var(--shadow); transition: background .2s var(--ease), transform .2s var(--ease);
}
.entity-btn:hover { background: var(--surface); }
.entity-btn:active { transform: scale(.98); }
.entity-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; flex: none; opacity: .6; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #9ca3af; display: inline-block; }
.dot.all { background: conic-gradient(var(--co1) 0 33%, var(--co2) 0 66%, var(--co3) 0); }
/* Company identity dots (.c1–.c8, by creation order) are in product.css. */
.demo-chip {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 5px 11px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; cursor: pointer; white-space: nowrap;
}
.demo-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.gear { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); border: 1px solid var(--line-strong); background: var(--card); }
.gear svg { width: 20px; height: 20px; }
.gear[aria-current] { color: var(--accent-ink); border-color: var(--accent); }
.demo-chip + .gear { margin-left: 0; }
@media (max-width: 400px) { .top-mark { display: none; } }
.demo-chip[hidden] + .gear { margin-left: auto; }
#view { padding: 8px 16px 16px; max-width: 1160px; margin: 0 auto; outline: none; }
/* Animates `top`, not transform: a transform on #view would re-anchor the fixed composer to the page. */
.enter { position: relative; animation: enter .2s var(--ease); }
@keyframes enter { from { top: 8px; } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; font-weight: 600; color: var(--ink-3); text-decoration: none; transition: color .2s var(--ease);
}
.tab svg { width: 24px; height: 24px; transition: transform .2s var(--ease); }
.tab[aria-current="page"] { color: var(--accent-ink); }
.tab[aria-current="page"] svg { transform: translateY(-1px); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--crit); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.tab .badge { position: absolute; top: 7px; left: calc(50% + 6px); }

/* ---------- type & layout ---------- */
.page-title { font-family: var(--display); font-size: 34px; font-weight: 500; margin: 10px 0 2px; letter-spacing: -.02em; line-height: 1.1; }
.page-sub { color: var(--ink-2); margin: 0 0 18px; font-size: 15px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 28px 2px 10px; }
.section-title h2 { font-size: 13px; margin: 0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.section-title .more { font-size: 14px; font-weight: 600; text-decoration: none; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.stack > * + * { margin-top: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.card h3 svg { width: 16px; height: 16px; }

/* ---------- home: hero ---------- */
.hero {
  position: relative; overflow: hidden; border: 0; color: var(--hero-ink); padding: 22px 20px 18px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(111, 207, 181, .18), transparent 55%), linear-gradient(160deg, var(--hero-a), var(--hero-b));
  box-shadow: var(--shadow-lift);
}
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.hero-label { font-size: 14px; font-weight: 600; color: var(--hero-ink-2); }
.hero-main { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-top: 6px; }
.hero-figure { font-family: var(--display); font-optical-sizing: auto; font-size: clamp(50px, 15vw, 72px); font-weight: 450; letter-spacing: -.035em; line-height: .95; font-variant-numeric: lining-nums; }
.hero-figure .cur { font-size: .55em; vertical-align: .55em; margin-right: .04em; letter-spacing: 0; color: var(--hero-ink-2); }
.hero-of { color: var(--hero-ink-2); font-size: 15px; margin-top: 8px; }
.hero-line { font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.25; margin: 16px 0 0; letter-spacing: -.01em; }
.hero-line .hl-ico { width: 20px; height: 20px; vertical-align: -2px; margin-right: 8px; color: var(--ring-good); }
.hero-line b { font-style: normal; font-weight: 600; }
.ring { width: 104px; height: 104px; display: block; }
.ring .trk { stroke: var(--hero-line); }
.ring .arc { transition: stroke-dashoffset .9s var(--ease); }
.ring.animate .arc { animation: ring 1s var(--ease) both .1s; }
@keyframes ring { from { stroke-dashoffset: 276.46; } }
.ring .pct { fill: var(--hero-ink); font-family: var(--display); font-size: 26px; font-weight: 500; }
.ring .of { fill: var(--hero-ink-2); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 999px; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.seg { display: block; width: 100%; height: 8px; margin: 18px 0 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--hero-ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--hero-ink); font-weight: 600; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend i.h1 { background: var(--h1); } .legend i.h2 { background: var(--h2); } .legend i.h3 { background: var(--h3); }
.hero-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hero-line); }
.hero-foot div { font-size: 13px; color: var(--hero-ink-2); }
.hero-foot b { display: block; font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--hero-ink); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.hero-foot b small { font-family: var(--ui); font-size: 13px; color: var(--hero-ink-2); font-weight: 500; }

/* KPIs: quieter than the hero */
.kpis { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 14px; }
.kpis .card:first-child { grid-column: 1 / -1; }
.stat { padding: 14px 16px; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; font-variant-numeric: lining-nums tabular-nums; }
.stat .d { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.stat .split { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.stat .split span { display: inline-flex; align-items: center; gap: 6px; }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis-t { fill: var(--ink-3); font-size: 11px; font-family: var(--ui); }
.chart .val-t { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: var(--ui); }
.chart .goal-l { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 4; }
.chart .goal-tag { fill: var(--gold); }
.chart .goal-t { fill: var(--goal-text); font-size: 11px; font-weight: 700; font-family: var(--ui); }
.chart .bar { fill: var(--bar); }
.chart .bar.partial { fill: var(--bar-partial); }
.chart.animate .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .6s var(--ease) both; }
.chart.animate .b1 { animation-delay: .04s; } .chart.animate .b2 { animation-delay: .08s; } .chart.animate .b3 { animation-delay: .12s; }
.chart.animate .b4 { animation-delay: .16s; } .chart.animate .b5 { animation-delay: .2s; }
@keyframes grow { from { transform: scaleY(0); } }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { opacity: .8; }
.chart .hit:focus { outline: none; }
.tip {
  position: fixed; z-index: 60; pointer-events: none; padding: 8px 11px; border-radius: 10px; font-size: 13px;
  background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lift); max-width: 240px;
}
.tip b { display: block; font-size: 16px; font-family: var(--display); font-weight: 600; }
details.table-view { margin-top: 10px; font-size: 14px; }
details.table-view summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }
table.data { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.data td.r, table.data th.r { text-align: right; }

/* contribution */
.contrib { display: grid; gap: 16px; }
.contrib-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.contrib-row .name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.contrib-row .amt { font-family: var(--display); font-size: 20px; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.contrib-row .amt.zero { font-family: var(--ui); font-size: 14px; color: var(--ink-3); font-weight: 500; }
.contrib-row svg { grid-column: 1 / -1; width: 100%; height: 8px; }
.contrib-row .none { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); border-top: 1px dashed var(--line-strong); padding-top: 6px; }
.contrib-row .share { font-size: 12px; color: var(--ink-3); margin-left: 4px; font-weight: 500; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.alert-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 16px; }
.alert-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn-ink); }
.alert-ico svg { width: 18px; height: 18px; }
.alert-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.alert-actions { display: flex; gap: 8px; margin-top: 12px; }
.cut { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 16px; text-decoration: none; color: inherit; transition: background .2s var(--ease); }
.cut:hover { background: var(--surface); }
.cut:active { background: var(--accent-soft); }
.cut .what { font-weight: 650; font-size: 16px; line-height: 1.3; }
.cut .why { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.cut .meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cut .amt { grid-column: 2; grid-row: 1 / span 3; text-align: right; display: flex; align-items: center; gap: 8px; }
.cut .amt b { display: block; font-family: var(--display); font-size: 26px; font-weight: 500; color: var(--accent-ink); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; line-height: 1; }
.cut .amt small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.cut .amt svg { width: 18px; height: 18px; color: var(--ink-3); }
.cut .rank { font-family: var(--display); font-style: italic; color: var(--ink-3); margin-right: 6px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.ask-cfo { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; text-decoration: none; color: var(--accent-ink); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.ask-cfo svg { width: 15px; height: 15px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card); font-weight: 650; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.big { min-height: 54px; font-size: 17px; border-radius: 16px; }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 14px; border-radius: 11px; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-ink); }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn:focus-visible, .tab:focus-visible, .entity-btn:focus-visible, .seg-btn:focus-visible, .opt:focus-visible, .cut:focus-visible, .demo-chip:focus-visible, .sugg:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cta { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; margin-top: 14px; transition: transform .15s var(--ease); }
.cta:active { transform: scale(.99); }
.cta .cta-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.cta .cta-ico svg { width: 22px; height: 22px; }
.cta .grow { flex: 1; }
.cta b { font-size: 16px; }

/* inbox */
.txn { padding: 18px 16px; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.txn + .txn { border-top: 1px solid var(--line); }
.txn-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.txn-merchant { font-weight: 650; font-size: 18px; line-height: 1.25; }
.txn-amt { font-family: var(--display); font-weight: 500; font-size: 22px; white-space: nowrap; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.txn-amt.in { color: var(--good-ink); }
.txn-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.suggest { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid transparent; }
.suggest .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.suggest .cat { font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 1px; }
.suggest .why { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.suggest.maybe { background: transparent; border: 1.5px dashed var(--line-strong); }
.suggest.maybe .lbl { color: var(--ink-3); }
.suggest.maybe .cat { font-weight: 500; color: var(--ink-2); font-style: italic; font-family: var(--display); font-size: 19px; }
.suggest.new { background: var(--surface); border: 1px solid var(--line); }
.suggest.new .lbl { color: var(--gold); }
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; font-style: normal; font-family: var(--ui); }
.conf svg { width: 36px; height: 6px; }
.txn-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 14px; }
.txn-actions.one { grid-template-columns: 1fr; }
.cardholder { background: color-mix(in srgb, var(--co3) 14%, transparent); border-color: transparent; color: var(--ink); font-weight: 650; }
.empty { text-align: center; padding: 48px 20px; }
.empty .big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.empty .big svg { width: 30px; height: 30px; }
.empty h2 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 0 0 6px; letter-spacing: -.01em; }
.leaving { animation: leave .2s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(28px); } }
.collapse { overflow: hidden; transition: height .2s var(--ease), padding .2s var(--ease); }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(12, 20, 32, .42); animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .22);
  animation: up .22s var(--ease);
}
@keyframes up { from { transform: translateY(40px); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 14px; }
.sheet h2 { font-family: var(--display); font-weight: 500; font-size: 24px; margin: 0 0 2px; letter-spacing: -.01em; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: transparent; text-align: left; cursor: pointer; font-size: 16px; transition: background .15s var(--ease);
}
.opt:hover { background: var(--surface); }
.opt[aria-checked="true"] { background: var(--accent-soft); }
.opt .grow { flex: 1; }
.opt .code { color: var(--ink-3); font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.opt .tick { width: 20px; height: 20px; color: var(--accent-ink); }
.opt .why { display: block; font-size: 13px; color: var(--ink-3); }
.opt-group { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 16px 14px 4px; }
.opt-group.top { color: var(--accent-ink); }
.search { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; color: var(--ink); margin: 12px 0 4px; }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--card); }

/* toast */
.toast {
  position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  max-width: min(92vw, 460px); padding: 13px 16px; border-radius: 14px; background: var(--ink); color: var(--paper); font-size: 15px; box-shadow: var(--shadow-lift);
  display: flex; gap: 10px; align-items: center; animation: toast .2s var(--ease);
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast svg { width: 18px; height: 18px; color: var(--ring-good); flex: none; }
.toast-act { margin-left: 4px; padding: 6px 12px; border-radius: 999px; border: 0; background: var(--paper); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; flex: none; }
.toast-act:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* offline note and install steps (installable app, docs/PWA.md) */
.offline { margin: 40px auto; max-width: 360px; text-align: center; color: var(--ink-2); }
.offline svg { width: 40px; height: 40px; color: var(--ink-3); }
.offline p { font-family: var(--display); font-size: 20px; line-height: 1.35; color: var(--ink); margin: 10px 0 0; }
.install-steps { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.install-steps svg { width: 22px; height: 22px; flex: none; color: var(--accent-ink); }
/* Installed (full screen) on a phone held sideways: keep clear of the notch and rounded corners. */
.topbar, #view { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.tabbar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* reports */
.segmented { display: flex; gap: 6px; overflow-x: auto; padding: 2px; margin: 0 -2px 12px; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.seg-btn {
  flex: none; min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; transition: background .2s var(--ease), color .2s var(--ease);
}
.seg-btn[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.segmented.sub .seg-btn { min-height: 32px; font-size: 14px; border-color: transparent; }
.segmented.sub .seg-btn[aria-pressed="true"] { background: var(--card); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 18px 16px 14px; }
.summary > div { padding: 0 8px; border-left: 1px solid var(--line); min-width: 0; }
.summary > div:first-child { padding-left: 2px; border-left: 0; }
.summary .k { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.summary .v { font-family: var(--display); font-size: clamp(19px, 5.3vw, 34px); white-space: nowrap; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.summary .v.pos { color: var(--good-ink); } .summary .v.neg { color: var(--crit-ink); }
.summary .s { font-size: 12px; color: var(--ink-3); }
.vs { padding: 0 16px 18px; }
.vs svg { width: 100%; height: 44px; display: block; }
.vs .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.vs .lbl span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key.in { background: var(--bar); } .key.out { background: var(--bar-partial); margin-left: 6px; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 16px 0; }
.report-head .t { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.report-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 36px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; margin: 0; cursor: pointer; transition: background .2s var(--ease); }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(14px); }
.toggle input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.stmt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stmt th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; padding: 20px 16px 6px; }
.stmt td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.stmt td.r { text-align: right; white-space: nowrap; }
.stmt .code { display: none; color: var(--ink-3); font-size: 12px; margin-right: 6px; }
.show-codes .stmt .code { display: inline; }
.stmt .nm { display: block; }
.stmt .sub { display: block; font-size: 13px; color: var(--ink-3); }
.stmt tr.total td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.stmt tr.net td { font-family: var(--display); font-weight: 600; font-size: 20px; background: var(--accent-soft); border-top: 0; }
.stmt tr.click { cursor: pointer; }
.stmt tr.click:hover td { background: var(--surface); }
.trend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; margin-top: 2px; }
.trend svg { width: 54px; height: 16px; }
.trend svg:not([viewBox="0 0 54 16"]) { width: 13px; height: 13px; }
.trend svg.flip { transform: rotate(180deg); }
.trend .spark { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trend .last { fill: var(--ink-2); }
.trend.up { color: var(--crit-ink); } .trend.down { color: var(--good-ink); } .trend.flat { color: var(--ink-3); }
.note { font-size: 13px; color: var(--ink-2); padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.note svg { width: 16px; height: 16px; flex: none; }
.note.good svg { color: var(--good); } .note.warn svg { color: var(--warn); }
.pick { display: grid; gap: 8px; }
.export-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.export-row:first-child { border-top: 0; }
.select { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); padding: 0 12px; font-size: 16px; color: var(--ink); }
.handoff { position: relative; overflow: hidden; }
.handoff .doc { display: flex; gap: 14px; align-items: center; }
.handoff .file { width: 54px; height: 66px; border-radius: 8px; flex: none; background: linear-gradient(160deg, #1f7a4d, #145a39); color: #fff; display: grid; place-items: end center; padding-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .05em; box-shadow: var(--shadow-lift); position: relative; }
.handoff .file::before { content: ""; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: linear-gradient(225deg, var(--card) 50%, rgba(255, 255, 255, .35) 50%); border-bottom-left-radius: 4px; }
.handoff h2 { font-family: var(--display); font-weight: 500; font-size: 24px; margin: 0; letter-spacing: -.01em; }
.handoff ul { margin: 14px 0 16px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 14px; color: var(--ink-2); }
.handoff li { display: flex; align-items: center; gap: 6px; }
.handoff li svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.handoff .row { display: flex; gap: 10px; align-items: center; }
.handoff .row .btn { flex: 1; }
.bs-sum .v.assets { color: var(--ink); }

/* accounts */
.acct { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 16px; border-top: 1px solid var(--line); }
.acct:first-of-type { border-top: 0; }
.acct-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.acct-ico svg { width: 21px; height: 21px; }
.acct .nm { font-weight: 650; font-size: 16px; }
.acct .meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 2px; }
.acct .bal { text-align: right; font-family: var(--display); font-size: 22px; font-weight: 500; white-space: nowrap; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.acct .bal small { display: block; font-family: var(--ui); font-weight: 500; font-size: 12px; color: var(--ink-3); letter-spacing: 0; }
.fresh { display: inline-flex; align-items: center; gap: 6px; }
.fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.fresh.todo::before { background: var(--warn); }
.fresh.off::before { background: var(--ink-3); }
a.fresh { color: var(--warn-ink); font-weight: 650; text-decoration: none; }
.co-head { display: flex; align-items: center; gap: 8px; padding: 16px; font-weight: 700; font-size: 17px; }
.co-head .sum { margin-left: auto; font-size: 14px; color: var(--ink-2); font-weight: 600; text-align: right; }
.cards { display: grid; gap: 12px; padding: 4px 16px 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.ccard {
  position: relative; aspect-ratio: 1.586; border-radius: 16px; padding: 16px 18px; color: #fff; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(140deg, #2b3542, #11161d); box-shadow: 0 8px 22px rgba(10, 16, 24, .22), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.ccard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%); pointer-events: none; }
.ccard.amex { background: linear-gradient(140deg, #5d6d7c, #2a3540); }
.ccard.amex.gold { background: linear-gradient(140deg, #6f87a3, #33475e); }
.ccard.venture { background: linear-gradient(140deg, #3a3f4a, #0f1217); }
.ccard.blue { background: linear-gradient(140deg, #2f74c8, #173f7a); }
.ccard.virtual { background: linear-gradient(140deg, #5c4bc4, #2e2373); }
.ccard .issuer { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.ccard .cname { font-size: 17px; font-weight: 650; line-height: 1.2; margin-top: 2px; }
.ccard .chipmark { width: 34px; height: 25px; border-radius: 6px; background: linear-gradient(135deg, #e8cf8a, #b8913f); margin-top: 12px; opacity: .9; }
.ccard .bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.ccard .last4 { font-size: 15px; letter-spacing: .14em; font-variant-numeric: tabular-nums; opacity: .9; }
.ccard .owed { text-align: right; font-family: var(--display); font-size: 26px; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ccard .owed small { display: block; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-bottom: 3px; }
.ccard .who { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #fff; color: #2e2373; }
.ccard .status { position: absolute; left: 18px; bottom: 50px; font-size: 12px; opacity: .85; display: inline-flex; gap: 6px; align-items: center; }
.ccard .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7fe0a8; }
.ccard .status.todo::before { background: #f3c25e; }
.ccard-wrap .under { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 8px; padding: 0 2px; }
.ccard-wrap .under a { color: var(--warn-ink); font-weight: 650; text-decoration: none; }
.ccard-wrap.sub { position: relative; }
.ccard-wrap.sub .ccard { transform: scale(.94); transform-origin: top center; margin-top: -6px; }
.subhead { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 2px 16px 0; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 14px; padding-bottom: 96px; }
.chat-note { align-self: center; font-size: 13px; color: var(--ink-3); text-align: center; max-width: 46ch; }
.chat-note::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: 1px; }
.msg { position: relative; max-width: 88%; padding: 12px 15px; border-radius: 20px; font-size: 16px; animation: enter .2s var(--ease); }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.cfo { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg .lead { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 6px; }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin-bottom: 0; }
.msg ol { margin: 6px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 15px; }
.msg ol li { display: flex; gap: 8px; }
.msg ol .n { font-family: var(--display); font-style: italic; color: var(--ink-3); min-width: 1ch; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cites .chip { font-size: 12px; }
.next { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: 15px; padding: 8px 13px; border-radius: 999px; cursor: pointer; }
.next svg { width: 15px; height: 15px; }
.cfo-hello { text-align: center; padding: 20px 8px 6px; }
.cfo-hello .av { width: 60px; height: 60px; border-radius: 20px; margin: 0 auto 12px; display: grid; place-items: center; background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); color: var(--ring-warn); box-shadow: var(--shadow-lift); }
.cfo-hello .av svg { width: 28px; height: 28px; }
.cfo-hello h2 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 0 0 6px; letter-spacing: -.015em; }
.cfo-hello p { color: var(--ink-2); margin: 0 auto; max-width: 36ch; }
.suggestions { display: grid; gap: 10px; margin-top: 18px; }
.sugg { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 16px; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s var(--ease), background .2s var(--ease); }
.sugg:hover { background: var(--surface); }
.sugg:active { transform: scale(.99); }
.sugg .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.sugg .ico svg { width: 18px; height: 18px; }
.sugg .grow { flex: 1; }
.sugg > svg { width: 18px; height: 18px; color: var(--ink-3); }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25; display: flex; gap: 8px;
  padding: 10px 12px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.composer input { flex: 1; min-height: 48px; border-radius: 24px; border: 1px solid var(--line-strong); padding: 0 18px; font-size: 16px; background: var(--card); color: var(--ink); }
.composer input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.composer .btn { border-radius: 24px; min-width: 48px; padding: 0 14px; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; } }
.skeleton { height: 140px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--surface), var(--card)); background-size: 200% 100%; animation: sh 1.2s infinite; margin: 12px 0; }
@keyframes sh { to { background-position: -200% 0; } }
.error { padding: 14px 16px; border-radius: 14px; background: var(--crit-soft); color: var(--crit-ink); }

/* settings */
.form-h { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.fields { display: grid; gap: 12px; margin: 14px 0 6px; }
.fields label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.fields input:not([type="checkbox"]), .row-form input { min-height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 14px; font-size: 16px; color: var(--ink); width: 100%; }
.fields input:focus, .row-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--card); }
.fields label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.fields label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.money-in { position: relative; display: block; }
.money-in > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; }
.money-in input { padding-left: 28px !important; font-family: var(--display); font-size: 20px !important; }
.row-form { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.row-form:first-child { border-top: 0; }
.pad { padding: 12px 16px; margin: 0; border-top: 1px solid var(--line); }
.holder-card { padding: 16px; border-top: 1px solid var(--line); }
.holder-card:first-child { border-top: 0; }
.hc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.holders { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.holders li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-holder { margin-top: 10px; }
.add-holder summary { cursor: pointer; color: var(--accent-ink); font-weight: 650; font-size: 15px; }
.hero-link { color: var(--ring-good); font-style: normal; font-weight: 600; }

/* ---------- tablet / desktop ---------- */
@media (min-width: 720px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpis .card:first-child { grid-column: auto; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 500px; border-radius: 24px; animation: pop .2s var(--ease); }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } }
  .sheet .grab { display: none; }
  .suggestions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .tabbar { display: none; }
  .top-mark { display: none; }
  .main { padding-bottom: 40px; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; width: 236px; flex: none; position: sticky; top: 0; height: 100vh;
    background: var(--surface); border-right: 1px solid var(--line); padding: 20px 12px;
  }
  .brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; padding: 2px 10px 22px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 11px; font-size: 15px; color: var(--ink-2); }
  .side-nav .tab svg { width: 20px; height: 20px; }
  .side-nav .tab:hover { background: var(--card); color: var(--ink); }
  .side-nav .tab[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
  .side-nav .tab[aria-current="page"] svg { color: var(--accent); transform: none; }
  .side-nav .tab[aria-current="page"]::before { display: none; }
  .side-nav .tab .badge { position: static; margin-left: auto; }
  .gear { display: none; }
  .side-settings { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 0 !important; padding-top: 14px !important; }
  .side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--ink-3); }
  .topbar { padding: 14px 32px; }
  #view { padding: 4px 32px 24px; }
  .page-title { font-size: 40px; }
  .composer { left: 236px; bottom: 0; padding: 14px 32px; }
  .toast { bottom: 24px; }
  .chat { padding-bottom: 110px; max-width: 760px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .home-grid > div > .section-title:first-child { margin-top: 0; }
  .hero { padding: 26px 26px 22px; }
  .reports-wrap { max-width: 820px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sign-in, account, operators ---------- */
body.signed-out .sidebar, body.signed-out .topbar, body.signed-out .tabbar { display: none; }
body.signed-out .main { padding-bottom: 24px; }
body.signed-out #view { padding: 0; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: url("/icon.svg") center / cover; flex: none; display: inline-block; }
.auth { min-height: calc(100vh - 48px); display: flex; flex-direction: column; justify-content: center; gap: 18px; width: min(100%, 420px); margin: 0 auto; padding: 32px 16px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; padding: 0 4px; }
.auth-brand .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
.auth-brand .small { color: var(--ink-2); font-size: 13px; }
.auth-card { padding: 22px 20px; }
.auth-card .page-sub { margin-bottom: 18px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); margin: 0; }
.auth-foot svg { width: 14px; height: 14px; }
.help { margin: 16px 0 0; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.lbl { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-3); }
.field input, .pw input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card);
  font: inherit; font-size: 16px; color: var(--ink);
}
.field input:focus-visible, .pw input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.pw { position: relative; display: block; }
.pw input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--surface); color: var(--accent-ink); font-weight: 650; font-size: 13px; cursor: pointer; }
.pw-toggle:focus-visible { outline: 3px solid var(--accent); }
.btn.block { width: 100%; min-height: 50px; font-size: 16px; }
.btn.busy { opacity: .7; cursor: progress; }
.btn:disabled { cursor: progress; }
.form-error { padding: 10px 12px; border-radius: 10px; background: var(--crit-soft); color: var(--crit-ink); font-size: 14px; font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 13px; margin: 12px 0; }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--accent-ink); margin-top: 1px; }
.notice.warn { background: var(--warn-soft); }
.notice.warn svg { color: var(--warn-ink); }
.checks { list-style: none; margin: -2px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); box-sizing: border-box; flex: none; }
.checks li.ok { color: var(--good-ink); font-weight: 600; }
.checks li.ok::before { border-color: var(--good); background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.narrow { max-width: 480px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent-ink); border: 0;
}
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.off { background: var(--surface); color: var(--ink-3); }
.me-btn { flex: none; width: 40px; height: 40px; margin-left: 8px; cursor: pointer; background: var(--accent-soft); color: var(--accent-ink); }
.me-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.me-head { display: flex; align-items: center; gap: 12px; margin: 4px 4px 12px; }
.me-head h2 { margin: 0; }
.menu { display: grid; gap: 2px; }
.menu .opt svg:first-child { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.opt.danger b { color: var(--crit-ink); }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.title-row .btn { margin-top: 4px; }
.op-row { display: flex; align-items: center; gap: 12px; }
.op-row .grow { flex: 1; min-width: 0; }
.op-row .nm { font-weight: 650; }
.op-row .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--ink-2); margin: 3px 0 2px; }
.chip.owner { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.chip.off { background: var(--crit-soft); border-color: transparent; color: var(--crit-ink); font-weight: 600; }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); font-weight: 600; }
.chip svg { width: 12px; height: 12px; }
.note-out { margin: 12px 4px; }
.roles { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.roles legend { margin-bottom: 6px; padding: 0; }
.opt.role { border: 1px solid var(--line-strong); }
.opt.role:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt.role input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.secret { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line-strong); margin: 8px 0; }
.secret code { font-size: 18px; font-weight: 700; letter-spacing: .04em; background: none; border: 0; padding: 0; user-select: all; }
@media (min-width: 960px) {
  .me-btn { background: var(--accent-soft); color: var(--accent-ink); }
  body.signed-out .main { padding-bottom: 24px; }
}
/* ---------- flow: subtabs, short Home, CFO cut list / watch list, P&L overview (feat/ui-flow) ---------- */
.subtabs { margin-top: 10px; margin-bottom: 14px; }
.seg-n { margin-left: 7px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.seg-btn[aria-current="page"] .seg-n { background: var(--paper); color: var(--ink); }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 650; text-decoration: none; color: var(--accent-ink); }
.see-all svg { width: 15px; height: 15px; }
.see-all.block { display: flex; justify-content: center; padding: 16px; margin-top: 6px; }

.todo { margin-top: 14px; }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.todo-row:first-child { border-top: 0; }
.todo-row:hover { background: var(--surface); }
.todo-row .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.todo-row b { font-size: 16px; }
.todo-row .cta-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.todo-row .cta-ico.watch { background: var(--gold); color: var(--goal-text); }
.todo-row .cta-ico svg { width: 21px; height: 21px; }
.todo-row .chev { width: 18px; height: 18px; color: var(--ink-3); }

.gap-line { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.gap-line svg { width: 100%; height: 8px; }
.cut.mini { padding: 13px 16px; }
.cut.mini .amt b { font-size: 22px; }
.cut.full { cursor: default; }
.cut.full:hover, .cut.full:active { background: none; }
.cut .ask-how { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; text-decoration: none; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.cut .ask-how svg { width: 13px; height: 13px; }
.cut-sum { display: flex; gap: 24px; margin-bottom: 4px; }
.cut-sum .k { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.cut-sum .v { font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.cut-sum .v small { font-family: var(--ui); font-size: 13px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.chart .wf { opacity: .92; }
.chart .wf.over { opacity: .45; }
.chart .wf-link { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 2; }
.chart .hit:hover + .wf, .chart .hit:focus + .wf { opacity: .7; }

.where { display: grid; gap: 12px; }
.where-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.where-row .name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where-row .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.where-row .pct { color: var(--ink-3); font-size: 12px; min-width: 32px; text-align: right; }
.where-row svg { grid-column: 1 / -1; width: 100%; height: 8px; grid-row: 2; }

.acct-bar { margin-top: 6px; }
.acct-bar svg { width: 100%; height: 6px; display: block; }

/* Bars are drawn full height; the grow animation only plays where motion is allowed. */
@media (prefers-reduced-motion: reduce) { .chart.animate .bar, .ring.animate .arc { animation: none; } }
[hidden] { display: none !important; }
.show-more { display: block; width: 100%; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-weight: 650; font-size: 15px; color: var(--accent-ink); cursor: pointer; text-align: center; }
.show-more:hover { background: var(--surface); }
.show-more:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.chart .wf.alt { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 2; }
.chip.alt { border-style: dashed; }
