/* =========================================================
   BRAND TOKENS. Everything else reads from here.
   Sampled from the K mark (docs/brand/):
     gold mid  #E5B858   gold deep #CC8F32   charcoal #22262F (dark logo background)
   --accent      = gold FILLS (buttons, badges, underlines)
   --accent-ink  = gold TEXT. Light mode needs a darker gold: logo gold on the light
                   background is 2.6:1, too faint to read. Fills don't have that issue.
   --accent-text = text placed ON a gold fill.
   ========================================================= */
:root {
  --accent: #CC8F32;
  --accent-ink: #8F631B;
  --accent-text: #22262F;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --hover: #e6e3da;
  --border: #e4e1d8;
  --border-strong: #cfcbc0;
  --text: #22262F;
  --text-2: #6b6b72;
  --text-3: #a3a19a;
  --tool: #0369a1;
  --check: #15803d;
  --agent: #7e22ce;
  --no: #b91c1c;
  /* hero band is charcoal in both themes */
  --hero-bg: #22262F;
  --hero-text: #ECE8DF;
  --hero-text-2: #A3A9B6;
  --hero-accent: #E5B858;
  --band-bg: #22262F;        /* charcoal bands (nav, CTA, run card) */
  --band-border: #363C49;    /* hairlines on charcoal bands */
  --band-text-2: #C9CDD6;    /* secondary text on charcoal bands */
  --band-line: #4A5162;      /* outlines of small controls on bands */
  --band-outline: #6B7280;   /* outline buttons on bands */
  --band-ok: #9ACB9A;        /* passed ticks on the approval card */
  --season-warm: #D9772B;    /* home greeting accents: pumpkin, lantern, lamp */
  --season-red: #C0392B;     /* maple, poppy, heart */
  --season-green: #2E8B57;   /* clover, holly */
  --season-cool: #4A90C2;    /* snow, moon */
  --k-glint: rgba(255, 255, 255, .95);   /* the light running across the K */
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent: #E5B858;
  --accent-ink: #E5B858;
  --accent-text: #22262F;
  --bg: #22262F;
  --surface: #2B303B;
  --surface-2: #333946;
  --hover: #3A4150;
  --border: #363C49;
  --border-strong: #4A5162;
  --text: #ECE8DF;
  --text-2: #A3A9B6;
  --text-3: #7A8192;
  --tool: #7cc4f0;
  --check: #4ade80;
  --agent: #c4a5f5;
  --no: #f87171;
  --band-bg: #1A1D24;        /* one step darker than the dark page, so bands still read as bands */
  --season-warm: #F0A060;
  --season-red: #F07A6A;
  --season-green: #6FCF97;
  --season-cool: #8CC4EA;
  --k-glint: rgba(255, 248, 225, .9);
  color-scheme: dark;
}

