/* Grow Accounting (growdev.org/accounting), Kenny 2026-10-06 #grow-accounting.
   Built on the Grow User Dashboard (Studio Light/Dark tokens from studio.css; shell, rail, buttons, toast from app.css).
   Money uses tabular numbers; credits/income read in the green link ink, never red/green alone (a sign or word too). */

.ac-main { container: acm / inline-size; }
.acct .num, .acct td.n, .acct .money { font-variant-numeric: tabular-nums; }
.pos { color: var(--acc-ink); }
.neg { color: var(--ink); }
.muted { color: var(--ink-3); }

/* ---------- rail: entity switcher ---------- */
.ent { position: relative; margin: 0 0 6px; }
.ent-btn { display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px;
  background: var(--sf); box-shadow: var(--e1); text-align: left; cursor: pointer; color: var(--ink); }
.ent-btn:hover { box-shadow: var(--e2); }
.ent-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 800; font-size: 13px; background: var(--a-soft); color: var(--a-ink); }
.ent-btn b { display: block; font-size: 14px; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-btn small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-btn > svg { width: 16px; height: 16px; color: var(--ink-3); }
.ent-menu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; border-radius: 14px; background: var(--sf); box-shadow: var(--e3); }
.ent-menu button { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.ent-menu button:hover, .ent-menu button[aria-current="true"] { background: var(--hover); }
.ent-menu .ent-av { width: 32px; height: 32px; font-size: 12px; }
.ent-menu b { font-size: 13.5px; display: block; }
.ent-menu small { font-size: 12px; color: var(--ink-3); }
.rail-link .rl-n { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--acc); color: var(--acc-on); font-size: 12px; font-weight: 800; }
.rail-link .rl-n.soft { background: var(--bg); color: var(--ink-2); }
@media (max-width: 999px) {
  .ent { margin: 0 0 10px; max-width: 360px; }
  .acct .rail nav > .ent { display: block; }
  .rail-link .rl-n { display: none; }
}

