/* OCR AI — OMLCloud. No inline styles anywhere (strict CSP). */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f1f2f8; --text: #171a2b; --muted: #5b6078;
  --line: #dfe2ee; --primary: #5b3cc4; --primary-ink: #ffffff; --primary-soft: #efeafd;
  --ok: #157a4a; --ok-soft: #e3f5ec; --warn: #9a5b00; --warn-soft: #fff3dc; --bad: #b42335; --bad-soft: #fde8eb;
  --info: #1f5fb8; --info-soft: #e5eefc; --field-line: #868ca3; --field-bg: var(--surface); --bad-ink: #ffffff; --radius: 12px; --shadow: 0 1px 2px rgba(20, 22, 50, .06), 0 4px 16px rgba(20, 22, 50, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131c; --surface: #191c28; --surface-2: #232838; --text: #e8eaf3; --muted: #a2a7bf; --line: #2c3144;
    --primary: #9b84ff; --primary-ink: #120d2a; --primary-soft: #2a2350; --ok: #5fd39a; --ok-soft: #173326;
    --warn: #f3b552; --warn-soft: #3a2c12; --bad: #ff7d8d; --bad-soft: #3d1a20; --info: #7fb0ff; --info-soft: #172843;
    --field-line: #6b7190; --field-bg: #11131c; --bad-ink: #120d2a;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* component display rules must never show hidden things */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: var(--primary); }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.2; margin: .2rem 0 .4rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