/* ---------- wordmark font: Fraunces SemiBold (OFL, app/static/fonts/OFL-Fraunces.txt). One weight, self-hosted, ASCII subset. */
@font-face {
  font-family: "Fraunces KF";
  src: url("../fonts/fraunces-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- body font: IBM Plex Sans 400, 500, 600 (OFL, app/static/fonts/OFL-IBM-Plex-Sans.txt). Self-hosted, latin subset. */
@font-face { font-family: "Plex Sans KF"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans KF"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans KF"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Plex Sans KF", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.btn { display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; border: 1px solid var(--border-strong); background: var(--surface); }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.theme-btn { border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--text-2); }
.theme-btn:hover { background: var(--hover); }

/* logo swaps by theme */
.logo-light, .logo-dark { height: 32px; width: auto; display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- public pages */
.pnav { display: flex; align-items: center; gap: 10px; max-width: 1040px; margin: 0 auto; padding: 18px 24px; }
/* Sticky top bars on wider screens only (Sung, 2026-10-17): on phones the bar is two rows and would take
   about an eighth of the screen, so there it scrolls away as before. */
.pbar { background: var(--bg); border-bottom: 1px solid var(--border); }
@media (min-width: 761px) {
  .pbar, .lnav-band { position: sticky; top: 0; z-index: 10; }
  :root { --bar-h: 70px; }   /* height of the sticky bar (69px measured); things that stick below it use this */
  html { scroll-padding-top: 96px; }   /* in-page links (#who, #services) land below the sticky bar */
}
/* lockup: 32px mark, 20px wordmark, 10px gap (the flex gap). top: nudges the cap height onto the mark's centre. */
.pnav .name { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: 20px; line-height: 1; position: relative; top: -0.0115em; white-space: nowrap; }
.pnav .name .flow { color: var(--accent-ink); }
.pnav .btn, .pnav .theme-btn { white-space: nowrap; }
.pnav .sp { flex: 1; }
.pnav .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }   /* user's name, cut short if long */
/* landing page: see the LANDING block at the end */

.login-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; }
.login h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.login .sub { color: var(--text-2); margin-bottom: 18px; }
.login .note { color: var(--text-2); line-height: 1.5; }


/* ---------- forms and signed-in pages */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 14px; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field small { display: block; margin-top: 5px; color: var(--text-3); font-size: 12px; }
.code { font-size: 20px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.err { color: var(--no); font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.btn.wide { width: 100%; padding: 10px 14px; font-size: 14px; cursor: pointer; }
a.btn.wide { text-align: center; box-sizing: border-box; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 14px 0; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.login .note a, .page a:not(.btn) { color: var(--accent-ink); text-decoration: underline; }
.login.wide-card { max-width: 420px; }
.login .note { margin-top: 14px; }
.login p.note + .field, .login p.note + .err { margin-top: 14px; }
.qr { display: flex; justify-content: center; margin: 14px 0; }
.qr svg { display: block; border-radius: 6px; }  /* segno gives a fixed size and a white quiet zone */
.key { display: inline-block; margin-top: 6px; font-size: 14px; letter-spacing: .08em; user-select: all; }
form.inline { display: inline; }
.page { max-width: 1040px; margin: 0 auto; padding: 24px 24px 48px; }
.page h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.page p { color: var(--text-2); line-height: 1.6; margin-bottom: 12px; max-width: 700px; }
.page p.err { color: var(--no); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin-bottom: 18px; }
.facts dt { color: var(--text-2); }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl .actions .btn { font-size: 12px; padding: 5px 10px; cursor: pointer; }
.link-box { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px 14px; margin: 14px 0; word-break: break-all; user-select: all; }
@media (max-width: 760px) { .tbl { display: block; overflow-x: auto; } }

/* ---------- error pages, legal pages */
.errpage { text-align: center; padding-top: 72px; }
.errpage p { margin-left: auto; margin-right: auto; }
.page p.errcode { font-size: 56px; font-weight: 700; color: var(--accent-ink); line-height: 1; margin-bottom: 8px; }
.page h2 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.page ul { margin: 0 0 12px 20px; color: var(--text-2); line-height: 1.6; max-width: 700px; }
.page li { margin-bottom: 6px; }

/* ---------- clients (entities) pages */
.pnav .navlinks { display: flex; align-items: center; gap: 10px; }
.page-head { flex-wrap: wrap; gap: 10px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 8px !important; }
.muted { color: var(--text-3); }
.checklist .check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 8px; max-width: 520px; cursor: pointer; }
.checklist input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.actions-row { display: flex; gap: 8px; margin-top: 14px; }

.code-inline { display: none; }

/* Narrow phones: the signed-in nav becomes two deliberate rows. Row 1: mark, wordmark, theme button.
   Row 2: Clients, Users, Account, Sign out. No wrapping surprises, no menu, no JS. */
@media (max-width: 480px) {
  .pnav { flex-wrap: wrap; gap: 8px; padding: 14px 12px; }
  .pnav .theme-btn { order: 2; }
  .pnav .navlinks { order: 3; flex: 1 0 100%; gap: 6px; }
  .pnav .btn, .pnav .theme-btn { padding: 6px 9px; font-size: 12px; }
  .pnav .who { max-width: 140px; }
}
@media (max-width: 480px) {
  /* the client code moves under the name so the table fits without sideways scrolling */
  .col-code { display: none; }
  .code-inline { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
  .tbl th, .tbl td { padding: 9px 10px; }
}

/* =========================================================
   LANDING (docs/LANDING_BRIEF.md). Charcoal bands top and bottom, page sections on --bg in both themes.
   Icons are inline SVG from _icons.html and take their colour from `color`.
   ========================================================= */
.ic { display: block; flex-shrink: 0; }
.eyebrow { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); margin-bottom: 14px; }
.lnav-band { background: var(--band-bg); border-bottom: 1px solid var(--band-border); color: var(--hero-text); }
.pnav.lnav { max-width: 1200px; gap: 14px; flex-wrap: wrap; }
.lnav .name { color: var(--hero-text); }
.lnav .name .flow { color: var(--hero-accent); }
.lnav .logo-light { display: none; }
.lnav .logo-dark { display: block; }
.lnav-links { display: flex; gap: 22px; align-items: center; margin-right: 6px; }
.lnav-links a { color: var(--band-text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.lnav-links a:hover { color: var(--hero-text); }
.lnav .theme-btn { color: var(--band-text-2); border-color: var(--band-line); }
.lnav .theme-btn:hover { background: color-mix(in srgb, var(--hero-text) 8%, transparent); }
.lnav .btn.primary { background: var(--hero-accent); border-color: var(--hero-accent); padding: 10px 16px; font-size: 14px; }

.hero-band { position: relative; overflow: hidden; background: var(--hero-bg) center / cover no-repeat; color: var(--hero-text); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-band.has-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--hero-bg) 95%, transparent) 0%, color-mix(in srgb, var(--hero-bg) 88%, transparent) 50%, color-mix(in srgb, var(--hero-bg) 62%, transparent) 100%); }
.hero { position: relative; z-index: 1; max-width: 1200px; min-height: 640px; margin: 0 auto; padding: 104px 24px 88px; display: flex; flex-direction: column; justify-content: center; }
.hero .eyebrow { color: var(--hero-accent); }
.hero h1 { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: clamp(38px, 6vw, 72px); line-height: 1.05; letter-spacing: -.015em; max-width: 860px; }
.hero h1 em { font-style: normal; color: var(--hero-accent); }
.hero > p { color: var(--band-text-2); font-size: 19px; line-height: 1.6; margin: 24px 0 28px; max-width: 620px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn, .cta-band .btn { padding: 13px 22px; font-size: 15px; }
.hero .btn.primary, .cta-band .btn.primary { background: var(--hero-accent); border-color: var(--hero-accent); color: var(--accent-text); }
.btn.on-dark { background: transparent; color: var(--hero-text); border-color: var(--band-outline); }
.btn.on-dark:hover { background: color-mix(in srgb, var(--hero-text) 8%, transparent); }
.hero .cpa-line { display: flex; align-items: center; gap: 12px; margin-top: 36px; font-size: 15px; color: var(--hero-text); }
.hero .cpa-line .ic { color: var(--hero-accent); }
.hero .cpa-line strong { font-weight: 600; }
.muted-on-dark { color: var(--hero-text-2); }

.lsec { max-width: 1200px; margin: 0 auto; padding: 96px 24px 24px; }
.lsec h2 { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.01em; max-width: 720px; }
.lsec p { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.split-head { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; justify-content: space-between; }
.split-head p { max-width: 440px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 44px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.card .ic, .tiles .ic, .steps3 .ic, .cpa-mark .ic { color: var(--accent-ink); }
.card h3 { font-size: 21px; font-weight: 600; }
.card p { font-size: 16px; }
.card p.tags { font-size: 14px; color: var(--text-3); }
h3.group { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin: 44px 0 14px; }
/* wrapping flex, not grid: the last row stretches to fill, so there is never an empty grey cell */
.tiles { list-style: none; display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tiles li { flex: 1 1 150px; }
.tiles.wide li { flex-basis: 220px; }
.tiles li { background: var(--surface); padding: 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.tiles strong { font-size: 16px; font-weight: 600; }
.tiles span { font-size: 14px; line-height: 1.5; color: var(--text-2); }

.how { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; margin-top: 44px; }
.steps3 { list-style: none; flex: 1 1 420px; min-width: 0; }
.steps3 li { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.steps3 li:last-child { border-bottom: 0; }
.steps3 h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.steps3 p { font-size: 16px; }
.run-card { flex: 1 1 420px; min-width: 0; background: var(--band-bg); color: var(--hero-text); border: 1px solid var(--band-border); border-radius: 16px; padding: 26px; }
.run-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.run-meta { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-text-2); margin-bottom: 4px; }
.run-title { display: block; font-size: 19px; font-weight: 600; }
.pill { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--hero-accent); padding: 6px 10px; border-radius: 999px; }
.run-steps { list-style: none; border-top: 1px solid var(--band-border); }
.run-steps li { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--band-border); font-size: 15px; }
.run-steps li span { flex: 1; }
.run-steps li em { font-style: normal; font-size: 13px; color: var(--hero-text-2); }
.run-steps li.ok .ic { color: var(--band-ok); }
.run-steps li.warn .ic, .run-steps li.you .ic, .run-steps li.you em { color: var(--hero-accent); }
.run-steps li.you span { font-weight: 600; }
.run-actions { display: flex; gap: 10px; margin-top: 18px; }
.chip { font-size: 14px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--band-line); }
.chip.primary { background: var(--hero-accent); border-color: var(--hero-accent); color: var(--accent-text); font-weight: 600; }

.cpa-band { background: var(--surface-2); margin-top: 96px; }
.lsec.cpa { padding: 88px 24px; display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: center; }
.cpa-mark { flex: 0 0 auto; }
.lsec.cpa > div:last-child { flex: 1 1 420px; min-width: 0; }
.lsec.cpa p { margin-top: 16px; max-width: 620px; }
.cpa-photo { flex: 1 1 420px; max-width: 560px; margin: 0; }
.cpa-photo img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }

.cta-band { background: var(--band-bg); color: var(--hero-text); }
.lsec.cta { padding: 80px 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.lsec.cta p { color: var(--band-text-2); margin-top: 12px; }
.cta-band .ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.pfoot { max-width: 1200px; margin: 0 auto; padding: 26px 24px 36px; color: var(--text-3); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.pfoot a { color: var(--text-3); }
.pfoot a:hover { color: var(--text); }
.pfoot-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  /* Two rows on phones. Row 1: mark, wordmark, Request access, theme. Row 2: the four links. */
  .pnav.lnav { gap: 8px; }
  .lnav .theme-btn { order: 2; }
  .lnav-links { order: 3; flex: 1 0 100%; gap: 14px; margin-right: 0; flex-wrap: nowrap; }
  .lnav-links a { font-size: 13px; }
  .lnav .btn.primary { padding: 8px 12px; }
  .hero { min-height: 0; padding: 64px 20px 56px; }
  .hero > p { font-size: 17px; }
  .lsec { padding: 64px 20px 16px; }
  .cpa-band { margin-top: 64px; }
  .lsec.cpa, .lsec.cta { padding: 56px 20px; }
  .cpa-mark .ic { width: 64px; height: 64px; }
}

/* ---------- trial balances (app/tb) */
.st { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); vertical-align: middle; }
.st-passed { color: var(--check); border-color: var(--check); }
.st-failed { color: var(--no); border-color: var(--no); }
.st-not-applicable, .st-not-run { color: var(--text-3); }
.page h1 .st { font-size: 13px; margin-left: 8px; }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot th { text-align: left; border-top: 2px solid var(--border-strong); background: var(--surface-2); }
.tbl tfoot th.num { text-align: right; }
.tbl.checks td:first-child { white-space: nowrap; font-weight: 600; }
.tbl-wrap { overflow-x: auto; position: relative; }   /* relative: keeps .sr labels inside the scroll box */
.hash { font-size: 12px; word-break: break-all; color: var(--text-2); }
.note-below { margin-top: 10px; font-size: 13px; }
.narrow-form { max-width: 420px; margin-top: 14px; }
.tbl + p, .tbl-wrap + p { margin-top: 12px; }
/* document reading (track B) */
.st-f-green, .st-x-ready { color: var(--check); border-color: var(--check); }
.st-f-amber, .st-x-check { color: var(--accent-ink); border-color: var(--accent); }
.st-f-red, .st-x-failed { color: var(--no); border-color: var(--no); }
.page h2 .st { font-size: 12px; margin-left: 6px; }
.tbl.fields td:first-child { white-space: nowrap; font-weight: 600; }
.tbl.fields td.muted { font-size: 12px; }
@media (max-width: 760px) {
  .tbl.fields thead { display: none; }
  .tbl.fields tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .tbl.fields td { padding: 0; border: 0; text-align: left; }
  .tbl.fields td:nth-child(2), .tbl.fields td:nth-child(3), .tbl.fields td:nth-child(5) { grid-column: 1 / -1; }
  .tbl.fields td:nth-child(4) { grid-row: 1; grid-column: 2; }
  .tbl.fields td[data-l]:not(:empty)::before { content: attr(data-l) ": "; color: var(--text-3); }
}
/* review screen (track B B-4) */
.page.wide { max-width: 1240px; }
.st-approved { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 14px; }
.viewer { position: sticky; top: calc(var(--bar-h, 0px) + 12px); max-height: calc(100vh - var(--bar-h, 0px) - 24px); overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 8px; }
.pg { position: relative; margin-bottom: 8px; background: var(--surface); }
.pg img { display: block; width: 100%; height: auto; }
.pgno { position: absolute; right: 6px; bottom: 6px; font-size: 11px; color: var(--text-3); }
.hl { position: absolute; border-radius: 2px; pointer-events: none; mix-blend-mode: multiply; }
.hl-green { background: color-mix(in srgb, var(--check) 22%, transparent); }
.hl-amber { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.hl-red { background: color-mix(in srgb, var(--no) 28%, transparent); }
.rform fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.rrow { margin-bottom: 12px; }
.rrow label, .rrow.two label { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.rform input, .rform select { width: 100%; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 14px; min-width: 0; }
.rrow.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rgrid { display: grid; gap: 6px; align-items: center; margin-bottom: 4px; }
.rgrid.tax { grid-template-columns: 2fr 0.8fr 1fr 1fr 58px; }
.rgrid.charge { grid-template-columns: 1.4fr 1.6fr 1fr 58px; }
.fnote { display: block; color: var(--text-3); font-size: 12px; margin: 2px 0 8px; }
.rrow.total input { font-weight: 600; }
.chk { margin: 0 0 8px; font-size: 13px; }
.override { margin: 10px 0; font-size: 13px; }
.override label { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.override input[type=checkbox] { width: auto; }
.ractions { display: flex; gap: 10px; margin-top: 12px; }
.small { font-size: 12px; }
@media (max-width: 900px) {
  .review { grid-template-columns: 1fr; }
  .viewer { position: static; max-height: 70vh; }
  .rgrid.tax { grid-template-columns: 1fr 1fr; }
  .rgrid.charge { grid-template-columns: 1fr 1fr; }
}
/* client settings (track B) */
.form-sec { font-size: 15px; margin: 22px 0 2px; }
.pair { display: flex; gap: 8px; }
/* layout recipe (TB-2) */
.recipe-form { max-width: 640px; margin-top: 14px; }
.role-grid { display: flex; flex-wrap: wrap; gap: 0 14px; }
.role-grid .field { flex: 1 1 110px; }
.recipe-form fieldset { border: 0; padding: 0; }
.recipe-form fieldset legend { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.recipe-form fieldset label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--text); }
.recipe-form fieldset input { width: auto; margin: 0; }
.ai-ask { margin: 4px 0 16px; }
.ai-ask small { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.ai-note { border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 14px; background: var(--surface-2); margin: 12px 0; }
.tbl.preview td { white-space: nowrap; font-size: 12px; }
ul.err { padding-left: 18px; }
/* phones: each check becomes a small card (name + result on one line, detail underneath) */
@media (max-width: 760px) {
  .tbl.checks thead { display: none; }
  .tbl.checks tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .tbl.checks tr:last-child { border-bottom: 0; }
  .tbl.checks td { padding: 0; border: 0; }
  .tbl.checks td:last-child { grid-column: 1 / -1; color: var(--text-2); }
}
/* mapping (TB-3) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* workbook import (TB-1b) */
.basis { margin: 16px 0; }
.basis .chk label { display: inline-flex; gap: 8px; align-items: center; }
/* statements (TB-4) */
.fs-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 16px; }
.fs-paper { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin: 12px 0 24px; }
.fs-paper h2 { margin-top: 0; }
.fs-paper h3 { margin: 24px 0 6px; }
table.fs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 480px; }
table.fs th { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 0 6px 12px; border-bottom: 1px solid var(--border-strong); }
table.fs td { padding: 3px 0; }
table.fs td.num, table.fs th.num { text-align: right; padding-left: 12px; white-space: nowrap; width: 130px; }
.fs-head td { font-weight: 600; padding-top: 10px; }
.fs-row { cursor: pointer; }
.fs-row:hover td { background: var(--surface-2); }
.fs-row td:first-child, .fs-plain td:first-child { padding-left: 16px; position: relative; }
.fs-row .tw { position: absolute; left: 2px; font-size: 10px; color: var(--text-3); top: 6px; }
.fs-row[aria-expanded="true"] .tw { transform: rotate(90deg); color: var(--accent-ink); }
.fs-acct td { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); }
.fs-acct td:first-child, .fs-indent { padding-left: 28px; }
.fs-subtotal td.num, .fs-total td.num { border-top: 1px solid var(--border-strong); }
.fs-total td, .fs-grand td { font-weight: 600; }
.fs-grand td.num { border-top: 1px solid var(--text); border-bottom: 3px double var(--text); }
.tbl .nowrap { white-space: nowrap; }

/* TB-1d: which column is which */
.layout { margin: 18px 0 26px; padding-top: 6px; border-top: 1px solid var(--border); }
.layout h2 { font-size: 17px; }
.layout-tbl th, .layout-tbl td { white-space: nowrap; vertical-align: top; }
.layout-tbl td.small { white-space: normal; min-width: 9rem; max-width: 14rem; }
.layout-tbl tr.sample td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.layout-tbl td.role-ignore select { color: var(--text-3); }
.w-num { width: 5rem; }
.layout .tbl-wrap { margin-bottom: 12px; }

/* GL-1 */
.gap-top { margin-top: 18px; }
.gap-bottom { margin-bottom: 18px; }

/* ---------- home (HOME-1): side panel of clients, greeting, chat */
.home { position: relative; display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 64px); transition: grid-template-columns .2s ease; }
.home.side-closed { grid-template-columns: 0 1fr; }
.home.side-closed .home-side { visibility: hidden; padding: 0; border: 0; overflow: hidden; }
/* the panel button sits at the top left, above the panel, and stays there when the panel is closed */
.side-btn { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.side-btn:hover { background: var(--hover); color: var(--text); }
.home-side { border-right: 1px solid var(--border); background: var(--surface-2); padding: 56px 12px 16px; overflow-y: auto; }
.home-side h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 18px 8px 6px; }
.home-side a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .92rem; }
.home-side a:hover { background: var(--hover); }
.home-side a.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-weight: 500; }
.home-side .n { flex: none; align-self: flex-start; margin-top: 2px; line-height: 1.4; white-space: nowrap; min-width: 22px; text-align: center; font-size: .75rem; padding: 1px 6px; border-radius: 10px; background: var(--accent); color: var(--accent-text); }
.home-side .n.zero { background: transparent; color: var(--text-3); }
.home-main { padding: 28px 32px 40px; max-width: 900px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; }
.home.side-closed .home-main { max-width: 100%; padding-top: 44px; }   /* panel closed: the content takes the freed width; 44px clears the panel button */
.home-main { transition: max-width .2s ease; }
.hello { display: flex; align-items: center; gap: 16px; margin: 32px 0 8px; }
.hello h1 { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: 2.1rem; margin: 0; }
.hello .line { color: var(--text-2); margin: 4px 0 0; }
.home-main.client .hello { margin-top: 8px; }
.home-main.client .hello h1 { font-size: 1.6rem; }
/* the K: comes in (scale + turn), turns once on its axis to finish, then floats, glows and a gold glint runs across
   the mark only (masked by the mark itself). Reduced motion: one glint on arrival, nothing moves after. */
.k-anim { position: relative; width: 64px; height: 64px; flex: none; perspective: 400px;
  animation: k-in .9s cubic-bezier(.2, .8, .2, 1.2) both, k-float 5s ease-in-out .9s infinite; }
.k-anim img { width: 64px; height: 64px; transform-origin: 50% 50%;
  animation: k-turn 1.2s ease-in-out 1.6s 1 both, k-glow 5s ease-in-out 2.8s infinite; }   /* one full turn to finish the arrival */
.k-anim .glint { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: var(--k-mask) center / contain no-repeat; mask: var(--k-mask) center / contain no-repeat;
  background: linear-gradient(110deg, transparent 30%, var(--k-glint) 48%, var(--k-glint) 52%, transparent 70%) -150% 0 / 300% 100% no-repeat;
  animation: k-glint 4s ease-in-out 3s infinite; }   /* after the turn */
.home-main.client .k-anim, .home-main.client .k-anim img { width: 44px; height: 44px; }
@keyframes k-in { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes k-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes k-glow { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 10px var(--accent)); } }
@keyframes k-turn { 0% { transform: none; } 50% { transform: scale(1.12) rotateY(180deg); filter: drop-shadow(0 0 14px var(--accent)); }
  100% { transform: rotateY(360deg); } }
