/* ═══════════════════════════════════════════════════════════════
   DocScanner — v1.9 (2026-06-03)
   "paper in → document out" — a sibling to Forms.
   Builds entirely on pane.css tokens. One stylesheet, both themes.
   Two surfaces share this file:
     A · the Tools-sheet detail view (desktop pane, ~360px)
     B · the mobilescan.rplay.be PWA (phone width)
   ═══════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   A · PANE SIDE — DocScanner detail inside the v1.7 Tools sheet
   ════════════════════════════════════════════════════════════════ */

.ds-detail { display: flex; flex-direction: column; gap: var(--md); padding-top: 2px; }

/* one-line value prop */
.ds-prop {
  font-size: var(--t-base); line-height: 1.5; color: var(--text);
}
.ds-prop b { color: var(--text-hi); font-weight: 650; }

/* 1·2·3 how it works */
.ds-steps { display: flex; flex-direction: column; gap: 2px; }
.ds-step { display: flex; align-items: flex-start; gap: 11px; padding: 7px 0; }
.ds-step .n {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip-tint); color: var(--orb-blue);
  font-size: var(--t-xs); font-weight: 800; font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.ds-step .st { min-width: 0; }
.ds-step .st-t { display: block; font-size: var(--t-base); font-weight: 650; color: var(--text-hi); }
.ds-step .st-s { display: block; font-size: var(--t-sm); color: var(--text-mid); line-height: 1.45; margin-top: 1px; }

/* QR block — the centrepiece */
.ds-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: var(--md);
  padding: var(--lg) var(--md) var(--md);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg-surface);
}
.ds-qr-card {
  background: #fff; border-radius: var(--r-md);
  padding: 14px; line-height: 0;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.35);
  position: relative;
}
.ds-qr-card svg { display: block; }
/* fade + small re-scramble when refreshing */
.ds-qr-card.refreshing { animation: qrPulse 0.5s var(--ease); }
@keyframes qrPulse { 0% { opacity: 1; } 40% { opacity: 0.25; transform: scale(0.97); } 100% { opacity: 1; transform: none; } }

.ds-url {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: var(--t-sm); font-weight: 600;
  color: var(--text-hi); letter-spacing: 0.01em;
}
.ds-url svg { width: 13px; height: 13px; color: var(--orb-blue); }

/* "expires in ~5 min — tap to refresh" */
.ds-expiry {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: var(--t-xs); color: var(--text-low);
  padding: 4px 8px; border-radius: var(--r-full); transition: color 0.15s, background 0.15s;
}
.ds-expiry:hover { color: var(--orb-blue); background: var(--chip-tint); }
.ds-expiry svg { width: 12px; height: 12px; }
.ds-expiry .t { font-variant-numeric: tabular-nums; font-family: var(--mono); }
.ds-expiry.stale { color: var(--warn); }

/* constraints — quiet, legible facts (not a card) */
.ds-facts { display: flex; flex-direction: column; gap: 8px; }
.ds-fact { display: flex; align-items: center; gap: 9px; font-size: var(--t-sm); color: var(--text-mid); }
.ds-fact svg { width: 15px; height: 15px; color: var(--orb-blue); flex-shrink: 0; opacity: 0.85; }
.ds-fact b { color: var(--text); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════
   B · MOBILE PWA — mobilescan.rplay.be
   Phone-framed for review; the .scan shell is what ships.
   ════════════════════════════════════════════════════════════════ */

/* device frame (review chrome only — not shipped) */
.stage {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 40px; flex-wrap: wrap;
  padding: 80px 24px 40px;
}
.device {
  width: 390px; height: 844px; flex-shrink: 0;
  border-radius: 54px; padding: 13px;
  background: linear-gradient(150deg, #1c1f27, #0a0b0f);
  box-shadow: 0 0 0 2px #2a2d36, 0 40px 90px -20px rgba(0,0,0,0.8), inset 0 0 2px rgba(255,255,255,0.2);
  position: relative;
}
.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 42px; overflow: hidden;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
}
.statusbar {
  flex-shrink: 0; height: 46px; padding: 0 28px 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--text-hi);
  position: relative; z-index: 30; background: transparent;
}
.statusbar .island { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 108px; height: 30px; border-radius: 16px; background: #000; }
.statusbar .icons { display: flex; align-items: center; gap: 6px; }
.statusbar .icons svg { display: block; }

/* ── the PWA shell (ships) ── */
.scan {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(125% 70% at 50% -8%, rgba(45,209,167,0.10), transparent 60%),
    var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
}
body.theme-light-bg .scan {
  background: radial-gradient(125% 70% at 50% -8%, rgba(22,192,154,0.12), transparent 60%), var(--bg-deep);
}

/* brand bar */
.scan-top {
  flex-shrink: 0; height: 52px; padding: 0 18px;
  display: flex; align-items: center; gap: 9px;
}
.scan-logo { height: 22px; width: auto; display: none; }
[data-theme="dark"] .scan-logo.dark { display: block; }
[data-theme="light"] .scan-logo.light { display: block; }
.scan-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orb-blue);
  padding: 3px 7px; border-radius: 4px;
  background: color-mix(in srgb, var(--orb-blue) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--orb-blue) 28%, transparent);
  line-height: 1;
}
.scan-top .spacer { flex: 1; }
.scan-top .net {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-low);
}
.scan-top .net svg { width: 13px; height: 13px; }
.scan-top .net.off { color: var(--warn); }

