@font-face { font-family: "Public Sans"; src: url("../vendor/fonts/public-sans-latin-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../vendor/fonts/newsreader-latin-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
/* "Preparer's workpaper" tokens, see DESIGN.md. Old names map onto the new system. */
:root {
  --s3:12px; --s4:16px; --s6:24px; --t4:18px; --paper: #ffffff; --desk: #f3f5f8; --ink: #151a24; --pen: #1d4a9a; --pen-dk: #163a7c; --hl: #ffe066; --hl-dk: #e0b400;
  --n50: #f6f7f9; --n100: #eef0f4; --n200: #e1e5ec; --n300: #c9d0db; --n400: #9aa4b4; --n500: #6b7587; --n600: #4b5466; --n700: #343c4c; --n800: #222836;
  --ok: #1c7a4a; --warn: #9a5800; --err: #c2332f;
  --bg: var(--desk); --card: var(--paper); --ink2: var(--n600); --mute: #5e6878; --line: var(--n200); --line2: var(--n100);
  --blue: var(--pen); --blue2: #e9eef8; --green: var(--ok); --green2: #e6f3ec; --red: var(--err); --red2: #fbeaea;
  --amber: var(--warn); --amber2: #fdf2dc; --teal: var(--n700); --teal2: var(--n100); --grey2: var(--n100);
  --r: 6px; --r-sm: 4px; --r-lg: 8px; --sh-spot: 0 0 0 9999px rgba(21,26,36,.5), 0 0 0 3px var(--hl) inset; --sh: none; --sh-over: 0 1px 2px rgba(21, 26, 36, .08), 0 12px 32px rgba(21, 26, 36, .16);
  --overlay: rgba(21,26,36,.45); --tour-overlay: rgba(21,26,36,.55); --highlight-fill: rgba(255,224,102,.45); --highlight-pulse: rgba(255,224,102,.6);
  --ease: cubic-bezier(.2, .7, .2, 1); --t: 160ms;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  font-family: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
.muted { color: var(--mute); } .sm { font-size: 12px; } .red { color: var(--red); } .green { color: var(--green); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.nowrap { white-space: nowrap; } .r { text-align: right; } .mt { margin-top: 16px; } .w30 { width: 30%; }

.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: var(--n200); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand b { display: block; font-size: 16px; color: var(--paper); }
.brand small { color: var(--n400); font-size: 11.5px; }
.logo { width: 34px; height: 34px; border-radius: var(--r-lg); background: var(--blue); color: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.sidehead { font-size: 11px; color: var(--n500); margin-top: 4px; }
.clist { display: flex; flex-direction: column; gap: 4px; }
.citem { text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--r-lg); padding: 9px 10px; color: inherit; cursor: pointer; position: relative; }
.citem:hover { background: var(--n800); }
.citem.on { background: var(--n800); border-color: var(--n700); }
.citem .cn { font-weight: 600; color: var(--paper); font-size: 13.5px; padding-right: 4px; }
.citem .cm { font-size: 11.5px; color: var(--n400); margin: 2px 0 5px; }
.privacy { font-size: 12px; background: var(--n800); border: 1px solid var(--n700); border-radius: var(--r-lg); padding: 10px; color: var(--n300); }
.privacy b { color: var(--paper); }
.side .btn.ghost { color: var(--n300); border-color: var(--n700); }
.mobile-top { display: none; }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.main { padding: 22px 26px 30px; flex: 1; min-width: 0; }
.foot { font-size: 11.5px; color: var(--mute); padding: 10px 26px 18px; }

/* chips / tags / badges */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip.sm { font-size: 10.5px; padding: 1px 7px; }
.c-grey { background: var(--grey2); color: var(--n600); } .c-blue { background: var(--blue2); color: var(--blue); }
.c-teal { background: var(--teal2); color: var(--teal); } .c-amber { background: var(--amber2); color: var(--amber); }
.c-green { background: var(--green2); color: var(--green); } .c-red { background: var(--red2); color: var(--red); }
.c-review-note { background: var(--n100); color: var(--n700); }
.chip[data-st="parsing"]::before { content: ""; width: 8px; height: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: var(--r-lg); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: var(--r-sm); background: var(--blue2); color: var(--blue); white-space: nowrap; }
.tag.xs { font-size: 10px; padding: 0 5px; } .tag.dark { background: var(--n700); color: var(--paper); } .tag.review-note { background: var(--n100); color: var(--n700); }
.tag.teal { background: var(--teal2); color: var(--teal); } .tag.red { background: var(--red2); color: var(--red); } .tag.amber { background: var(--amber2); color: var(--amber); } .tag.blue { background: var(--blue2); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: var(--r); white-space: nowrap; margin-right: 3px; }
.badge.ok { background: var(--green2); color: var(--green); } .badge.bad { background: var(--red); color: var(--paper); } .badge.warn { background: var(--amber2); color: var(--amber); }
.cf { font-style: normal; display: inline-block; min-width: 20px; text-align: center; font-size: 9.5px; font-weight: 700; line-height: 14px; border-radius: var(--r); padding: 0 4px; margin-left: 5px; vertical-align: 1px; }
.c-hi { background: var(--green2); color: var(--green); } .c-md { background: var(--amber2); color: var(--amber); } .c-lo { background: var(--red); color: var(--paper); }
.c-ed { background: var(--blue); color: var(--paper); } .c-ok { background: var(--green); color: var(--paper); }

/* buttons */
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-lg); padding: 7px 13px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--n300); background: var(--n50); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--paper); } .btn.primary:hover { background: var(--pen-dk); }
.btn.warn { background: var(--n700); border-color: var(--n700); color: var(--paper); }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 5px 10px; font-size: 12px; } .btn.xs { padding: 3px 8px; font-size: 11.5px; border-radius: var(--r); } .btn.full { width: 100%; }
input.mini { width: 80px; padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--r); font-size: 12px; }