@keyframes k-glint { 0% { background-position: -150% 0; } 45%, 100% { background-position: 250% 0; } }
.accent { position: absolute; right: -10px; bottom: -6px; width: 26px; height: 26px; animation: accent-in .8s ease-out both .4s; }
.home-main.client .accent { width: 20px; height: 20px; right: -8px; }
@keyframes accent-in { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
.accent .warm { fill: var(--season-warm); } .accent .red { fill: var(--season-red); } .accent .green { fill: var(--season-green); }
.accent .cool { fill: var(--season-cool); } .accent .gold { fill: var(--accent); } .accent .ink { fill: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .home { transition: none; }
  .k-anim, .k-anim img, .accent { animation: none; }
  .k-anim .glint { animation: k-glint 1.6s ease-in-out .3s 1 both; }
}
.tasks h2 { font-size: 1rem; margin: 22px 0 6px; }
.tasks ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tasks li { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-top: 1px solid var(--border); }
.tasks li:first-child { border-top: 0; }
.tasks li a { color: var(--text); }
.tasks .who { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); min-width: 56px; }
.tasks .who.review { color: var(--accent-ink); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.chat { margin-top: auto; padding-top: 28px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chat-log .msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; white-space: pre-wrap; line-height: 1.45; }
.chat-log .msg.user { align-self: flex-end; background: var(--surface-2); }
.chat-log .msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.chat-log .msg.err { color: var(--no); }
.chat-box { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); padding: 8px 8px 8px 14px; }
.chat-box textarea { flex: 1; border: 0; resize: none; background: transparent; color: var(--text); font: inherit; min-height: 44px; max-height: 200px; outline: none; }
.chat-note { font-size: .78rem; color: var(--text-3); margin: 6px 4px 0; }
@media (max-width: 760px) {
  .home, .home.side-closed { grid-template-columns: 1fr; }
  .home-side { border-right: 0; border-bottom: 1px solid var(--border); max-height: 260px; }
  .home.side-closed .home-main { padding-top: 56px; }
  .home-main { padding: 16px; }
}