/* state host */
.scan-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.ms-state { display: none; flex: 1; min-height: 0; flex-direction: column; }
.ms-state.active { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .ms-state.active { animation: msIn 0.3s var(--ease); }
}
@keyframes msIn { from { transform: translateY(7px); } to { transform: none; } }

/* generic centred hero column (ready / pairing / offline / done / error) */
.ms-hero {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px 28px;
  gap: 4px;
}
.ms-hero .ms-art {
  width: 96px; height: 96px; border-radius: 28px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--chip-tint);
  border: 1px solid color-mix(in srgb, var(--orb-blue) 26%, transparent);
  color: var(--orb-blue);
}
.ms-hero .ms-art svg { width: 44px; height: 44px; }
.ms-hero .ms-art.warn { background: color-mix(in srgb, var(--warn) 13%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.ms-hero .ms-art.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 32%, transparent); color: var(--bad); }
.ms-hero .ms-art.ok { background: var(--grad-orb); border-color: transparent; color: var(--on-accent); box-shadow: 0 12px 34px -8px rgba(45,209,167,0.5); }

.ms-h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-hi); line-height: 1.18; }
.ms-sub { margin-top: 11px; max-width: 280px; font-size: 14.5px; line-height: 1.55; color: var(--text-mid); text-wrap: pretty; }
.ms-sub b { color: var(--text); font-weight: 650; }
.ms-mask { font-family: var(--mono); color: var(--text-hi); font-weight: 600; }

/* big primary action (camera / send / retry) — large tap target */
.ms-cta {
  width: 100%; min-height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: var(--r-md);
  background: var(--grad-orb); color: var(--on-accent);
  font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(45,209,167,0.55);
  transition: transform 0.14s var(--ease), box-shadow 0.14s, filter 0.14s;
}
.ms-cta:hover { filter: brightness(1.05); }
.ms-cta:active { transform: translateY(1px); }
.ms-cta svg { width: 21px; height: 21px; }
.ms-cta.ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; min-height: 50px; font-size: 15px; }
.ms-cta.ghost:hover { background: var(--bg-raised); color: var(--text-hi); }

/* sticky footer area for actions in hero states */
.ms-foot { flex-shrink: 0; padding: 14px 22px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.ms-foot .ms-note { text-align: center; font-size: 12px; color: var(--text-low); line-height: 1.4; }

/* page-counter context chip (ready state) */
.ms-context {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px;
  padding: 6px 13px; border-radius: var(--r-full);
  background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-mid); font-weight: 600;
}
.ms-context svg { width: 14px; height: 14px; color: var(--orb-blue); }

/* Add to Home Screen nudge */
.ms-a2hs {
  display: flex; align-items: center; gap: 11px;
  margin: 0 22px 12px; padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-surface); border: 1px solid var(--border);
}
.ms-a2hs .ic { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--chip-tint); color: var(--orb-blue); }
.ms-a2hs .ic svg { width: 18px; height: 18px; }
.ms-a2hs .tx { flex: 1; min-width: 0; }
.ms-a2hs .tx .t { display: block; font-size: 13px; font-weight: 700; color: var(--text-hi); }
.ms-a2hs .tx .s { display: block; font-size: 11.5px; color: var(--text-mid); line-height: 1.35; margin-top: 1px; }
.ms-a2hs .x { border: none; background: transparent; color: var(--text-low); cursor: pointer; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); flex-shrink: 0; }
.ms-a2hs .x:hover { background: var(--bg-raised); color: var(--text-hi); }
.ms-a2hs .x svg { width: 15px; height: 15px; }

