@font-face { font-family: "Stamp"; src: url("fonts/barlow-condensed-800-latin.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Stamp"; src: url("fonts/barlow-condensed-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-400-latin.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-600-latin.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-700-latin.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Data"; src: url("fonts/red-hat-mono-500-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --sky: #0EA5E9;
  --sky-50: #F0F9FF;
  --sky-100: #E0F2FE;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --paper: #F0F9FF;
  --page: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #475569;
  --rule: #CBD5E1;
  --rule-soft: #E2E8F0;
  --pass: #1E7548;
  --review: #9A5600;
  --stop: #B0232B;
  --focus: #2563EB;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --stamp: "Stamp", "Arial Narrow", sans-serif;
  --data: "Data", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --lift: 0 4px 24px rgba(37, 99, 235, .08), 0 8px 32px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #93C5FD var(--paper); }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; }
::selection { background: var(--blue-100); color: var(--ink); }
input, textarea { caret-color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex: none; }
[hidden] { display: none !important; }
.num, .data { font-family: var(--data); font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue); color: #fff; min-width: 200px; box-shadow: 0 4px 14px -6px rgba(37, 99, 235, .6); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-primary:disabled { background: var(--blue-100); color: var(--ink-2); box-shadow: none; cursor: not-allowed; }
.btn-quiet { background: #fff; border-color: var(--rule); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { border-color: #93C5FD; background: var(--blue-50); }
.btn-quiet:disabled { color: #94A3B8; cursor: not-allowed; }
.btn-gilt { background: var(--blue); color: #fff; width: 100%; }
.btn-gilt:hover { background: var(--blue-dark); }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); }

/* ---------- login ---------- */
.cover { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, var(--sky-100), transparent 60%), linear-gradient(180deg, var(--sky-50), #fff); color: var(--ink); padding: 24px 16px; }
.cover-panel { width: min(420px, 100%); text-align: center; background: #fff; border: 1px solid var(--blue-100); border-radius: 16px; padding: 40px 32px 32px; box-shadow: var(--lift); }
.cover-seal { width: 80px; height: 80px; color: var(--blue); }
.cover-title { font-family: var(--stamp); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; margin: 16px 0 6px; color: var(--ink); }
.cover-sub { margin: 0 0 40px; font-family: var(--stamp); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: 14px; color: var(--blue); }
.cover-form { text-align: left; display: grid; gap: 10px; }
.cover-form label { font-size: 14px; font-weight: 600; color: var(--ink); }
.cover-form input { height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--rule); background: #fff; color: var(--ink); font-size: 16px; }
.cover-form input:focus-visible { outline-color: var(--blue); border-color: var(--blue); }
.cover-form .btn { margin-top: 10px; }
.cover-error { margin: 0; color: var(--stop); font-size: 14px; }
.cover-foot { margin: 28px 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail { background: #fff; border-right: 1px solid var(--blue-100); color: var(--ink); display: flex; flex-direction: column; padding: 24px 0; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 24px 32px; color: var(--blue); font-family: var(--stamp); font-weight: 800; font-size: 26px; letter-spacing: .03em; text-transform: uppercase; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: grid; gap: 2px; padding: 0 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); text-align: left; cursor: pointer; font-size: 15px; }
.nav-item .ico { width: 20px; height: 20px; stroke-width: 1.6; }
.nav-item:hover { background: var(--sky-50); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--blue-50); color: var(--blue-dark); font-weight: 600; }
.nav-item[aria-current="page"] .ico { color: var(--blue); }
.rail-foot { margin-top: auto; padding: 0 24px; display: grid; gap: 18px; }
.ledger { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--blue-100); padding-top: 16px; }
.ledger dd { margin: 0; color: var(--ink); font-family: var(--data); font-variant-numeric: tabular-nums; text-align: right; }
.note { margin: 0; display: flex; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.note .ico { color: var(--sky); margin-top: 1px; }
.signout { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 0; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.signout:hover { color: var(--blue); }

.main { padding: 32px 40px 56px; max-width: 1400px; width: 100%; }
.head { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.head h1 { margin: 0 0 6px; font-family: var(--stamp); font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.head p { margin: 0; color: var(--ink-2); max-width: 68ch; }

/* ---------- stepper ---------- */
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--blue-100); border-radius: 14px; background: var(--page); overflow: hidden; box-shadow: var(--lift); }
.steps li + li { border-left: 1px solid var(--blue-100); }
.step { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 20px; border: 0; background: none; text-align: left; cursor: pointer; min-height: 64px; transition: background-color .15s; }
.step:hover:not(:disabled) { background: var(--sky-50); }
.step:disabled { cursor: not-allowed; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--rule); font-family: var(--stamp); font-weight: 800; font-size: 18px; color: var(--ink-2); }
.step-t { display: grid; line-height: 1.25; }
.step-t b { font-family: var(--stamp); font-weight: 800; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; }
.step-t span { font-size: 13px; color: var(--ink-2); }
.step:disabled .step-t b, .step:disabled .step-n { color: #94A3B8; }
.step[aria-current="step"] { background: var(--blue); color: #fff; }
.step[aria-current="step"] .step-n { border-color: #fff; color: #fff; }
.step[aria-current="step"] .step-t span { color: #DBEAFE; }
.step.done .step-n { background: var(--pass); border-color: var(--pass); color: #fff; }
.step[aria-current="step"]:focus-visible { outline-color: #fff; outline-offset: -4px; }

/* ---------- step 1: upload ---------- */
.drop { position: relative; display: grid; place-items: center; min-height: 220px; border: 1.5px dashed #93C5FD; border-radius: 12px; background: var(--page); cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--sky-50); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop.compact { min-height: 96px; }
.drop-empty { display: grid; justify-items: center; gap: 6px; padding: 20px; text-align: center; color: var(--ink-2); font-size: 14px; max-width: 52ch; }
.drop-empty b { color: var(--ink); font-weight: 600; font-size: 16px; }
.drop-empty u { text-underline-offset: 3px; color: var(--ink); }
.drop-empty .ico { width: 30px; height: 30px; color: var(--blue); stroke-width: 1.5; margin-bottom: 4px; }
.drop.compact .drop-empty { grid-auto-flow: column; align-items: center; gap: 12px; max-width: none; }
.drop.compact .drop-empty .ico { margin: 0; width: 24px; height: 24px; }

.queue { list-style: none; margin: 20px 0 0; padding: 0; border: 1px solid var(--blue-100); border-radius: 14px; background: var(--page); overflow: hidden; }
.queue:empty { display: none; }
.q { display: grid; grid-template-columns: 40px minmax(0, 1fr) 96px 220px 88px; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.q + .q { border-top: 1px solid var(--rule-soft); }
.q-type { font-family: var(--stamp); font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--blue); border: 1.5px solid currentColor; border-radius: 4px; text-align: center; padding: 1px 0; }
.q-name { font-family: var(--data); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-size { font-size: 13px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.q-state { font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.q-state .ico { width: 16px; height: 16px; }
.q-state.ok { color: var(--pass); }
.q-state.bad { color: var(--stop); }
.q-state.run { color: var(--blue); }
.q-state span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-act { text-align: right; }
.q-err { grid-column: 2 / -1; margin: -4px 0 2px; font-size: 13px; color: var(--stop); }
.pulse { display: block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .45); } 100% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); } }

.run { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.run-note { margin: 0; color: var(--ink-2); font-size: 14px; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- step 2: review ---------- */
.review { display: grid; gap: 16px; }
.batch { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 260px); border: 1px solid var(--blue-100); border-radius: 14px; background: var(--page); overflow-x: auto; }
.batch:has(.bi:only-child) { display: none; }
.bi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 12px 14px; border: 0; background: none; text-align: left; cursor: pointer; border-left: 1px solid var(--rule-soft); }
.bi:first-child { border-left: 0; }
.bi:hover { background: var(--sky-50); }
.bi[aria-current="true"] { background: var(--blue-50); color: var(--blue-dark); box-shadow: inset 0 -2px 0 var(--blue); }
.bi-v { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-sub { grid-column: 1; font-size: 12px; color: var(--ink-2); font-family: var(--data); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { grid-row: 1 / 3; grid-column: 2; align-self: center; width: 10px; height: 10px; border-radius: 50%; }
.dot.pass { background: var(--pass); } .dot.review { background: var(--review); } .dot.stop { background: var(--stop); } .dot.none { border: 1.5px solid #94A3B8; }


.page { background: var(--page); border: 1px solid var(--blue-100); border-radius: 16px; box-shadow: var(--lift); overflow: hidden; }
.sheet { display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); }
.orig { border-right: 1px solid var(--blue-100); background: #FAFCFF; padding: 20px; display: grid; grid-template-rows: auto auto; align-content: start; gap: 12px; min-width: 0; }
.orig-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.orig-head .data { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orig-frame { background: var(--sky-100); border-radius: 10px; min-height: 320px; display: grid; place-items: start center; overflow: hidden; padding: 12px; position: sticky; top: 16px; }
.orig-frame img { max-width: 100%; max-height: calc(100vh - 120px); display: block; box-shadow: 0 1px 3px rgba(15, 23, 42, .18); background: #fff; }
.orig-frame iframe { width: 100%; height: 78vh; min-height: 560px; border: 0; background: #fff; }
.orig-frame p { color: var(--ink-2); font-size: 14px; padding: 24px; text-align: center; }

.fields { padding: 24px 28px 28px; min-width: 0; }
.fields-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.serial { display: block; font-family: var(--data); font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.vendor-in { display: block; width: 100%; margin-top: 2px; border: 1px solid transparent; border-radius: 8px; background: none; padding: 2px 6px; margin-left: -7px; font-family: var(--stamp); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; }
.vendor-in:hover { border-color: var(--rule); }
.vendor-in:focus { outline: none; border-color: var(--blue); background: #fff; }
.edited { font-size: 12px; color: var(--review); margin-top: 4px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .6fr); gap: 14px 18px; }
.f { display: grid; gap: 4px; min-width: 0; }
.f.wide { grid-column: 1 / -1; }
.f label, .lab { font-family: var(--stamp); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.in { height: 38px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; font-family: var(--data); font-size: 14px; min-width: 0; width: 100%; transition: border-color .15s; }
.in:hover { border-color: #93C5FD; }
.in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.in.txt { font-family: var(--sans); }
.in.r { text-align: right; }
textarea.in { height: auto; min-height: 38px; padding: 8px 10px; resize: vertical; font-family: var(--sans); }
.in.empty { background: var(--sky-50); }

.items-h { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 8px; }
.items-h h3 { margin: 0; font-family: var(--stamp); font-weight: 800; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; }
.items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.items th { font-family: var(--stamp); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-align: left; padding: 0 4px 6px; }
.items th.r { text-align: right; }
.items td { padding: 3px 4px; }
.items .in { height: 34px; }
.items .c-q { width: 56px; } .items .c-p { width: 116px; } .items .c-a { width: 128px; } .items .c-x { width: 40px; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: #FEF2F2; color: var(--stop); }

.totals { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); align-items: start; }
.tot { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.tot label { text-align: right; }
.tot .grand { font-family: var(--stamp); font-weight: 800; font-size: 24px; height: 46px; border-color: var(--ink); box-shadow: 0 3px 0 -1px #fff, 0 4px 0 -1px var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.checks li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.checks .ico { width: 16px; height: 16px; margin-top: 2px; }
.checks .ok { color: var(--pass); } .checks .bad { color: var(--stop); } .checks .na { color: var(--ink-2); }
.checks b { font-weight: 600; color: var(--ink); display: block; }
.checks span { color: var(--ink-2); font-family: var(--data); font-size: 12px; }

/* stamps: the signature move */
.stamps { display: flex; gap: 4px; flex: none; }
.stamp { color: var(--pass); display: block; width: 112px; height: 112px; }
.stamp.review { color: var(--review); } .stamp.stop { color: var(--stop); } .stamp.none { color: #93C5FD; }
.stamp svg { width: 100%; height: 100%; overflow: visible; transform: rotate(var(--tilt, -6deg)); }
.stamp .ring, .stamp .core { mix-blend-mode: multiply; }
.stamp .ring { opacity: .9; } .stamp .core { opacity: .95; }
.stamp.press svg { animation: press .42s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes press { 0% { opacity: 0; transform: scale(1.5) rotate(var(--tilt, -6deg)); filter: blur(3px); } 60% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: scale(1) rotate(var(--tilt, -6deg)); } }
.thresh { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); text-align: right; }

.review-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.review-bar .pager { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }

/* ---------- step 3: export & history tables ---------- */
.tbl tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 12px; font-weight: 600; }
.tbl tfoot .grand { font-family: var(--stamp); font-weight: 800; font-size: 20px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { font-family: var(--stamp); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-align: left; padding: 14px 16px 8px; border-bottom: 1px solid var(--blue-100); white-space: nowrap; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .data { font-size: 13px; white-space: nowrap; }
.tbl tbody tr:hover td { background: var(--sky-50); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tag.pass { color: var(--pass); } .tag.review { color: var(--review); } .tag.stop { color: var(--stop); } .tag.none { color: var(--ink-2); }
.export-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--blue-100); flex-wrap: wrap; }
.export-bar .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.export-bar p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 60ch; }

.empty-state { padding: 48px 24px; text-align: center; color: var(--ink-2); }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.alert { padding: 12px 16px; border: 1px solid #FECACA; background: #FEF2F2; color: #7F1D1D; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .sheet { grid-template-columns: 1fr; }
  .orig { border-right: 0; border-bottom: 1px solid var(--blue-100); }
  .orig-frame { position: static; }
  .orig-frame iframe { min-height: 420px; }
  .orig-frame iframe { height: 60vh; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--blue-100); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 8px 16px; }
  .brand { padding: 0; font-size: 22px; }
  .nav { grid-auto-flow: column; padding: 0; margin-left: auto; }
  .nav-item { padding: 8px 10px; }
  .rail-foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .head h1 { font-size: 30px; }
  .steps { margin-bottom: 20px; }
  .step { padding: 10px 12px; gap: 10px; min-height: 56px; }
  .step-t span { display: none; }
  .step-t b { font-size: 17px; }
  .review { grid-template-columns: 1fr; }
  .batch { grid-auto-columns: minmax(180px, 1fr); }
  .q { grid-template-columns: 40px minmax(0, 1fr) 72px; }
  .q-size { display: none; }
  .q-state { grid-column: 2 / 4; }
  .q-act { grid-column: 3; grid-row: 1; }
  .fields { padding: 20px 16px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .f.wide { grid-column: 1 / -1; }
  .totals { grid-template-columns: 1fr; }
  .stamps { justify-content: flex-start; }
  .items .c-p { width: 110px; } .items .c-a { width: 120px; } .items .c-q { width: 56px; }
}
@media (max-width: 560px) {
  .steps .step-n { width: 26px; height: 26px; font-size: 15px; }
  .grid { grid-template-columns: 1fr; }
  .items, .items tbody, .items tr, .items td { display: block; width: 100%; }
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 6px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
  .items td:first-child { grid-column: 1 / -1; }
  .items td[data-l]::before { content: attr(data-l); display: block; font-family: var(--stamp); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
  .fields-head { flex-direction: column-reverse; }
  .stamps { align-self: flex-end; }
  .stamp { width: 96px; height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.press svg { animation: none; }
  .pulse, .spin { animation-duration: 2.4s; }
}