/* ---------- PDF statement review (BK-2b): the lines table gets more room than an invoice's fields */
.review.stmt { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
.bank-lines { table-layout: fixed; width: 100%; }
.bank-lines td, .bank-lines th { padding: 4px 4px; vertical-align: top; }
.rform .bank-lines input { padding: 4px 6px; font-size: 13px; }
.bank-lines .st { font-size: .68rem; padding: 0 5px; }
.bank-lines .fnote { display: block; font-size: .72rem; color: var(--text-2); margin-top: 2px; }

/* ---------- waitlist (LEADS-1): /join, hero band with the form card; /leads */
.join-hero { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 72px 24px 80px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.join-copy { flex: 1 1 440px; min-width: 0; padding-top: 12px; }
.join-copy .eyebrow { color: var(--hero-accent); }
.join-copy h1 { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -.01em; }
.join-copy h1 em { font-style: normal; color: var(--hero-accent); }
.join-copy > p { color: var(--band-text-2); font-size: 18px; line-height: 1.6; margin: 20px 0; max-width: 520px; }
.join-ticks { list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--band-text-2); font-size: 15px; }
.join-ticks li { display: flex; align-items: center; gap: 10px; }
.join-ticks .ic { color: var(--band-ok); }
.join-copy .cpa-line { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 15px; color: var(--hero-text); }
.join-copy .cpa-line .ic { color: var(--hero-accent); }
.join-card { flex: 1 1 380px; min-width: 0; max-width: 460px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.join-card h2 { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: 26px; margin-bottom: 16px; }
.join-card textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font: inherit; font-size: 14px; color: var(--text); resize: vertical; }
.join-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.join-card .field input, .join-card .field select { min-height: 44px; }
.join-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.opt { font-weight: 400; color: var(--text-3); }
.join-set { border: 0; padding: 0; margin: 0 0 14px; }
.join-set legend { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.join-checks { display: grid; grid-template-columns: 1fr; gap: 4px; }
.join-checks label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; min-height: 28px; }
.intent { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.intent:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.intent span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.intent small { color: var(--text-2); font-size: 13px; }
.join-checks input, .intent input, .consent input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--text-2); margin: 4px 0 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-card .btn.wide { min-height: 48px; font-size: 15px; }
.fine { font-size: 12px; color: var(--text-3); margin-top: 12px; line-height: 1.5; }
.fine a { color: var(--accent-ink); text-decoration: underline; }
.join-build-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pre { white-space: pre-wrap; }

/* ---------- quotes (QUOTE-1) */
.quote-grid { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; }
.quote-form { flex: 1 1 420px; min-width: 0; margin-top: 0; }
.quote-side { flex: 1 1 340px; min-width: 0; position: sticky; top: 90px; }
.quote-tbl { margin-bottom: 16px; }
.quote-tbl tr.sum td { font-weight: 600; background: var(--surface-2); }
.quote-doc { max-width: 760px; margin: 0 auto; padding: 32px 24px 48px; background: var(--surface); color: var(--text); }
.quote-doc h2 { font-size: 16px; margin: 24px 0 8px; }
.quote-doc ul { margin: 0 0 12px 20px; line-height: 1.6; color: var(--text-2); }
.quote-doc p { margin-bottom: 12px; line-height: 1.5; }
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--accent); padding-bottom: 14px; margin-bottom: 18px; }
.pnav-lockup { display: flex; align-items: center; gap: 10px; }
.pnav-lockup .name { font-family: "Fraunces KF", Georgia, serif; font-weight: 600; font-size: 22px; }
.pnav-lockup .flow { color: var(--accent-ink); }
.quote-meta { text-align: right; line-height: 1.5; }
.quote-draft { border: 2px solid var(--no); color: var(--no); font-weight: 700; text-align: center; padding: 6px; letter-spacing: .1em; }
@media print {
  .no-print { display: none; }
  body { background: var(--surface); }
  .quote-doc { padding: 0; max-width: none; }
}