/* ── 5 · CAPTURE — camera viewfinder ── */
.ms-cap { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #05070d; }
.ms-vf {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  margin: 12px; border-radius: var(--r-lg);
  /* faux paper-on-desk so the frame reads as a live camera */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%),
    repeating-linear-gradient(115deg, #11151d, #11151d 22px, #0e1219 22px, #0e1219 44px);
}
/* the "page" the camera has found */
.ms-page {
  position: absolute; left: 13%; top: 12%; right: 13%; bottom: 14%;
  border-radius: 6px;
  background: linear-gradient(160deg, #f5f6f4, #e7e9e6);
  box-shadow: 0 18px 50px -10px rgba(0,0,0,0.6);
  overflow: hidden;
}
.ms-page::before {
  content: ''; position: absolute; inset: 14% 14% 40%;
  background: repeating-linear-gradient(transparent, transparent 11px, rgba(20,30,55,0.14) 11px, rgba(20,30,55,0.14) 12px);
}
.ms-page::after {
  content: ''; position: absolute; left: 14%; right: 38%; top: 8%;
  height: 9px; border-radius: 3px; background: rgba(20,30,55,0.22);
}
/* auto-edge detect outline */
.ms-edge {
  position: absolute; inset: 9% 9% 10%;
  border: 2.5px solid var(--grad-orb); border-radius: 8px;
  box-shadow: 0 0 0 100vmax rgba(5,7,13,0.28);
  animation: edgePulse 1.8s var(--ease) infinite;
}
@keyframes edgePulse { 0%,100% { opacity: 0.85; } 50% { opacity: 0.45; } }
/* corner brackets */
.ms-corners i { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(255,255,255,0.85); }
.ms-corners i:nth-child(1) { top: 18px; left: 18px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.ms-corners i:nth-child(2) { top: 18px; right: 18px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.ms-corners i:nth-child(3) { bottom: 18px; left: 18px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.ms-corners i:nth-child(4) { bottom: 18px; right: 18px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

/* top overlay: page counter + edge hint */
.ms-vf-top {
  position: absolute; top: 14px; left: 0; right: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ms-counter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(5,7,13,0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255,255,255,0.14);
}
.ms-counter .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad-orb); box-shadow: 0 0 8px var(--grad-orb); }
.ms-edge-hint {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--ok) 22%, rgba(5,7,13,0.55));
  color: #fff; font-size: 11.5px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent);
}
.ms-edge-hint svg { width: 13px; height: 13px; }

/* bottom overlay: guidance + shutter row */
.ms-vf-guide {
  position: absolute; left: 0; right: 0; bottom: 96px; z-index: 4;
  text-align: center; color: rgba(255,255,255,0.82);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.ms-shutter-row {
  flex-shrink: 0; height: 112px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 26px calc(8px + env(safe-area-inset-bottom));
}
.ms-shutter {
  justify-self: center;
  width: 74px; height: 74px; border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.92); background: transparent;
  cursor: pointer; display: grid; place-items: center;
  transition: transform 0.1s;
}
.ms-shutter::after { content: ''; width: 56px; height: 56px; border-radius: 50%; background: #fff; transition: transform 0.1s, background 0.1s; }
.ms-shutter:active::after { transform: scale(0.86); background: var(--grad-orb); }
.ms-cap-x, .ms-cap-done {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08);
  color: #fff; cursor: pointer; display: grid; place-items: center;
}
.ms-cap-x svg, .ms-cap-done svg { width: 21px; height: 21px; }
.ms-cap-x { justify-self: start; }
.ms-cap-done { justify-self: end; position: relative; }
.ms-cap-done .mini-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-full);
  background: var(--grad-orb); color: var(--on-accent);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid #05070d; font-variant-numeric: tabular-nums;
}

