/* Archive Desk browser app. Shared by archive-desk.html and archive-desk-protection.html.
   An evidence locker: cool steel shelving, intake tags, a seal green for verified fingerprints,
   evidence red only for broken seals. Red Hat Display, Text and Mono. */
:root {
  color-scheme: light;
  --ink: #0f1720;
  --ink-soft: #26313d;
  --paper: #e4e8e6;
  --surface: #f8f9f7;
  --surface-soft: #eff2f0;
  --folder: #d5dcd6;
  --line: #cdd4cf;
  --line-strong: #6c7a73;
  --muted: #4a5751;
  --stamp: #b3261e;
  --brand: #0f1720;
  --brand-soft: #dde3df;
  --deep: #0f1720;
  --seal: #1d6b4f;
  --seal-soft: #dcebe3;
  --steel: #2d5b9a;
  --stamp-soft: #f6dfdc;
  --amber-soft: #f2e6c9;
  --error: #b3261e;
  --error-soft: #f6dfdc;
  --warning: #855a00;
  --added: #2d5b9a;
  --added-soft: #dfe7f2;
  --radius: 4px;
  --radius-button: 3px;
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--steel);
  --heading: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--body); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
a { color: var(--ink); text-decoration-color: var(--steel); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--heading); letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 50; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; border-radius: var(--radius-button); color: var(--surface); background: var(--ink); text-decoration: none; }
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: var(--radius-button); font-size: 15px; font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center; transition: background-color .18s ease-out, border-color .18s ease-out; }
.button.primary { color: var(--surface); background: var(--ink); }
.button.primary:hover:not(:disabled) { background: var(--ink-soft); }
.button.secondary { color: var(--ink); background: var(--surface); }
.button.secondary:hover:not(:disabled) { background: var(--folder); }
.button.full { width: 100%; }
.button svg, .text-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; margin: 0 -12px; border: 0; border-radius: var(--radius-button); background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--steel); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: background-color .18s ease-out; }
.text-button:hover:not(:disabled) { background: var(--brand-soft); }

/* Header: a box label strip */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px max(16px, calc((100vw - 1248px) / 2)); border-bottom: 1px solid #000; color: #e9eeeb; background: var(--ink); }
.topbar .brand, .topbar .topbar-link { color: #f3f6f4; }
.topbar .topbar-right, .topbar .local-badge { color: #b7c2bc; }
.topbar .brand img { border-radius: 4px; background: var(--surface); padding: 2px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; font: 700 19px/1 var(--heading); letter-spacing: .02em; }
.brand img { width: 36px; height: 36px; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.local-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 15px; }
.local-badge > span { display: none; }
.topbar-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: none; }
.topbar-link:hover { text-decoration: underline; text-decoration-color: var(--steel); }

.shell { max-width: 1280px; margin: 0 auto; padding: 32px 16px 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.kicker { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border: 1.5px solid var(--ink); border-left: 10px solid var(--ink); border-radius: 2px 10px 10px 2px; color: var(--ink); background: var(--surface); font: 600 13px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { font-size: clamp(32px, 3.8vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.page-heading .lede { max-width: 620px; margin-top: 12px; font-size: 18px; color: var(--muted); }
.page-heading .button { flex: none; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex: none; }
#run-tour.running { cursor: progress; }

/* Tabs: folder tabs that join the panel below */
.tabbar { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 6px; padding: 0 0 0 0; margin-bottom: 20px; border-bottom: 3px solid var(--ink); }
.tabbar button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line-strong); border-bottom: 0; border-radius: 4px 4px 0 0; background: linear-gradient(var(--surface-soft), var(--folder)); color: var(--ink); font-size: 15px; font-weight: 700; transition: background-color .18s ease-out; }
.tabbar button:hover:not([aria-selected=true]) { background: var(--surface-soft); }
.tabbar button[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); box-shadow: inset 0 3px 0 var(--seal); }
.tabbar button[aria-selected=true]:focus-visible { box-shadow: inset 0 3px 0 var(--seal), var(--focus); }
.tab-number { font: 700 15px/1 var(--mono); }

/* Panels: file folders */
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: 0 1px 0 #fff inset, 0 2px 0 rgba(15, 23, 32, .08); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; }
.panel-heading h2, .sidebar h2 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.eyebrow { margin-bottom: 4px; font-family: var(--mono); font-size: 15px; color: var(--muted); }
.sidebar { display: grid; gap: 16px; min-width: 0; }
.sidebar .panel { padding: 22px 24px; }
.sidebar .panel > p:not(.eyebrow) { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* Drop zone and pickers */
.dropzone { margin: 0 24px; padding: 28px 20px 24px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); transition: background-color .18s ease-out, border-color .18s ease-out; }
.dropzone.drag-over { border-color: var(--ink); border-style: solid; background: var(--folder); }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--folder); color: var(--ink); }
.drop-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.dropzone h3 { font-size: 20px; font-weight: 800; }
.dropzone p { max-width: 400px; margin: 6px auto 16px; font-size: 15px; color: var(--muted); }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dropzone .limit-note { margin: 16px auto 0; font-size: 14px; }
.limit-note strong { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.selection-meta { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 10px; font-size: 14px; color: var(--muted); }
.selection-meta span:last-child { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.notice { margin: 0 24px 14px; padding: 12px 14px; border-radius: var(--radius); font-size: 15px; }
.notice.amber { background: var(--amber-soft); border: 1px solid var(--line-strong); border-left: 4px solid var(--warning); color: #5a3e00; }
.file-picker { display: flex; align-items: center; gap: 14px; min-height: 72px; margin: 4px 24px 24px; padding: 16px 18px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); cursor: pointer; transition: background-color .18s ease-out, border-color .18s ease-out; }
.file-picker:hover { border-color: var(--ink); background: var(--folder); }
.file-picker:has(+ input:focus-visible) { box-shadow: var(--focus); }
.file-picker strong { display: block; font-size: 16px; font-weight: 700; }
.file-picker small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.picker-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--folder); color: var(--ink); }
.picker-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: square; stroke-linejoin: miter; }
.section-intro { max-width: 640px; padding: 0 24px; font-size: 15px; color: var(--muted); }