/* page header */
.phead { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.crumb { font-size: 12px; color: var(--mute); }
.phead h1 { font-size: 24px; letter-spacing: -.01em; margin: 2px 0 4px; }
.meta { color: var(--ink2); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pstats { display: flex; gap: 10px; }
.pst { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 7px 14px; text-align: center; min-width: 92px; }
.pst b { display: block; font-size: 17px; } .pst span { font-size: 11px; color: var(--mute); }
.pst.ok b { color: var(--green); } .pst.bad b { color: var(--red); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 16px 0 16px; overflow-x: auto; }
.tab { background: none; border: none; padding: 9px 14px; font-weight: 600; color: var(--ink2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); }
.tab .cnt { background: var(--amber2); color: var(--amber); border-radius: var(--r-lg); font-size: 11px; padding: 0 6px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 16px; }
.cardh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.cardh h3 { font-size: 15px; }
.cardf { padding: 12px 16px; border-top: 1px solid var(--line2); text-align: right; }
.tscroll { overflow-x: auto; }
.empty { text-align: center; padding: 60px 20px; background: var(--paper); border: 1px dashed var(--n300); border-radius: var(--r); color: var(--ink2); }
.empty.sm { padding: 30px; }
.empty .eico { font-size: 34px; } .empty h3 { margin: 8px 0 6px; color: var(--ink); } .empty p { max-width: 520px; margin: 0 auto 14px; }

/* upload */
.uplayout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.drop { border: 1px dashed var(--n300); background: var(--paper); border-radius: var(--r-lg); padding: 30px 24px; text-align: center; cursor: pointer; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.drop.over { border-color: var(--blue); background: var(--blue2); }
.dico { font-size: 34px; color: var(--blue); } .drop h3 { font-size: 19px; margin: 4px 0; } .drop p { color: var(--ink2); margin: 0 0 14px; }
.dact { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.privnote { margin-top: 14px; font-size: 12px; color: var(--teal); }
.uphelp { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; font-size: 13px; color: var(--ink2); }
.uphelp h4 { color: var(--ink); margin-bottom: 6px; } .uphelp ol { padding-left: 18px; margin: 0; } .uphelp li { margin: 6px 0; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink2); }
.pbar{ width: 200px; height: 8px; background: var(--line2); border-radius: var(--r-sm); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--blue); transition: width .3s var(--ease); }
.pipe { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); }
.pp { display: flex; align-items: center; gap: 6px; } .pp b { font-size: 15px; } .arr { color: var(--n300); }
table { border-collapse: collapse; width: 100%; }
.qt th, .ct th, .rt th { text-align: left; font-size: 11.5px; color: var(--mute); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--n50); }
.qt td, .ct td, .rt td { padding: 8px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.qt td.n { color: var(--mute); width: 34px; } .qt .fn { font-weight: 600; font-size: 13px; }
.sub { font-size: 11.5px; color: var(--mute); margin-top: 2px; } .sub.red { color: var(--red); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.qt tr.q-parsing { background: var(--n50); } .qt tr.q-ocr { background: var(--n50); }

/* review grid */
.toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-sm); padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.fchip span { color: var(--mute); font-size: 11.5px; margin-left: 2px; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); } .fchip.on span { color: var(--n300); }
.tright { display: flex; gap: 8px; }
.search { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 10px; width: 220px; background: var(--paper); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink2); margin-bottom: 10px; flex-wrap: wrap; }
.legend .cf { margin: 0 4px 0 0; }
.gridwrap { overflow: auto; max-height: calc(100vh - 262px); min-height: 300px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.grid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: max-content; min-width: 100%; }
.grid th { position: sticky; background: var(--desk); color: var(--ink2); font-weight: 600; font-size: 11.5px; padding: 6px 9px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line2); white-space: nowrap; z-index: 3; text-align: left; }
.grid tr.g1 th { top: 0; height: 30px; } .grid tr.g2 th { top: 30px; }
.grid th.gh { text-align: center; background: var(--blue2); color: var(--ink); font-size: 10.5px; }
.grid th.num { text-align: right; }
.grid td { padding: 6px 9px; border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); white-space: nowrap; background: var(--paper); vertical-align: middle; }
.grid td.c { cursor: pointer; } .grid td.c:hover { background: var(--desk); box-shadow: inset 0 0 0 1px var(--n300); }
.grid .fz { position: sticky; z-index: 2; } .grid th.fz { z-index: 5; top: 0; }
.grid .fz1 { left: 0; width: 132px; min-width: 132px; } .grid .fz2 { left: 132px; width: 260px; min-width: 260px; max-width: 260px; box-shadow: 2px 0 0 var(--n200); }
.grid .fzr { position: sticky; right: 0; z-index: 2; box-shadow: -2px 0 0 var(--n200); text-align: right; } .grid th.fzr { z-index: 5; top: 0; }
.grid td.fzr .btn { margin-left: 3px; }
.grid td.payer { cursor: pointer; white-space: normal; } .grid td.payer:hover .pn { color: var(--blue); text-decoration: underline; }
.grid .pn { font-weight: 600; font-size: 12.5px; line-height: 1.3; } .grid .fnm { font-size: 10.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid tr.s-review td.fz1, .grid tr.s-ocr td.fz1 { box-shadow: inset 3px 0 0 var(--amber); } .grid tr.s-ocr td.fz1 { box-shadow: inset 3px 0 0 var(--red); }
.grid tr.s-approved td.fz1, .grid tr.s-overridden td.fz1 { box-shadow: inset 3px 0 0 var(--green); }
.grid tr.s-excluded td { color: var(--n400); background: var(--n50); }
.grid tr:hover td { background: var(--paper); }
.grid .neg { color: var(--red); }
.grid .codes { display: inline-flex; gap: 4px; }
.cd { background: var(--grey2); border-radius: var(--r-sm); padding: 0 5px; font-size: 11.5px; } .cd b { color: var(--blue); } .cd.st { background: var(--amber2); }
.grid td.chk { cursor: pointer; } .grid .tagcol { min-width: 112px; }
.tagsel { font-size: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 2px 4px; background: var(--paper); }
.tagsel.weak { border-color: var(--amber); background: var(--amber2); }
.shimmer { display: inline-block; width: 46px; height: 9px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--n100), var(--n200), var(--n100)); background-size: 200% 100%; animation: sh 1.1s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* checks */
.gatecard { display: flex; gap: 14px; align-items: flex-start; border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; border: 1px solid; }
.gatecard.ok { background: var(--green2); border-color: var(--n300); } .gatecard.bad { background: var(--n50); border-color: var(--n300); }
.gatecard .gi { font-size: 22px; } .gatecard h3 { font-size: 16px; margin-bottom: 4px; }
.gatecard ul { margin: 4px 0 8px; padding-left: 18px; color: var(--ink2); } .gatecard p { margin: 2px 0 8px; color: var(--ink2); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpi b { font-size: 22px; display: block; } .kpi span { font-size: 12px; color: var(--mute); }
.iss { display: flex; flex-direction: column; border-left: 3px solid; padding: 4px 9px; margin: 3px 0 5px; border-radius: var(--r-sm); font-size: 12.5px; }
.iss span { color: var(--ink2); font-size: 12px; }
.iss.s-red { border-color: var(--red); background: var(--n50); } .iss.s-red b { color: var(--red); }
.iss.s-amber { border-color: var(--hl-dk); background: var(--n50); } .iss.s-info { border-color: var(--n400); background: var(--n50); } .iss.s-ok { border-color: var(--green); background: var(--n50); } .iss.s-ok b { color: var(--green); }
.ct a { color: var(--ink); text-decoration: none; } .ct a:hover { color: var(--blue); }
.expbtns { display: flex; gap: 8px; margin: 8px 0 6px; }
.mapnote { font-size: 12px; color: var(--amber); font-weight: 600; }
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.rgrid .span2 { grid-column: span 2; }
.rt td, .rt th { padding: 6px 10px; font-size: 12.5px; }
.rt td.num, .rt th.num, .qt td.num { white-space: nowrap; }
.rt td.form { white-space: nowrap; }
.rt td.ein { white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }
.rt tr.tot td { font-weight: 700; background: var(--n50); border-top: 1px solid var(--line); }
.rt tr.exprow { cursor: pointer; } .rt tr.exprow:hover td { background: var(--n50); }
.sublines td { background: var(--paper); } .sublines div { display: flex; justify-content: space-between; font-size: 12px; padding: 1px 0 1px 18px; color: var(--ink2); }
.card h4 { padding: 0 16px; font-size: 13.5px; } .card > p { padding: 0 16px 12px; margin: 6px 0 0; }
.prev td, .prev th { white-space: nowrap; font-size: 11.5px; }

/* side panel */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: var(--paper); box-shadow: var(--sh-over); z-index: 40; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ph .pt { font-weight: 700; font-size: 16px; }
.x { border: none; background: var(--grey2); width: 30px; height: 30px; border-radius: var(--r-lg); cursor: pointer; font-size: 14px; flex: none; }
.pbody { overflow-y: auto; padding: 14px 18px 30px; flex: 1; }
.fhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.flab { font-size: 12px; color: var(--mute); font-weight: 700; }
.fsrc { font-size: 12.5px; color: var(--blue); font-weight: 600; }
.fval { font-size: 22px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.fval .cf { font-size: 11px; line-height: 17px; vertical-align: 4px; }
.fconf { font-size: 12.5px; color: var(--ink2); margin: 6px 0 10px; } .fconf ul { margin: 4px 0 0; padding-left: 18px; }
.codes-t { margin-bottom: 10px; } .codes-t td, .codes-t th { padding: 5px 8px; font-size: 12.5px; }
.editbox { background: var(--n50); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; display: grid; gap: 8px; margin-bottom: 12px; }
.editbox label { font-size: 12px; color: var(--ink2); display: grid; gap: 3px; }
.editbox input { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; background: var(--paper); }
.ebtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.recbox { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 12px; }
.rbh { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.rollcalc { border: 1px solid; border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 12px; }
.rollcalc.ok { border-color: var(--n300); background: var(--n50); } .rollcalc.bad { border-color: var(--n300); background: var(--n50); }
.rch { font-weight: 800; font-size: 15px; margin-bottom: 6px; } .rollcalc.bad .rch { color: var(--red); } .rollcalc.ok .rch { color: var(--green); }
.rollcalc table td { padding: 3px 0; font-size: 13px; } .rollcalc table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.rollcalc tr.t td { border-top: 1px solid var(--line); font-weight: 700; } .rollcalc tr.red td { color: var(--red); }
.hint { background: var(--amber2); border-radius: var(--r-lg); padding: 8px 10px; font-size: 12.5px; margin: 8px 0; }
.qbibox { background: var(--blue2); border-radius: var(--r-lg); padding: 8px 10px; font-size: 12.5px; margin-bottom: 10px; }
.srch { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 6px; }
.pgtabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pgt { border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); font-size: 11.5px; padding: 2px 8px; cursor: pointer; }
.pgt.hit { border-color: var(--hl); } .pgt.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.viewer { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--n100); max-height: 560px; overflow: auto; margin-bottom: 12px; }
.vload { padding: 40px 16px; text-align: center; color: var(--mute); font-size: 13px; }
.pgwrap { position: relative; background: var(--paper); }
.pgwrap canvas { display: block; }
.hl { position: absolute; background: var(--highlight-fill); outline: 2px solid var(--hl-dk); border-radius: var(--r-sm); animation: pulse 1.4s ease-in-out 2; }
@keyframes pulse { 50% { background: var(--highlight-pulse); } }
.ocrnote { margin-top: 10px; background: var(--red2); color: var(--warn); border-radius: var(--r-lg); padding: 10px 12px; font-size: 12.5px; }

/* modal / toast */
.modal { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal[hidden], .panel[hidden], .toast[hidden] { display: none; }
.mbox { background: var(--paper); border-radius: var(--r-lg); padding: 20px 22px; width: min(520px, 100%); box-shadow: var(--sh-over); }
.mbox h3 { font-size: 17px; margin-bottom: 6px; } .mbody { font-size: 13px; color: var(--ink2); } .mbody ul { padding-left: 18px; }
.mlab { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.mlab textarea { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; font-weight: 400; resize: vertical; }
.merr { color: var(--red); font-size: 12px; min-height: 16px; margin-top: 4px; }
.mact { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: var(--r-lg); font-size: 13px; z-index: 70; box-shadow: var(--sh-over); }

/* responsive */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rgrid, .uplayout { grid-template-columns: minmax(0, 1fr); } .rgrid .span2 { grid-column: auto; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); padding: 10px 14px; position: sticky; top: 0; z-index: 20; }
  .mobile-top b { color: var(--paper); } .mobile-top .logo { width: 28px; height: 28px; font-size: 11px; }
  .mobile-top select { max-width: 60vw; border-radius: var(--r); padding: 5px 6px; background: var(--n800); color: var(--paper); border: 1px solid var(--n700); font-size: 12.5px; }
  .main { padding: 14px 12px 24px; }
  .phead h1 { font-size: 20px; } .pstats { width: 100%; } .pst { flex: 1; min-width: 0; padding: 6px 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid .fz1 { width: 0; min-width: 0; padding: 0; font-size: 0; } .grid .fz1 .chip { display: none; }
  .grid .fz2 { left: 0; width: 160px; min-width: 160px; max-width: 160px; }
  .gridwrap { max-height: 70vh; }
  .tright { width: 100%; } .search { flex: 1; width: auto; min-width: 0; }
  .legend { display: none; }
  .grid .fzr, .grid th.fzr { position: static; box-shadow: none; }
  .grid .fz2 { box-shadow: 2px 0 0 var(--n200), inset 3px 0 0 var(--rowc, transparent); }
  .grid tr.s-review { --rowc: var(--amber); } .grid tr.s-ocr { --rowc: var(--red); } .grid tr.s-approved, .grid tr.s-overridden { --rowc: var(--green); }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; width: 100%; } .fchip { flex: none; }
  .foot { padding: 10px 12px 18px; }
  .drop { padding: 22px 14px; }
}
.gridwrap { scroll-padding-left: 404px; scroll-padding-right: 170px; scroll-padding-top: 64px; }
@media (min-width: 1600px) { body.panel-open .mainwrap { margin-right: 600px; } }

/* ---------- polish: hero, demo button, before/after, guided tour ---------- */
.pstats { align-items: stretch; }
.demo-btn { background: var(--pen); border-color: var(--pen); color: var(--paper); }
.demo-btn:hover { background: var(--pen-dk); border-color: var(--pen-dk); }
.demo-btn small { font-weight: 500; opacity: .85; margin-left: 4px; }
.pstats > .demo-btn { align-self: center; padding: 10px 16px; font-size: 14px; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; border-radius: var(--r-lg); }

.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 22px; align-items: center; margin-bottom: 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 32px; }
.hero .hk { font-size: 12px; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.hero.done .hk { color: var(--green); }
.hero h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.015em; max-width: 760px; }
.hero p { color: var(--ink2); max-width: 720px; margin: 10px 0 0; }
.hero .hact { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero .pbar.big { width: 100%; max-width: 560px; height: 12px; border-radius: var(--r); margin-top: 12px; }
.hstats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hstats > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 14px; min-width: 150px; }
.hstats b { display: block; font-size: 22px; letter-spacing: -.01em; } .hstats span { font-size: 12px; color: var(--mute); }
.amber { color: var(--amber); }
.hq { font-size: 14px; font-style: normal; color: var(--ink2); border-left: 3px solid var(--hl-dk); padding: 4px 0 4px 14px; line-height: 1.5; }
.hq span { display: block; font-style: normal; font-size: 11.5px; color: var(--mute); margin-top: 6px; }

