/* SignReady. A restrained working-paper identity: warm paper, ink, ledger green,
   ruled totals. Type: Source Serif 4 for headings and figures, IBM Plex Sans for text. */

@font-face { font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("/static/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("/static/fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("/static/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f5f3ee;
  --paper-2: #efece4;
  --surface: #fffefb;
  --ink: #1b2430;
  --ink-2: #3a4553;
  --muted: #6b7380;
  --faint: #9aa0a8;
  --rule: #e2ddd1;
  --rule-2: #cfc8b8;
  --green: #1e5a49;
  --green-ink: #153f33;
  --green-tint: #e5eee9;
  --brick: #9c3b23;
  --brick-tint: #f6e7e1;
  --amber: #8a5a0b;
  --amber-tint: #faf0dc;
  --slate-tint: #eceef0;
  --serif: "Serif4", "Iowan Old Style", Georgia, serif;
  --sans: "Plex", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --r: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14.5px/1.5 var(--sans); font-feature-settings: "kern"; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
h1 { font-size: 30px; line-height: 1.15; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 12px; }
.sub { color: var(--muted); font-size: 12.5px; }
.muted { color: var(--faint); }
.strong { font-weight: 600; color: var(--ink); text-decoration: none; }
a.strong:hover { text-decoration: underline; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.mark { width: 26px; height: 26px; flex: none; }
.mark-bg { fill: var(--green); stroke: none; }
.mark-tick { fill: none; stroke: #f5f3ee; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mark-rule { stroke: #f5f3ee; stroke-width: 1.4; }
.wm-text { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.wm-ready { color: var(--green); }

/* ---------- Top bar */
.topbar { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 58px; background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.brand { text-decoration: none; }
.firm { display: flex; align-items: baseline; gap: 8px; padding-left: 24px; border-left: 1px solid var(--rule); height: 26px; align-items: center; }
.firm-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.firm-name { font-weight: 500; }
.sample-chip { font-size: 11px; color: var(--amber); background: var(--amber-tint); border: 1px solid #ecd9b3; padding: 1px 7px; border-radius: 10px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: var(--r); font-weight: 500; }
.topnav a:hover { background: var(--paper); }
.topnav a.on { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.who { display: flex; align-items: center; gap: 12px; padding-left: 20px; border-left: 1px solid var(--rule); }
.who-name { font-weight: 500; }
.who-role { font-size: 11.5px; color: var(--muted); }
.who-link, .linkish { font: inherit; font-size: 13px; color: var(--green); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.crumbs { padding: 14px 28px 0; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 7px; color: var(--rule-2); }
main { padding: 18px 28px 40px; max-width: 1360px; margin: 0 auto; }
.foot { display: flex; justify-content: space-between; gap: 20px; padding: 18px 28px 28px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--rule); max-width: 1360px; margin: 0 auto; }

/* ---------- Page heads */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 6px 0 20px; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); margin: 0 0 6px; white-space: pre; }
.lede { color: var(--ink-2); max-width: 68ch; margin: 8px 0 0; }
.head-stat { text-align: right; display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 12.5px; }
.head-stat .big { font-family: var(--serif); font-size: 30px; color: var(--ink); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.head-stat.is-flag .big { color: var(--brick); }
.rule-line { margin: -8px 0 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* ---------- Cards */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; }
.card.flush { padding: 0; }
.card-title { padding: 16px 20px 12px; margin: 0; border-bottom: 1px solid var(--rule); font-size: 16px; display: flex; align-items: baseline; gap: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); padding-right: 16px; }
.card-head .card-title { border: 0; }
.card-flag { border-color: #e2b8aa; box-shadow: inset 3px 0 0 var(--brick); }
.narrow { max-width: 560px; margin: 20px auto; }
.narrow-left { max-width: 720px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.empty { text-align: center; padding: 40px; }
.hint { color: var(--muted); font-size: 12.5px; }
.hint.pad { padding: 10px 20px; margin: 0; }

/* ---------- Ledger tables */
table.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; }
.ledger th { text-align: left; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 10px 14px 8px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.ledger td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger th:first-child, .ledger td:first-child { padding-left: 20px; }
.ledger th:last-child, .ledger td:last-child { padding-right: 20px; }
.ledger tbody tr:hover td { background: #fbfaf6; }
.ledger.compact td { padding-top: 7px; padding-bottom: 7px; }
.ledger .r { text-align: right; }
.ledger tr.total td { border-top: 1px solid var(--ink); font-weight: 600; border-bottom: 1px solid var(--rule); }
.ledger tr.grand td { font-weight: 600; border-bottom: 0; }
.ledger tr.grand td.r .num, .ledger tfoot tr.grand td.r .num { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding: 2px 0 1px; display: inline-block; min-width: 100px; }
.ledger tfoot td { border-bottom: 0; }
.ledger tr.is-off td { color: var(--faint); }
.ledger tr.is-flag td { background: #fdf6f3; }
.ledger tr.is-flag td:first-child { box-shadow: inset 3px 0 0 var(--brick); }
.ledger tr.is-warn td { background: #fdfaf1; }
.ledger tr.hl td { background: var(--green-tint); font-weight: 600; }
.ledger tr:target td { background: #fff3c4 !important; transition: background 0.4s; }
.ledger td.indent, .ledger .indent { padding-left: 38px; }
.num { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.rowno { color: var(--faint); font-family: var(--mono); font-size: 12px; width: 48px; }
.flag-text .num { color: var(--brick); }
.ledger.rows td { padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }

/* ---------- Figures */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 18px; }
.fig { padding: 16px 20px 14px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.fig:first-child { border-left: 0; }
.fig-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fig-value { font-family: var(--serif); font-size: 28px; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.fig-foot { font-size: 12.5px; color: var(--muted); }
.fig-flag .fig-value { color: var(--brick); }
.fig-flag { box-shadow: inset 0 3px 0 var(--brick); }
.fig-small { font-family: var(--serif); font-size: 18px; font-variant-numeric: lining-nums tabular-nums; }

.recon-strip { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 18px; }
.recon-strip > div { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.recon-strip .op { justify-content: center; color: var(--faint); font-family: var(--serif); font-style: italic; padding: 0 4px; }
.recon-strip .is-flag .fig-value { color: var(--brick); }
.recon-strip .mat { margin-left: auto; border-left: 1px solid var(--rule); background: var(--paper); }

.deadline-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 240px; }
.dl-date { font-family: var(--serif); font-size: 19px; }

/* ---------- Badges and status */
.tier { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid; vertical-align: 1px; }
.tier-review { color: var(--green); border-color: #a9c6bb; background: var(--green-tint); }
.tier-audit { color: #3d3a6b; border-color: #bcbad9; background: #eeedf6; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st-ok { color: var(--green); }
.st-flag { color: var(--brick); }
.st-warn { color: var(--amber); }
.st-open { color: #3c5a8a; }
.st-muted { color: var(--muted); }
.assume { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); background: var(--amber-tint); border: 1px dashed #d9b46a; padding: 0 6px; border-radius: 3px; text-decoration: none; line-height: 17px; vertical-align: 1px; }
a.assume:hover { color: var(--amber); background: #f6e6c4; }
.verified { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.ruleref { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.rule-id { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); text-decoration: none; background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }
a.rule-id:hover { background: var(--rule); }
.rule-src { color: var(--muted); }
.rule-date { color: var(--faint); }
.src { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-family: var(--mono); font-size: 11.5px; color: var(--green); text-decoration: none; border-bottom: 1px dotted #9fbcb1; white-space: nowrap; }
.src:hover { border-bottom-style: solid; }
.srcs { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; max-width: 100%; }
.srcs .more { font-size: 11.5px; color: var(--faint); }
.srcs-cell { white-space: normal; width: 260px; max-width: 260px; }
.srcs-cell .srcs { display: flex; flex-direction: column; gap: 3px; }
td.docno, .nowrap { white-space: nowrap; }
.fmt { font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--rule-2); padding: 0 4px; border-radius: 3px; margin-left: 4px; }

/* ---------- Flash and callouts */
.flash { padding: 10px 14px; border-radius: var(--r); margin: 0 0 14px; border: 1px solid; font-size: 13.5px; }
.flash-info { background: var(--green-tint); border-color: #b9d1c7; color: var(--green-ink); }
.flash-warn { background: var(--amber-tint); border-color: #ecd9b3; color: #6b4608; }
.flash-error { background: var(--brick-tint); border-color: #e7c1b4; color: #7a2c18; }
.callout { padding: 14px 18px; border-radius: var(--r); margin: 0 0 16px; font-size: 13.5px; }
.callout-assume { background: var(--amber-tint); border: 1px dashed #d9b46a; color: #5c3d07; }

/* ---------- Forms and buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 13.5px/1 var(--sans); padding: 9px 14px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.btn-danger { color: var(--brick); border-color: #e2b8aa; }
.btn-danger:hover { background: var(--brick); color: #fff; border-color: var(--brick); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-small { padding: 6px 10px; font-size: 12.5px; }
.btn-block { width: 100%; padding: 12px 14px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 12.5px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.field legend { margin-bottom: 6px; }
.field small { color: var(--muted); font-size: 12px; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--rule-2); border-radius: var(--r); padding: 9px 11px; min-width: 0; }
input:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 90, 73, 0.14); }
input[type=checkbox], input[type=radio] { accent-color: var(--green); width: 15px; height: 15px; margin: 0; }
.choice { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 14px; }
.choice .sub { margin-left: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; max-width: 860px; }
.form-grid .form-actions { grid-column: 1 / -1; }
.form-inline-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.form-inline-grid .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--rule); background: #fbfaf6; }
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar select, .filter-bar input { padding: 7px 10px; font-size: 13px; }
.mark-form, .tag-form, .proc-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tag-form select { max-width: 210px; font-size: 12.5px; padding: 6px 8px; }
.tag-form input { width: 140px; font-size: 12.5px; padding: 6px 8px; }
.proc-form { justify-content: flex-start; }
.proc-form input[name=note] { width: 200px; font-size: 12.5px; padding: 6px 8px; }
.mark-form select { font-size: 12.5px; padding: 5px 8px; }

/* ---------- Tabs, chips */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule-2); margin-bottom: 18px; }
.tabs a { padding: 9px 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--green); border-bottom-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.card-head .chips { margin: 0; }
.chip { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--rule-2); border-radius: 14px; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Engagement layout and working-paper index */
.eng-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 28px; align-items: start; }
.wp-index { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.wp-client { padding: 16px 16px 14px; border-bottom: 1px solid var(--rule); }
.wp-name { font-family: var(--serif); font-weight: 600; font-size: 16.5px; line-height: 1.25; margin: 0 0 6px; }
.wp-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin: 0; }
.wp-meta2 { font-size: 12px; color: var(--faint); margin: 4px 0 0; }
.wp-list { list-style: none; margin: 0; padding: 6px 0; }
.wp-list a { display: grid; grid-template-columns: 24px 1fr 12px; align-items: center; gap: 6px; padding: 7px 14px 7px 16px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; border-left: 2px solid transparent; }
.wp-list a:hover { background: var(--paper); }
.wp-list a.on { color: var(--ink); font-weight: 600; background: var(--paper); border-left-color: var(--green); }
.wp-letter { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.wp-list a.on .wp-letter { color: var(--green); }
.wp-state { width: 9px; height: 9px; border-radius: 50%; justify-self: end; }
.wp-done { background: var(--green); }
.wp-open { border: 1.5px solid #6d86ad; }
.wp-flag { background: var(--brick); transform: rotate(45deg); border-radius: 1px; width: 8px; height: 8px; }
.wp-warn { background: #d9a23c; }
.wp-na { border: 1.5px solid var(--rule-2); }
.wp-prepared { margin: 4px 12px 12px; padding: 10px 12px; background: var(--green-tint); border-radius: var(--r); font-weight: 600; font-size: 12.5px; color: var(--green-ink); display: flex; flex-direction: column; }
.wp-prepared span { font-weight: 400; color: var(--green); }
.eng-main { min-width: 0; }

.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.facts dd { margin: 0; }
.inline-facts { grid-template-columns: auto 1fr auto 1fr auto 1fr; margin-bottom: 14px; font-size: 13px; }

.progress { list-style: none; margin: 0; padding: 0; }
.progress li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.progress li:last-child { border-bottom: 0; }
.progress a { color: var(--ink); text-decoration: none; }
.progress a:hover { text-decoration: underline; }
.pg-note { font-size: 12.5px; color: var(--muted); }
.pg-flag .pg-note { color: var(--brick); font-weight: 500; }
.pg-open .pg-note { color: #3c5a8a; }
.pg-done .pg-note::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 2px; }

/* Deposits */
.deposits td { font-size: 13px; }
.deposits tr.nonrev td { background: #fbf8f0; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 3px; background: var(--slate-tint); color: var(--ink-2); }
.tag-revenue { background: var(--green-tint); color: var(--green-ink); }
.tag-loan, .tag-owner_capital, .tag-inter_account, .tag-refund { background: #e8edf5; color: #2f4a73; }
.tag-asset_sale, .tag-excluded_income { background: var(--amber-tint); color: #6b4608; }
.tag-other { background: var(--brick-tint); color: #7a2c18; }
.confirmed, .suggested { font-size: 11px; margin-left: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.confirmed { color: var(--green); }
.suggested { color: var(--faint); }
.reason { font-size: 12px; color: var(--muted); margin-top: 3px; max-width: 46ch; }
.reason .note { color: var(--ink-2); font-style: italic; }

/* Schedules */
.sched-nav { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); margin-bottom: 18px; overflow: hidden; }
.sched-nav a { padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; border-left: 1px solid var(--rule); line-height: 1.3; }
.sched-nav a:first-child { border-left: 0; }
.sched-nav a span { display: block; font-family: var(--serif); font-size: 20px; color: var(--green); }
.sched-nav a:hover { background: var(--paper); }
.sched-no { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); font-weight: 500; }
.schedule { scroll-margin-top: 80px; }
.sched td:nth-child(2) { width: 170px; }
.sched .sub-head td { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); font-weight: 600; padding-top: 16px; background: transparent !important; }
.sched .note-row td { color: var(--muted); font-size: 12.5px; font-style: italic; }
.sched .check-row td { font-size: 12.5px; color: var(--muted); background: var(--paper) !important; }
.sched tr.total td.r .num { border-top: 1px solid var(--ink); padding-top: 2px; display: inline-block; min-width: 100px; }
.sched tr.total td { border-top: 0; font-weight: 600; }
.sched tr.grand td { background: #fbfaf6; }

/* Variance */
.finding .card p:last-child { margin-bottom: 0; }
.drill td { font-size: 13px; }
.sources-line { font-size: 12.5px; color: var(--muted); }

/* Rules page */
.rules { padding: 4px 0; }
.rule { padding: 16px 20px; border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.rule:last-child { border-bottom: 0; }
.rule:target { background: #fffbea; }
.rule.is-assume { background: linear-gradient(90deg, var(--amber-tint), transparent 40%); box-shadow: inset 3px 0 0 #d9b46a; }
.rule-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rule-head h3 { font-size: 15.5px; }
.rule-value { margin: 0 0 8px; max-width: 90ch; }
.rule-why { font-size: 13px; color: #5c3d07; }
.rule-quote { margin: 8px 0 0; padding: 8px 14px; border-left: 2px solid var(--rule-2); font-family: var(--serif); font-size: 14px; color: var(--ink-2); }
.rule-quote p { margin: 0 0 4px; }
.rule-quote footer { font-family: var(--sans); font-size: 12px; }

/* Export and hand-off */
.downloads { list-style: none; margin: 0 0 10px; padding: 0; }
.dl { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.dl:hover strong { text-decoration: underline; }
.dl > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.dl-type { font-family: var(--mono); font-size: 10.5px; font-weight: 500; width: 42px; text-align: center; padding: 3px 0; border: 1px solid var(--rule-2); border-radius: 3px; color: var(--green); margin-top: 2px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.checks li:last-child { border-bottom: 0; }
.checks a { color: var(--ink); text-decoration: none; }
.checks a:hover { text-decoration: underline; }
.chk { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--rule-2); flex: none; position: relative; top: 2px; }
.checks .ok .chk { background: var(--green); border-color: var(--green); }
.checks .ok .chk::after { content: ""; position: absolute; left: 3.5px; top: 0.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.handoff { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px 30px 28px; position: relative; }
.handoff h2 { font-size: 24px; margin: 4px 0 10px; max-width: 30ch; }
.handoff p { max-width: 78ch; color: var(--ink-2); }
.handoff-rule { position: absolute; left: 30px; right: 30px; top: 0; height: 5px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.handoff.is-done { background: var(--green-tint); border-color: #b9d1c7; }
.handoff.is-done h2 { color: var(--green-ink); }

/* Admin */
.secret-box { display: flex; gap: 10px; align-items: center; background: var(--paper); border: 1px dashed var(--rule-2); border-radius: var(--r); padding: 12px 14px; margin: 14px 0; }
.secret-box code { word-break: break-all; font-size: 13.5px; flex: 1; }
.act { font-size: 11.5px; padding: 1px 5px; border-radius: 3px; background: var(--paper-2); }
.act-login, .act-mfa, .act-logout { background: #e8edf5; color: #2f4a73; }
.act-user, .act-setup, .act-password { background: #eeedf6; color: #3d3a6b; }
.act-upload, .act-document { background: var(--green-tint); color: var(--green-ink); }
.act-tag, .act-procedure, .act-checklist, .act-settings { background: var(--amber-tint); color: #6b4608; }
.act-export, .act-engagement { background: #e5f0f2; color: #1f5560; }
.act-access, .act-demo { background: var(--brick-tint); color: #7a2c18; }
.audit-table td { font-size: 12.5px; }
.audit-table .detail { color: var(--muted); max-width: 380px; word-break: break-word; font-family: var(--mono); font-size: 11px; }
.pager { display: flex; gap: 8px; margin-top: 12px; }
.upload-form { display: grid; grid-template-columns: 300px 1fr auto; gap: 16px; align-items: end; }
.upload-form input[type=file] { background: var(--paper); border-style: dashed; padding: 14px; }
.results { list-style: none; margin: 0 0 8px; padding: 0; }
.results li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; flex-wrap: wrap; }
.users-table td { vertical-align: middle; }

.error-page { max-width: 560px; margin: 40px auto; }
.error-page h1 { margin-bottom: 10px; }

/* ---------- Auth pages */
body.auth { background: var(--paper); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }
.auth-side { background: var(--ink); color: #e9e6de; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, 0.045) 31px 32px); pointer-events: none; }
.auth-side .wordmark { color: #f5f3ee; }
.auth-side .wm-ready { color: #8fc3ad; }
.auth-side .mark-bg { fill: #2c7a63; }
.auth-pitch { position: relative; z-index: 1; max-width: 440px; }
.auth-lede { font-family: var(--serif); font-size: 31px; line-height: 1.22; color: #fbfaf6; margin: 0 0 22px; }
.auth-rule { width: 120px; height: 5px; border-top: 1px solid #8fc3ad; border-bottom: 1px solid #8fc3ad; margin-bottom: 20px; }
.auth-small { color: #b9bfc6; font-size: 14px; line-height: 1.6; }
.auth-foot { color: #8b939c; font-size: 12px; margin: 0; position: relative; z-index: 1; }
.auth-brand { position: relative; z-index: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-title { font-size: 28px; margin: 0 0 8px; }
.auth-sub { color: var(--ink-2); margin: 0 0 22px; }
.auth-note { color: var(--muted); font-size: 12.5px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.auth-alt { margin-top: 12px; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; text-align: center; padding: 12px; }
.enrol { display: flex; gap: 18px; align-items: center; margin: 0 0 20px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.qr-frame { width: 150px; height: 150px; flex: none; }
.qr { width: 150px; height: 150px; display: block; }
.enrol-key { display: flex; flex-direction: column; gap: 6px; }
.enrol-key .label { font-size: 12px; color: var(--muted); }
.secret { font-size: 13px; line-height: 1.6; word-break: break-word; color: var(--ink); }

@media (max-width: 1100px) {
  .eng-layout { grid-template-columns: 1fr; }
  .wp-index { position: static; }
  .grid-2, .figures { grid-template-columns: 1fr 1fr; }
  .sched-nav { grid-template-columns: repeat(4, 1fr); }
  .firm-label, .who-role { display: none; }
}
@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 28px; }
  .auth-lede { font-size: 24px; }
  .grid-2, .figures, .form-grid, .form-inline-grid, .upload-form { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  main { padding: 12px 16px; }
}
@media print {
  .topbar, .wp-index, .foot, .btn, form { display: none !important; }
  .eng-layout { display: block; }
  body { background: #fff; }
}