/* Tables: an inventory sheet */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
th, td { padding: 11px 24px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { padding-top: 10px; padding-bottom: 10px; background: var(--surface-soft); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
td:first-child { font-family: var(--mono); font-size: 15px; }
td:nth-child(n+2) { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
th:first-child { width: 50%; }
th:nth-child(2) { width: 16%; }
th:nth-child(3) { width: 34%; }
.verify-panel th:first-child { width: 42%; }
.verify-panel th:nth-child(2) { width: 16%; }
.verify-panel th:nth-child(3) { width: 42%; }
.verify-panel td:nth-child(3) { font-size: 13px; line-height: 1.6; word-break: break-all; }
.empty-row td { padding: 28px 20px; text-align: center; font-family: var(--body) !important; font-size: 15px !important; color: var(--muted); background: var(--surface-soft); }
.panel-footer { display: flex; align-items: flex-start; gap: 10px; padding: 12px 24px; border-top: 1px dashed var(--line-strong); background: var(--surface-soft); font-size: 14px; color: var(--muted); }
.tiny-dot { width: 6px; height: 6px; margin-top: 8px; background: var(--steel); flex: none; }

/* Build card */
.build-card label, .protect-card label:not(.file-picker), .field-label { display: block; margin: 18px 0 6px; font-size: 14px; font-weight: 700; }
.build-card input, .protect-card input[type=password] { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-bottom: 2px solid var(--ink); border-radius: var(--radius-button); background: #ffffff; font-size: 16px; }
.build-card input { margin-bottom: 14px; font-family: var(--mono); font-size: 17px; }
#created-result { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.success-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 2px 10px 2px 4px; border: 1.5px solid var(--seal); border-radius: 2px; font: 600 13px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--seal); background: var(--seal-soft); }
.success-label > span { display: grid; place-items: center; width: 20px; height: 20px; background: var(--seal); color: var(--surface); font-size: 12px; }
.file-name { font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
#created-size, #protected-size { margin: 4px 0 14px; font-size: 14px; }
.hash-details { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hash-details summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--ink); }
.hash-details code { display: block; margin-top: 4px; padding: 8px 10px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 13px; line-height: 1.7; word-break: break-all; color: var(--ink); }
.build-card .small, .recovery-card .small, .protect-card .small { margin-top: 12px; }

/* Checklist */
.checklist ol { list-style: none; margin: 4px 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.checklist li > span { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); font: 700 15px/1 var(--mono); color: var(--muted); transition: background-color .18s ease-out; }
.checklist li.done > span { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.checklist strong { display: block; font-size: 15px; font-weight: 700; }
.checklist small { display: block; font-size: 14px; color: var(--muted); }
.privacy-note { padding: 0 4px; font-size: 14px; color: var(--muted); }
.privacy-note strong { color: var(--ink); }
.privacy-note p { margin-top: 4px; }

/* Verify */
.result-heading { display: flex; align-items: center; gap: 14px; margin: 4px 24px 18px; padding: 14px 16px; border: 1.5px solid var(--ink); border-left-width: 6px; border-radius: var(--radius); background: var(--surface-soft); }
.result-heading h3 { font-size: 18px; font-weight: 800; color: var(--ink); }
.result-heading p { font-size: 15px; color: var(--ink); }
.result-check { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 2px solid var(--seal); border-radius: 50%; background: var(--seal-soft); color: var(--seal); font-size: 18px; font-weight: 800; }
.archive-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 24px 20px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
.archive-facts div { min-width: 0; padding: 10px 14px; border-left: 1px solid var(--line); }
.archive-facts div:first-child { border-left: 0; }
.archive-facts dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.archive-facts dd { margin: 2px 0 0; font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.format-tag { display: inline-block; margin-bottom: 12px; padding: 3px 8px; border: 1px solid var(--ink); border-radius: 2px; background: var(--folder); color: var(--ink); font: 700 14px/1.4 var(--mono); }
.format-card h3 { font-size: 18px; font-weight: 800; }
.format-card p { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* Compare */
.compare-inputs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: stretch; margin: 0 24px 12px; }
.compare-slot { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); }
.slot-head { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.input-step { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 2px; background: var(--ink); color: var(--surface); font: 700 15px/1 var(--mono); }
.slot-value { font-size: 15px; overflow-wrap: anywhere; }
.slot-value.is-set { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.slot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.slot-actions .button { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.compare-inputs > .button { align-self: center; }
.compare-explainer { margin: 0 24px 20px; font-size: 14px; color: var(--muted); }
.diff-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 24px 16px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--surface-soft); }
.diff-stats > div { padding: 12px 16px; border-left: 1px solid var(--line-strong); }
.diff-stats > div:first-child { border-left: 0; }
.diff-stats strong { display: block; font: 700 34px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.diff-stats span { font-size: 14px; font-weight: 700; color: var(--muted); }
.diff-stats .added strong { color: var(--added); }
.diff-stats .changed strong { color: var(--warning); }
.diff-stats .removed strong { color: var(--error); }
.diff-stats .unchanged strong { color: var(--muted); }
.diff-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 24px 8px; font-size: 15px; }
.diff-toolbar .text-button { margin: 0; }
.check-option { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.compare-panel th:first-child { width: 46%; }
.compare-panel th:nth-child(n+2) { width: 18%; }
.change-badge { display: inline-block; padding: 1px 8px; border: 1.5px solid currentColor; border-radius: 2px; font: 700 13px/1.6 var(--body); letter-spacing: .02em; }
.change-badge.added { background: var(--added-soft); color: var(--added); }
.change-badge.changed { background: var(--amber-soft); color: #5a3e00; }
.change-badge.removed { background: var(--error-soft); color: #8a1f19; }
.change-badge.unchanged { background: var(--surface-soft); color: var(--muted); }

/* Desk log: one line under the folder tabs, in the page flow so it never covers a panel */
.status-bar { display: flex; align-items: baseline; gap: 14px; margin: -8px 0 20px; padding: 10px 16px; border: 1.5px solid var(--line-strong); border-left: 6px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); scroll-margin: 12px; }
.status-bar p { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.status-label { flex: none; font: 700 13px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status-bar.done { color: var(--ink); border-left-color: var(--ink); }
.status-bar.busy { border-left-color: var(--warning); }
.status-bar.busy .status-label::after { content: " ..."; }
.status-bar.error { color: var(--error); background: #f9e9e6; border-color: var(--stamp); }
.status-bar.error .status-label { color: var(--stamp); }
.verify-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -8px 24px 24px; }

/* Footer */
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; padding: 24px 0 32px; border-top: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; }
.site-footer p { max-width: 560px; }
.site-footer .footer-about { align-self: center; }

/* Dialog */
dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1.5px solid var(--ink); border-top: 6px solid var(--stamp); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(15, 23, 32, .55); }
dialog h2 { font-size: 22px; font-weight: 800; }
dialog p { margin: 8px 0 20px; color: var(--muted); font-size: 15px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions .button { flex: 1 1 160px; }

/* Protection tab */
.protection-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin: 4px 0 20px; }
.protection-intro h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.15; }
.protection-intro p:last-child { max-width: 680px; margin-top: 8px; font-size: 16px; color: var(--muted); }
.preview-label { flex: none; padding: 4px 12px; border: 1.5px solid var(--stamp); border-radius: 2px; color: var(--stamp); font: 600 13px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.protection-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.protect-card { padding: 24px; }
.protect-card h3 { margin: 22px 0 10px; font-size: 18px; font-weight: 800; }
.protect-card h3:first-of-type { margin-top: 8px; }
.protect-card .file-picker { margin: 10px 0 0; }
.protect-card .button.secondary { margin-top: 4px; }
.protect-card .button.full { margin-top: 18px; }
.protect-card .table-wrap { margin-top: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.protect-card table { font-size: 14px; }
.protect-card th, .protect-card td { padding: 10px 12px; }
.protect-card th:first-child { width: auto; }
.protect-card th:last-child { width: 96px; }
.protect-card tr:first-child th { border-top: 0; }
#protected-result, #unlocked-result { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
#unlocked-summary { font-size: 15px; color: var(--muted); }
.protection-limits { margin-top: 20px; padding: 24px; }
.protection-limits h3 { font-size: 18px; font-weight: 800; }
.limits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.limits-grid p { font-size: 15px; color: var(--muted); }
.limits-grid strong { display: block; margin-bottom: 4px; color: var(--ink); }

/* Responsive */
@media (max-width: 1080px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .compare-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .compare-inputs > .button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 880px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .privacy-note { grid-column: 1 / -1; }
  .protection-grid, .limits-grid { grid-template-columns: minmax(0, 1fr); }
  .local-badge { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .brand { font-size: 16px; letter-spacing: .08em; }
  .brand img { width: 32px; height: 32px; }
  .shell { padding-top: 24px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading .lede { font-size: 16px; }
  .heading-actions { display: grid; gap: 10px; margin-top: 18px; }
  .page-heading .button { width: 100%; }
  .tabbar { gap: 4px; }
  .tabbar button { flex-direction: column; gap: 2px; min-height: 56px; padding: 6px 4px; font-size: 14px; }
  .tab-extra { display: none; }
  .panel-heading { padding: 20px 16px 14px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar .panel, .protect-card, .protection-limits { padding: 20px 16px; }
  .dropzone { margin: 0 16px; padding: 22px 14px 18px; }
  .drop-actions .button { flex: 1 1 130px; }
  .selection-meta { padding: 16px 16px 8px; }
  .notice { margin-left: 16px; margin-right: 16px; }
  .section-intro { padding: 0 16px; }
  .file-picker { margin: 4px 16px 20px; }
  .verify-alt { margin: -6px 16px 20px; }
  .verify-alt .button { width: 100%; }
  .status-bar { flex-direction: column; gap: 2px; padding: 10px 14px; }
  th, td { padding-left: 16px; padding-right: 16px; }
  .date-column, .selection-panel td:nth-child(3) { display: none; }
  .selection-panel th:first-child { width: 72%; }
  .selection-panel th:nth-child(2) { width: 28%; }
  .verify-panel th:first-child { width: 64%; }
  .verify-panel th:nth-child(2) { width: 36%; }
  .verify-panel th:nth-child(3), .verify-panel td:nth-child(3) { display: none; }
  .result-heading { margin: 4px 16px 16px; }
  .archive-facts { grid-template-columns: minmax(0, 1fr); margin: 0 16px 16px; }
  .archive-facts div { border-left: 0; border-top: 1px solid var(--line); }
  .archive-facts div:first-child { border-top: 0; }
  .compare-inputs { grid-template-columns: minmax(0, 1fr); margin: 0 16px 12px; }
  .compare-inputs > .button { justify-self: stretch; }
  .compare-explainer { margin: 0 16px 16px; }
  .diff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 16px 14px; }
  .diff-stats > div:nth-child(3) { border-left: 0; }
  .diff-stats > div:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
  .diff-toolbar { padding: 0 16px 8px; }
  .compare-panel th, .compare-panel td { padding-left: 10px; padding-right: 10px; }
  .compare-panel th:first-child, .compare-panel td:first-child { padding-left: 16px; }
  .compare-panel th:first-child { width: 40%; }
  .compare-panel th:nth-child(2) { width: 28%; }
  .compare-panel th:nth-child(n+3) { width: 16%; }
  .compare-panel td:nth-child(n+3) { font-size: 13px; }
  th { text-transform: none; letter-spacing: 0; font-size: 13px; }
  td:first-child, td:nth-child(n+2) { font-size: 14px; }
  .change-badge { padding: 1px 6px; }
  .compare-panel th:nth-child(n+3), .compare-panel td:nth-child(n+3) { padding-left: 6px; padding-right: 6px; }
  .compare-panel th:nth-child(n+3) { font-size: 12px; overflow-wrap: normal; }
  .protection-intro { display: block; }
  .preview-label { display: inline-block; margin-top: 12px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .topbar-link { font-size: 14px; }
  .tabbar button { font-size: 13px; }
  .compare-panel th:nth-child(n+3), .compare-panel td:nth-child(n+3) { display: none; }
  .compare-panel th:first-child { width: 60%; }
  .compare-panel th:nth-child(2) { width: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Tamper seal: a glyph drawn from the first bytes of a SHA-256 fingerprint.
   The same archive always draws the same seal, a changed byte draws a different one. */
.seal-glyph { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.seal-glyph svg { flex: none; width: 64px; height: 64px; }
.seal-glyph svg .ring { fill: var(--seal-soft); stroke: var(--seal); stroke-width: 1.5; }
.seal-glyph svg .tick { stroke: var(--seal); stroke-width: 2.2; stroke-linecap: round; }
.seal-glyph svg .core { fill: var(--seal); }
.seal-glyph svg .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: seal-draw .7s ease-out forwards; }
.seal-glyph strong { display: block; font: 600 13px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--seal); }
.seal-glyph span { display: block; margin-top: 2px; font: 500 14px/1.45 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.seal-glyph small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.seal-glyph div { min-width: 0; }
.seal-glyph.in-panel { margin: 0 24px 18px; }
.seal-glyph.other { border-color: var(--steel); background: var(--added-soft); }
.seal-glyph.other svg .ring { fill: #eef2f8; stroke: var(--steel); stroke-dasharray: 5 4; }
.seal-glyph.other svg .tick { stroke: var(--steel); }
.seal-glyph.other svg .core { fill: var(--steel); }
.seal-glyph.other strong { color: var(--steel); }
@keyframes seal-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) { .seal-glyph.in-panel { margin: 0 16px 16px; } }
@media (prefers-reduced-motion: reduce) { .seal-glyph svg .draw { animation: none; stroke-dashoffset: 0; } }

/* Fit and finish: balanced headings, readable phone copy, a press you can feel,
   the narrow Fold cover and very wide screens. */
.site-footer .footer-contact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; max-width: none; padding-top: 12px; border-top: 1px dashed var(--line); }
.footer-contact span { margin-right: 4px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; }
.lede, .section-intro, .sidebar .panel > p, .limits-grid p, .format-card p, .dropzone p { text-wrap: pretty; }
.button:active:not(:disabled), .text-button:active:not(:disabled), .tabbar button:active { transform: translateY(1px); }
.button, .text-button { transition: background-color .18s ease-out, border-color .18s ease-out, transform .08s ease-out; }
@media (max-width: 1023px) {
  .small, .checklist small, .file-picker small, .selection-meta, .dropzone .limit-note, .seal-glyph small { font-size: 15px; }
  .panel-footer, .privacy-note, .privacy-note p, .compare-explainer, .panel > p:not(.eyebrow), .sidebar .panel > p:not(.eyebrow), .section-intro, .dropzone p, .notice, .limits-grid p, .format-card p, .status-bar p, #status, #unlocked-summary, dialog p, .result-heading p, .slot-value { font-size: 16px; }
  .site-footer, .site-footer p { font-size: 16px; }
}
@media (max-width: 360px) {
  .topbar { gap: 10px; }
  .brand { gap: 8px; font-size: 15px; letter-spacing: .04em; }
  .brand img { width: 30px; height: 30px; }
  .tabbar { gap: 3px; }
  .tabbar button { padding: 6px 2px; font-size: 13px; }
  .tab-number { font-size: 13px; }
  .panel-heading { gap: 10px; }
  .kicker { letter-spacing: .04em; }
  .dropzone { margin: 0 12px; padding: 20px 12px 16px; }
  .drop-actions .button { flex-basis: 100%; }
  .slot-actions .button { flex: 1 1 100%; }
  .diff-stats strong { font-size: 28px; }
  .diff-stats > div { padding: 10px 12px; }
}
@media (min-width: 2048px) { body { zoom: 1.15; } .topbar { padding-inline: max(16px, calc((100vw / 1.15 - 1248px) / 2)); } }
@media (min-width: 2400px) { body { zoom: 1.3; } .topbar { padding-inline: max(16px, calc((100vw / 1.3 - 1248px) / 2)); } }
@media (min-width: 2880px) { body { zoom: 1.5; } .topbar { padding-inline: max(16px, calc((100vw / 1.5 - 1248px) / 2)); } }
@media (min-width: 3300px) { body { zoom: 1.75; } .topbar { padding-inline: max(16px, calc((100vw / 1.75 - 1248px) / 2)); } }
@media (min-width: 3700px) { body { zoom: 2; } .topbar { padding-inline: max(16px, calc((100vw / 2 - 1248px) / 2)); } }