/* ── 6 · REVIEW pages ── */
.ms-review { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ms-rv-head { flex-shrink: 0; padding: 6px 22px 12px; }
.ms-rv-head .t { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-hi); }
.ms-rv-head .s { font-size: 13px; color: var(--text-mid); margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.ms-rv-head .s .max { color: var(--warn); font-weight: 700; display: none; align-items: center; gap: 4px; }
.ms-rv-head .s .max svg { width: 13px; height: 13px; }
.ms-review.full .s .count { display: none; }
.ms-review.full .s .max { display: inline-flex; }

.ms-thumbs {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 4px 18px 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  align-content: start;
}
.ms-thumb {
  position: relative; aspect-ratio: 3/4; border-radius: var(--r-md);
  background: linear-gradient(160deg, #f7f8f6, #e6e8e5);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.4);
  overflow: hidden; cursor: grab;
  border: 1px solid var(--border);
}
.ms-thumb::before { content: ''; position: absolute; inset: 16% 14% 30%; background: repeating-linear-gradient(transparent, transparent 8px, rgba(20,30,55,0.12) 8px, rgba(20,30,55,0.12) 9px); }
.ms-thumb .pg { position: absolute; top: 7px; left: 7px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: var(--r-full); background: rgba(5,7,13,0.72); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; z-index: 2; }
.ms-thumb .ops { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 5px; z-index: 2; }
.ms-thumb .ops button { width: 30px; height: 30px; border-radius: 8px; border: none; background: rgba(5,7,13,0.74); color: #fff; cursor: pointer; display: grid; place-items: center; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ms-thumb .ops button svg { width: 15px; height: 15px; }
.ms-thumb .ops button.del:hover { background: var(--bad); }
.ms-thumb.dragging { opacity: 0.5; cursor: grabbing; }
/* "add page" tile */
.ms-thumb.add {
  background: transparent; border: 1.5px dashed var(--border-strong);
  display: grid; place-items: center; cursor: pointer; box-shadow: none;
  color: var(--orb-blue);
}
.ms-thumb.add::before { display: none; }
.ms-thumb.add:hover { border-color: var(--orb-blue); background: var(--chip-tint); }
.ms-thumb.add .inner { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.ms-thumb.add .inner svg { width: 22px; height: 22px; }
.ms-thumb.add.locked { opacity: 0.4; pointer-events: none; }

.ms-rv-foot { flex-shrink: 0; padding: 12px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg-surface); }

/* ── 7 · SENDING progress ── */
.ms-prog { width: 100%; max-width: 260px; margin-top: 22px; }
.ms-prog-bar { height: 7px; border-radius: var(--r-full); background: var(--bg-raised); overflow: hidden; }
.ms-prog-bar i { display: block; height: 100%; width: 0%; border-radius: var(--r-full); background: var(--grad-orb); transition: width 0.3s var(--ease); }
.ms-prog-steps { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--text-low); font-weight: 600; }
.ms-prog-steps span.on { color: var(--orb-blue); }
.ms-leave { margin-top: 18px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-mid); }
.ms-leave svg { width: 14px; height: 14px; color: var(--orb-blue); }

/* spinner reused */
.ms-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--orb-blue); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* preserved-pages note on error */
.ms-preserved {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 8px 13px; border-radius: var(--r-md);
  background: var(--chip-tint); border: 1px solid color-mix(in srgb, var(--orb-blue) 28%, transparent);
  color: var(--orb-blue); font-size: 12.5px; font-weight: 600;
}
.ms-preserved svg { width: 15px; height: 15px; }

/* ════════════════════════════════════════════════════════════════
   v1.10 · TWO-QR PAIRING
   ════════════════════════════════════════════════════════════════ */

/* ── A · pane · 2-step stepper (Get the app / Link your phone) ── */
.ds-stepper {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 4px;
}
.ds-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; background: transparent; color: var(--text-mid);
  font-family: var(--font); font-size: var(--t-sm); font-weight: 650;
  padding: 7px 8px; border-radius: var(--r-full); cursor: pointer; white-space: nowrap;
  transition: background 0.16s, color 0.16s;
}
.ds-tab .sn {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  background: var(--border-strong); color: var(--bg-surface);
}
.ds-tab.on { background: var(--bg-surface); color: var(--text-hi); box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.ds-tab.on .sn { background: var(--grad-orb); color: var(--on-accent); }
.ds-tab.done .sn { background: var(--ok); color: var(--on-accent); }

.ds-pane-step { display: none; flex-direction: column; gap: var(--md); }
.ds-pane-step.on { display: flex; }
.ds-step-lead { font-size: var(--t-sm); color: var(--text-mid); line-height: 1.5; text-align: center; padding: 0 4px; text-wrap: pretty; }
.ds-step-lead b { color: var(--text-hi); font-weight: 650; }

/* "never expires" — calm neutral, NOT a countdown (step 1 only) */
.ds-noexpire { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--text-low); }
.ds-noexpire svg { width: 13px; height: 13px; color: var(--orb-blue); }

/* shortcut: returning users jump straight to step 2 */
.ds-jump {
  align-self: center; border: none; background: transparent;
  color: var(--orb-blue); font-family: var(--font); font-size: var(--t-sm); font-weight: 650;
  cursor: pointer; padding: 6px 12px; border-radius: var(--r-full); transition: background 0.15s;
}
.ds-jump:hover { background: var(--chip-tint); }

