/* SafeShare -- Veridico brand: dark teal surfaces, Soft Cream ink, one Bright Orange accent,
   Montserrat for the interface and for tokens, Maitree for the words of the documents. */
:root {
  --night: #0c2827;
  --surface: #123332;
  --raised: #193d3b;
  --soft: #214744;
  --strong: #315251;
  --muted-teal: #4a6b6a;
  --ink: #f9eee7;
  --ink-soft: #f3ddd1;
  --muted: #c3d5d2;
  --muted-2: #a8bfbc;
  --accent: #ff923d;
  --accent-ink: #061b1a;
  --green: #74ab91;
  --coral: #ef9c82;
  --line: rgba(249, 238, 231, 0.14);
  --line-strong: rgba(249, 238, 231, 0.3);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --f-display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --f-body: "Maitree", Georgia, serif;
  --star: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  --top: 64px;

  /* what each kind of finding looks like: on the dark interface (c) and on white paper (f fill, b edge) */
  --c-person: #ffd9be;  --f-person: rgba(255, 196, 150, 0.62);  --b-person: #d98c58;
  --c-org: #daeef3;     --f-org: rgba(150, 206, 220, 0.55);     --b-org: #4f93a3;
  --c-contact: #ef9c82; --f-contact: rgba(239, 156, 130, 0.5);  --b-contact: #c8664a;
  --c-address: #74ab91; --f-address: rgba(116, 171, 145, 0.45); --b-address: #417b65;
  --c-identifier: #a8bfbc; --f-identifier: rgba(74, 107, 106, 0.3); --b-identifier: #4a6b6a;
  --c-money: #ff923d;   --f-money: rgba(255, 146, 61, 0.34);    --b-money: #e0731d;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--surface); font: 600 .85rem var(--f-display); border-radius: 999px; }
.skip:focus { top: 12px; }
#main { min-height: calc(100vh - var(--top)); outline: none; }

/* ------------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center; gap: 24px;
  height: var(--top); padding: 0 24px;
  background: var(--night);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand .sep { width: 1px; height: 26px; background: var(--line-strong); }
.brand .name { font: 400 1.22rem/1 var(--f-display); letter-spacing: -0.02em; white-space: nowrap; }

.steps { display: flex; align-items: center; }
.step {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 4px; border: 0; background: none;
  color: var(--muted-2); font: 500 .84rem/1 var(--f-display); white-space: nowrap;
  cursor: default;
}
.step .node { width: 11px; height: 11px; clip-path: var(--star); background: currentColor; opacity: .5; transition: transform .4s var(--ease), background .3s; }
.step .n { font-variant-numeric: tabular-nums; opacity: .7; }
.step.done { color: var(--ink); cursor: pointer; }
.step.done .node { opacity: 1; }
.step.done:hover .label { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--line-strong); }
.step.now { color: var(--ink); }
.step.now .node { background: var(--accent); opacity: 1; transform: scale(1.45); }
.step.now .label { border-bottom: 2px solid var(--accent); padding-bottom: 4px; margin-bottom: -6px; }
.steps .rule { width: 30px; height: 1px; background: var(--line-strong); margin: 0 10px; }

.privacy { justify-self: end; display: flex; align-items: center; gap: 10px; font: 500 .8rem/1.2 var(--f-display); color: var(--muted); text-align: right; }
.privacy .dot { width: 9px; height: 9px; clip-path: var(--star); background: var(--green); flex: none; }
.privacy.ai .dot { background: var(--accent); }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 2.85rem; padding: .78rem 1.3rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 600 .86rem/1 var(--f-display); white-space: nowrap; text-decoration: none;
  cursor: pointer;
  transition: background .26s var(--ease), color .26s var(--ease), border-color .26s var(--ease), transform .12s var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
}
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--strong); }
.btn.small { min-height: 2.2rem; padding: .5rem .95rem; font-size: .8rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.link {
  border: 0; background: none; padding: 2px 0; cursor: pointer;
  color: var(--ink); font: 600 .84rem/1.4 var(--f-display);
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.link:hover { text-decoration-thickness: 2px; }
.link.quiet { color: var(--muted); text-decoration-color: var(--line-strong); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }

.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
  width: 36px; height: 21px; border-radius: 999px; cursor: pointer;
  background: rgba(249, 238, 231, .12); border: 1px solid var(--line-strong);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--muted-2); transition: transform .3s var(--ease), background .25s;
}
.switch:checked { background: var(--ink); border-color: var(--ink); }
.switch:checked::after { transform: translateX(15px); background: var(--strong); }
.switch:disabled { opacity: .4; cursor: not-allowed; }

.field { width: 100%; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(6, 27, 26, .35); color: var(--ink); font: 400 .92rem/1.3 var(--f-body); }
.field::placeholder { color: var(--muted-2); opacity: .8; }
.field:focus { outline: none; border-color: var(--ink); }

.tok {
  display: inline-flex; align-items: center; max-width: 100%;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(249, 238, 231, .07); border: 1px solid var(--line-strong);
  font: 600 .74rem/1.2 var(--f-display); letter-spacing: .02em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.star { display: inline-block; width: 10px; height: 10px; flex: none; clip-path: var(--star); background: var(--c, var(--ink)); }
.ftype {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 22px; border-radius: 5px;
  font: 700 .58rem/1 var(--f-display); letter-spacing: .04em;
  color: var(--surface); background: var(--muted);
}
.ftype.pdf { background: var(--coral); }
.ftype.word { background: var(--c-org); }
.ftype.powerpoint { background: var(--c-person); }
.ftype.excel { background: var(--green); }
.ftype.image { background: var(--muted-2); }
.ftype.text { background: var(--ink-soft); }

.note { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; font-size: .92rem; line-height: 1.55; }
.note.warn { border-color: rgba(239, 156, 130, .55); background: rgba(239, 156, 130, .07); }
.note b { font-family: var(--f-display); font-weight: 600; }

/* ------------------------------------------------------------------ 1. upload */
.upload {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
  max-width: 1320px; margin: 0 auto;
  padding: clamp(36px, 7vh, 84px) clamp(20px, 4vw, 56px) 28px;
}
.upload h1 { font-size: clamp(2.3rem, 4.1vw, 3.55rem); line-height: 1.05; letter-spacing: -.035em; max-width: 12ch; }
.upload .lede { margin-top: 22px; max-width: 33rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.75; }
.specimen { margin-top: 34px; max-width: 33rem; border-top: 1px solid var(--line); }
.specimen .r { display: grid; grid-template-columns: minmax(0, 1fr) 22px auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specimen .was { font-size: .93rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specimen .arrow { height: 1px; background: var(--line-strong); position: relative; }
.specimen .arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left: 6px solid var(--line-strong); border-right: 0; }
.specimen .is { justify-self: end; }
.specimen .same { font: 500 .78rem/1 var(--f-display); color: var(--muted-2); }
.specimen .num { font: 600 .82rem/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--accent); }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  min-height: 330px; padding: 44px 32px; text-align: center;
  border: 1px dashed rgba(249, 238, 231, .34); border-radius: 24px;
  background: linear-gradient(180deg, rgba(33, 71, 68, .55), rgba(12, 40, 39, .6));
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.drop.over { border-color: var(--accent); border-style: solid; background: rgba(255, 146, 61, .07); }
.drop .big-star { width: 34px; height: 34px; clip-path: var(--star); background: var(--accent); }
.drop h2 { font-size: 1.55rem; letter-spacing: -.02em; }
.drop .acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.drop .kinds { margin-top: 6px; max-width: 30rem; font-size: .86rem; color: var(--muted); line-height: 1.6; }

.batch { max-width: 1320px; margin: 0 auto; padding: 8px clamp(20px, 4vw, 56px) 72px; }
.batch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 0 12px; border-bottom: 1px solid var(--line-strong); }
.batch-head h2 { font-size: 1.3rem; letter-spacing: -.015em; }
.batch-head .sum { font: 500 .84rem var(--f-display); color: var(--muted); }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 120px 90px 34px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fname small { color: var(--muted-2); font-size: .82rem; }
.files .kind, .files .size { font: 500 .8rem var(--f-display); color: var(--muted); }
.files .size { text-align: right; font-variant-numeric: tabular-nums; }
.files .bar { height: 2px; background: var(--line); margin-top: 6px; border-radius: 2px; overflow: hidden; }
.files .bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .2s; }
.files .err { color: var(--coral); font-size: .85rem; }
.scan-opts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 28px; align-items: start; padding-top: 26px; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.opt .switch { margin-top: 3px; }
.opt label { font: 600 .92rem/1.35 var(--f-display); cursor: pointer; }
.opt p { margin-top: 4px; font-size: .88rem; line-height: 1.55; color: var(--muted); }
.scan-opts .go { align-self: center; }

