@font-face { font-family: Archivo; src: url(/fonts/archivo-var-latin.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root {
  --bg: #f6f8f7; --surface: #fff; --rule: #000; --rule-l: #e5e5e5; --ink: #000; --muted: #5e5e5e;
  --accent: #f0a800; --on-accent: #000; --error: #b3261e; --ok: #1b6b3a; --band: #000; --on-band: #f6f8f7; --accent-text: #000;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0e12; --surface: #19181d; --rule: #f6f8f7; --rule-l: #34333a; --ink: #f6f8f7; --muted: #a8a8ad; --error: #ff8a80; --ok: #6fd08c; --band: #f6f8f7; --on-band: #0f0e12; --accent-text: #f0a800; }
}
* { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 8px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 Archivo, 'Helvetica Neue', Arial, sans-serif; font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 8px 15px; z-index: 9; }
.skip:focus { left: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 15px; }
.muted { color: var(--muted); }
.label { font-weight: 500; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
h1, h2, h3, h4 { font-weight: 300; margin: 0; line-height: 1.1; }
h1 { font-size: 40px; letter-spacing: -.01em; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
h4 { font-size: 15px; font-weight: 500; }
p { margin: 0 0 15px; }

.top { background: #000; color: #f6f8f7; height: 33px; }
.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 33px; gap: 15px; }
.mark { font-weight: 700; font-stretch: 75%; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; font-size: 15px; color: #f6f8f7; }
.top .label { font-size: 12px; white-space: nowrap; color: #f6f8f7; }

.hero { padding: 33px 0 22px; }
.hero p.lead { font-size: 19px; font-weight: 300; margin: 8px 0 22px; max-width: 46em; }
.drop { position: relative; border: 1px solid var(--rule); background: var(--surface); padding: 33px 15px; text-align: center; }
.drop.over { border: 4px solid; border-image: repeating-linear-gradient(45deg, #000 0 8px, #f0a800 8px 16px) 4; background: color-mix(in srgb, #f0a800 12%, var(--surface)); padding: 30px 12px; }
.drop .x { position: absolute; width: 13px; height: 13px; background: linear-gradient(var(--rule), var(--rule)) center/1px 100% no-repeat, linear-gradient(var(--rule), var(--rule)) center/100% 1px no-repeat; }
.drop .x:nth-child(1) { left: -7px; top: -7px; } .drop .x:nth-child(2) { right: -7px; top: -7px; }
.drop .x:nth-child(3) { left: -7px; bottom: -7px; } .drop .x:nth-child(4) { right: -7px; bottom: -7px; }
.drop.over .x { display: none; }
.drop-t { font-size: 24px; font-weight: 300; margin: 0 0 15px; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop input[type=file]:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 22px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn.black { background: var(--band); color: var(--on-band); }
.btn.amber { background: var(--accent); color: var(--on-accent); border-color: #000; }
.btn[aria-disabled=true] { opacity: .45; }
.btn:hover:not([aria-disabled=true]) { box-shadow: inset 0 0 0 2px var(--rule); }
.link { background: none; border: 0; padding: 4px 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 33px; }
.under { margin: 15px 0 0; }
.alt { margin-top: 8px; }
details.paste { margin-top: 8px; }
details.paste textarea { width: 100%; min-height: 110px; margin: 8px 0; }
summary { cursor: pointer; }
.band { background: var(--band); color: var(--on-band); padding: 15px; margin: 15px 0; }
.band strong { font-weight: 600; }
.working { margin: 15px 0 0; }
.working .bar { height: 4px; border: 1px solid var(--rule); margin-top: 4px; }
.working .bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform .2s; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); margin: 22px 0 0; background: var(--surface); }
.steps > * { padding: 15px; border-left: 1px solid var(--rule); text-decoration: none; display: block; }
.steps > *:first-child { border-left: 0; }
.steps .n { display: block; font-size: 24px; font-weight: 300; }
.steps .done .n::after { content: ' \2713'; color: var(--ok); }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

section.blk { padding: 33px 0 0; }
section.blk > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 15px; }
details.blk-d > summary { list-style: none; padding: 15px 0 8px; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 15px; margin-top: 18px; }
details.blk-d > summary::-webkit-details-marker { display: none; }
details.blk-d > summary h2 { display: inline; }
details.blk-d > summary .muted { text-decoration: underline; text-underline-offset: 3px; }
details.blk-d[open] > summary { margin-bottom: 15px; }

select, input[type=text], textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: 8px; min-height: 40px; width: 100%; max-width: 100%; }
textarea { resize: vertical; line-height: 1.35; }
.sq { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 4px; border: 1px solid var(--rule); font-weight: 500; font-stretch: 75%; font-size: 13px; letter-spacing: .04em; flex: none; background: var(--surface); color: var(--ink); }

.map-grid { border-top: 1px solid var(--rule-l); }
.map-group { padding: 15px 0 4px; }
.map-row { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 15px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--rule-l); }
.map-row.unmapped label { color: var(--muted); }
.map-row .sq { justify-self: start; }
.map-row .sample { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 15px; }
.stat b { font-size: 24px; font-weight: 300; margin-right: 4px; }
.stat.fixc b { background: var(--accent); color: var(--on-accent); padding: 0 4px; }
.needc, .stat.needc b { color: var(--error); }
.stat.yr { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stat.yr select { width: auto; }

.est { border: 1px solid var(--rule); background: var(--surface); margin: 0 0 22px; }
.est > h3 { padding: 15px; border-bottom: 1px solid var(--rule); }
.form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; padding: 15px; }
.form.one { padding-bottom: 8px; border-bottom: 1px solid var(--rule-l); }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f.wide { grid-column: span 2; }
.f .msg, .cell .msg { font-size: 13px; color: var(--muted); }
.f.err input, .f.err select { border-width: 2px; border-color: var(--error); }
.f.err .msg, .cell.err .msg { color: var(--error); }
.f.todo input, .f.todo select { border-style: dashed; }
.f.fix input { background: var(--accent); color: var(--on-accent); }
.strip { display: grid; grid-template-columns: repeat(12, minmax(84px, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow-x: auto; scroll-snap-type: x proximity; }
.tot { padding: 8px; border-left: 1px solid var(--rule-l); scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; }
.tot:first-child { border-left: 0; }
.tot b { font-size: 24px; font-weight: 300; }
.tot .label { font-size: 11px; color: var(--muted); }
.checks { margin: 0; padding: 15px 15px 15px 33px; color: var(--error); border-bottom: 1px solid var(--rule); }
.est > .btn.ghost { margin: 15px; }

.case { border-top: 1px solid var(--rule); }
.cases .case:first-child { border-top: 0; }
.case-h { display: flex; flex-wrap: wrap; gap: 4px 15px; align-items: center; padding: 8px 15px; border-bottom: 1px solid var(--rule-l); }
.case-h h4 { margin-right: auto; }
.case-state { font-weight: 500; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.case.has-err .case-state { color: var(--error); }
.cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cell { padding: 8px; border-right: 1px solid var(--rule-l); border-bottom: 1px solid var(--rule-l); display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.cell.wide { grid-column: span 3; }
.cell.mid { grid-column: span 2; }
.csvcol { opacity: .7; white-space: nowrap; }
.sq.n301 { border-style: double; border-width: 3px; }
.estd > summary { padding: 8px 15px; border-bottom: 1px solid var(--rule-l); }
.estd:not([open]) > summary { border-bottom: 0; }
.cell-h { display: flex; gap: 8px; align-items: center; }
.cell-h .label { font-size: 11px; color: var(--muted); line-height: 1.2; }
.cell-h .sq { min-width: 24px; height: 24px; font-size: 12px; }
.cell.fix { background: var(--accent); color: var(--on-accent); }
.cell.fix .cell-h .label, .cell.fix .msg, .cell.fix .was { color: #1d1500; }
.cell.fix .sq { background: #fff; color: #000; border-color: #000; }
.cell.fix .now { font-weight: 600; }
.cell.fix .msg { font-size: 12px; }
.cell.err { box-shadow: inset 0 0 0 2px var(--error); }
.cell .val.muted { font-size: 13px; }
.cell.read { outline: 2px dashed var(--ink); outline-offset: -4px; }
.cell .msg.ask { color: inherit; }
.cell .msg .link { min-height: 0; padding: 0; font-weight: 600; }
.cell.fix .msg .link { color: #1d1500; }
.skipped { border: 1px solid var(--rule); background: var(--surface); margin: 0 0 15px; }
.skipped > summary { padding: 8px 15px; }
.skipped ul { list-style: none; margin: 0; padding: 0 15px 8px; }
.skipped li { padding: 4px 0; border-top: 1px solid var(--rule-l); overflow-wrap: anywhere; }
.checks.sheet-totals { border: 1px solid var(--error); background: var(--surface); margin: 0 0 15px; }
.ask-bar { border: 1px solid var(--rule); background: var(--surface); padding: 8px 15px; }
.ask-bar .link { font-weight: 600; }
#est-source { margin: 15px 0; display: grid; gap: 8px; }
#est-source > * { margin: 0; }
.ask-bar.hold { border: 2px solid var(--ink, currentColor); padding: 12px 15px; }
.ask-bar.hold p { margin: 0 0 8px; overflow-wrap: anywhere; }
.ask-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
.ask-btns .btn { white-space: normal; text-align: left; }
.sheets { list-style: none; padding: 0; overflow-wrap: anywhere; }
.sheets li { padding: 2px 0; }

.dl { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); background: var(--surface); }
.dl-col { padding: 15px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dl-col + .dl-col { border-left: 1px solid var(--rule); }
.dl-col p { margin: 0; }
.next { margin-top: 15px; border: 1px solid var(--rule); padding: 15px; background: var(--surface); }
.next ol { margin: 8px 0 0; padding-left: 22px; }
.sticky { display: none; }

table.spec { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--rule-l); border-right: 1px solid var(--rule-l); }
.spec thead th { border-bottom: 1px solid var(--rule); font-weight: 500; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.spec code, code { font: inherit; font-stretch: 87%; background: var(--surface); border: 1px solid var(--rule-l); padding: 0 4px; overflow-wrap: anywhere; }
.tw { overflow-x: auto; margin: 0 0 22px; }
.spec .hn, .spec .hn code { white-space: nowrap; overflow-wrap: normal; }
.faq details { border-bottom: 1px solid var(--rule-l); padding: 8px 0; }
.faq summary { font-size: 19px; font-weight: 300; padding: 4px 0; }
.faq details p { margin: 8px 0; max-width: 60em; }

.doc { padding: 33px 0 0; max-width: 900px; }
.doc.widep { max-width: none; }
.doc h1 { font-size: 40px; margin-bottom: 8px; }
.doc h2 { margin: 33px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.doc .lead { font-size: 19px; font-weight: 300; }
.doc li { margin-bottom: 4px; }
.crumb { font-size: 13px; margin-bottom: 15px; }
.cta { border: 1px solid var(--rule); background: var(--surface); padding: 15px; margin: 22px 0; display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: space-between; }
.cta p { margin: 0; }
.src { font-size: 13px; color: var(--muted); }
.cols { columns: 2; column-gap: 33px; padding-left: 18px; }

footer { margin-top: 66px; border-top: 1px solid var(--rule); padding: 22px 0 33px; font-size: 13px; }
footer .fgrid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 22px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { padding: 2px 0; }
footer form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
footer textarea { min-height: 66px; }

@media (max-width: 760px) {
  h1, .doc h1 { font-size: 32px; }
  .top .label { font-size: 11px; letter-spacing: .03em; }
  .steps .n { font-size: 19px; }
  .steps > * { padding: 8px; }
  .map-row { grid-template-columns: 44px minmax(0, 1fr); }
  .map-row select { grid-column: 1 / -1; }
  .map-row .sample { display: none; }
  .form { grid-template-columns: 1fr 1fr; }
  .f.wide { grid-column: 1 / -1; }
  .cells { grid-template-columns: 1fr; }
  .cell, .cell.wide, .cell.mid { grid-column: auto; border-right: 0; display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 4px 8px; align-items: start; }
  .cell > :not(.cell-h) { grid-column: 2; }
  .cell-h { grid-row: span 3; }
  .cell-h .label { font-size: 12px; }
  .strip { grid-template-columns: repeat(12, 31%); scroll-snap-type: x mandatory; }
  .dl { grid-template-columns: 1fr; }
  .dl-col + .dl-col { border-left: 0; border-top: 1px solid var(--rule); }
  .dl .btn { width: 100%; }
  .stat.yr { margin-left: 0; }
  body.has-file .sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--rule); padding: 8px 15px; gap: 15px; align-items: center; justify-content: space-between; z-index: 5; }
  body.has-file { padding-bottom: 66px; }
  footer .fgrid { grid-template-columns: 1fr; }
  .cols { columns: 1; }
}
@media (max-width: 420px) { .form { grid-template-columns: 1fr; } .f.wide { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, footer, .sticky, .drop, .steps { display: none; } }