.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour[hidden] { display: none; }
.tour .thole { position: fixed; border-radius: var(--r); box-shadow: var(--sh-over); transition: top .3s var(--ease), left .3s var(--ease), width .3s var(--ease), height .3s var(--ease); pointer-events: none; }
.tour.final .thole { display: none; }
.tour.final { background: var(--tour-overlay); }
.tour .tcard { position: fixed; pointer-events: auto; background: var(--paper); border-radius: var(--r-lg); padding: 16px 18px 14px; box-shadow: var(--sh-over); transition: top .3s var(--ease), left .3s var(--ease); }
.tour .tprog { height: 4px; background: var(--line2); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 10px; }
.tour .tprog i { display: block; height: 100%; width: 0; background: var(--pen); }
.tour .tstep { font-size: 12px; font-weight: 600; color: var(--mute); }
.tour h4 { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.2; margin: 2px 0 6px; }
.tour p { margin: 0 0 12px; color: var(--ink2); font-size: 14px; line-height: 1.5; }
.tour .tbtns { display: flex; gap: 6px; align-items: center; } .tour .tsp { flex: 1; }

@media (max-width: 1180px) { .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .hero { padding: 16px; } .hero h2 { font-size: 19px; } .hero .hact .btn { flex: 1 1 100%; } .hstats > div { flex: 1 1 40%; min-width: 0; }
  .pstats > .demo-btn { flex: 1 1 100%; }
  .tour .tbtns .btn { padding: 5px 8px; }
}
@media (max-width: 900px) {
  .pstats { flex-wrap: wrap; } .pst span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .tabs .tab { flex: none; }
}
@media (max-width: 600px) { .codes-t td, .codes-t th { padding: 5px 5px; } .codes-t .mini { width: 64px; } .codes-t th { letter-spacing: 0; } }