/* ── B · PWA · in-app QR scanner (Link to Outlook) + manual code ── */
/* the scanner surface (.ms-cap) is a dark "camera" in BOTH themes → fixed light-on-dark text */
.ms-linkhead { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px; }
.ms-linkhead .lk-back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.07); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.ms-linkhead .lk-back svg { width: 19px; height: 19px; }
.ms-linkhead .lk-t { font-size: 17px; font-weight: 700; color: #fff; }

/* centred QR reticle for the scanner (vs. the document edge outline) */
.ms-qr-reticle { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; }
.ms-qr-reticle .box { position: relative; width: 62%; aspect-ratio: 1; }
.ms-qr-reticle .box i { position: absolute; width: 36px; height: 36px; border: 3px solid #fff; }
.ms-qr-reticle .box i:nth-child(1) { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 9px 0 0 0; }
.ms-qr-reticle .box i:nth-child(2) { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 9px 0 0; }
.ms-qr-reticle .box i:nth-child(3) { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 9px; }
.ms-qr-reticle .box i:nth-child(4) { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 9px 0; }
.ms-scanline { position: absolute; left: 8%; right: 8%; top: 20%; height: 2.5px; border-radius: 2px; background: var(--grad-orb); box-shadow: 0 0 14px var(--grad-orb); }
@media (prefers-reduced-motion: no-preference) { .ms-scanline { animation: scanline 2.2s var(--ease) infinite; } }
@keyframes scanline { 0%,100% { top: 20%; } 50% { top: 76%; } }

.ms-link-foot { flex-shrink: 0; padding: 14px 22px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 11px; }
.ms-codelink { border: none; background: transparent; color: rgba(255,255,255,0.72); font-family: var(--font); font-size: 13px; font-weight: 650; cursor: pointer; padding: 6px; }
.ms-codelink:hover { color: var(--orb-cyan); }
.ms-code { display: none; flex-direction: column; gap: 10px; }
.ms-code.on { display: flex; }
.ms-code .ms-note { color: rgba(255,255,255,0.5); }
.ms-code-row { display: flex; gap: 9px; }
.ms-code-input {
  flex: 1; height: 52px; text-align: center; letter-spacing: 0.34em;
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--r-md);
  background: rgba(255,255,255,0.08); color: #fff;
  font-family: var(--mono); font-size: 19px; font-weight: 600; text-transform: uppercase; outline: none;
}
.ms-code-input:focus { border-color: var(--orb-cyan); }
.ms-code-input::placeholder { color: rgba(255,255,255,0.4); letter-spacing: 0.18em; }
.ms-code-go { width: 52px; flex-shrink: 0; border: none; border-radius: var(--r-md); background: var(--grad-orb); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; }
.ms-code-go svg { width: 21px; height: 21px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* install hint chip on the "browser / not installed" hero */
.ms-installrow { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 7px 13px; border-radius: var(--r-full); background: var(--chip-tint); border: 1px solid color-mix(in srgb, var(--orb-blue) 26%, transparent); color: var(--orb-blue); font-size: 12.5px; font-weight: 650; }
.ms-installrow svg { width: 15px; height: 15px; }

/* ════════════════════════════════════════════════════════════════
   Cross-surface review harness (top control bar) — not shipped
   ════════════════════════════════════════════════════════════════ */
.ctl {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 80;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: rgba(20,28,42,0.92); border: 1px solid #2a3340; border-radius: 999px;
  padding: 6px 8px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  max-width: calc(100vw - 28px);
}
body.theme-light-bg .ctl { background: rgba(255,255,255,0.9); border-color: rgba(20,30,55,0.12); }
.ctl .lbl { color: #6b7686; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding-left: 6px; }
.ctl .grp { display: inline-flex; border: 1px solid #2a3340; border-radius: 999px; overflow: hidden; }
body.theme-light-bg .ctl .grp { border-color: rgba(20,30,55,0.14); }
.ctl .grp button { border: none; background: transparent; color: #9aa3b2; font-family: var(--font); font-size: 12px; font-weight: 600; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
body.theme-light-bg .ctl .grp button { color: #5e6878; }
.ctl .grp button svg { width: 13px; height: 13px; }
.ctl .grp button.on { background: var(--grad-orb); color: var(--on-accent); }
.ctl a.link { color: #9aa3b2; font-size: 12px; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.ctl a.link:hover { color: var(--orb-blue); }
body.theme-light-bg .ctl a.link { color: #5e6878; }
