/* Bokio Assistant: compact, single-screen review UI. No framework; tokens on :root. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #1c2129;
  --text-2: #5b6573;
  --text-3: #8b94a1;
  --accent: #3b5bdb;
  --accent-soft: #e8edfd;
  --accent-text: #ffffff;
  --ok: #1f8a4c;
  --ok-soft: #e3f4ea;
  --warn: #b26b00;
  --warn-soft: #fdf1dc;
  --err: #c92a2a;
  --err-soft: #fde8e8;
  --in: #1f8a4c;
  --out: #1c2129;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --radius: 6px;
  --topbar: 44px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #161a20;
    --surface-2: #1d222a;
    --border: #2a3039;
    --border-strong: #3a414c;
    --text: #e6e9ee;
    --text-2: #a3abb7;
    --text-3: #747d8a;
    --accent: #6e8bff;
    --accent-soft: #1e2847;
    --accent-text: #0f1216;
    --ok: #4cc27f;
    --ok-soft: #15291e;
    --warn: #e0a440;
    --warn-soft: #2d2412;
    --err: #ff6b6b;
    --err-soft: #331a1c;
    --in: #4cc27f;
    --out: #e6e9ee;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 13px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); line-height: 1.45; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .6rem; }
small { font-size: .9em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: 0 .3em; border-radius: 3px; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 3px; padding: 0 .3em;
  font-size: .8em; color: inherit; opacity: .75; margin-left: .35em; }
ul { padding-left: 1.2rem; margin: 0 0 .6rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: .8rem 0; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 1.25rem;
  padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 650; letter-spacing: -.01em; color: var(--text); display: flex; align-items: center; gap: .45rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; border-radius: 5px; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.mainnav { display: flex; gap: 2px; height: 100%; }
.mainnav a { display: flex; align-items: center; gap: .4rem; padding: 0 .7rem; color: var(--text-2); border-bottom: 2px solid transparent; }
.mainnav a:hover { color: var(--text); text-decoration: none; }
.mainnav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.count { background: var(--accent); color: var(--accent-text); border-radius: 9px; padding: 0 .45rem; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-actions form { margin: 0; }

/* job progress pills */
.pill { display: inline-flex; align-items: center; gap: .45rem; height: 26px; padding: 0 .6rem; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; color: var(--text-2); white-space: nowrap; position: relative; }
.pill progress { width: 70px; height: 5px; }
.pill.done { color: var(--ok); }
.pill.failed { color: var(--warn); }
details.pill { padding: 0; }
details.pill > summary { list-style: none; cursor: pointer; padding: 0 .6rem; display: flex; align-items: center; gap: .4rem; height: 100%; }
details.pill > summary::-webkit-details-marker { display: none; }
details.pill > ul { position: absolute; right: 0; top: 30px; width: 420px; max-height: 50vh; overflow: auto; margin: 0; padding: .6rem .8rem .6rem 1.6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.12);
  white-space: normal; color: var(--text); font-size: .9rem; }

/* toast */
.toast { position: fixed; z-index: 50; left: 50%; top: calc(var(--topbar) + 8px); transform: translateX(-50%); max-width: min(680px, calc(100vw - 32px));
  background: var(--text); color: var(--bg); padding: .55rem .9rem; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: flex; gap: .8rem; align-items: center; transition: opacity .3s; }
.toast button { background: transparent; border: 0; color: inherit; opacity: .7; padding: 0 .2rem; min-height: 0; font-size: 1.1rem; }
.toast.hide { opacity: 0; pointer-events: none; }

/* ---------- controls ---------- */
button, [role=button], input[type=submit] {
  font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 28px; padding: 0 .75rem;
  border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1; }
button:hover, [role=button]:hover { filter: brightness(1.06); text-decoration: none; }
button:focus-visible, [role=button]:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.secondary, [role=button].secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
button.secondary:hover, [role=button].secondary:hover { background: var(--surface-2); filter: none; }
button.outline, [role=button].outline { background: transparent; color: var(--accent); border-color: var(--accent); }
button.secondary.outline, [role=button].secondary.outline { color: var(--text-2); border-color: var(--border-strong); }
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--surface-2); color: var(--text); filter: none; }
button.approve { background: var(--ok); border-color: var(--ok); color: #fff; }
button.small, [role=button].small { min-height: 24px; padding: 0 .55rem; font-size: .92rem; }
button:disabled, fieldset:disabled button { opacity: .45; cursor: not-allowed; filter: none; }
[aria-busy=true] { pointer-events: none; opacity: .8; }
[aria-busy=true]::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%; min-height: 28px; padding: .25rem .5rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius); }
input[type=file] { font: inherit; }
textarea { min-height: 0; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid] { border-color: var(--err); background: var(--err-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-2); }
label { display: block; color: var(--text-2); font-size: .92rem; margin-bottom: .5rem; }
label > input, label > select, label > textarea { margin-top: .2rem; color: var(--text); font-size: 1rem; }
label:has(> input[type=radio]), label:has(> input[type=checkbox]) { display: inline-flex; align-items: center; gap: .35rem; margin-right: 1rem; color: var(--text); }
fieldset { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; }
progress { accent-color: var(--accent); width: 100%; height: 6px; }