/* ---------- design pass: "Preparer's workpaper" (DESIGN.md) ---------- */
body { font-size: 14px; color: var(--ink); -webkit-font-smoothing: antialiased; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -.2em; margin-right: .4em; flex: none; }
.ic.sm { width: .95em; height: .95em; margin: 0 0 0 2px; color: var(--mute); }
button .ic:last-child:not(:first-child) { margin: 0 0 0 .35em; }
.x .ic, .btn.xs .ic:only-child { margin: 0; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.side :focus-visible, .mobile-top :focus-visible { outline-color: var(--hl); }
.btn, .tab, .fchip, .citem, .pgt, .x { transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease); }
.btn { border-radius: var(--r-sm); border-color: var(--n300); }
.btn:hover { border-color: var(--n400); background: var(--n50); }
.btn:active { background: var(--n100); }
.btn.primary:active, .demo-btn:active { background: var(--pen-dk); }
.btn.lg { border-radius: var(--r-sm); }
.btn.warn { background: var(--paper); border-color: var(--err); color: var(--err); }
.btn.warn:hover { background: var(--red2); border-color: var(--err); }
.chip, .fchip, .cf, .tab .cnt { border-radius: var(--r-sm); }
.chip.sm { font-size: 11px; }
.tag.dark { background: var(--n700); }
.logo { border-radius: var(--r-sm); background: var(--pen); font-family: var(--display); font-size: 15px; font-weight: 700; }
.brand small { color: var(--n400); }
.side { background: var(--ink); }
.sidehead { font-size: 12px; color: var(--n400); }
.citem { border-radius: var(--r); } .citem:hover { background: var(--n800); } .citem.on { background: var(--n800); border-color: var(--n700); }
.privacy{ background: transparent; border: 1px solid var(--n700); border-radius: var(--r); }
.privacy .ic{ color: var(--hl); }
.mobile-top { background: var(--ink); }
/* engagement header: form-style fields, figures strip */
.crumb { font-size: 13px; }
.phead h1 { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phead h1 .chip { font-family: "Public Sans", Arial, sans-serif; font-size: 12px; letter-spacing: 0; }
dl.meta { display: flex; gap: 0; margin: 8px 0 0; flex-wrap: wrap; }
dl.meta > div { padding: 0 16px; border-left: 1px solid var(--line); } dl.meta > div:first-child { padding-left: 0; border-left: 0; }
dl.meta dt { font-size: 12px; color: var(--mute); } dl.meta dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.pstats { gap: 0; align-items: center; }
.pst { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 2px 18px; min-width: 0; text-align: left; }
.pst b { font-size: 20px; font-weight: 700; } .pst span { font-size: 12px; }
.pstats > .demo-btn { margin-right: 14px; padding: 9px 14px; font-size: 14px; background: var(--paper); color: var(--pen); border-color: var(--pen); }
.pstats > .demo-btn:hover { background: var(--blue2); }
.tab { font-size: 14px; } .tab.on { color: var(--ink); border-bottom-color: var(--pen); }
.tab .cnt { font-weight: 700; }
/* hero: one sentence, one figures strip, one primary button */
.hero { grid-template-columns: minmax(0, 7fr) minmax(240px, 4fr); gap: 32px; align-items: start; }
.hero .hk { font-size: 13px; font-weight: 600; color: var(--mute); margin-bottom: 8px; display: flex; align-items: center; }
.hero.done .hk { color: var(--ok); }
.hero h2 { font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1.2; letter-spacing: -.012em; max-width: 32ch; }
.hstats { gap: 0; margin-top: 20px; }
.hstats > div { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0 24px; min-width: 0; }
.hstats > div:first-child { border-left: 0; padding-left: 0; }
.hstats b { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.hstats span { font-size: 13px; }
.hero .hact { margin-top: 24px; gap: 8px; }
.hero .hact .btn.ghost { border-color: transparent; color: var(--pen); text-decoration: underline; text-underline-offset: 3px; }
.hero .hact .btn.ghost:hover { background: transparent; color: var(--pen-dk); }
.hq { font-family: var(--display); font-size: 19px; font-style: normal; line-height: 1.4; color: var(--n700); border-left: 0; padding: 0; text-indent: -.4em; }
.hq span { font-family: "Public Sans", Arial, sans-serif; font-style: normal; font-size: 12px; color: var(--mute); margin-top: 10px; text-indent: 0; }
.hero .hq { padding-top: 4px; }
/* figures strips instead of boxed cards */
.kpis { gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.kpi { border: 0; border-left: 1px solid var(--line2); border-radius: 0; background: none; padding: 14px 16px; }
.kpi:first-child { border-left: 0; }
.kpi b { font-family: var(--display); font-size: 28px; font-weight: 600; }
.card { box-shadow: none; } .cardh h3 { font-size: 15px; font-weight: 650; }
.gridwrap{ box-shadow: none; }
.uphelp, .drop { border-radius: var(--r); }
.drop { border: 1px dashed var(--n300); background: var(--paper); }
.dico, .empty .eico { color: var(--pen); } .dico .ic, .empty .eico .ic { width: 30px; height: 30px; margin: 0; stroke-width: 1.5; }
.privnote { color: var(--n600); display: flex; align-items: center; justify-content: center; }
.arr { display: inline-flex; color: var(--n300); } .arr .ic { margin: 0; }
.qt th, .ct th, .rt th, .grid th, .grid th.gh { font-size: 12px; font-weight: 600; color: var(--n600); background: var(--n50); }
.grid th.gh { color: var(--ink); background: var(--n100); }
/* issues: tinted rows, no accent bars */
.iss { border-left: 0; border-radius: var(--r-sm); padding: 5px 9px; }
.iss.s-amber b { color: var(--warn); } .iss.s-info { background: var(--n50); }
.gatecard { border-radius: var(--r); } .gatecard .gi { display: grid; } .gatecard .gi .ic { width: 24px; height: 24px; margin: 0; }
.gatecard.ok .gi { color: var(--ok); } .gatecard.bad .gi { color: var(--err); }
.hint, .ocrnote { display: flex; gap: 2px; align-items: baseline; flex-wrap: wrap; border-radius: var(--r-sm); }
.hint { background: var(--amber2); }
/* panel, modal, toast */
.panel { box-shadow: var(--sh-over); }
.ph .pt { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.2; }
.x { border-radius: var(--r-sm); display: grid; place-items: center; } .x:hover { background: var(--n200); }
.flab { font-size: 13px; font-weight: 600; color: var(--n600); }
.fval { font-family: var(--display); font-size: 30px; font-weight: 600; }
.editbox, .recbox, .rollcalc, .viewer { border-radius: var(--r); }
.pgt { border-radius: var(--r-sm); } .pgt.hit { border-color: var(--hl-dk); }
.hl { background: var(--highlight-fill); outline-color: var(--hl-dk); }
.mbox { border-radius: var(--r-lg); box-shadow: var(--sh-over); } .mbox h3 { font-family: var(--display); font-size: 22px; font-weight: 600; }
.toast { background: var(--ink); border-radius: var(--r); }
.tour .tbtns .btn { display: inline-flex; align-items: center; }
.tour .tbtns .ic { margin-right: .3em; }
.tour .tbtns [data-t="next"] .ic { margin: 0 0 0 .3em; }
@media (max-width: 900px) {
  .phead h1 { font-size: 24px; }
  dl.meta > div { padding: 0 10px; } dl.meta dd { font-size: 13px; }
  .pstats { margin-top: 4px; }
  .pstats > .demo-btn { margin: 0 0 10px; flex: 1 1 100%; }
  .pst { flex: 1; padding: 2px 10px; } .pst:first-of-type { border-left: 0; padding-left: 0; }
  .hero { padding: 20px 16px; gap: 16px; } .hero h2 { font-size: 23px; }
  .hstats > div { flex: 1 1 0; padding: 0 12px; } .hstats b { font-size: 24px; white-space: nowrap; }
  .hq { font-size: 17px; }
  .kpi { border-top: 1px solid var(--line2); } .kpi b { font-size: 24px; }
}
.grid td, .rt td, .qt td, .ct td, .pst b, .hstats b, .kpi b, .fval, .rollcalc td, .pp b { font-variant-numeric: tabular-nums; }
.phead h1, .hero h2, .ph .pt, .mbox h3 { word-spacing: .06em; }
.brand b { white-space: nowrap; }
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero h2 { max-width: 30ch; }
  .hero .hq { padding-top: 16px; border-top: 1px solid var(--line2); }
}
@media (max-width: 600px) {
  dl.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 0; }
  dl.meta > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .hero .hact .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 600px) {
  /* queue on phones: file, status, open. Payer, form and parse time live in the review grid */
  .qt th:nth-child(1), .qt td:nth-child(1), .qt th:nth-child(3), .qt td:nth-child(3), .qt th:nth-child(4), .qt td:nth-child(4), .qt th:nth-child(6), .qt td:nth-child(6) { display: none; }
  .qt td, .qt th { padding: 8px 8px; }
  .prog .pbar { width: 90px; }
}
@media (max-width: 600px) {
  .qt { table-layout: fixed; } .qt th:nth-child(2) { width: 58%; } .qt th:nth-child(7) { width: 0; }
  .qt .fn, .qt .sub { overflow-wrap: anywhere; }
  .qt .chip { white-space: normal; }
  .qt td:nth-child(7) { padding: 0; } .qt td:nth-child(7):not(:empty) { padding: 8px 4px; }
}
@media (max-width: 600px) { .qt th:nth-child(7), .qt td:nth-child(7) { display: none; } .qt th:nth-child(2) { width: 60%; } }
/* Contain wide workpaper tables when resizing an already-reviewed batch. */
.main { min-width: 0; overflow: clip; }
.tscroll, .gridwrap { max-width: 100%; overscroll-behavior-x: contain; }
.toast { max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
.v-rollup > .card:first-child { padding: 16px; }
.v-rollup input { max-width: 100%; }

/* Fix round 1: task-first workpaper surfaces. */
.app { grid-template-columns: 224px minmax(0, 1fr); }
.main { padding: 24px; overflow: visible; }
.mainwrap, .view, .card, .rgrid > *, .baseline-layout > * { min-width: 0; }
.privacy-row { display: flex; align-items: flex-start; gap: 8px; padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--n300); color: var(--mute); font-size: 12px; line-height: 1.5; text-align: left; }
.privacy-row .ic { margin: 2px 0 0; }
.side { background: var(--ink); }
.clist { gap: 0; }
.citem, .citem.on { background: transparent; border: 0; border-bottom: 1px solid var(--n700); border-radius: 0; padding: 16px 4px; }
.citem:hover, .citem.on:hover { background: var(--n800); }
.citem.on .cn { text-decoration: underline; text-decoration-color: var(--n400); text-underline-offset: 4px; }
.privacy { margin-top: auto; padding: 16px 4px 0; border: 0; border-top: 1px solid var(--n700); border-radius: 0; }
.tabs { position: relative; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; scrollbar-color: var(--n400) var(--n100); padding-right: 24px; }
.tabs::after { content: '›'; position: sticky; right: -24px; margin-left: auto; flex: 0 0 24px; align-self: stretch; display: grid; place-items: center; background: var(--desk); color: var(--pen); font-size: 22px; }
.tabs .tab { flex: none; }
.hero .hact { margin-top: 16px; }
.hstats b { font-size: 28px; }
.hq { font-style: normal; }
.drop { border: 1px dashed var(--n300); border-radius: var(--r); }
select, input:not([type='file']), textarea { border: 1px solid var(--n300); border-radius: var(--r-sm); background-color: var(--paper); padding: 8px; }
select { appearance: none; font-family: 'Public Sans', sans-serif; font-size: 13px; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234b5466' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; cursor: pointer; }
.tagsel.weak { background-color: var(--paper); border-color: var(--n300); }
.tag-help { display: block; color: var(--warn); font-size: 11px; margin-top: 4px; white-space: normal; }
.gridwrap { min-height: 0; max-height: calc(100dvh - 300px); scroll-padding-left: 324px; scroll-padding-right: 16px; }
.grid .fz1 { width: 104px; min-width: 104px; }
.grid .fz2 { left: 104px; width: 220px; min-width: 220px; max-width: 220px; }
.grid .fzr { position: static; box-shadow: none; }
.grid .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .tagcol { width: 120px; min-width: 120px; }
.grid .tagsel { width: 112px; font-size: 13px; padding: 6px 22px 6px 6px; }
.grid .activity-col { width: 156px; min-width: 156px; max-width: 156px; white-space: normal; }
.grid .activity-col select { width: 140px; font-size: 13px; padding: 6px 24px 6px 6px; }
.grid .basis-col { min-width: 220px; width: 220px; max-width: 220px; white-space: normal; line-height: 1.45; }
.grid th.activity-col { white-space: normal; }
.grid tr.s-review td.fz1, .grid tr.s-ocr td.fz1, .grid tr.s-approved td.fz1, .grid tr.s-overridden td.fz1 { box-shadow: none; }
.grid th.fz1, .grid th.fz2, .grid th.tagcol, .grid th.activity-col, .grid th.basis-col { white-space: normal; }
.grid td.c { min-width: 88px; }
.tscroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.tscroll > .rt { min-width: 840px; }
.tscroll .rt th:first-child, .tscroll .rt td:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.tscroll .rt th:first-child { background: var(--n50); }
.tscroll .rt .tot td:first-child { background: var(--n100); }
.rt td.payer, #schedule-e .rt td:first-child, #schedule-e .rt th:first-child { min-width: 220px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt td.payer small { display: block; margin-top: 4px; color: var(--mute); font-size: 12px; }
.queue-payer { display: none; }
.qt td:nth-child(2) { max-width: 320px; }
.qt .fn, .qt .queue-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt .sub { max-width: 320px; }
.qt .queue-name { min-width: 220px; max-width: 260px; }
.mapping-table { min-width: 1450px !important; }
.mapping-table th { white-space: nowrap; }
.mapping-table .mapping-line { height: 36px; line-height: 36px; white-space: nowrap; font-size: 13px; }
.mapping-table .ny-target { min-width: 220px; max-width: 240px; }
.mapping-table .ny-target small { display: block; margin-top: 8px; color: var(--mute); }
.source-link { border: 0; padding: 0; color: var(--pen); background: transparent; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.worksheet-help, .audit-help { margin: 0; padding: 12px 16px; color: var(--mute); font-size: 12px; border-top: 1px solid var(--line); }
.approval-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px; }
.approval-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; align-items: flex-start; }
.approval-field label { font-size: 12px; color: var(--mute); }
.approval-field input { width: 100%; }
.signature-table { min-width: 500px !important; }
.signature-table th, .signature-table td { text-align: left; padding: 12px 16px; font-size: 13px; }
.signature-table th:first-child, .signature-table td:first-child { min-width: 100px; }
.export-status { border-top: 1px solid var(--line); padding: 16px; }
.export-status h3 { font-size: 15px; }
.export-status ul { padding-left: 20px; color: var(--mute); }
.export-status .expbtns { margin-top: 16px; }
.baseline-intro { max-width: 70ch; margin: 12px 0 24px; color: var(--n600); }
#savings h2 { font: 500 28px/1.2 var(--display); }
.baseline-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(240px, 4fr); gap: 32px; align-items: start; }
.baseline-table { min-width: 560px !important; }
.baseline-table th, .baseline-table td { text-align: left; padding: 16px 12px; }
.baseline-table td.num { color: var(--ink); font-size: 20px; text-align: right; white-space: nowrap; }
.baseline-table td:last-child { min-width: 210px; }
.baseline-table th:first-child { min-width: 180px; max-width: 220px; }
.assumption-form { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--n300); padding-top: 16px; }
.assumption-form h3 { font-size: 15px; }
.assumption-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--n600); }
.assumption-form input { width: 100%; }
.tag.review-note { background: var(--n100); color: var(--n700); }
@media (max-width: 1180px) { .baseline-layout { grid-template-columns: 1fr; } }
@media (max-width: 1024px) {
  .qt { min-width: 640px; table-layout: auto; }
  .qt td:nth-child(2) { min-width: 240px; }
  .rt td:first-child { min-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 16px 12px 24px; }
  .mobile-top select { background-color: var(--n800); border-color: var(--n600); color: var(--paper); border-radius: var(--r-sm); }
  .qt th:nth-child(3), .qt td:nth-child(3) { display: none; }
  .queue-payer { display: block; color: var(--n600); font-size: 12px; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
  .grid .fz1 { width: 0; min-width: 0; padding: 0; }
  .grid .fz2 { left: 0; width: 220px; min-width: 220px; max-width: 220px; box-shadow: 1px 0 0 var(--n300); }
  .gridwrap { scroll-padding-left: 220px; }
  .legend { display: flex; font-size: 12px; gap: 8px; }
}
@media (max-width: 600px) {
  .approval-fields { grid-template-columns: 1fr; gap: 16px; }
  .qt { min-width: 480px; }
  .qt th:nth-child(2) { width: auto; }
  .qt td:nth-child(7) { display: table-cell; padding: 8px; }
  .prog .pbar { width: 64px; }
  .cardh { flex-wrap: wrap; gap: 8px; }
  .privacy-row { margin-bottom: 12px; }
}
@media (max-width: 699px) {
  .tour .tcard { padding: 8px 12px; max-height: 140px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .tour .tstep, .tour .tprog, .tour [data-t='back'], .tour [data-t='pause'], .tour .tsp { display: none; }
  .tour h4 { font-family: 'Public Sans', sans-serif; font-size: 15px; line-height: 1.3; margin: 0 0 4px; }
  .tour p { font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
  .tour .tbtns { justify-content: space-between; }
  body.tour-source .panel .pbody { padding: 8px 12px 160px; }
}

.tour .thole { box-shadow: var(--sh-spot); }
/* Keep the first three value columns inside a 1440px review workspace. */
.grid .tagsel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%234b5466' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.mapping-table { min-width: 1120px !important; table-layout: fixed; }
.mapping-table th, .mapping-table td { padding: 8px; }
.mapping-table th:nth-child(1) { width: 220px; }
.mapping-table th:nth-child(2) { width: 108px; }
.mapping-table th:nth-child(3) { width: 88px; }
.mapping-table th:nth-child(4) { width: 244px; }
.mapping-table th:nth-child(5) { width: 220px; }
.mapping-table th:nth-child(6) { width: 100px; }
.mapping-table th:nth-child(7) { width: 80px; }
.mapping-table .mapping-line { height: 48px; line-height: 18px; display: flex; align-items: center; white-space: normal; }
.mapping-table .num .mapping-line { justify-content: flex-end; }
.mapping-table th { white-space: normal; }
#lacerte-worksheet .tscroll { max-height: 600px; }
.mapping-table thead th { position: sticky; top: 0; z-index: 2; }
.mapping-table thead th:first-child { z-index: 3; }
.mapping-table tbody td:first-child { box-shadow: 1px 0 0 var(--n300); }
@media (max-width: 699px) {
  .tour .tbtns [data-t='back'], .tour .tbtns [data-t='pause'] { display: none; }
}

/* Fix round 2: readable evidence, state workpapers and compact navigation. */
#start-demo-mobile, .privacy-short, .privacy-toggle, .mobile-tab-label, .queue-status, .mobile-math, .mobile-worksheet, .audit-mobile { display: none; }
.privacy-toggle { border: 0; background: transparent; color: var(--pen); cursor: pointer; padding: 0; }
.privacy-detail { flex: 1 0 100%; margin: 4px 0 0; }
.season-summary { border-top: 1px solid var(--n700); padding-top: 16px; color: var(--n300); }
.season-summary h3 { font-size: 13px; color: var(--paper); margin-bottom: 12px; }
.season-summary dl { margin: 0; }
.season-summary dl > div { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0; font-size: 12px; }
.season-summary dd { margin: 0; font-weight: 600; }
.activity-info { color: var(--warn); cursor: help; margin-left: 4px; }
.grid .tagcol { white-space: nowrap; }
.grid .tagcol .tagsel { width: 100px; }
.confidence-swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--n500); border-radius: var(--r-sm); margin-right: 4px; vertical-align: -1px; }
.confidence-swatch.high { background: var(--green2); }
.confidence-swatch.derived { background: var(--amber2); }
.confidence-swatch.low { background: var(--red2); }
.kpi small { display: block; margin-top: 4px; font-size: 11px; }
.activity-chip { display: inline-block; min-width: 84px; padding: 3px 8px; border-radius: var(--r-sm); background: var(--n100); color: var(--n700); text-align: center; font-size: 12px; }
.workpaper-sections { position: sticky; top: 0; z-index: 10; background: var(--desk); border-bottom: 1px solid var(--n300); display: flex; gap: 8px; overflow: auto; padding: 8px 0; margin-bottom: 16px; }
.workpaper-sections button { border: 0; background: transparent; padding: 8px; color: var(--pen); font-size: 13px; white-space: nowrap; cursor: pointer; }
.rgrid > section, .rgrid > details { scroll-margin-top: 64px; }
#schedule-e .tscroll, #qbi-section .tscroll { max-height: 420px; }
#schedule-e thead th, #qbi-section thead th { position: sticky; top: 0; z-index: 2; }
#schedule-e thead th:first-child, #qbi-section thead th:first-child { z-index: 3; }
.rgrid .support-section .rt { min-width: 0; }
.rgrid .support-section .rt th, .rgrid .support-section .rt td { position: static; min-width: 0; }
.export-detail > summary { cursor: pointer; padding: 16px; font-size: 13px; font-weight: 600; }
.mapping-settings { border-bottom: 1px solid var(--n300); padding: 12px 16px; font-size: 13px; }
.mapping-settings summary { cursor: pointer; color: var(--pen); }
.mapping-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mapping-config-grid label { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mapping-config-grid input { width: 100%; font-size: 13px; }
.mapping-table { table-layout: auto; min-width: 1160px !important; }
.mapping-table th:nth-child(1) { width: 220px; }
.mapping-table th:nth-child(2) { width: 140px; min-width: 120px; }
.mapping-table th:nth-child(3) { width: 130px; }
.mapping-table th:nth-child(4) { width: 240px; }
.mapping-table th:nth-child(5) { width: 270px; }
.mapping-table th:nth-child(6) { width: 80px; }
.mapping-table .box-code { white-space: nowrap; min-width: 120px; }
.mapping-table .payer-heading th { position: static; background: var(--n100); font-size: 13px; padding: 12px; }
.mapping-table .verify { display: inline-block; margin: 4px 0 0 4px; }
.state-entry { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--mute); }
.state-entry input { width: 112px; padding: 6px; color: var(--ink); font-size: 13px; }
.state-row { background: var(--n50); }
.zoom-control { display: flex; align-items: center; gap: 4px; color: var(--mute); font-size: 12px; }
.zoom-control select { font-size: 12px; padding-top: 4px; padding-bottom: 4px; }
.srch { flex-wrap: wrap; gap: 8px; }
.viewer.focus-view .pgwrap { display: none; }
.source-band { margin: 0; padding: 16px; background: var(--paper); min-height: 160px; }
.source-band figcaption { color: var(--mute); font-size: 12px; }
.source-band p { font-size: 15px; margin: 8px 0 16px; }
.source-band small { display: block; color: var(--mute); font-size: 11px; margin-top: 12px; }
.source-row.hl { position: relative; inset: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; width: 100%; border-radius: var(--r-sm); }
.source-row canvas { display: block; max-width: 70%; height: auto !important; }
.source-row canvas:last-child { max-width: 25%; }
body.tour-source .panel .pbody { padding-bottom: 240px; }
body.tour-audit .audit-desktop tbody tr:not([data-action='preparer-signoff']):not([data-action='reviewer-signoff']):not([data-action='override']):not([data-action='missing-ack']),
body.tour-audit .audit-mobile article:not([data-action='preparer-signoff']):not([data-action='reviewer-signoff']):not([data-action='override']):not([data-action='missing-ack']) { display: none; }
.tour .tour-more { display: none; border: 0; padding: 0; background: transparent; color: var(--pen); text-decoration: underline; cursor: pointer; }
.tour .tcard .tbtns { justify-content: space-between; }
.tour .tcard .tstep { display: block; }
@media (max-width: 1179px) { .support-section { grid-column: 1 / -1; } }
@media (max-width: 899px) {
  .mobile-top { gap: 8px; padding: 8px 12px; }
  #start-demo-desktop { display: none; }
  #start-demo-mobile { display: inline-flex; align-items: center; padding: 6px 8px; font-size: 12px; white-space: nowrap; }
  .mobile-top .brand small { display: none; }
  .mobile-top select { flex: 1; min-width: 0; max-width: 320px; padding-top: 6px; padding-bottom: 6px; font-size: 12px; }
  .main { padding-top: 8px; }
  .privacy-row { align-items: center; flex-wrap: wrap; padding-bottom: 8px; margin-bottom: 8px; gap: 8px; }
  .privacy-row .privacy-full { display: none; }
  .privacy-short, .privacy-toggle { display: inline; }
  .privacy-toggle .ic { width: 16px; height: 16px; margin: 0; }
  .phead { gap: 8px; margin-bottom: 8px; }
  .phead h1 { font-size: 24px; margin: 0; }
  .crumb { display: none; }
  dl.meta { margin-top: 4px; gap: 0; }
  dl.meta > div:first-child, dl.meta > div:last-child { display: none; }
  dl.meta > div { border: 0; padding: 0 12px 0 0; display: flex; gap: 4px; }
  dl.meta dt { font-size: 12px; }
  dl.meta dd { font-size: 12px; margin: 0; }
  .pstats { margin: 0; gap: 8px; justify-content: flex-start; width: 100%; }
  .pst, .pst:first-of-type { border: 0; padding: 0; display: flex; gap: 4px; flex: 0 0 auto; }
  .pst b, .pst span { font-size: 12px; font-weight: 400; display: inline; }
  .pst b { font-weight: 600; }
  .tabs { margin-bottom: 12px; scroll-padding-inline: 48px; padding-right: 24px; }
  .tab { font-size: 13px; padding: 8px; }
  .workpaper-sections { top: 46px; }
  .tour .tcard { padding: 8px 12px; max-height: 220px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .tour .tcard .tprog { display: block; height: 4px; margin-bottom: 6px; }
  .tour .tcard .tstep { position: absolute; right: 12px; top: 18px; font-size: 11px; line-height: 18px; }
  .tour .tcard h4 { font-family: 'Public Sans', sans-serif; font-size: 15px; padding-right: 48px; line-height: 1.3; margin: 0 0 6px; }
  .tour .tcard p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; white-space: normal; text-overflow: clip; overflow: hidden; font-size: 13px; line-height: 18px; margin: 0 0 6px; }
  .tour .tcard.expanded { max-height: 70dvh; overflow: auto; }
  .tour .tcard.expanded p { display: block; -webkit-line-clamp: unset; }
  .tour .tcard .tour-more { display: inline-block; font-size: 12px; margin-bottom: 4px; }
  .tour .tcard .tour-more[hidden] { display: none; }
  .tour .tcard .tbtns [data-t='back'], .tour .tcard .tbtns [data-t='pause'] { display: inline-flex; align-items: center; justify-content: center; }
  .tour .tcard .tbtns .back-btn { width: 40px; height: 40px; padding: 0; }
  .tour .back-btn span { display: none; }
  .tour .tcard .tbtns .btn { min-height: 40px; padding: 6px 8px; }
  .tour .tcard .tbtns { gap: 6px; }
  body.tour-review .grid .fz2 { width: 140px; min-width: 140px; max-width: 140px; }
  body.tour-review .grid .basis-col { min-width: 196px; max-width: 196px; width: 196px; }
  body.tour-review .gridwrap { scroll-padding-left: 144px; }
}
@media (max-width: 599px) {
  .mobile-top .brand b { display: none; }
  .mobile-top .brand .logo { width: 28px; height: 28px; }
  .mobile-top select { max-width: none; }
  .phead { margin-top: 0; }
  .phead h1 { font-size: 22px; gap: 8px; }
  dl.meta { display: flex; }
  .tabs { display: none; }
  .mobile-tab-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--mute); border-bottom: 1px solid var(--n300); padding: 8px 0; margin-bottom: 12px; }
  .mobile-tab-label select { max-width: 68%; font-size: 13px; color: var(--ink); }
  .workpaper-sections { gap: 4px; margin-bottom: 12px; padding: 4px 0; }
  .workpaper-sections button { padding: 6px; font-size: 12px; }
  .qt { min-width: 0; table-layout: fixed; }
  .qt th:nth-child(2), .qt td:nth-child(2) { min-width: 0; max-width: none; width: auto; }
  .qt th:nth-child(5), .qt td:nth-child(5) { display: none; }
  .qt th:nth-child(7), .qt td:nth-child(7) { display: table-cell; width: 64px; }
  .qt .fn, .qt .queue-payer, .qt .sub { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .queue-status { display: block; margin: 6px 0; }
  .qt .chip { white-space: nowrap; }
  .desktop-worksheet { display: none; }
  .mobile-worksheet { display: block; }
  .mobile-k1 { border-bottom: 1px solid var(--n300); padding: 16px; }
  .mobile-k1 h4 { font-size: 15px; line-height: 1.4; }
  .mobile-federal, .state-mobile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .mobile-federal small { color: var(--mute); font-size: 12px; }
  .mobile-states { margin-top: 8px; }
  .mapping-config-grid { grid-template-columns: 1fr; }
  .baseline-table { min-width: 0 !important; table-layout: fixed; }
  .baseline-table th, .baseline-table td { padding: 12px 8px; }
  .baseline-table th:first-child { min-width: 0; width: 44%; white-space: normal; }
  .baseline-table th:nth-child(3), .baseline-table td:nth-child(3) { display: none; }
  .baseline-table td.num { width: 56%; font-size: 20px; white-space: normal; }
  .mobile-math { display: block; font-size: 12px; line-height: 1.5; color: var(--n600); font-weight: 400; margin-top: 6px; text-align: right; }
  .audit-desktop { display: none; }
  .audit-mobile { display: block; }
  .audit-mobile article { padding: 16px; border-bottom: 1px solid var(--n300); font-size: 13px; }
  .audit-mobile article h4 { font-size: 14px; }
  .audit-mobile article p { margin: 6px 0 0; }
  .signature-table { min-width: 0 !important; }
  .signature-table th, .signature-table td { padding: 10px 8px; font-size: 12px; }
  .signature-table th:first-child, .signature-table td:first-child { min-width: 0; }
}
.mobile-k1 summary { cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.4; }
.tour-copy-note { color: var(--n600); border-bottom: 1px solid var(--n300); padding-bottom: 8px; margin-bottom: 8px; font-size: 12px; }
@media (max-width: 899px) {
  .audit-desktop { display: none; }
  .audit-mobile { display: block; }
  .audit-mobile article { padding: 16px; border-bottom: 1px solid var(--n300); font-size: 13px; }
  .audit-mobile article h4 { font-size: 14px; }
  .audit-mobile article p { margin: 6px 0 0; }
}
body.tour-signed #batch-signoff .approval-fields { display: none; }
body.tour-signed .main { padding-bottom: 240px; }
@media (max-width: 899px) { .rgrid > section, .rgrid > details { scroll-margin-top: 104px; } }
/* Touch widths use complete K-1 lines instead of obscured table columns. */
@media (min-width: 600px) and (max-width: 899px) {
  .desktop-worksheet { display: none; }
  .mobile-worksheet { display: block; }
  .mobile-k1 { border-bottom: 1px solid var(--n300); padding: 16px; }
  .mobile-federal { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 6px 16px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .mobile-federal > b { grid-column: 1; grid-row: 1; }
  .mobile-federal > span { grid-column: 2; grid-row: 1; }
  .mobile-federal > small { grid-column: 2; grid-row: 2; color: var(--mute); font-size: 12px; }
  .mobile-federal > .source-link { grid-column: 1; grid-row: 2; justify-self: start; }
  .mobile-states { margin-top: 8px; }
  .state-mobile { display: grid; grid-template-columns: 160px 130px minmax(0,1fr); gap: 6px 16px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .state-mobile > b { grid-column: 1; grid-row: 1; }
  .state-mobile > label { grid-column: 2; grid-row: 1 / 3; }
  .state-mobile > span { grid-column: 3; grid-row: 1 / 3; }
  .state-mobile > .source-link { grid-column: 1; grid-row: 2; justify-self: start; }
}
/* Round 3: ruled review blocks and flowing desktop keying workpaper. */
.tabs::after { display: none; }
.tabs.overflows::after { display: grid; }
.batch-facts { align-self: stretch; }
.batch-facts h3 { margin: 0 0 12px; font-size: 14px; }
.batch-facts button { display: flex; gap: 16px; width: 100%; padding: 12px 0; text-align: left; border: 0; border-bottom: 1px solid var(--n200); background: none; color: var(--pen); cursor: pointer; }
.batch-facts button b { min-width: 28px; font-variant-numeric: tabular-nums; }
.mobile-review,.mobile-qbi { display: none; }
.tagsel.weak,.activity-chip.unconfirmed { border: 1px solid var(--warn); color: var(--warn); background: var(--paper); }
.sched-e td { vertical-align: middle; }
.sched-e .form-code { white-space: nowrap; min-width: 64px; }
.sched-e td:nth-child(3) { min-width: 108px; }
.classification-band th { color: var(--warn); background: var(--paper); text-align: left; }
.state-entry { position: relative; }
.state-entry .state-micro { display: none; }
.state-entry input { text-align: right; font-variant-numeric: tabular-nums; }
.state-entry:has(input[value=""]) .state-micro { display: block; font-size: 12px; }
.box-amount { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.mobile-k1 summary small { display: block; padding-top: 4px; font-weight: 400; color: var(--mute); }
.confidence-details { margin: 8px 0 16px; font-size: 12px; }
.confidence-details summary { cursor: pointer; color: var(--mute); }
.basis-summary { padding: 16px 0; }
.mapping-table { min-width: 900px !important; table-layout: auto; }
.mapping-table th:nth-child(1) { width: 150px; }
.mapping-table th:nth-child(2) { width: 100px; }
.mapping-table th:nth-child(3) { width: auto; }
.mapping-table th:nth-child(4) { width: 310px; }
.mapping-table th:nth-child(5) { width: 80px; }
.mapping-table tbody td:first-child { position: static; box-shadow: none; }
.mapping-table .verify { margin-top: 0; }
.mapping-table .payer-heading th { white-space: nowrap; }
#return-lines { grid-column: 1 / -1; }
#foreign-section { grid-column: 1 / -1; }
#foreign-section .cardh { padding-bottom: 8px; }
@media(min-width:1180px) {
 #schedule-e .tscroll,#lacerte-worksheet .desktop-worksheet,#qbi-section .tscroll { max-height: none; overflow: visible; }
 #schedule-e,#lacerte-worksheet,#qbi-section { overflow: visible; }
 #schedule-e thead th,#lacerte-worksheet thead th,#qbi-section thead th { top: 48px; }
 #schedule-e .rt,#qbi-section .rt { min-width: 0; width:100%; }
 .mapping-table { min-width: 0 !important; width: 100%; }
 .mapping-table td { font-size: 12px; padding:8px; }
 .mapping-table th:nth-child(4) { width: 290px; }
 .mapping-table .payer-heading th { padding: 12px 8px; }
 #return-lines { grid-column: auto; }
 #foreign-section { grid-column: auto; align-self: start; }
 .rgrid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
}
@media(max-width:599px) {
 .v-review .gridwrap { display: none; }
 .mobile-review { display: block; background: var(--paper); border: 1px solid var(--n300); border-radius: 4px; }
 .review-block { padding: 12px; border-bottom: 1px solid var(--n300); }
 .review-block header { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
 .review-block header>b { min-width: 0; font-size: 13px; }
 .review-block header .chip { flex-shrink: 0; font-size: 10px; }
 .review-amounts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 12px 0; }
 .review-amounts button { padding: 0; border: 0; background: none; text-align: left; color: var(--pen); font-size: 12px; cursor: pointer; }
 .review-amounts button>span,.review-amounts button>b { display:block; }
 .review-amounts .cf { font-size: 10px; }
 .review-amounts .cd { white-space: normal; }
 .review-decisions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
 .review-decisions label { min-width: 0; font-size: 12px; color: var(--mute); }
 .review-decisions select { width: 100%; min-width:0; margin-top: 4px; font-size: 12px; }
 .review-block p { margin: 8px 0 0; }
 .mobile-qbi { display:block; }
 #qbi-section>.tscroll { display: none; }
 .mobile-qbi article { padding: 12px; border-top: 1px solid var(--n200); }
 .mobile-qbi dl { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:8px; margin:8px 0 0; }
 .mobile-qbi dl div { display:flex; justify-content:space-between; gap:8px; }
 .mobile-qbi dt { color:var(--mute); }
 .mobile-qbi dd { margin:0; font-variant-numeric:tabular-nums; }
 #schedule-e .rt td:first-child,#schedule-e .rt th:first-child { min-width: 140px; max-width:140px; }
 .sched-e td:nth-child(3) { min-width: 108px; }
}
.c-md { border: 1px solid var(--warn); background: var(--paper); color: var(--warn); }
@media(min-width:1180px) {
 .mapping-table .state-entry input { height:28px; padding:4px 8px; }
}
@media(min-width:600px) and (max-width:899px) {
 .state-mobile > span { grid-column:3; grid-row:1; }
 .state-mobile > .mobile-state-mapping { grid-column:3; grid-row:2; color:var(--mute); font-size:12px; }
}
@media(max-width:599px) {
 .mobile-federal > .box-amount { width:100%; }
 .mobile-state-mapping { color:var(--mute); font-size:12px; }
}
/* Round 4: visible working areas, stable sticky layers, and touch workpapers. */
.tscroll .rt thead th { z-index: 6; background:var(--n100); }
.tscroll .rt thead th:first-child { z-index:7; background:var(--n100); }
.tscroll .rt tbody th { background:var(--paper); }
.mapping-table .mapping-default { color:var(--mute); background:transparent; border:1px solid var(--n300); font-size:10px; font-weight:400; }
.mapping-notice { display:block; margin-top:8px; font-size:12px; text-align:left; }
.state-entry input.needs-key { border-color:var(--warn); }
.state-entry input.needs-key::placeholder { color:var(--warn); opacity:1; }
.gatecard li .source-link { display:inline; text-align:left; white-space:normal; padding:0; line-height:inherit; }
.gatecard li { padding:0 0 4px; }
.tagsel,[data-act="client-sel"] { appearance:none; padding-right:28px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%235e6878' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; }
[data-act="client-sel"] { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c9d0db' stroke-width='1.5'/%3E%3C/svg%3E"); }
.audit-mobile article h4 { padding-left:0; margin-left:0; }
.audit-mobile article h4::before { display:none; }
.signature-table tbody th,#foreign-section tbody th { background:var(--paper); }
.pst.pending b { color:var(--warn); }
.mobile-schedule { display:none; }
@media(min-width:1180px) {
 .gridwrap { height:var(--grid-available,calc(100dvh - 390px)); min-height:0; max-height:none; }
 .desktop-worksheet .mapping-table thead th { top:48px; z-index:6; }
 .desktop-worksheet .mapping-table thead th:first-child { z-index:7; }
 .desktop-worksheet .payer-heading th { position:sticky; top:96px; left:0; z-index:4; background:var(--n100); }
 .mapping-table th:nth-child(1) { width:184px; min-width:184px; }
 .mapping-table th:nth-child(3) { width:auto; }
 .mapping-table .state-entry input { width:112px; }
}
@media(max-width:899px) {
 .v-review .gridwrap { display:none; }
 .mobile-review { display:block; background:var(--paper); border:1px solid var(--n300); border-radius:var(--r-sm); }
 .review-block { padding:12px; border-bottom:1px solid var(--n300); }
 .review-block header { display:flex; justify-content:space-between; align-items:start; gap:8px; }
 .review-block header>b { min-width:0; font-size:13px; }
 .review-block header .chip { flex-shrink:0; font-size:10px; }
 .review-amounts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px 0; }
 .review-amounts button { padding:0; border:0; background:none; text-align:left; color:var(--pen); font-size:12px; cursor:pointer; }
 .review-amounts button>span,.review-amounts button>b { display:block; }
 .review-amounts .cf { font-size:10px; }
 .review-amounts .cd { white-space:normal; }
 .review-decisions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
 .review-decisions label { min-width:0; font-size:12px; color:var(--mute); }
 .review-decisions select { width:100%; min-width:0; margin-top:4px; font-size:12px; padding-right:28px; }
 .review-block p { margin:8px 0 0; }
 .v-review .filters { flex-wrap:wrap; overflow:visible; }
 .v-review .toolbar { overflow:visible; }
 .mobile-top #start-demo-mobile { margin-left:auto; }
 .mobile-top select { flex:0 1 320px; }
}
@media(min-width:600px) and (max-width:899px) {
 .review-block { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:8px 24px; padding:16px; }
 .review-block header { grid-column:1 / -1; }
 .review-amounts { grid-column:1; padding:8px 0; }
 .review-decisions { grid-column:2; grid-row:2 / 4; align-self:center; }
 .review-block p { grid-column:1; }
}
@media(max-width:599px) {
 .mobile-top select { flex:1; }
 #schedule-e>.tscroll { display:none; }
 .mobile-schedule { display:block; }
 .mobile-schedule article,.mobile-schedule footer { padding:12px 16px; border-top:1px solid var(--n200); }
 .mobile-schedule article header { display:flex; justify-content:space-between; align-items:start; gap:12px; }
 .mobile-schedule article header>b { min-width:0; font-size:13px; }
 .mobile-schedule article header>div { display:flex; flex-direction:column; align-items:end; gap:4px; flex-shrink:0; }
 .mobile-schedule .form-code { font-size:12px; color:var(--mute); white-space:nowrap; }
 .mobile-schedule .activity-chip { min-width:84px; }
 .mobile-schedule article p,.mobile-schedule footer p { margin:8px 0 0; font-size:12px; }
 .schedule-amount { display:flex; justify-content:space-between; gap:12px; font-variant-numeric:tabular-nums; }
 .schedule-amount span { color:var(--mute); }
 .mobile-schedule .unclassified-title { color:var(--warn); font-size:12px; padding:12px 16px; border-top:1px solid var(--n200); }
}
@media(min-width:1180px) {
 .desktop-worksheet .mapping-table .payer-heading th { z-index:4; }
}
.mobile-top select[data-act="client-sel"] { padding-right:28px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c9d0db' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; }
.tscroll .rt.signature-table tbody th:first-child,.tscroll .rt tbody th:first-child { background:var(--paper); }
@media(min-width:1180px) {
 .desktop-worksheet .mapping-table .payer-heading th:first-child { background:var(--n100); }
}
.tag.mapping-default { color:var(--mute); background:transparent; border:1px solid var(--n300); font-size:10px; font-weight:400; }
@media(max-width:899px) {
 .review-decisions select { min-height:36px; padding:8px 28px 8px 8px; }
}
/* Round 5: findings in view, complete touch schedules, aligned figures. */
.checks-mobile { display:none; }
.rt th.num,.rt td.num { text-align:right; padding-right:12px; }
.sched-e { table-layout:fixed; }
#schedule-e .sched-e th:first-child,#schedule-e .sched-e td:first-child { width:260px; min-width:260px; max-width:260px; }
.sched-e th:nth-child(2) { width:72px; }
.sched-e th:nth-child(3) { width:108px; }
.mapping-table td { vertical-align:middle; }
.desktop-worksheet .mapping-table .state-row td { background:var(--n50); }
.grid .pn { white-space:normal; overflow:visible; text-overflow:clip; }
.grid .fnm { display:flex; gap:8px; align-items:baseline; }
.grid .fnm>span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.state-indicator { flex-shrink:0; color:var(--pen); font-size:10px; }
.approval-reason { display:block; margin-top:4px; font-size:12px; }
.workpaper-sections button.on { border-bottom:2px solid var(--pen); color:var(--ink); font-weight:600; }
.workpaper-sections button { border-bottom:2px solid transparent; }
.source-row canvas { mix-blend-mode:multiply; }
#tour .tcard { transition:opacity var(--t) var(--ease); }
#tour .tcard.source-wait { visibility:hidden; opacity:0; pointer-events:none; }
.tloading { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); padding:16px; border:1px solid var(--n300); border-radius:var(--r); background:var(--paper); color:var(--ink); }
.tloading[hidden] { display:none; }
.tloading .btn { margin-left:12px; }
.baseline-table tbody th,.baseline-table tbody td { background:var(--paper); }
.baseline-table tbody tr.tot th,.baseline-table tbody tr.tot td { background:var(--n100); }
.kpi.zero b { color:var(--mute); }
#schedule-e>.tscroll,#qbi-section>.tscroll { max-height:none; }
@media(min-width:900px) {
 .desktop-worksheet .mapping-table { table-layout:fixed; }
 .desktop-worksheet .mapping-table th:nth-child(1) { width:180px; min-width:180px; }
 .desktop-worksheet .mapping-table th:nth-child(2) { width:112px; }
 .desktop-worksheet .mapping-table th:nth-child(3) { width:320px; }
 .desktop-worksheet .mapping-table th:nth-child(4) { width:auto; }
 .desktop-worksheet .mapping-table th:nth-child(5) { width:64px; }
 .desktop-worksheet .mapping-table .state-row td { padding-top:4px; padding-bottom:4px; }
}
@media(max-width:899px) {
 #schedule-e>.tscroll,#qbi-section>.tscroll { display:none; }
 .mobile-schedule,.mobile-qbi { display:block; }
 .mobile-schedule article,.mobile-schedule footer { padding:12px 16px; border-top:1px solid var(--n200); }
 .mobile-schedule article header { display:flex; justify-content:space-between; align-items:start; gap:12px; }
 .mobile-schedule article header>b { min-width:0; font-size:13px; }
 .mobile-schedule article header>div { display:flex; align-items:center; gap:8px; flex-shrink:0; }
 .mobile-schedule .form-code { font-size:12px; color:var(--mute); white-space:nowrap; }
 .mobile-schedule .activity-chip { min-width:84px; }
 .mobile-schedule article p,.mobile-schedule footer p { margin:8px 0 0; font-size:12px; }
 .schedule-amount { display:flex; justify-content:space-between; gap:12px; font-variant-numeric:tabular-nums; }
 .schedule-amount span { color:var(--mute); }
 .mobile-schedule .unclassified-title { color:var(--warn); font-size:12px; padding:12px 16px; border-top:1px solid var(--n200); }
 .mobile-qbi article { padding:12px 16px; border-top:1px solid var(--n200); }
 .mobile-qbi dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:8px 0 0; }
 .mobile-qbi dl div { display:flex; justify-content:space-between; gap:8px; }
 .mobile-qbi dt { color:var(--mute); }
 .mobile-qbi dd { margin:0; font-variant-numeric:tabular-nums; }
}
@media(min-width:600px) and (max-width:899px) {
 .state-mobile { grid-template-columns:140px minmax(0,1fr); }
 .state-mobile>b { grid-column:1; grid-row:1; }
 .state-mobile>.state-entry { grid-column:1; grid-row:2; width:112px; justify-self:end; }
 .state-mobile>span { grid-column:2; grid-row:1; }
 .state-mobile>.mobile-state-mapping { grid-column:2; grid-row:2; }
 .state-mobile>.source-link { grid-column:1; grid-row:3; }
}
@media(max-width:599px) {
 .checks-table { display:none; }
 .checks-mobile { display:block; }
 .missing-block,.finding-block { padding:16px; border-top:1px solid var(--n200); }
 .missing-block header,.finding-block header { display:flex; justify-content:space-between; align-items:start; gap:12px; }
 .missing-block header>b,.finding-block header>a { min-width:0; font-size:14px; overflow-wrap:break-word; }
 .missing-block header .badge,.finding-block header .chip { flex-shrink:0; }
 .missing-block p { line-height:1.5; margin:12px 0; }
 .finding-list { margin:12px 0; }
 .finding-list .iss { width:100%; padding:12px; margin:8px 0; border:1px solid var(--n200); }
 .checks-mobile .btn.full { width:100%; white-space:normal; }
 .mobile-schedule article header>div { flex-direction:column; align-items:end; gap:4px; }
 .mobile-qbi dl { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .state-mobile>.state-entry { align-self:flex-end; width:112px; }
 .workpaper-sections { flex-wrap:wrap; overflow:visible; }
 .workpaper-sections button { padding:6px 8px; }
 .rgrid>section,.rgrid>details { scroll-margin-top:144px; }
}
@media(min-width:900px) {
 .desktop-worksheet .mapping-table th:nth-child(2) { width:132px; }
 .desktop-worksheet .state-entry { align-items:flex-end; }
 .desktop-worksheet .state-entry input { width:104px; }
}
.tscroll .rt.baseline-table tbody tr.tot th:first-child { background:var(--n100); }
.finding-block header a { color:var(--ink); text-decoration:none; }
.finding-block header a:hover,.finding-block header a:focus-visible { color:var(--pen); text-decoration:underline; }

.statement-example{padding:var(--s6);margin-block:var(--s4)}.statement-example p{margin-block:var(--s3)}.fit-pain{font-size:var(--t4);line-height:1.5;max-width:65ch;margin-block:var(--s4)}