/* ------------------------------------------------------------------ progress */
.progress-view { max-width: 680px; margin: 0 auto; padding: clamp(48px, 10vh, 120px) 24px 64px; }
.progress-view h1 { font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: -.03em; line-height: 1.1; }
.progress-view .now { margin-top: 18px; color: var(--ink-soft); min-height: 1.7em; }
.track { margin-top: 18px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }
.spin { width: 22px; height: 22px; clip-path: var(--star); background: var(--accent); animation: turn 2.4s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.progress-view .head { display: flex; align-items: center; gap: 16px; }

/* ------------------------------------------------------------------ 2. review workbench */
.bench { display: grid; grid-template-columns: 236px minmax(0, 1fr) 412px; height: calc(100vh - var(--top)); }
.docs { border-right: 1px solid var(--line); overflow: auto; padding: 18px 0 24px; }
.docs h2 { padding: 0 18px 10px; font: 500 .8rem var(--f-display); color: var(--muted); }
.doc {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  width: 100%; padding: 10px 18px; border: 0; border-left: 2px solid transparent; background: none; text-align: left; cursor: pointer;
}
.doc:hover { background: rgba(249, 238, 231, .04); }
.doc[aria-current="true"] { background: rgba(249, 238, 231, .07); border-left-color: var(--accent); }
.doc .t { font-size: .9rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc .t small { display: block; font: 500 .74rem/1.4 var(--f-display); color: var(--muted-2); }
.doc .n { font: 600 .76rem var(--f-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.doc .warn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); display: inline-block; margin-left: 6px; }

.stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--night); }
.stage-bar { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.stage-bar .title { min-width: 0; font: 500 .9rem/1.3 var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-bar .title small { color: var(--muted-2); font-weight: 500; margin-left: 8px; }
.stage-bar .spacer { flex: 1; }
.stage-bar .hint { font-size: .82rem; color: var(--muted-2); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); font: 500 .76rem var(--f-display); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 2px; background: var(--f); box-shadow: inset 0 0 0 1.5px var(--b); }
.legend i.kept { background: transparent; box-shadow: none; outline: 1.5px dashed var(--muted-2); outline-offset: -1.5px; }
.stage { flex: 1; overflow: auto; padding: 28px 28px 96px; scroll-behavior: smooth; }
.stage .empty { margin: 80px auto; max-width: 28rem; text-align: center; color: var(--muted); }

.page {
  position: relative; margin: 0 auto 26px;
  width: min(100%, calc(var(--pw, 820px) * var(--zoom, 1)));
  aspect-ratio: var(--w) / var(--h);
  background: #fff; box-shadow: 0 18px 48px rgba(0, 0, 0, .4);
}
.page img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.page .pno { position: absolute; left: 100%; top: 0; margin-left: 10px; font: 500 .72rem var(--f-display); color: var(--muted-2); }
.words, .marks { position: absolute; inset: 0; }
.words { z-index: 1; cursor: text; }
.marks { z-index: 2; pointer-events: none; }
.w { position: absolute; border-radius: 2px; }
.w.sel { background: rgba(255, 146, 61, .38); }
.mk {
  position: absolute; pointer-events: auto; cursor: pointer; border-radius: 2px;
  background: var(--f); box-shadow: inset 0 0 0 1.5px var(--b); mix-blend-mode: multiply;
  transition: background .2s, box-shadow .2s, transform .3s var(--ease);
}
.mk:hover { box-shadow: inset 0 0 0 2.5px var(--b); }
.mk.off { background: transparent; box-shadow: none; outline: 1.5px dashed rgba(18, 51, 50, .55); outline-offset: -1.5px; mix-blend-mode: normal; }
.mk.pulse { animation: pulse 1.4s var(--ease) 2; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 2px var(--b), 0 0 0 6px rgba(255, 146, 61, .45); } }
.c-person { --c: var(--c-person); --f: var(--f-person); --b: var(--b-person); }
.c-org { --c: var(--c-org); --f: var(--f-org); --b: var(--b-org); }
.c-contact { --c: var(--c-contact); --f: var(--f-contact); --b: var(--b-contact); }
.c-address { --c: var(--c-address); --f: var(--f-address); --b: var(--b-address); }
.c-identifier { --c: var(--c-identifier); --f: var(--f-identifier); --b: var(--b-identifier); }
.c-money { --c: var(--c-money); --f: var(--f-money); --b: var(--b-money); }