/* ---------- build log (BUILD-1) */
.buildlog .bl-week { border-top: 1px solid var(--border); padding: 22px 0 6px; }
.buildlog .bl-week h2 { margin: 4px 0 10px; }
.buildlog .bl-week ul { margin: 0 0 8px 18px; line-height: 1.6; }
.buildlog .bl-join { margin-top: 28px; }
.bl-more { margin-top: 18px; }
.bl-more a { color: var(--accent-ink); text-decoration: underline; }

/* ---------- invoices to bank (BK-4a) */
.match-inv { margin: 0 0 14px; }
.match-inv table { margin: 8px 0; }
.match-inv fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.pay-tbl td:nth-child(3), .pay-tbl td:nth-child(8) { white-space: nowrap; }
/* ---------- JOIN-2: the email-only signup form (landing hero and closing band, /join, /build) */
.quick { width: 100%; max-width: 520px; margin: 4px 0 0; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-row input { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.quick-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.quick-row .btn { min-height: 48px; padding: 0 20px; font-size: 15px; white-space: nowrap; }
.quick-note { font-size: 13px; line-height: 1.5; color: var(--text-2); margin: 10px 0 0 !important; }
.quick-note a { color: var(--accent-ink); text-decoration: underline; }
.quick-err { color: var(--no); font-size: 14px; margin: 8px 0 0 !important; }
.quick.on-dark .quick-row input { background: var(--surface); border-color: var(--band-line); }
.quick.on-dark .quick-note { color: var(--band-text-2); }
.quick.on-dark .quick-note a { color: var(--hero-accent); }
.quick.on-dark .btn.primary { background: var(--hero-accent); border-color: var(--hero-accent); color: var(--accent-text); }
.quick-more { font-size: 14px; margin-top: 14px; color: var(--band-text-2); }
.quick-more a { color: var(--hero-text); text-decoration: underline; }
.hero .quick { margin-top: 4px; }
.cta-form { flex: 1 1 360px; min-width: 0; max-width: 520px; }
.quick-lead { color: var(--text-2); line-height: 1.55; margin-bottom: 14px; }
.quick-alt { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.quick-alt a { color: var(--accent-ink); text-decoration: underline; }
.buildlog .bl-signup { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 18px 20px; margin: 18px 0 8px; max-width: 640px; }
.buildlog .bl-signup p { margin-bottom: 10px; }
.more { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- landing v3 (DECISIONS #71): how it fits, what works today */
.fine-print { font-size: 14px !important; color: var(--text-3) !important; margin-top: 18px; }
.today { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 32px; }
.today li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.today .ic { color: var(--check); flex: none; margin-top: 1px; }
/* build log write-ups (BUILD-2) */
.bl-article { max-width: 760px; }
.bl-article .tags a { color: var(--text-3); }
.bl-article .bl-lede { font-size: 18px; color: var(--text); }
.bl-article ol.bl-steps { margin: 0 0 12px 22px; color: var(--text-2); line-height: 1.6; }
.bl-article ol.bl-steps li { margin-bottom: 6px; }
.bl-article .tbl-wrap { margin: 8px 0 0; }
.bl-bars { margin: 10px 0 0; max-width: 700px; }
.bl-bar { display: grid; grid-template-columns: minmax(120px, 230px) 1fr 64px; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; color: var(--text-2); }
.bl-bar-track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bl-bar-fill { display: block; height: 100%; background: var(--border-strong); border-radius: 6px; }
.bl-bar-fill.alt { background: var(--accent); }
.bl-bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.buildlog .bl-post a { color: var(--accent-ink); text-decoration: underline; font-weight: 600; }
@media (max-width: 560px) { .bl-bar { grid-template-columns: 1fr 64px; } .bl-bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- RPT-1: board and customer reports (also inlined in the downloaded file) */
.rpt section { margin: 22px 0; }
.rpt section > p { margin: 0 0 10px; line-height: 1.55; }
.rpt h2 { margin: 0 0 8px; }
.rpt-head h1 { margin: 2px 0; }
.rpt-title { font-size: 1.15rem; margin: 2px 0 6px; }
.rpt-draft { display: inline-block; border: 2px solid var(--no); color: var(--no); padding: 2px 10px; font-weight: 600; letter-spacing: .05em; }
.rpt-controls label { margin-right: 10px; white-space: nowrap; }
.rpt tr.drill { cursor: pointer; }
.rpt tr.drill:hover { background: var(--hover); }
.rpt tr.rpt-total td, .rpt tr.rpt-subtotal td { border-top: 1px solid var(--border-strong); font-weight: 600; }
.rpt tr.rpt-grand td { border-top: 2px solid var(--border-strong); font-weight: 700; }
.rpt figure { margin: 10px 0 18px; }
.rpt .chart { width: 100%; max-width: 720px; height: auto; display: block; }
.rpt .chart-label { font-size: 11px; fill: var(--text-2); }
.rpt-foot { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 28px; }
@media print {
  .rpt tr.drill:hover { background: none; }
  .rpt section { break-inside: avoid; }
}

/* Variance analysis (VAR-1): waterfalls and the decomposition tree */
.var .chart { width: 100%; height: auto; display: block; }
.var .chart-label { font-size: 11px; fill: var(--text-2); }
.var .wf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.var .wf-grid h3 { margin: 0 0 8px; font-size: 15px; }
.var .wf-grid.one { grid-template-columns: minmax(0, 960px); }   /* a single chart: no wider than it reads */
.var .fav { color: var(--check); }
.var .unfav { color: var(--no); }
.var .tree { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 6px 10px; }
.var .tree-n > summary, .var .tree-leaf, .var .tree-head { display: grid; grid-template-columns: 1fr 120px 120px 120px; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.var .tree-head { font-size: 12px; color: var(--text-2); cursor: default; }
.var .tree-leaf { cursor: default; }
.var .tree-kids { margin-left: 18px; }
.var .tree-n .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .var .wf-grid { grid-template-columns: 1fr; } .var .tree-n > summary, .var .tree-leaf, .var .tree-head { grid-template-columns: 1fr 80px 80px 80px; } }
.var label.block { display: block; margin: 4px 0; }
.var textarea.w-full { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.var .writeup li { margin: 4px 0; }
/* 13-week cash flow (CF-13a) */
.red-text { color: var(--no); font-weight: 600; }
.cf-grid tr.tot td { font-weight: 600; border-top: 1px solid var(--border-strong); }
.cf-grid td.cf-low { color: var(--no); font-weight: 700; }
.cf-grid td.cf-ov { background: var(--surface-2, var(--surface)); }
.cf-grid { font-size: 13px; }
.cf-grid td, .cf-grid th { padding: 6px 8px; white-space: nowrap; }
.cf-grid td:first-child { min-width: 200px; white-space: normal; }
/* Compare versions (VER-2): decomposition tree */
.vb-tree { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 6px 10px; }
.vb-tree details > summary, .vb-tree .leaf { display: grid; grid-template-columns: 14px 1fr 140px; gap: 8px; padding: 5px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; list-style: none; }
.vb-tree details > summary::-webkit-details-marker { display: none; }
.vb-tree details > summary > .mk::before { content: "+"; color: var(--text-3); }
.vb-tree details[open] > summary > .mk::before { content: "-"; }
.vb-tree .leaf { cursor: default; }
.vb-tree .kids { margin-left: 20px; }
.vb-tree .num { text-align: right; font-variant-numeric: tabular-nums; }
.vb-tree .up { color: var(--check); } .vb-tree .down { color: var(--no); }

/* ---------- signed-in pages use the screen width (Sung 2026-11-05, DECISIONS #114). body.app is set in base.html
   when someone is signed in; public pages (landing, /join, /build, sign-in) don't have it and keep the centred
   1040px column. Wide screens only: phones (760px and below) are unchanged. Prose still caps at 700px (.page p). */
@media (min-width: 761px) {
  body.app .pnav { max-width: none; margin: 0; padding: 18px 32px; }
  body.app .page, body.app .page.wide { max-width: none; margin: 0; padding: 24px 32px 48px; }
}
