/* Archive Desk with encrypted copies. Same family as the browser app page: sage paper, white sheets,
   spruce text, leaf green behind verified things. Archivo for text, Chivo Mono for paths and fingerprints. */
:root {
  --ink: #1c2b22; --ink-soft: #2c4034; --paper: #eef1ec; --surface: #ffffff; --surface-soft: #f5f7f3; --folder: #e3e9e1;
  --line: #d3dbd3; --line-strong: #7b897f; --muted: #4b5a50; --brand: #1c2b22; --brand-soft: #e6ece4; --deep: #1c2b22;
  --seal: #2e6b3c; --seal-soft: #e5f1d6; --steel: #2e6b3c; --leaf: #cfe8a9;
  --added: #2b5a86; --added-soft: #e1eaf3; --amber-soft: #f3ead0; --warning: #6f5400; --stamp: #a3261d; --error: #a3261d; --error-soft: #f8e4e1;
  --radius: 12px; --radius-button: 8px;
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--seal);
  --heading: "Archivo", "Segoe UI", system-ui, sans-serif;
  --body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "Chivo Mono", ui-monospace, Consolas, monospace;
}
html { overflow-x: clip; }
body { background: var(--paper); font: 400 16px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--heading); letter-spacing: -.01em; }
a { text-decoration-color: var(--seal); }