.textdoc { max-width: 860px; margin: 0 auto; padding: 36px 44px; background: #fff; color: #1d2a29; box-shadow: 0 18px 48px rgba(0, 0, 0, .4); font: 400 .92rem/1.75 var(--f-body); white-space: pre-wrap; word-break: break-word; }
.textdoc mark { color: inherit; border-radius: 2px; background: var(--f); box-shadow: inset 0 0 0 1.5px var(--b); cursor: pointer; }
.textdoc mark.off { background: transparent; box-shadow: none; outline: 1.5px dashed rgba(18, 51, 50, .55); outline-offset: -1.5px; }

/* findings panel */
.findings { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.f-scroll { flex: 1; overflow: auto; padding: 22px 22px 16px; }
.f-head h2 { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.2; }
.f-head p { margin-top: 6px; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer;
  font: 500 .78rem/1 var(--f-display); color: var(--muted);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] .star { background: var(--surface); }
.group { margin-top: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.group-head h3 { flex: 1; font: 600 .86rem/1.3 var(--f-display); }
.group-head .all { font: 500 .76rem var(--f-display); color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.row { border-top: 1px solid var(--line); }
.row-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 9px 0; }
.row .real { min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: 400 .94rem/1.4 var(--f-body); color: var(--ink); overflow-wrap: anywhere; }
.row .real:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.row.off .real { color: var(--muted-2); text-decoration: line-through; text-decoration-color: rgba(168, 191, 188, .5); }
.row.off .tok { opacity: .45; }
.row .tok { cursor: text; border-color: var(--line); }
.row .tok:hover { border-color: var(--ink); }
.row .count { font: 500 .76rem var(--f-display); color: var(--muted-2); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; }
.row .more { width: 26px; height: 26px; }
.row .tok-edit { width: 9.5rem; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--ink); background: var(--night); font: 600 .74rem/1.2 var(--f-display); letter-spacing: .02em; }
.row-extra { padding: 0 0 12px 46px; }
.row-extra .lbl { font: 500 .74rem var(--f-display); color: var(--muted-2); margin-bottom: 6px; }
.forms { display: flex; flex-wrap: wrap; gap: 6px; }
.form-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; }
.form-chip button { border: 0; background: none; color: var(--muted-2); cursor: pointer; padding: 0 4px; font-size: .9rem; line-height: 1; }
.form-chip button:hover { color: var(--ink); }
.add-form { display: flex; gap: 8px; margin-top: 8px; }
.add-form .field { padding: .4rem .65rem; font-size: .85rem; }
.row-extra .meta { margin-top: 10px; font-size: .82rem; color: var(--muted-2); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.row-extra .meta .link { font-size: .78rem; }
.src-ai { color: var(--accent); }

.section { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.section h3 { font: 600 .95rem/1.3 var(--f-display); }
.section > p, .fold-body > p { margin-top: 6px; font-size: .88rem; color: var(--muted); line-height: 1.55; }
.section .line { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.section .line label { font: 600 .88rem/1.3 var(--f-display); cursor: pointer; }
.amounts { margin-top: 12px; }
.amt { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.amt .from { font: 400 .9rem var(--f-body); color: var(--ink-soft); }
.amt .to { font: 600 .84rem var(--f-display); text-align: right; }
.amt .kind { grid-column: 1 / -1; margin-top: -2px; font: 500 .72rem var(--f-display); color: var(--muted-2); }
.amt .arrow { height: 1px; background: var(--line-strong); }
.amts-off .amt .to { color: var(--muted-2); text-decoration: line-through; }
.calc { margin-top: 12px; display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); }
.calc .star { margin-top: 6px; --c: var(--green); }
.keep { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.keep .chip[aria-pressed="false"] { text-decoration: line-through; }
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.style-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: none; cursor: pointer; text-align: left; }
.style-opt:hover { border-color: var(--line-strong); }
.style-opt[aria-pressed="true"] { border-color: var(--ink); background: rgba(249, 238, 231, .05); }
.style-opt .sample { font: 600 .72rem/1 Arial, sans-serif; padding: 4px 6px; border-radius: 2px; }
.style-opt .nm { font: 600 .8rem/1.2 var(--f-display); }
.style-opt .why { font-size: .76rem; line-height: 1.4; color: var(--muted-2); }
.s-yellow_black { background: #fff233; color: #000; }
.s-plain_black { background: #fff; color: #000; }
.s-red_white { background: #fff; color: #bf0000; }
.s-black_white { background: #000; color: #fff; }
.f-foot { border-top: 1px solid var(--line); padding: 14px 22px 18px; background: var(--night); }
.f-foot .sum { font-size: .86rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.f-foot .btn { width: 100%; }
.add-item { display: flex; gap: 8px; margin-top: 12px; }
.add-item select { flex: none; width: auto; }

/* popover */
.pop {
  position: fixed; z-index: 80; width: min(340px, calc(100vw - 24px));
  padding: 16px; border-radius: 14px;
  background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  font-size: .9rem;
}
.pop .q { font: 400 1rem/1.4 var(--f-body); overflow-wrap: anywhere; }
.pop .sub { margin-top: 6px; font: 500 .76rem var(--f-display); color: var(--muted-2); }
.pop .becomes { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pop .becomes .arrow { flex: 1; height: 1px; background: var(--line-strong); }
.pop .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pop .cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.pop .cats button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; font: 500 .82rem var(--f-display); text-align: left; }
.pop .cats button:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ 3. redact results */
.result { max-width: 860px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) 24px 72px; }
.result h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -.03em; line-height: 1.08; }
.result .lede { margin-top: 14px; color: var(--ink-soft); max-width: 40rem; }
.checks { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.checks > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.checks .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.checks .mark svg { width: 14px; height: 14px; }
.checks .ok .mark { background: rgba(116, 171, 145, .18); color: var(--green); }
.checks .bad .mark { background: rgba(239, 156, 130, .16); color: var(--coral); }
.checks h3 { font: 600 1rem/1.35 var(--f-display); }
.checks p { margin-top: 3px; font-size: .9rem; color: var(--muted); }
.checks ul { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; color: var(--ink-soft); }
.per-file { list-style: none; margin: 28px 0 0; padding: 0; }
.per-file li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.per-file .what { font: 500 .78rem var(--f-display); color: var(--muted); text-align: right; }
.result .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem/1 var(--f-display); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.clean { color: var(--green); }
.badge.leak, .badge.unreadable { color: var(--coral); }

/* ------------------------------------------------------------------ 4. code map: the key you keep */
.keyroom { padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 48px) 80px; }
.sheet {
  max-width: 1100px; margin: 0 auto; padding: clamp(28px, 4vw, 56px);
  background: var(--ink); color: var(--surface); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.sheet-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 2px solid var(--surface); }
.sheet h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -.035em; line-height: 1.05; }
.sheet .batch-id { margin-top: 8px; font: 500 .8rem var(--f-display); color: var(--muted-teal); }
.sheet .dl { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet .btn { border-color: rgba(18, 51, 50, .35); color: var(--surface); }
.sheet .btn:hover { border-color: var(--surface); }
.sheet .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sheet .btn.primary:hover { background: var(--surface); border-color: var(--surface); color: var(--ink); }
.sheet .warning { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 16px 18px; border: 1px solid rgba(18, 51, 50, .35); border-radius: 10px; background: rgba(255, 146, 61, .09); font-size: .95rem; line-height: 1.6; }
.sheet .warning::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 5px; clip-path: var(--star); background: var(--accent); }
.sheet .warning b { font-family: var(--f-display); font-weight: 600; }
.sheet h2 { margin-top: 38px; font: 400 1.4rem/1.2 var(--f-display); letter-spacing: -.02em; }
.sheet h2 small { font: 500 .8rem var(--f-display); color: var(--muted-teal); margin-left: 10px; letter-spacing: 0; }
.ktable { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.ktable th { text-align: left; font: 600 .74rem/1.3 var(--f-display); color: var(--muted-teal); padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(18, 51, 50, .3); }
.ktable td { padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(18, 51, 50, .13); vertical-align: top; }
.ktable td.n { font: 500 .82rem var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ktable .tok { background: rgba(18, 51, 50, .06); border-color: rgba(18, 51, 50, .28); color: var(--surface); }
.ktable .also { color: var(--muted-teal); font-size: .84rem; }
.ktable .files-cell { color: var(--muted-teal); font-size: .82rem; }
.ktable .cat-cell { display: flex; align-items: center; gap: 8px; font: 500 .8rem var(--f-display); white-space: nowrap; }
.ktable .star { --c: var(--b-person); }
.ktable .c-person .star { background: var(--b-person); } .ktable .c-org .star { background: var(--b-org); }
.ktable .c-contact .star { background: var(--b-contact); } .ktable .c-address .star { background: var(--b-address); }
.ktable .c-identifier .star { background: var(--b-identifier); }
.moneykey { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 48px); margin-top: 12px; }
.formula { font: 400 1.05rem/1.6 var(--f-body); }
.formula .eq { font: 500 1.6rem/1.2 var(--f-display); letter-spacing: -.01em; margin: 10px 0 4px; }
.formula table { margin-top: 10px; border-collapse: collapse; font-size: .9rem; }
.formula td { padding: 6px 18px 6px 0; border-bottom: 1px solid rgba(18, 51, 50, .13); font-variant-numeric: tabular-nums; }
.formula td:first-child { font: 600 .8rem var(--f-display); }
.hidden-val { letter-spacing: .14em; color: var(--muted-teal); }
.reverse { padding: 18px 20px; border: 1px solid rgba(18, 51, 50, .25); border-radius: 12px; }
.reverse h3 { font: 600 1rem var(--f-display); }
.reverse p { margin-top: 4px; font-size: .88rem; color: var(--muted-teal); }
.reverse form { display: flex; gap: 8px; margin-top: 12px; }
.reverse .field { background: #fff; color: var(--surface); border-color: rgba(18, 51, 50, .35); }
.reverse .field:focus { border-color: var(--surface); }
.reverse .out { margin-top: 12px; font-size: .92rem; }
.reverse .out b { font: 600 1.15rem var(--f-display); font-variant-numeric: tabular-nums; }
.sheet details { margin-top: 34px; border-top: 1px solid rgba(18, 51, 50, .3); padding-top: 14px; }
.sheet summary { cursor: pointer; font: 400 1.25rem/1.3 var(--f-display); letter-spacing: -.015em; }
.sheet summary small { font: 500 .8rem var(--f-display); color: var(--muted-teal); margin-left: 10px; }
.sheet :focus-visible { outline-color: var(--surface); }
.sheet .kept-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.sheet .kept-list span { padding: 4px 10px; border: 1px solid rgba(18, 51, 50, .25); border-radius: 999px; font: 500 .8rem var(--f-display); }

/* ------------------------------------------------------------------ 5. check & download */
.check-bench { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--top)); }
.out-files { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
.out-files .head { padding: 22px 20px 14px; }
.out-files .head h1 { font-size: 1.6rem; letter-spacing: -.025em; line-height: 1.15; }
.out-files .head p { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.out-files .head .btn { margin-top: 16px; width: 100%; }
.out-files .list { flex: 1; overflow: auto; border-top: 1px solid var(--line); }
.out-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.out-row .doc { border-left-width: 2px; }
.out-row .dl-one { margin-right: 12px; }
.out-files .foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.modes { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.modes button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; cursor: pointer; font: 500 .8rem/1 var(--f-display); color: var(--muted); }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.cmp .page { cursor: ew-resize; }
.cmp .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split, 50%)); }
.cmp .after img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cmp .handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; pointer-events: none; }
.cmp .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cmp .tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.cmp .tags span { padding: 5px 9px; border-radius: 6px; font: 600 .7rem/1 var(--f-display); background: rgba(18, 51, 50, .88); color: var(--ink); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 1500px; margin: 0 auto 26px; }
.pair .page { width: 100%; margin: 0; }
.pair .cap { font: 500 .74rem var(--f-display); color: var(--muted-2); margin-bottom: 6px; }
.text-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.text-pair .textdoc { padding: 24px 28px; font-size: .86rem; }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--surface); font: 500 .88rem/1.45 var(--f-display); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: rise .5s var(--ease); }
.toast.err { background: #f6d2c6; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.banner { display: flex; align-items: center; gap: 14px; max-width: 1320px; margin: 18px auto 0; padding: 12px 18px; border: 1px solid rgba(239, 156, 130, .55); border-radius: 12px; background: rgba(239, 156, 130, .08); font-size: .92rem; }
.banner .x { margin-left: auto; }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1240px) {
  .bench { grid-template-columns: 200px minmax(0, 1fr) 360px; }
  .steps .label { display: none; }
  .step.now .label { display: inline; }
}
@media (max-width: 980px) {
  .top { grid-template-columns: 1fr auto; height: auto; min-height: var(--top); padding: 10px 16px; row-gap: 6px; }
  .steps { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; }
  .privacy > span { display: none; }      /* the account button stays */
  .bench, .check-bench { display: block; height: auto; }
  .docs { overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .docs h2 { display: none; }
  #doclist { display: flex; }
  .doc { width: auto; min-width: 210px; flex: none; }
  .stage { max-height: 75vh; padding: 16px; }
  .findings { border-left: 0; border-top: 1px solid var(--line); }
  .out-files .list { max-height: 260px; }
  .upload { grid-template-columns: 1fr; }
  .scan-opts { grid-template-columns: 1fr; }
  .moneykey, .pair, .text-pair { grid-template-columns: 1fr; }
  .page .pno { display: none; }
}
@media (max-width: 640px) {
  .files li { grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .files .kind, .files .size { display: none; }
  .brand img { height: 24px; }
  .stage-bar .hint { display: none; }
  .ktable th:nth-child(3), .ktable td:nth-child(3), .ktable th:nth-child(5), .ktable td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ small additions */
.sheet .link { color: var(--surface); }
.sheet a { color: var(--surface); }
.pair .cap, .text-pair .cap { font: 500 .74rem var(--f-display); color: var(--muted-2); margin: 0 0 6px; }
.stage-bar input[type="range"] { width: 160px; accent-color: var(--accent); }
.out-row .doc .t small { margin-top: 3px; }

/* ------------------------------------------------------------- your own categories */
:root { --c-custom: #d9cff7; --f-custom: rgba(184, 166, 240, 0.42); --b-custom: #8a76d1; }
.c-custom { --c: var(--c-custom); --f: var(--f-custom); --b: var(--b-custom); }

/* ------------------------------------------------------------- findings: tools */
.f-tools { position: sticky; top: -22px; z-index: 2; margin: -22px -22px 18px; padding: 16px 22px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.scope { display: flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(249, 238, 231, .04); }
.scope button { flex: 1; border: 0; border-radius: 999px; padding: 7px 10px; background: none; color: var(--muted); font: 600 .78rem var(--f-display); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.scope button:hover:not(:disabled) { color: var(--ink); }
.scope button[aria-checked="true"] { background: var(--ink); color: var(--surface); }
.scope button:disabled { opacity: .45; cursor: default; }
.scope button span { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.f-search { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.f-search .field { flex: 1; min-width: 0; padding: 7px 11px; font-size: .86rem; }
.f-search .link { white-space: nowrap; font-size: .8rem; }
.f-head .in-doc { margin-top: 4px; font: 500 .82rem var(--f-display); color: var(--muted); overflow-wrap: anywhere; }
.f-head .in-doc b { color: var(--ink); font-weight: 600; }

/* folding groups and sections */
.group-head h3 { margin: 0; }
.fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: none; color: var(--ink); font: 600 .86rem/1.3 var(--f-display); text-align: left; cursor: pointer; }
.fold .chev { display: inline-flex; color: var(--muted-2); transition: color .2s var(--ease); }
.fold .chev svg { width: 14px; height: 14px; }
.fold:hover .chev, .fold:focus-visible .chev { color: var(--ink); }
.fold small { padding: 1px 8px; border-radius: 999px; background: rgba(249, 238, 231, .08); color: var(--muted); font: 600 .72rem var(--f-display); font-variant-numeric: tabular-nums; }
.group.shut { padding-bottom: 2px; }
.fold-sec h3 .fold { font-size: .95rem; }
.fold-sec.shut { padding-bottom: 0; }
.fold-body { padding-top: 2px; }

/* reviewing one document at a time */
.review { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.review .prog { font: 500 .8rem var(--f-display); color: var(--muted); }
.review .prog b { color: var(--ink); font-weight: 700; }
.btn.is-done { color: var(--green); border-color: rgba(116, 171, 145, .5); }
.btn svg { width: 13px; height: 13px; vertical-align: -2px; }
.doc .rv { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--green); }
.doc .rv svg { width: 11px; height: 11px; }

/* ------------------------------------------------------------- categories dialog */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 18, 17, .66); backdrop-filter: blur(3px); }
.dialog { position: relative; display: flex; flex-direction: column; width: min(720px, 100%); max-height: min(88vh, 920px); border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); outline: none; }
.dialog header { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.dialog header > div { flex: 1; }
.dialog header h2 { font-size: 1.4rem; letter-spacing: -.02em; }
.dialog header p { margin-top: 6px; max-width: 52ch; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.dialog-body { overflow: auto; padding: 6px 24px 20px; }
.dialog-body h3 { margin: 20px 0 6px; font: 600 .72rem var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.cat-list { margin: 0; padding: 0; list-style: none; }
.cat-list > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.cat-list .nm { font: 600 .9rem/1.3 var(--f-display); }
.cat-list .nm small { display: block; margin-top: 3px; font: 400 .8rem/1.45 var(--f-body); color: var(--muted-2); }
.cat-list .nm small b { color: var(--muted); font-weight: 600; }
.add-cat { margin-top: 12px; }
.add-cat svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.dialog .hint { margin-top: 12px; font-size: .82rem; color: var(--muted-2); }
.cat-list > li.cat-form { display: block; padding: 14px 0 16px; }
.cat-form form { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(249, 238, 231, .03); }
.cat-form label { display: grid; gap: 6px; font: 600 .8rem var(--f-display); color: var(--muted); }
.cat-form label small { font: 400 .76rem var(--f-body); color: var(--muted-2); }
.cat-form .two { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; }
.becomes-prev, .cat-test { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.cat-test { min-height: 1.7em; }
.cat-test .muted { color: var(--muted-2); }
.found-chip { padding: 3px 8px; border-radius: 6px; background: var(--f-custom); box-shadow: inset 0 0 0 1px var(--b-custom); color: var(--ink); font: 600 .76rem var(--f-display); }
.found-chip small { margin-left: 4px; opacity: .75; }
.cat-form .err { color: var(--coral); font-size: .84rem; }
.cat-form .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cat-form .grow { flex: 1; }
.cat-form .confirm { display: inline-flex; align-items: center; gap: 10px; font-size: .84rem; }
.link.danger { color: var(--coral); }
@media (max-width: 600px) {
  .cat-form .two { grid-template-columns: 1fr; }
  .cat-list > li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cat-list > li .tok { display: none; }
}

/* ------------------------------------------------------------- how to scan */
.modes-pick { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.modes-pick legend { padding: 0; margin-bottom: 10px; font: 600 .92rem/1.35 var(--f-display); }
.mode-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.mode-opt:hover { border-color: var(--line-strong); }
.mode-opt:has(input:checked) { border-color: var(--ink); background: var(--raised); }
.mode-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.mode-opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.mode-opt input { grid-row: span 2; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.mode-opt .nm { font: 600 .9rem/1.35 var(--f-display); }
.mode-opt .why, .modes-pick > .why { font-size: .84rem; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------- on the web: signing in, the account */
.drop.signin { align-items: stretch; justify-content: flex-start; min-height: 0; text-align: left; border-style: solid; border-color: var(--line-strong); }
.signin form { display: grid; gap: 16px; width: 100%; max-width: 27rem; margin: 0 auto; }
.signin h2 { font-size: 1.55rem; letter-spacing: -.02em; }
.signin p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
.signin label { display: grid; gap: 6px; font: 600 .84rem/1.3 var(--f-display); }
.signin .field { padding: .75rem .9rem; font-size: 1rem; }
.signin .code { font: 600 1.3rem/1 var(--f-display); letter-spacing: .4em; }
.signin .check { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; font: 400 .9rem/1.55 var(--f-body); color: var(--ink-soft); }
.signin .check input { width: 17px; height: 17px; margin: 4px 0 0; accent-color: var(--accent); }
.signin .btn { justify-self: start; }
.signin .small { font-size: .82rem; color: var(--muted); }
.signin .small .link + .link { margin-left: 18px; }
.signin .err { color: var(--coral); font-size: .9rem; }
.signin a, .legal-foot a, .acct a { color: var(--ink); }
.acct-btn { display: inline-grid; justify-items: end; gap: 1px; margin-left: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: none; font: 500 .74rem/1.25 var(--f-display); color: var(--muted); cursor: pointer; }
.acct-btn:hover { border-color: var(--ink); }
.acct-btn b { color: var(--accent); font-weight: 700; }
.acct-btn span { color: var(--ink); font: 600 .84rem/1.2 var(--f-display); }
.acct .dialog-body > p { margin-top: 2px; font-size: .92rem; color: var(--ink-soft); }
.acct .allow b { color: var(--accent); }
.acct .dialog-body > .btn { margin-top: 10px; }
.acct .line { display: flex; align-items: center; gap: 12px; font-size: .92rem; }
.acct .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.acct .confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; color: var(--ink-soft); }
.acct footer a { color: var(--muted); }
.legal-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; max-width: 1320px; margin: 0 auto; padding: 4px clamp(20px, 4vw, 56px) 40px; font: 500 .8rem/1.5 var(--f-display); color: var(--muted-2); }
.legal-foot span { flex: 1 1 26rem; }

/* ------------------------------------------------------------- the terms and the privacy notice */
.legal-top { display: flex; }
.legal-top .brand { text-decoration: none; color: inherit; }
.legal { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vh, 72px) 24px 96px; }
.legal h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; }
.legal .meta { margin-top: 10px; font: 500 .82rem var(--f-display); color: var(--muted-2); }
.legal .summary { margin-top: 26px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--raised); }
.legal h2 { margin-top: 38px; font-size: 1.2rem; letter-spacing: -.01em; }
.legal p, .legal li { margin-top: 10px; color: var(--ink-soft); }
.legal ul { margin: 0; padding-left: 1.25rem; }
.legal a { color: var(--ink); }

/* ------------------------------------------------------------- the welcome page: sign in left, what it does right */
.upload.welcome { grid-template-columns: minmax(0, 26rem) minmax(0, 33rem); justify-content: center; gap: clamp(32px, 7vw, 112px); align-items: center; }
.upload.welcome .signin { padding: 36px 34px; }
.upload.welcome .signin form { max-width: none; }
.upload.welcome h1 { max-width: 14ch; }
.restore-cta.try-demo { margin-top: 34px; padding: 18px 20px; border-color: rgba(255, 146, 61, .45); background: rgba(255, 146, 61, .06); }   /* over restore.css */
.try-demo .btn { flex: none; }
/* one column: the sample-documents invitation comes straight after signing in, before the explanation */
@media (max-width: 980px) {
  .upload.welcome { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .upload.welcome > div:last-child { display: contents; }
  .upload.welcome .signin { order: -2; }
  .upload.welcome .try-demo { order: -1; margin: 18px 0 44px; max-width: none; }
}