/* ---------- regular pages ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 18px 20px 48px; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .9rem; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }
article { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; margin: 0 0 .9rem; box-shadow: var(--shadow); }
article > header { margin: -.9rem -1rem .8rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: 8px 8px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; align-items: end; }
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.toolbar form { margin: 0; }
.overflow-auto { overflow: auto; }
.muted { color: var(--text-3); }
.warn { color: var(--err); }
.notice { color: var(--warn); }
.ok { color: var(--ok); }
.note { white-space: pre-line; }
form.inline { display: inline; margin: 0; }
details > summary { cursor: pointer; }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-weight: 600; color: var(--text-2); font-size: .88rem; background: var(--surface-2); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.out { color: var(--out); } td.in, .in { color: var(--in); }
.table-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: auto; background: var(--surface); }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: .9rem; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

/* tabs (status filters) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: .8rem; flex-wrap: wrap; }
.tabs a { padding: .4rem .75rem; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs small { color: var(--text-3); }

/* chips */
.chip { display: inline-block; font-size: .82rem; line-height: 1.5; padding: 0 .45rem; border-radius: 4px; background: var(--surface-2);
  color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; font-weight: 500; }
.chip-booked_in_bokio, .chip-booked, .chip-approved { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip-proposed, .chip-match { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip-skipped, .chip-ignored, .chip-unlisted { opacity: .7; }
.chip-correction { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-rule { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* receipts grid */
.receipt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.receipt { margin: 0; padding: .5rem; }
.receipt img, .pdf-thumb { width: 100%; height: 190px; object-fit: cover; border-radius: 4px; display: block; background: var(--surface-2); }
.pdf-thumb { display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: var(--text-3); }
.receipt footer { margin-top: .45rem; font-size: .9rem; word-break: break-word; }
.ext { display: grid; grid-template-columns: auto 1fr; gap: 0 .5rem; margin: .3rem 0 0; font-size: .88rem; }
.ext dt { color: var(--text-3); } .ext dd { margin: 0; }

/* ---------- review workspace ---------- */
body.ws { height: 100vh; overflow: hidden; }
.workspace { height: calc(100vh - var(--topbar)); display: grid; grid-template-columns: 272px minmax(460px, 1fr) minmax(380px, 1.05fr); }
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.pane:last-child { border-right: 0; }
.pane-head { flex: none; display: flex; align-items: center; gap: .5rem; min-height: 38px; padding: .4rem .8rem;
  border-bottom: 1px solid var(--border); background: var(--surface); }
.pane-head .title { font-weight: 600; }
.pane-head .spacer { flex: 1; }
.pane-body { flex: 1; min-height: 0; overflow: auto; }

/* queue */
.queue { background: var(--surface); }
.q-group { padding: .55rem .8rem .25rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3);
  position: sticky; top: 0; background: var(--surface); z-index: 1; display: flex; justify-content: space-between; }
.q-item { display: block; padding: .45rem .8rem .45rem calc(.8rem - 3px); border-left: 3px solid transparent; color: var(--text);
  border-bottom: 1px solid var(--border); }
.q-item:hover { background: var(--surface-2); text-decoration: none; }
.q-item.active { background: var(--accent-soft); border-left-color: var(--accent); }
.q-row { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; }
.q-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.q-amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 550; }
.q-amt.in { color: var(--in); }
.q-meta { color: var(--text-3); font-size: .88rem; gap: .4rem; justify-content: flex-start; margin-top: 1px; }
.q-meta .grow { flex: 1; }
.conf { font-weight: 600; font-size: .82rem; }
.conf-hi { color: var(--ok); } .conf-mid { color: var(--warn); } .conf-lo { color: var(--err); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--border-strong); flex: none; align-self: center; }
.dot.ready { background: var(--accent); } .dot.edited { background: var(--warn); }
.q-empty { padding: 2rem 1rem; text-align: center; color: var(--text-3); }

/* entry editor */
.entry { background: var(--bg); }
.entry .pane-body { padding: .8rem .9rem; display: flex; flex-direction: column; gap: .7rem; }
.tx-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .65rem .8rem; box-shadow: var(--shadow); }
.tx-top { display: flex; align-items: flex-start; gap: .8rem; }
.tx-name { font-size: 1.15rem; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
.tx-desc { color: var(--text-2); overflow-wrap: anywhere; }
.tx-amount { margin-left: auto; font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount small { font-size: .65em; color: var(--text-3); font-weight: 500; }
.facts { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin-top: .4rem; color: var(--text-2); font-size: .92rem; }
.facts b { font-weight: 500; color: var(--text); }

.ai-box { border-radius: 8px; padding: .5rem .75rem; background: var(--accent-soft); border: 1px solid transparent; }
.ai-box.edited { background: var(--surface-2); border-color: var(--border); }
.ai-head { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.ai-head .meta { font-weight: 400; color: var(--text-2); font-size: .9rem; }
.confbar { width: 64px; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.confbar > i { display: block; height: 100%; background: currentColor; }
.reason { margin: .3rem 0 0; color: var(--text-2); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.reason.open { -webkit-line-clamp: unset; }
.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.issues li { padding: .35rem .6rem; border-radius: var(--radius); font-size: .93rem; }
.issues .error { background: var(--err-soft); color: var(--err); }
.issues .warning { background: var(--warn-soft); color: var(--warn); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.entry-fields { display: grid; grid-template-columns: 1fr 140px; gap: .5rem .6rem; padding: .65rem .8rem .2rem; }
.entry-fields .span2 { grid-column: 1 / -1; }
.entry-fields label { margin-bottom: .4rem; }

table.lines { background: transparent; }
table.lines th { background: transparent; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); padding: .35rem .4rem; }
table.lines td { padding: .22rem .4rem; border-bottom: 0; }
table.lines th:first-child, table.lines td:first-child { padding-left: .8rem; }
table.lines th:last-child, table.lines td:last-child { padding-right: .5rem; }
table.lines input { min-height: 26px; padding: .1rem .4rem; }
table.lines .acc { width: 80px; }
table.lines .amt { width: 112px; }
table.lines .amt input { text-align: right; font-variant-numeric: tabular-nums; }
table.lines .acc-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 1px; }
/* The bank line is fixed by the transaction: shown as plain text, not as an editable field. */
table.lines tr.locked input[readonly] { background: var(--surface-2); border-color: transparent; color: var(--text); cursor: default; box-shadow: none; }
table.lines .acc-name.unknown { color: var(--err); }
table.lines .del { width: 26px; }
table.lines .del button { min-height: 22px; width: 22px; padding: 0; opacity: .5; }
table.lines tr:hover .del button { opacity: 1; }
table.lines tfoot td { border-top: 1px solid var(--border); padding-top: .4rem; padding-bottom: .5rem; font-weight: 600; }
.balance { font-size: .9rem; font-weight: 500; }
.add-line { margin: 0 .8rem .2rem; }

details.teach { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
details.teach > summary { padding: .5rem .8rem; font-weight: 600; color: var(--text-2); }
details.teach[open] > summary { border-bottom: 1px solid var(--border); }
details.teach .teach-body { padding: .6rem .8rem; }
details.teach .knowledge { margin: .6rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; }

.actionbar { flex: none; display: flex; align-items: center; gap: .45rem; padding: .55rem .9rem; background: var(--surface); border-top: 1px solid var(--border); }
.actionbar .spacer { flex: 1; }
.actionbar .hint { color: var(--text-3); font-size: .85rem; }
/* Wolt: the month-end entry booked before the payout, shown read-only above the form. */
.card.accrual { padding: .5rem .75rem; }
.accrual-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .25rem 0 .4rem; }
.accrual-head .title { font-weight: 600; }
.accrual-head .spacer { flex: 1; }
.card.accrual table.lines td.num { font-variant-numeric: tabular-nums; text-align: right; }
.booked-banner { display: flex; align-items: center; gap: .5rem; color: var(--ok); font-weight: 600; }

.nav-arrows { display: flex; align-items: center; gap: .2rem; color: var(--text-3); font-size: .9rem; }
.nav-arrows a { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--text-2); }
.nav-arrows a:hover { background: var(--surface-2); text-decoration: none; }
.nav-arrows .off { opacity: .3; pointer-events: none; }

/* receipt viewer */
.receipt-pane { background: var(--surface-2); }
.receipt-pane .pane-head { flex-wrap: wrap; }
.r-facts { display: flex; flex-wrap: wrap; gap: .2rem .9rem; padding: .45rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface); font-size: .92rem; }
.r-facts span { color: var(--text-3); } .r-facts b { font-weight: 550; }
.r-facts .diff { color: var(--err); font-weight: 600; }
.viewer { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 10px; }
/* One .rpage per page (the image, or a PDF page drawn by PDF.js); it is exactly the page's size, so
   the value boxes inside are placed in percent of the page. --fit-h is set by script to the viewer height. */
.viewer .rpage { position: relative; flex: none; max-width: 100%; line-height: 0; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); cursor: zoom-in; }
.viewer .rpage img { display: block; max-width: 100%; max-height: var(--fit-h, none); }
.viewer.zoom { align-items: flex-start; justify-content: flex-start; }
.viewer.zoom .rpage { max-width: none; cursor: zoom-out; }
.viewer.zoom .rpage img { max-width: none; max-height: none; }
/* Column direction: pages stack from the top. Centering them (justify-content: center from .viewer)
   pushes a document taller than the pane above the scroll origin, where it cannot be scrolled to. */
.viewer.pdf { flex-direction: column; justify-content: flex-start; align-items: center; gap: 10px; }
.viewer.pdf .rpage { width: 100%; }
.viewer.pdf.zoom { align-items: flex-start; }
.viewer.pdf.zoom .rpage { width: 200%; }
.viewer.pdf canvas { display: block; width: 100%; height: auto; }
.pdf-loading { margin: auto; }
.viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer.native { padding: 0; }

/* where each extracted value is printed */
.hl { position: absolute; outline: 2px solid var(--hl); outline-offset: 2px; border-radius: 2px; background: var(--hl-soft); pointer-events: auto; cursor: default; --hl: #e8a100; --hl-soft: rgba(232,161,0,.12); }
.hl.diff { --hl: var(--err); --hl-soft: rgba(201,42,42,.12); }
.hl.active { outline-width: 3px; background: rgba(232,161,0,.28); z-index: 2; }
.hl.diff.active { background: rgba(201,42,42,.25); }
.hl.active::after { content: attr(data-label); position: absolute; left: -4px; bottom: calc(100% + 5px); padding: 1px 6px; border-radius: 4px; background: var(--hl); color: #fff; font: 600 12px/1.5 var(--font); white-space: nowrap; }
.no-boxes .hl:not(.active) { display: none; }
.r-facts [data-box].has-box { cursor: default; border-radius: 3px; box-shadow: inset 0 -2px 0 rgba(232,161,0,.55); }
.r-facts [data-box].has-box.active { background: rgba(232,161,0,.18); }
.r-facts .box-toggle { display: inline-flex; align-items: center; gap: .3rem; margin: 0 0 0 auto; color: var(--text-3); font-size: .85rem; cursor: pointer; }
.r-facts .box-toggle input { margin: 0; }
.r-facts .box-status { font-size: .85rem; }
.no-receipt { margin: auto; text-align: center; color: var(--text-3); max-width: 320px; }
.no-receipt .big { font-size: 2rem; opacity: .4; }

.done-state { margin: auto; text-align: center; color: var(--text-2); padding: 3rem 1rem; }
.done-state .big { font-size: 2.6rem; color: var(--ok); }

@media (max-width: 1280px) {
  .workspace { grid-template-columns: 232px minmax(420px, 1fr) minmax(320px, 1fr); }
}
@media (max-width: 1080px) {
  body.ws { overflow: auto; height: auto; }
  .workspace { grid-template-columns: 1fr; height: auto; }
  .queue { display: none; }
  .receipt-pane { height: 80vh; }
  .entry .pane-body { overflow: visible; }
}
@media (max-width: 640px) {
  .mainnav a { padding: 0 .4rem; }
  .topbar { gap: .5rem; padding: 0 8px; overflow-x: auto; }
  .brand span:last-child { display: none; }
  .page { padding: 14px 16px 40px; }
}
.page-head details { position: relative; }
summary[role=button] { list-style: none; }
summary[role=button]::-webkit-details-marker { display: none; }