/* Top bar */
.topbar { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.topbar .brand, .topbar .topbar-link { color: var(--ink); }
.topbar .local-badge { font: 400 15px/1.3 var(--body); color: var(--muted); letter-spacing: 0; }
.topbar .topbar-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.sb-logo text { font-family: "Archivo", sans-serif; font-stretch: 112%; }

/* Heading: wide Archivo, then the two ways in */
.shell { max-width: 1360px; padding-top: 44px; }
.page-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 36px; }
.kicker { display: block; margin-bottom: 14px; padding: 0; border: 0; border-radius: 0; background: transparent; font: 600 17px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--seal); }
.preview-label { padding: 4px 12px; border: 0; border-radius: 999px; background: var(--amber-soft); color: #4f3c00; font: 600 14px/1.5 var(--body); letter-spacing: 0; text-transform: none; }
.page-heading h1 { max-width: 16ch; font-size: clamp(38px, 5.4vw, 76px); font-weight: 700; font-stretch: 116%; line-height: 1.02; letter-spacing: -.025em; }
.page-heading .lede { max-width: 50ch; margin-top: 18px; font-size: 19px; color: var(--muted); }
.heading-actions { justify-content: flex-start; }
@media (min-width: 1080px) {
  .page-heading { grid-template-columns: minmax(0, 1fr) 300px; align-items: end; column-gap: 48px; }
  .heading-actions { flex-direction: column; align-items: stretch; }
}

/* Buttons */
.button { border-width: 1.5px; border-radius: var(--radius-button); font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.button.primary:hover:not(:disabled) { border-color: var(--ink-soft); background: var(--ink-soft); }
.button.secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button.secondary:hover:not(:disabled) { border-color: var(--ink); background: var(--surface-soft); }
.text-button { font-weight: 600; text-decoration-color: var(--seal); }
.text-button:hover:not(:disabled) { background: var(--brand-soft); }

/* Steps: a real sequence, down the left on a desktop, across the top below that */
.tabbar { padding: 0; border: 0; }
.tabbar button { border: 0; border-radius: var(--radius-button); background: transparent; color: var(--ink); font: 600 16px/1.2 var(--body); box-shadow: none; }
.tab-number { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1.5px solid var(--line-strong); border-radius: 50%; font: 600 14px/1 var(--body); }
.tabbar button:hover:not([aria-selected=true]) { background: var(--brand-soft); }
.tabbar button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.tabbar button[aria-selected=true] .tab-number { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.tabbar button:focus-visible, .tabbar button[aria-selected=true]:focus-visible { box-shadow: var(--focus); }
@media (min-width: 1080px) {
  .shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .page-heading, .site-footer { grid-column: 1 / -1; }
  .tabbar { grid-column: 1; grid-row: 2 / span 2; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; margin: 0; }
  .tabbar button { justify-content: flex-start; gap: 12px; min-height: 56px; padding: 10px 12px; text-align: left; font-size: 18px; }
  .status-bar { grid-column: 2; margin: 0 0 16px; }
  #workspace { grid-column: 2; min-width: 0; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1079px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: calc(var(--radius-button) + 4px); background: var(--folder); }
  .tabbar button { gap: 8px; min-height: 48px; padding: 6px 6px; }
  .tabbar button:hover:not([aria-selected=true]) { background: rgba(255, 255, 255, .55); }
}

/* Status line */
.status-bar { align-items: center; padding: 10px 16px; border: 0; border-radius: var(--radius-button); background: var(--folder); color: var(--ink); }
.status-bar.done { background: var(--folder); color: var(--ink); }
.status-bar.error { background: var(--error-soft); color: var(--error); }
.status-label { font: 600 14px/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.status-bar.busy .status-label::after { content: ""; }
@media (max-width: 640px) { .status-bar { align-items: flex-start; } }

/* Sheets */
.panel { border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.panel-heading h2, .sidebar h2 { font-size: 24px; font-weight: 700; font-stretch: 108%; }
.eyebrow { font: 600 15px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.dropzone { border: 1.5px dashed var(--ink); border-radius: var(--radius-button); background: var(--surface-soft); }
.dropzone.drag-over { background: var(--seal-soft); border-color: var(--seal); }
.drop-icon, .picker-icon { border: 0; background: transparent; }
.drop-icon svg { width: 32px; height: 32px; }
.dropzone h3 { font-size: 24px; font-weight: 700; font-stretch: 108%; }
.limit-note strong { font-family: var(--body); font-weight: 700; }
.selection-meta span:last-child { font-family: var(--mono); }
.file-picker { border: 1.5px dashed var(--ink); border-radius: var(--radius-button); background: var(--surface-soft); }
.file-picker:hover { background: var(--seal-soft); }
.table-wrap { border-top: 1px solid var(--line); }
th { background: var(--surface-soft); border-top: 0; border-bottom: 1px solid var(--line); font: 600 14px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
td:first-child, td:nth-child(n+2) { font-family: var(--mono); font-size: 14px; }
.empty-row td { background: var(--surface); }
.panel-footer { border-top: 1px solid var(--line); background: transparent; }
.tiny-dot { display: none; }
.build-card label, .protect-card label:not(.file-picker), .field-label { font-weight: 600; }
.build-card input, .protect-card input[type=password] { border: 1.5px solid var(--line-strong); border-radius: var(--radius-button); background: var(--surface); }
.build-card input { font-family: var(--mono); font-size: 16px; }
.build-card input:focus-visible, .protect-card input[type=password]:focus-visible { border-color: var(--seal); }
#created-result, #protected-result, #unlocked-result { border-top: 1px solid var(--line); }
.success-label { gap: 8px; padding: 4px 10px 4px 4px; border: 0; border-radius: 999px; background: var(--seal-soft); font: 600 14px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--seal); }
.success-label > span { border-radius: 50%; background: var(--seal); }
.hash-details summary { font-weight: 600; }
.hash-details code { border-radius: 6px; font-family: var(--mono); }
.checklist li > span { border-radius: 50%; font: 600 14px/1 var(--body); }
.checklist li.done > span { background: var(--seal); border-color: var(--seal); color: var(--surface); }
.result-heading { border: 0; border-radius: var(--radius-button); background: var(--seal-soft); }
.result-heading h3 { font-weight: 700; }
.result-check { border: 0; background: var(--seal); color: var(--surface); font-size: 18px; }
.archive-facts, .diff-stats { border: 0; border-radius: var(--radius-button); background: var(--surface-soft); }
.archive-facts dt { font-weight: 600; }
.archive-facts dd { font-family: var(--mono); }
.diff-stats strong { font: 700 44px/1 var(--heading); font-stretch: 112%; }
.diff-stats > div { border-left-color: var(--line); }
.format-tag { border: 0; border-radius: 4px; background: var(--folder); font: 600 13px/1.4 var(--mono); }
.format-card h3 { font-weight: 700; }
.compare-slot { border: 0; border-radius: var(--radius-button); background: var(--surface-soft); box-shadow: 0 0 0 1px var(--line); }
.input-step { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); font: 600 14px/1 var(--body); }
.slot-value.is-set { font-family: var(--mono); }
.change-badge { border: 0; border-radius: 4px; font: 600 13px/1.6 var(--body); letter-spacing: 0; }
.change-badge.changed { color: #4f3c00; }
.seal-glyph { border: 0; border-radius: var(--radius-button); background: var(--seal-soft); }
.seal-glyph svg { width: 88px; height: 88px; }
.seal-glyph strong { text-transform: none; letter-spacing: 0; font: 600 15px/1.35 var(--body); }
.seal-glyph svg .ring { fill: var(--surface); }
.protection-intro h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; font-stretch: 112%; }
.protection-intro p:last-child { color: var(--muted); }
.protect-card h3 { font-size: 18px; font-weight: 700; }
.protect-card .eyebrow { font-size: 18px; font-weight: 700; color: var(--ink); }
.protect-card .table-wrap { border: 1px solid var(--line); border-radius: var(--radius-button); }
.protection-limits h3 { font-weight: 700; }
.notice.amber { border: 0; border-radius: var(--radius-button); background: var(--amber-soft); color: #4f3c00; }
dialog { border: 0; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(28, 43, 34, .3); }
dialog h2 { font-weight: 700; }
dialog::backdrop { background: rgba(28, 43, 34, .5); }

/* Footer */
.site-footer { margin-top: 64px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .sb-foot { color: var(--ink); }
.site-footer nav { gap: 0 24px; }
.site-footer nav a { font: 600 17px/1.2 var(--body); color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.site-footer .footer-contact { border-top: 1px solid var(--line); }
.footer-contact span { font: 600 14px/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.footer-contact a { font-weight: 500; text-decoration-color: var(--line-strong); }

@media (max-width: 640px) {
  .shell { padding-top: 28px; }
  .page-heading h1 { font-size: clamp(34px, 10vw, 48px); }
  .page-heading .lede { font-size: 17px; }
  .tabbar button { font-size: 15px; gap: 4px; }
  .seal-glyph svg { width: 64px; height: 64px; }
}
@media (max-width: 380px) {
  .tabbar button { padding: 6px 2px; font-size: 13px; }
  .tab-number { width: 24px; height: 24px; font-size: 13px; }
}