p { margin: 0 0 .8rem; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* Header and layout */
.top { display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2rem); background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand-name { font-weight: 700; font-size: 1.1rem; }
.brand-by { color: var(--muted); font-size: .8rem; }
.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.nav a, .nav .linkish { padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav a:hover { background: var(--surface-2); }
.menu-toggle { display: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 1.4rem clamp(1rem, 3vw, 2rem) 3rem; }
.narrow { max-width: 640px; margin: 0 auto; }
.foot { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; padding: 1.5rem 1rem 2.5rem; color: var(--muted); font-size: .875rem; }
.foot a { color: var(--muted); }
.banner { padding: .7rem clamp(1rem, 3vw, 2rem); font-size: .95rem; }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.crumbs { margin: 0; font-size: .875rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }

/* Components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > h2:first-child { margin-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: .55rem 1rem; border-radius: 10px;
  border: 1px solid var(--field-line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; }
.linkish { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.danger-text { color: var(--bad); }
.inline { display: inline; margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.alert { border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; border: 1px solid transparent; }
.alert ul { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--info-soft); color: var(--info); }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill-ok, .pill-file-done, .pill-file-expanded { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-confirmed { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.pill-needs_review, .pill-warn, .pill-file-waiting_credits { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-failed, .pill-file-failed, .pill-file-rejected, .pill-file-quarantined { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill-info, .pill-file-processing, .pill-file-queued, .pill-file-uploaded { background: var(--info-soft); color: var(--info); border-color: transparent; }
.req { font-size: .75rem; color: var(--warn); font-weight: 600; }
.secret { background: var(--surface-2); padding: .15rem .4rem; border-radius: 6px; user-select: all; }

/* Forms */
.form { display: grid; gap: .9rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .93rem; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--field-bg); border: 1px solid var(--field-line);
  border-radius: 9px; padding: .55rem .7rem; min-height: 44px; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }
input:focus, select:focus { border-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.fieldset-plain { gap: .9rem; min-width: 0; }               /* wraps a whole form so a read-only role can only look */
.fieldset-plain:disabled input, .fieldset-plain:disabled select { color: var(--text); opacity: 1; background: var(--surface-2); }
.role-matrix th, .role-matrix td { text-align: center; }
.role-matrix th:first-child, .role-matrix td:first-child { text-align: left; }
.role-matrix .yes { color: var(--ok); font-weight: 700; }
.role-matrix .no { color: var(--muted); }

/* Photos from WhatsApp */
.plain-list { margin: .2rem 0 .6rem; padding-left: 1.1rem; display: grid; gap: .25rem; }
.wa-source { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
  margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.wa-source p { margin: 0; flex: 1 1 260px; }
.qr-box { display: grid; place-items: center; padding: 1rem; margin: .5rem auto 1rem; width: max-content; max-width: 100%;
  background: #fff; border-radius: 12px; }               /* a QR needs a white quiet zone, also in dark mode */
.qr-box img { display: block; width: min(264px, 70vw); height: auto; image-rendering: pixelated; }
.pairing-code { font: 700 clamp(1.6rem, 7vw, 2.2rem)/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .18em; text-align: center; margin: .6rem 0 1rem; user-select: all; }
.chat-list { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .4rem; max-height: 60vh; overflow: auto; }
.chat-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: 0;
  padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.chat-name { overflow-wrap: anywhere; }
.chat-pick { justify-content: flex-start; cursor: pointer; min-height: 44px; }
.chat-pick input { width: 1.2rem; height: 1.2rem; flex: none; margin: 0; }
.chat-pick.is-chosen { background: var(--ok-soft); border-color: transparent; }
.chosen-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: .6rem .8rem; margin: .4rem 0 .8rem; }
.chosen-box h3 { margin: 0 0 .4rem; font-size: 1rem; }
.chosen-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .3rem; }
.chosen-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.chosen-list form { margin: 0; }
.wa-unlink { align-items: center; }
.wa-unlink p { margin: 0; }
legend { font-weight: 700; margin-bottom: .4rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.choice.disabled { opacity: .6; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; margin-bottom: .6rem; }
.grid2 > label, .grid2 > .field { align-content: start; }
pre { overflow-x: auto; max-width: 100%; background: var(--surface-2); padding: .75rem; border-radius: 8px; }
.secret { overflow-wrap: anywhere; }
.row-form { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .6rem; }
.row-form label { min-width: 160px; }
.row-form .grow { flex: 1 1 260px; }
.has-flag input, .has-flag select { border-color: var(--warn); background: var(--warn-soft); }
.flag { color: var(--warn); font-weight: 500; font-size: .85rem; }
.small-input { width: 90px; min-height: 36px; padding: .25rem .5rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1rem; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.card .table { border: 0; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.empty-row td { color: var(--muted); text-align: center; padding: 1.4rem; }
.pager { display: flex; gap: .5rem; justify-content: center; margin: .5rem 0 1rem; }
.admin-actions { white-space: nowrap; }
.admin-actions form { margin-right: .3rem; }

/* Dashboard tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .15rem; box-shadow: var(--shadow); }
.tile-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.tile-value { font-size: 2rem; font-weight: 750; line-height: 1.1; }
.tile-note { color: var(--muted); font-size: .85rem; }
.tile-warn { border-color: var(--warn); }
.empty { text-align: center; padding: 2rem 1rem; }

/* Upload */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.8rem 1rem; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.drop-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .2rem; }
.upload-list { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .35rem; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: .6rem; align-items: center; font-size: .9rem; }
.upload-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
progress { width: 100%; height: 8px; accent-color: var(--primary); }
.status-bar { display: flex; gap: 1.2rem; flex-wrap: wrap; padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.progress-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: -.4rem 0 1rem; }
.progress-line progress { flex: 1 1 220px; max-width: 460px; height: .8rem; accent-color: var(--primary); }
.read-again { position: relative; }
.read-again > summary { list-style: none; cursor: pointer; }
.read-again > summary::-webkit-details-marker { display: none; }
.read-again[open] > form { position: absolute; right: 0; z-index: 5; width: min(360px, 90vw); margin-top: .4rem; }
@media (max-width: 600px) {    /* the buttons wrap on a phone: the panel opens on its own full line, never off screen */
  .read-again[open] { flex-basis: 100%; }
  .read-again[open] > form { position: static; width: auto; }
}
.more-pages > summary { margin: .6rem 0 .3rem; }
.viewer:has(.more-pages[open]) { position: static; }     /* every page open: it scrolls with the page, never covers the form */
details.confidence > summary { cursor: pointer; margin-top: .2rem; }
.file-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .4rem; }
.file-list li { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.file-name { font-weight: 500; overflow-wrap: anywhere; }
details > summary { cursor: pointer; font-weight: 700; }
.danger { border-color: var(--bad-soft); }
.danger-row { border-top: 1px solid var(--line); padding-top: .8rem; }

/* Review */
.review { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.viewer { position: sticky; top: 76px; }
.viewer-tools { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.viewer-frame { overflow: auto; max-height: 72vh; border-radius: 10px; background: var(--surface-2); display: flex; min-height: 260px; }
.viewer-frame img { max-width: 100%; margin: auto; display: block; transition: transform .15s ease; transform-origin: center center; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: .6rem 0; border-top: 1px solid var(--line); }

/* Landing */
.hero { display: grid; grid-template-columns: 1.2fr .9fr; gap: 2rem; align-items: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.lead { font-size: 1.12rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--primary); margin: 0; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; box-shadow: var(--shadow); font-size: .9rem; }
.mini-row { display: grid; grid-template-columns: 1.4fr .6fr .4fr 1.1fr; gap: .5rem; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
.mini-row.head { font-weight: 700; color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.mini-row.check { color: var(--warn); border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 2rem 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.step h2 { margin: .4rem 0 .3rem; font-size: 1.05rem; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature { padding: .4rem .2rem; }
.packs { display: flex; gap: 1rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.pack { display: grid; justify-items: center; gap: .2rem; padding: 1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); min-width: 140px; }
.pack:hover { border-color: var(--primary); }
.pack-pages { font-size: 1.6rem; font-weight: 750; }
.prose h2 { margin-top: 1.6rem; }
.prose li { margin-bottom: .4rem; }

@media (max-width: 1080px) {
  .js .menu-toggle { display: inline-flex; min-height: 44px; padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--field-line); background: var(--surface); color: var(--text); font: inherit; }
  .js .nav:not(.nav-public) { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .js .nav.open { display: flex; }
}
@media (max-width: 860px) {
  .review { grid-template-columns: 1fr; }
  .viewer { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: .4rem; }
  .viewer-frame { max-height: 34vh; min-height: 160px; }
  .review-page .top { position: static; }
  .hero { grid-template-columns: 1fr; }
  .upload-list li { grid-template-columns: minmax(0, 1fr) 90px; }
  .upload-list li .state { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Batch page: the file for Invoicer sits under the downloads. */
.export .invoicer { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.export .invoicer h3 { margin: 0 0 .25rem; font-size: 1rem; }

/* Duplicates: the same document read more than once. */
.pill-dup { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.dup-alert { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.dup-alert .btn { margin-left: auto; }
.dup-box p { margin: 0 0 .4rem; }
.dup-list { margin: .2rem 0 .6rem 1.2rem; padding: 0; }
.dup-list li { margin: .15rem 0; }
.dup-group h2 { margin-top: 0; }
.keep-row td { background: var(--ok-soft); }
.actions-cell { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.empty-state { text-align: center; padding: 2rem 1rem; }

/* Wizards: step indicator and step blocks. */
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
.stepper-item { display: flex; align-items: center; gap: .45rem; }
.stepper-item span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; font-size: .8rem; background: var(--surface); }
.stepper-item.current { color: var(--text); font-weight: 600; }
.stepper-item.current span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.stepper-item.done span { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.wizard fieldset.step-block { border: 0; padding: 0 0 1rem; margin: 0 0 .4rem; border-bottom: 1px solid var(--line); }
.wizard fieldset.step-block:last-of-type { border-bottom: 0; }
.wizard legend { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; padding: 0; }
.step-no { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .85rem; }
.choice-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choice-card { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .85rem; border: 1px solid var(--field-line); border-radius: 10px; cursor: pointer; font-weight: 400; background: var(--surface); }
.choice-card span { display: grid; gap: .15rem; }
.choice-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.choice-card input { margin-top: .2rem; }
.option-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 1rem; }
.option-card { margin-bottom: 0; }

/* Layout builder. */
.builder-table td { vertical-align: middle; }
.builder-table tr.off td:not(:first-child) { opacity: .7; }
.builder-table input:not([type=checkbox]), .builder-table select { min-width: 150px; width: 100%; }
.order-cell { white-space: nowrap; }
.order-cell .btn { padding: .15rem .45rem; min-height: 32px; }
.center { text-align: center; }
.preview-table th { background: var(--primary-soft); white-space: nowrap; }
.preview-table td.muted { font-style: italic; }

/* Typing help on forms. */
.input-hint { display: block; font-size: .8rem; min-height: 0; }
.input-hint.good { color: var(--ok); }
.input-hint.bad { color: var(--bad); }
input.input-bad { border-color: var(--bad); }
input.input-good { border-color: var(--ok); }

/* Upload: a real button for choosing files; drag-and-drop text only where a mouse is used. */
.sr-only:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (pointer: coarse) { .only-mouse { display: none; } }
.pill-copy { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* Touch screens: every target at least 44px. */
@media (pointer: coarse), (max-width: 860px) {
  .btn-small { min-height: 44px; }
  .order-cell .btn { min-height: 44px; min-width: 44px; }
  .nav a, .nav .linkish { min-height: 44px; display: flex; align-items: center; }
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; }
  .hit { display: block; padding: 10px; margin: -10px; }
}

/* Phones: tables become stacked cards instead of scrolling sideways. */
@media (max-width: 640px) {
  .table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.stack tr { display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .table.stack td { border: 0; padding: .1rem .2rem; }
  .table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .table.stack td.stack-main { grid-column: 1 / -1; font-weight: 600; }
}
.done-alert { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Review form: one field = label, input, hints (no buttons inside labels). */
.field { display: grid; gap: .3rem; align-content: start; }
.field > label { font-weight: 600; font-size: .93rem; }
.lines input.line-desc { min-width: 14rem; }
.lines input.line-num { min-width: 7rem; }
.review-more { margin-top: .8rem; justify-content: space-between; }
