/* PrintDrop — editorial "print magazine" look: paper, ink hairlines, one spot blue. */
:root {
  --paper: #F4F1EA;
  --paper-2: #ECE7DC;
  --ink: #111111;
  --ink-2: #3A3A3A;
  --ink-3: #5F5F5F;
  --rule: #111111;
  --rule-soft: #CFC8B8;
  --spot: #1A1AFF;
  --pop: #D84008;
  --spot-ink: #1414CC;
  --spot-wash: #E4E4FB;
  --error: #9E1F23;
  --error-wash: #F6E1DE;
  --font-display: 'Inter','Inter Fallback', system-ui, sans-serif;
  --font-body: 'Inter','Inter Fallback', system-ui, sans-serif;
  --font-ui: 'Inter','Inter Fallback', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { font-family: var(--font-ui); color: var(--ink); background: var(--paper); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body > main { flex: 1; width: 100%; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; border-radius: 0; }
:focus-visible { outline: 2px solid var(--spot); outline-offset: 3px; }
a { color: var(--spot-ink); }

.logo { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 6vw, 64px); line-height: .95; letter-spacing: -0.035em; font-variation-settings: 'opsz' 144; color: var(--ink); text-decoration: none; }
.logo { display: inline-flex; align-items: center; }
.logo img { flex: none; width: 40px; height: 40px; margin-right: 14px; border-radius: 0; }
.phone-shell > .logo { display: flex; }
.phone-shell > .logo img { width: 36px; height: 36px; margin-right: 12px; }
.logo::after { content: '.'; color: var(--pop); }
.kicker, .bar-line { margin: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.kicker { color: var(--spot-ink); margin-bottom: 14px; }

/* Desk masthead */
.bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 24px; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 40px 14px; border-bottom: 1px solid var(--rule); box-shadow: 0 4px 0 -3px var(--rule); }
.bar-line { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.bar-status { color: var(--ink-3); }
.is-active .bar-status { color: var(--spot-ink); font-weight: 700; }
.bar .text-button { padding-bottom: 6px; }

.desk-surface { max-width: 1180px; margin: 0 auto; padding: 48px 40px 40px; }
.desk-note { margin: 24px 0 0; font-family: var(--font-body); font-style: italic; color: var(--ink-2); font-size: 16px; }

/* The panel */
.sheet { position: relative; background: var(--paper); border: 1px solid var(--rule); padding: 44px; }
.crop { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.crop::before, .crop::after { content: ''; position: absolute; background: var(--ink); }
.crop::before { width: 18px; height: 1px; }
.crop::after { width: 1px; height: 18px; }
.crop.tl { top: -26px; left: -26px; } .crop.tl::before { bottom: 0; right: 0; } .crop.tl::after { right: 0; bottom: 0; }
.crop.tr { top: -26px; right: -26px; } .crop.tr::before { bottom: 0; left: 0; } .crop.tr::after { left: 0; bottom: 0; }
.crop.bl { bottom: -26px; left: -26px; } .crop.bl::before { top: 0; right: 0; } .crop.bl::after { right: 0; top: 0; }
.crop.br { bottom: -26px; right: -26px; } .crop.br::before { top: 0; left: 0; } .crop.br::after { left: 0; top: 0; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
h1 { margin: 0; font-size: clamp(34px, 5vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; font-variation-settings: 'opsz' 144; max-width: 16ch; }
h2 { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; }
h3 { margin: 0; font-size: 18px; font-weight: 700; }

.sheet-empty { min-height: 380px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.sheet-empty p:not(.kicker) { max-width: 58ch; margin: 20px 0 32px; font-family: var(--font-body); color: var(--ink-2); font-size: 20px; line-height: 1.45; }

.button { min-height: 52px; padding: 0 28px; border: 1px solid var(--pop); background: var(--pop); color: #fff; font-family: var(--font-ui); font-weight: 600; font-size: 16px; letter-spacing: .01em; cursor: pointer; }
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--pop); }
.button:disabled, .button:disabled:hover { background: transparent; border-color: var(--rule-soft); color: var(--ink-3); cursor: not-allowed; }
.button.wide { width: 100%; }
.text-button { min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--ink); font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; cursor: pointer; }
.text-button:hover { color: var(--spot-ink); }

/* Live session: QR panel on the left, ledger on the right */
.sheet-live { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; animation: fade .4s ease-out both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qr-block { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; border: 1px solid var(--rule); border-top-width: 6px; background: var(--paper-2); }
/* QR stays black-on-white; the white padding is the quiet zone. */
.qr { align-self: center; width: 262px; height: 262px; padding: 20px; background: #fff; border: 1px solid var(--rule); }
.qr canvas, .qr img { display: block; width: 220px !important; height: 220px !important; image-rendering: pixelated; }
.qr-hint { margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; text-align: center; }
.qr-sub { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center; color: var(--ink-2); }
.qr-block > .text-button { align-self: center; }

.inbox { min-width: 0; display: flex; flex-direction: column; }
.inbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--rule); }
.timer { font-family: var(--font-mono); color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inbox .file-list { flex: 1; max-height: 380px; overflow: auto; }
.inbox-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.inbox-status { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-mono); color: var(--ink-2); font-size: 13px; }
.inbox-status.is-direct { color: var(--spot-ink); font-weight: 700; }
.sent-list { margin-top: 32px; }
.sent-list h3 { padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.nearby { width: 100%; margin-top: 12px; }
.nearby h3 { padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 16px; }
.nearby-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.nearby-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.nearby-name small { display: block; font-family: var(--font-mono); color: var(--ink-3); font-weight: 400; font-size: 12px; }
.nearby-empty { margin: 0; padding: 10px 0; font-family: var(--font-body); font-style: italic; color: var(--ink-2); font-size: 15px; }
.name-field { display: block; margin-bottom: 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.name-field input { display: block; width: 100%; margin-top: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 0; background: #fff; font-family: var(--font-ui); font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--ink); }
#deskList { border-top: 2px solid var(--rule); }

.dot { width: 9px; height: 9px; flex: none; border-radius: 50%; border: 1px solid var(--ink); background: transparent; }
.is-active .dot, .is-direct .dot { background: var(--spot); border-color: var(--spot); }

/* File rows: a ruled ledger, shared by desk and phone */
.file-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.file-type { width: 48px; flex: none; padding: 6px 0; border: 1px solid var(--rule); text-align: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.file-meta { flex: 1; min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 16px; }
.file-size { display: block; margin-top: 2px; font-family: var(--font-mono); color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-empty { margin: 0; padding: 36px 0; font-family: var(--font-body); font-style: italic; font-size: 18px; color: var(--ink-2); }
.download-file-button { min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--ink); font-family: var(--font-ui); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.download-file-button:hover { background: var(--ink); color: var(--paper); }
.download-file-button:disabled { opacity: .5; cursor: default; }
.download-file-button:disabled:hover { background: transparent; color: var(--ink); }
a.download-file-button { display: inline-flex; align-items: center; text-decoration: none; }
.file-remove { width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--ink-2); font-size: 24px; line-height: 1; cursor: pointer; }
.file-remove:hover { color: var(--error); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 5; max-width: calc(100vw - 32px); padding: 12px 18px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 13px; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Colophon */
.colophon { max-width: 1180px; width: 100%; margin: 0 auto; padding: 16px 40px 28px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.colophon p { margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
.colophon a { color: var(--spot-ink); text-underline-offset: 3px; }

/* Customer phone */
.phone-shell { max-width: 540px; margin: 0 auto; padding: 24px 20px 32px; }
.phone-shell > .logo { font-size: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); box-shadow: 0 4px 0 -3px var(--rule); }
.phone-shell > .kicker { margin: 10px 0 36px; color: var(--ink-2); }
.phone-sheet { padding: 32px 24px 28px; }
.phone-sheet h1 { font-size: 36px; }
.route { display: flex; align-items: center; gap: 10px; margin: 14px 0 24px; font-family: var(--font-mono); color: var(--ink-2); font-size: 13px; }
.route.is-direct { color: var(--spot-ink); font-weight: 700; }
.tray { width: 100%; min-height: 128px; padding: 20px; border: 1px dashed var(--rule); background: #fff; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; }
.tray::after { content: 'PDF · images · Office · text'; display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.tray:hover { border-style: solid; border-color: var(--spot); color: var(--spot-ink); }
.phone .file-list { margin: 8px 0 20px; max-height: 300px; overflow: auto; }
.is-uploading .tray, .is-uploading .file-remove { opacity: .45; pointer-events: none; }
.upload-progress { margin-bottom: 16px; }
.progress-track { height: 14px; border: 1px solid var(--rule); background: #fff; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--spot); transition: width .15s; }
.upload-progress > span { display: block; margin-top: 8px; font-family: var(--font-mono); color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.upload-result { margin-top: 16px; padding: 16px 16px 16px 18px; border: 1px solid; border-left-width: 6px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.upload-result.success { border-color: var(--spot); background: var(--spot-wash); color: var(--ink); }
.upload-result.error { border-color: var(--error); background: var(--error-wash); color: var(--error); }
.fine { margin: 24px 0 0; font-family: var(--font-body); font-style: italic; color: var(--ink-2); font-size: 15px; }
.phone .colophon { max-width: 540px; padding: 0 20px 24px; }

@media (max-width: 860px) {
  .bar { padding: 20px 20px 12px; }
  .bar-line { margin-left: 0; width: 100%; padding-bottom: 0; }
  .desk-surface { padding: 32px 20px 32px; }
  .sheet { padding: 28px 20px; }
  .sheet-live { grid-template-columns: 1fr; gap: 32px; }
  .crop { display: none; }
  .colophon { padding: 12px 20px 24px; }
}
@media (max-width: 420px) {
  .phone-shell { padding: 18px 16px 28px; }
  .phone-sheet { padding: 24px 16px; }
  .phone-sheet h1 { font-size: 30px; }
  .phone .colophon { padding: 0 16px 20px; }
  .qr-block { padding: 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-live { animation: none; }
  .toast, .progress-track span { transition: none; }
}

/* Developer skin */
.desk-note { font-style: normal; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; }