/* ---------- page head ---------- */
.ac-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 0 0 22px; }
.ac-head .eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.ac-head h1 { margin: 0; font-size: clamp(28px, 3.6cqi, 40px); line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.ac-head p.lede { margin: 8px 0 0; color: var(--ink-3); font-weight: 500; font-size: 15.5px; max-width: 62ch; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn svg { width: 17px; height: 17px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.sample svg { width: 14px; height: 14px; flex: none; }
.ac-main:focus { outline: none; }
/* Kenny 2026-10-06 #grow-accounting: catch-all so no sprite icon ever renders at intrinsic size */
.ac-main svg:not([width]):not(.spark) { max-width: 22px; max-height: 22px; }
.sample { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--bg); color: var(--ink-3); font-size: 12px; font-weight: 700; }

/* ---------- cards & grids ---------- */
.card { background: var(--sf); border-radius: var(--r-panel); box-shadow: var(--e1); padding: 20px 22px; min-width: 0; }
.card > h2, .card-h h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.card-h a, .card-h button.lnk { font-size: 13.5px; font-weight: 700; color: var(--acc-ink); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.card-h a:hover { text-decoration: underline; }
.card p.sub { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-3); }
.g { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@container acm (min-width: 720px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g21 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
@container acm (min-width: 1040px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mt { margin-top: 18px; }

/* hero: the dark Studio panel, like the dashboard's hero */
.ac-hero { position: relative; border-radius: var(--r-panel); background: var(--hero); color: #fff; padding: 24px 26px; overflow: hidden; box-shadow: var(--e-dark); --acc-ring: #fff; }
.ac-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.ac-hero .ah-k { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); margin: 0; }
.ac-hero .ah-v { font-size: clamp(34px, 5cqi, 52px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; margin: 4px 0 0; }
.ac-hero .ah-s { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; font-size: 14px; color: rgba(255,255,255,.78); font-weight: 600; }
.ac-hero .ah-s b { color: #fff; }
.ac-hero-row { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@container acm (min-width: 820px) { .ac-hero-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.spark { width: 100%; height: 96px; display: block; }
.spark .ln { fill: none; stroke: var(--acc); stroke-width: 2.5; }
.spark .ar { fill: url(#sparkfill); }

/* KPI tiles */
.kpi { padding: 18px 20px; }
.kpi .k { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.kpi .k i { width: 9px; height: 9px; border-radius: 50%; background: var(--a, var(--ink-3)); }
.kpi .v { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.kpi .d { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi .d b { color: var(--ink-2); }

/* account rows */
.alist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.arow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
a.arow:hover, button.arow:hover { background: var(--hover); }
button.arow { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.bank { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .02em; background: var(--bc, var(--lead)); overflow: hidden; }
.bank.long { font-size: 9.5px; letter-spacing: 0; }
.bank.mini { width: 22px; height: 22px; border-radius: 6px; font-size: 8.5px; letter-spacing: 0; }
.arow b { display: block; font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow small { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.arow .amt { text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.arow .amt small { font-weight: 600; }
.dot-ok, .dot-warn { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--acc-edge, #6D941E); }
.dot-warn { background: var(--disc); }

/* bar chart (P&L by month) */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: end; height: 190px; padding: 6px 4px 0; border-bottom: 1px solid var(--line); }
.bars .col { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: end; height: 100%; }
.bars .b { border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; }
.bars .b.in { background: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-edge); }
.bars .b.out { background: var(--line-2); }
.bars-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; padding: 8px 4px 0; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-align: center; }
.bars-x span b { display: block; color: var(--ink); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* checklist */
.chk { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chk li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--hair); font-size: 14px; font-weight: 600; }
.chk li:last-child { border-bottom: 0; }
.chk .ck { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--line-2); }
.chk .ck svg { width: 14px; height: 14px; }
.chk li.done .ck { background: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-edge); color: var(--acc-on); }
.chk li.done span.t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.chk a { font-size: 13px; font-weight: 700; color: var(--acc-ink); text-decoration: none; white-space: nowrap; }

/* meter */
.meter { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--a, var(--acc)); }

/* ---------- tables ---------- */
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.tbar .grow { flex: 1; }
.ac-seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--sf); border-radius: 12px; box-shadow: var(--e1); flex-wrap: wrap; }
.ac-seg button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 700 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; }
.ac-seg button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-ink); }
.ac-seg button .c { font-size: 12px; opacity: .7; }
.srch { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; min-width: 220px; border-radius: 12px; background: var(--sf); box-shadow: var(--e1); }
.srch svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.srch input { border: 0; background: none; outline: 0; font: 600 14px var(--font); color: var(--ink); width: 100%; }
.sel { height: 42px; padding: 0 34px 0 12px; border: 0; border-radius: 12px; background: var(--sf); box-shadow: var(--e1); font: 700 13.5px var(--font); color: var(--ink); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }

.ac-tw { background: var(--sf); border-radius: var(--r-panel); box-shadow: var(--e1); overflow: hidden; }
.tscroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sf); }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; font-weight: 700; }
table.t tbody tr:hover td { background: var(--hover); }
table.t .d { white-space: nowrap; color: var(--ink-3); font-weight: 600; font-size: 13px; }
table.t .p b { display: block; font-weight: 700; font-size: 14px; max-width: 34ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.t .p small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; max-width: 34ch; white-space: normal; line-height: 1.35; }
table.t tr.sum td { font-weight: 800; border-top: 1px solid var(--line); background: var(--bg); }
table.t tr.grp td { padding-top: 18px; font-size: 12.5px; font-weight: 800; color: var(--ink-3); border-bottom: 1px solid var(--line); }
table.t tr.ind td:first-child { padding-left: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--bg); font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--a, var(--ink-3)); }
.chip.ok { background: var(--acc-soft); color: var(--acc-ink); }
.chip.warn { background: var(--disc-soft); color: var(--disc-ink); }
.chip.info { background: var(--vol-soft); color: var(--vol-ink); }
.chip.lock svg, .chip svg { width: 13px; height: 13px; }
.ai { display: inline-flex; align-items: center; gap: 6px; }
.ai .conf { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.ai .conf.lo { color: var(--disc-ink); }
.ibtn2 { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; }
.ibtn2:hover { background: var(--hover); color: var(--ink); }
.ibtn2 svg { width: 17px; height: 17px; }
.ac-rc { color: var(--ink-3); }
.ac-rc.ac-miss { color: var(--disc-ink); }
.cat-sel { height: 34px; max-width: 220px; padding: 0 30px 0 10px; border: 0; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2); background-color: var(--sf); font: 700 13px var(--font); color: var(--ink); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.cat-sel.sug { box-shadow: inset 0 0 0 1.5px var(--acc-edge); background-color: var(--acc-soft); }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.empty-s { padding: 36px 20px; text-align: center; color: var(--ink-3); font-weight: 600; }
.empty-s b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

.bulk { position: sticky; bottom: 16px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--float-bg); color: #fff; box-shadow: 0 0 0 1px var(--float-rim), var(--e3); --acc-ring: #fff; }
.bulk .btn:disabled { opacity: 1; background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); box-shadow: none; }
.bulk p { margin: 0; flex: 1; font-weight: 700; font-size: 14px; }
.bulk .btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }

/* ---------- connections ---------- */
.conn { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: start; }
.conn .bank { width: 52px; height: 52px; border-radius: 14px; font-size: 14px; }
.conn h3 { margin: 2px 0 2px; font-size: 16.5px; letter-spacing: -.02em; }
.conn p { margin: 0; font-size: 13.5px; color: var(--ink-3); font-weight: 500; }
.conn .ca { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.qb { background: #2CA01C; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 600; }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sf); box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 800; font-size: 13px; }
.steps li.done::before { content: "✓"; background: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-edge); color: var(--acc-on); }
.steps li.now::before { background: var(--sel-bg); color: var(--sel-ink); box-shadow: none; }
.steps li small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.note b { color: var(--ink); }
.note.acc { background: var(--acc-soft); }

/* ---------- reconcile ---------- */
.recon-sum { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container acm (min-width: 820px) { .recon-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.recon-sum div { padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.recon-sum small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.recon-sum b { font-size: 20px; letter-spacing: -.03em; }
.recon-sum .diff.zero { background: var(--acc-soft); }
.recon-sum .diff.zero b { color: var(--acc-ink); }
.tick { width: 20px; height: 20px; accent-color: var(--acc-edge); cursor: pointer; }

/* ---------- payroll ---------- */
.prun { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@container acm (min-width: 980px) { .prun { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.stepper { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.stepper span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px; border-radius: 99px; background: var(--sf); box-shadow: var(--e1); font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.stepper span i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); font-style: normal; font-size: 12px; font-weight: 800; }
.stepper span.on { color: var(--sel-ink); background: var(--sel-bg); }
.stepper span.on i { background: var(--acc); color: var(--acc-on); }
.stepper span.done i { background: var(--acc); color: var(--acc-on); }
.hrs { width: 76px; height: 34px; padding: 0 8px; border: 0; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--sf); color: var(--ink); font: 700 14px var(--font); text-align: right; }
.sticky-sum { position: sticky; top: calc(var(--hdr) + 20px); }
.sumlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.sumlist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sumlist li b { color: var(--ink); }
.sumlist li.tot { border-bottom: 0; padding-top: 12px; font-size: 16px; color: var(--ink); font-weight: 800; }
.av-s { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--a-soft, var(--bg)); color: var(--a-ink, var(--ink-2)); font-size: 12px; font-weight: 800; margin-right: 10px; vertical-align: middle; flex: none; }
.who { display: flex; align-items: center; }
.who b { display: block; font-size: 14px; }
.who small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ---------- reports ---------- */
.rep-doc { max-width: none; }
.rep-doc .rh { text-align: center; padding: 8px 0 18px; }
.rep-doc .rh b { display: block; font-size: 18px; letter-spacing: -.02em; }
.rep-doc .rh span { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.rep-tiles { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container acm (min-width: 640px) { .rep-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container acm (min-width: 1040px) { .rep-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rtile { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: var(--r-card); background: var(--sf); box-shadow: var(--e1); text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.rtile:hover { box-shadow: var(--e2); transform: translateY(-2px); }
.rtile .ri { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--a-soft); color: var(--a-ink); }
.rtile .ri svg { width: 22px; height: 22px; }
.rtile b { display: block; font-size: 15.5px; letter-spacing: -.015em; }
.rtile span { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* ---------- funds ---------- */
.fund { padding: 18px 20px; }
.fund .fh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fund .fh b { font-size: 15.5px; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; }
.fund .fh b i { width: 10px; height: 10px; border-radius: 50%; background: var(--fc); }
.fund .fv { font-size: 26px; font-weight: 800; letter-spacing: -.035em; margin: 8px 0 2px; }
.fund .fm { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin: 0 0 8px; }
.fund .meter i { background: var(--fc); }

/* ---------- dialog ---------- */
.ac-scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim-dlg); }
.ac-dlg { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: var(--r-panel); background: var(--sf); box-shadow: var(--e3); }
.ac-dlg.wide { width: min(760px, calc(100vw - 24px)); }
.ac-dlg h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.03em; }
.ac-dlg > p { margin: 0 0 16px; color: var(--ink-3); font-size: 14px; }
.ac-dlg .x { position: absolute; top: 14px; right: 14px; }
.fld { display: grid; gap: 6px; margin: 0 0 14px; }
.fld label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fld input, .fld select, .fld textarea { height: 42px; padding: 0 12px; border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--sf); color: var(--ink); font: 600 14px var(--font); }
.fld textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 3px solid var(--acc-ring); outline-offset: 1px; }
.frow { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dlg-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.plaid { display: grid; gap: 8px; }
.plaid button { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: var(--bg); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.plaid button:hover { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.plaid .bank { width: 44px; height: 44px; }
.prog { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; margin: 10px 0; }
.prog i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.split-row input { height: 38px; padding: 0 10px; border: 0; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--sf); color: var(--ink); font: 700 14px var(--font); text-align: right; }
.split-row .cat-sel { max-width: none; height: 38px; }

/* phones */
@media (max-width: 600px) {
  .card { padding: 16px; }
  .ac-hero { padding: 20px; }
  table.t th, table.t td { padding: 10px; }
  .hide-s { display: none; }
  .srch { min-width: 0; flex: 1 1 100%; order: 9; }
  .tbar .grow { display: none; }
  .bulk { position: static; padding: 10px 12px; gap: 8px; }
  .ac-head .eyebrow { flex-wrap: wrap; }
  .bulk p { flex-basis: 100%; font-size: 13px; }
}
.show-xs { display: none !important; }
@container acm (max-width: 560px) { .hide-xs { display: none; } .show-xs { display: block !important; } }
@container acm (max-width: 700px) { .hide-m { display: none; } }

/* Grow Accounting app additions (accounting.sycu.org). Kenny 2026-10-06 #grow-accounting.
   Everything above this file is the approved prototype's accounting.css, unchanged. These rules only add what the real
   app needs: sign-in, loading skeletons, the import wizard, file drop zones, errors, and print. Same tokens throughout. */

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sample.ro { background: var(--vol-soft); color: var(--vol-ink); }

/* ---------- signed out: no rail, no app nav ---------- */
body.signed-out .rail, body.signed-out .hdr-nav, body.signed-out .av-btn, body.signed-out .hdr-burger, body.signed-out .hdr-help { display: none; }
body.signed-out .app { grid-template-columns: minmax(0, 1fr); }
.auth-wrap { display: grid; place-items: center; min-height: calc(100vh - var(--hdr) - 220px); padding: 40px 0; }
.auth-card { width: min(440px, 100%); background: var(--sf); border-radius: var(--r-panel); box-shadow: var(--e2); padding: 30px 30px 26px; }
.auth-card .eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.04em; line-height: 1.1; }
.auth-card > p { margin: 0 0 18px; color: var(--ink-3); font-size: 14.5px; }
.auth-card .fld input { height: 46px; font-size: 15px; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-card .code input { letter-spacing: .35em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.auth-card .err { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--disc-soft); color: var(--disc-ink); font-weight: 700; font-size: 13.5px; }
.secret { display: block; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font: 700 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; word-break: break-all; }
.fine { font-size: 12.5px; color: var(--ink-3); margin: 12px 0 0; }

/* ---------- loading + empty ---------- */
.sk { position: relative; overflow: hidden; background: var(--bg); border-radius: 12px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: sk 1.2s infinite; }
[data-mode="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes sk { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }
.sk-h { height: 44px; width: 46%; margin: 4px 0 22px; }
.sk-hero { height: 168px; border-radius: var(--r-panel); }
.sk-row { height: 96px; }
.sk-t { height: 320px; border-radius: var(--r-panel); }
.start { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@container acm (min-width: 820px) { .start { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.start .card { display: flex; flex-direction: column; gap: 8px; }
.start .card h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.start .card p { margin: 0; color: var(--ink-3); font-size: 14px; flex: 1; }
.start .card .btn { align-self: flex-start; margin-top: 6px; }
.start .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: var(--acc-on); font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 1px var(--acc-edge); }
.err-box { padding: 18px 20px; border-radius: var(--r-card); background: var(--disc-soft); color: var(--disc-ink); font-weight: 600; }
.err-box b { display: block; font-size: 16px; margin-bottom: 4px; color: var(--ink); }

/* ---------- small layout helpers (CSP: no inline styles; JS sets data-style through the CSSOM) ---------- */
.h2-lg { font-size: 19px !important; }
.mt0 { margin-top: 0 !important; }
.mt-s { margin-top: 10px; }
.left { justify-content: flex-start !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.full { width: 100%; }
.bank.date { --bc: var(--bg); color: var(--ink); font-size: 11px; line-height: 1.1; text-align: center; }
.arow.plain { padding: 0; }
.av-s.lg { width: 40px; height: 40px; margin: 0; }
.arow.two { grid-template-columns: 40px minmax(0, 1fr); }
.amt-sm { font-size: 14px !important; }
.lnk-btn { background: none; border: 0; padding: 0; color: var(--acc-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; }
.lnk-btn:hover { text-decoration-color: currentColor; }
.chip.bad { background: var(--disc-soft); color: var(--disc-ink); }
.chip.neutral { background: var(--bg); color: var(--ink-3); }
.cat-sel.match { box-shadow: inset 0 0 0 1.5px var(--vol-edge, var(--vol)); background-color: var(--vol-soft); }
.row-acts .more { position: relative; }
tr.flagged td { background: var(--disc-soft); }
.split-row.three { grid-template-columns: minmax(0, 1fr) 120px 34px; }
.money-in { font-weight: 800; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-weight: 700; }
.kv dd { margin: 0; font-weight: 600; }
.tabs { margin-bottom: 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .fld { margin: 0; min-width: 160px; flex: 1; }
.fld .hint { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.fld input[type="file"] { padding: 9px 12px; height: auto; }
.fld input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--acc-edge); }
.chk-line { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; margin: 10px 0; }
.chk-line input { width: 20px; height: 20px; accent-color: var(--acc-edge); }

/* ---------- import wizard ---------- */
.drop { display: grid; place-items: center; gap: 6px; padding: 26px 18px; border-radius: var(--r-card); border: 2px dashed var(--line-2); background: var(--bg); text-align: center; color: var(--ink-3); font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--acc-edge); background: var(--acc-soft); color: var(--ink); }
.drop b { color: var(--ink); font-size: 15.5px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.done { border-style: solid; border-color: var(--acc-edge); background: var(--acc-soft); color: var(--ink-2); }
.imp-files { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@container acm (min-width: 820px) { .imp-files { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.map-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 12px; }
.map-grid .fld { margin: 0; }
.map-grid select { height: 38px; }
.errs { list-style: none; margin: 10px 0 0; padding: 0; max-height: 280px; overflow: auto; border-radius: 12px; background: var(--bg); }
.errs li { padding: 8px 12px; border-bottom: 1px solid var(--hair); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.errs li.e { color: var(--disc-ink); }
.errs li:last-child { border-bottom: 0; }
.errs li b { color: var(--ink-3); font-weight: 800; margin-right: 6px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.recon-pass { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; font-weight: 700; margin-bottom: 12px; }
.recon-pass.ok { background: var(--acc-soft); color: var(--acc-ink); }
.recon-pass.no { background: var(--disc-soft); color: var(--disc-ink); }
.recon-pass svg { width: 20px; height: 20px; flex: none; }

/* ---------- toasts as errors ---------- */
.toast.err { background: var(--disc-ink, #8a3a00); }

/* ---------- dialogs: wider tables ---------- */
.ac-dlg .tscroll { max-height: 52vh; overflow: auto; }
.ac-dlg .ac-tw { box-shadow: inset 0 0 0 1px var(--line); }

/* keyboard focus everywhere (Studio ring) */
.acct :focus-visible { outline: 3px solid var(--acc-ring); outline-offset: 2px; }
.ac-main:focus-visible { outline: none; }

/* ---------- phones down to 360px ---------- */
@media (max-width: 600px) {
  .auth-card { padding: 22px 18px; }
  .frow { grid-template-columns: minmax(0, 1fr); }
  .recon-sum b { font-size: 17px; }
  .inline-form .fld { min-width: 0; flex-basis: 100%; }
  .ac-acts .btn { padding: 10px 14px; }
}

/* ---------- print (reports, reconciliation reports) ---------- */
@media print {
  .hdr, .rail, .ftr, .ac-acts, .tbar, .bulk, .toast, .skip, .no-print, .ac-dlg, .ac-scrim, .mm, .mm-scrim { display: none !important; }
  body.v2, .ac-main { background: #fff !important; }
  .app { display: block !important; max-width: none !important; padding: 0 !important; }
  .card, .ac-tw { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .rep-doc .rh { padding-top: 0; }
  table.t { font-size: 11px; }
  table.t th, table.t td { padding: 5px 6px; }
  table.t tbody tr:hover td { background: none; }
  .tscroll { overflow: visible !important; max-height: none !important; }
  .ac-head h1 { font-size: 22px; }
  a[href]::after { content: none !important; }
}

/* table column widths, legend swatches and journal-entry rows (no inline styles under the CSP) */
.w36 { width: 36px; } .w44 { width: 44px; } .w80 { width: 80px; }
.legend i.lg-in { background: var(--acc); } .legend i.lg-out { background: var(--line-2); }
.je-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.je-row input { height: 38px; padding: 0 10px; border: 0; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--sf); color: var(--ink); font: 700 14px var(--font); text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.je-row .cat-sel { max-width: none; height: 38px; }
@media (max-width: 600px) { .je-row { grid-template-columns: minmax(0, 1fr) 84px 84px 30px; } }
.lnk-plain { color: inherit; }
.warnline { color: var(--disc-ink) !important; }
table.t tr.ind2 td:first-child { padding-left: 46px; }
.kv .secret { margin: 0; }
details.note summary { cursor: pointer; }

/* Kenny 2026-10-06 #grow-accounting: keep visually-hidden labels inside the scrolling table, and keep the review queue
   usable on phones (the category select narrows; icon actions wrap under Approve). */
.tscroll { position: relative; }
@media (max-width: 600px) {
  .cat-sel { max-width: 150px; }
  .ai { flex-wrap: wrap; }
  .row-acts { flex-wrap: wrap; justify-content: flex-end; }
  table.t .p b { max-width: 22ch; }
}
.chip.trunc { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; line-height: 26px; vertical-align: middle; }
@container acm (min-width: 701px) { .cat-sel { max-width: 200px; } table.t th.w36 { width: 30px; padding-right: 0; } }
.bulk .btn[disabled] { opacity: 1; background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); box-shadow: none; }
/* review queue fits without sideways scrolling at laptop widths */
table.t td:has(> .tick), table.t th.w36 { width: 34px; padding-left: 14px; padding-right: 2px; }
table.t .row-acts .ibtn2 { width: 30px; }
table.t .row-acts { gap: 2px; }
@container acm (max-width: 1060px) { .cat-sel { max-width: 170px; } .chip.trunc { max-width: 110px; } }
@container acm (max-width: 900px) { table.t td.hide-s, table.t th.hide-s { display: none; } }
/* the sparkline's filled area has no outline (the shell's global svg stroke would otherwise draw its closing edges) */
.spark .ar { stroke: none; }
/* phones: the category select takes the remaining width instead of being clipped */
@container acm (max-width: 560px) {
  table.t td .ai { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  table.t .cat-sel { max-width: 132px; width: 132px; }
  table.t .chip.info { max-width: 132px; overflow: hidden; text-overflow: ellipsis; }
}
@container acm (max-width: 560px) {
  table.t td, table.t th { padding-left: 8px; padding-right: 8px; }
  table.t .p b, table.t .p small { max-width: 18ch; }
  table.t .row-acts .ibtn2 { display: none; }
  table.t .row-acts .ibtn2[data-undo] { display: inline-grid; }
  table.t td:has(> .tick), table.t th.w36 { padding-left: 10px; width: 28px; }
}
@container acm (max-width: 560px) {
  table.t .p b, table.t .p small { max-width: 13ch; }
  table.t td .p, table.t td.p { min-width: 0; }
  table.t .btn-sm { padding: 7px 10px; font-size: 13px; }
  table.t .cat-sel { max-width: 112px; width: 112px; font-size: 12px; padding-right: 24px; }
}
.show-xs-btn { display: none; }
@container acm (max-width: 560px) {
  .show-xs-btn { display: inline-flex; margin-top: 6px; }
  table.t th.acts-col, table.t td.acts-col { display: none; }
  table.t .p b, table.t .p small { max-width: 17ch; }
  table.t .cat-sel { max-width: 140px; width: 140px; }
}
@container acm (max-width: 560px) { table.t .p b, table.t .p small { max-width: 15ch; } table.t .cat-sel { max-width: 128px; width: 128px; } }
@container acm (max-width: 360px) { table.t .p b, table.t .p small { max-width: 12ch; } table.t .cat-sel { max-width: 116px; width: 116px; } }
.cat-sel { text-overflow: ellipsis; }
