/* ==========================================================================
   SignKnox design system (see the v3 layer at the end for current tokens)
   Warm paper surfaces, hairline rules, Newsreader for display, Mona Sans for
   interface text, JetBrains Mono for references. One accent: --brand
   (the firm's color, set at runtime; ink by default).
   ========================================================================== */
@font-face { font-family: "Mona Sans"; src: url("/fonts/mona-sans.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("/fonts/great-vibes.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("/fonts/dancing-script.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --brand: #1c1b18;
  --brand-ink: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 6%, #fbfaf7);
  --brand-tint: color-mix(in srgb, var(--brand) 12%, #fff);
  --brand-ring: color-mix(in srgb, var(--brand) 16%, transparent);
  --brand-hover: color-mix(in srgb, var(--brand) 86%, #000);

  --paper: #f7f6f2; --paper-2: #f1efe9; --paper-3: #e9e6de;
  --sheet: #fff;
  --ink: #1c1b18; --ink-2: #44413b; --muted: #7a766c; --faint: #aaa69c;
  --line: #e6e3db; --line-2: #efede7; --line-strong: #d6d2c7;
  --hover: rgba(28, 27, 24, .045); --press: rgba(28, 27, 24, .075);

  --ok: #2f6b47; --ok-bg: #eaf1ea; --warn: #8b5c14; --warn-bg: #f6eedf; --bad: #a3392b; --bad-bg: #f7e8e5; --info: #2d4f7c; --info-bg: #e9eef5;

  --r-xs: 5px; --r-sm: 7px; --r: 10px; --r-lg: 12px; --r-xl: 16px;
  --sh-1: 0 1px 0 rgba(28, 27, 24, .04);
  --sh-2: 0 1px 2px rgba(28, 27, 24, .05), 0 4px 14px -4px rgba(28, 27, 24, .08);
  --sh-3: 0 0 0 1px rgba(28, 27, 24, .07), 0 24px 60px -12px rgba(28, 27, 24, .28);
  --ease: cubic-bezier(.22, .8, .24, 1);

  --font: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sig-font: "Great Vibes", "Segoe Script", "Snell Roundhand", cursive;

  /* aliases kept for markup that sets inline styles */
  --bg: var(--paper); --surface: var(--sheet); --surface-2: #fbfaf7; --hair: var(--line); --hair-2: var(--line-2);
  --green: var(--ok); --green-bg: var(--ok-bg); --amber: var(--warn); --amber-bg: var(--warn-bg); --red: var(--bad); --red-bg: var(--bad-bg);
  --blue: var(--info); --blue-bg: var(--info-bg); --grey-bg: var(--paper-2);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; letter-spacing: -.003em; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-optical-sizing: auto;
}
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-family: var(--serif); font-weight: 420; letter-spacing: -.018em; }
h2 { font-family: var(--serif); font-weight: 450; letter-spacing: -.012em; }
h3 { font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: color-mix(in srgb, var(--brand) 16%, #fff); }
code { font-family: var(--mono); font-size: 11.5px; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.num, .n { font-variant-numeric: tabular-nums; }
svg.i { width: 17px; height: 17px; flex: none; fill: currentColor; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.error { color: var(--bad); margin-top: 8px; font-size: 13px; }
.error:empty { display: none; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* ---------- buttons ---------- */
button, .btn {
  font: inherit; font-size: 13px; font-weight: 560; letter-spacing: -.004em; line-height: 1;
  height: 34px; padding: 0 13px; border-radius: var(--r-sm); border: 0; cursor: pointer; text-decoration: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; user-select: none;
  color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(28, 27, 24, .04);
  transition: background .16s var(--ease), box-shadow .16s var(--ease), color .16s, transform .08s;
}
button svg.i, .btn svg.i { width: 16px; height: 16px; }
button:hover, .btn:hover { background: #fdfcfa; box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 rgba(28, 27, 24, .05); }
button:active, .btn:active { transform: translateY(.5px); }
button:focus-visible, .btn:focus-visible, a:focus-visible, .item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button.primary, .btn.primary {
  color: var(--brand-ink); background: var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px var(--brand-hover), 0 1px 2px rgba(28, 27, 24, .18);
}
button.primary:hover, .btn.primary:hover { background: var(--brand-hover); }
button.ghost, .btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
button.ghost:hover, .btn.ghost:hover { background: var(--hover); box-shadow: none; color: var(--ink); }
button.danger, .btn.danger { color: var(--bad); }
button.ghost.danger:hover { background: var(--bad-bg); color: var(--bad); }
button.big, .btn.big { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 9px; }
button.small, .btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; border-radius: 6px; }
button.small svg.i, .btn.small svg.i { width: 15px; height: 15px; }
button.icon { width: 34px; padding: 0; }
button.icon.small { width: 28px; }
button.block { width: 100%; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.primary:disabled { opacity: 1; background: var(--paper-3); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.kbd { font: 500 10.5px/1 var(--mono); color: var(--muted); padding: 3px 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); background: var(--sheet); }
button.primary .kbd { color: rgba(255, 255, 255, .72); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); margin-left: auto; }

/* ---------- inputs ---------- */
input, textarea, select {
  font: inherit; font-size: 13.5px; color: var(--ink); width: 100%;
  padding: 8px 11px; min-height: 36px; border-radius: var(--r-sm); border: 0; background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(28, 27, 24, .03);
  transition: box-shadow .16s var(--ease), background .16s;
}
input:hover, textarea:hover, select:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink-2), 0 0 0 3px var(--brand-ring); }
input::placeholder, textarea::placeholder { color: var(--faint); text-transform: none; letter-spacing: normal; font-family: var(--font); }
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%237a766c' d='M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0Zm-96-84.68L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48a8 8 0 0 0 11.32 11.32Z'/%3E%3C/svg%3E") no-repeat right 9px center / 13px; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; padding: 0; box-shadow: none; accent-color: var(--brand); cursor: pointer; }
input[type=color] { padding: 3px; }
label { display: block; font-size: 12px; font-weight: 560; color: var(--ink-2); margin: 16px 0 6px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---------- app frame: sidebar ---------- */
#app:has(> .sidebar) { padding-left: 232px; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 232px; z-index: 30; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px 14px; background: var(--paper-2); box-shadow: inset -1px 0 0 var(--line);
}
.sb-brand { display: block; padding: 2px 8px 4px; text-decoration: none; }
.brandmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); white-space: nowrap; text-decoration: none !important; min-width: 0; }
.brandmark .nm { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; }
.brandmark img { max-height: 30px; max-width: 160px; display: block; }
.sb-action button { width: 100%; justify-content: flex-start; height: 34px; }
.sb-nav { display: flex; flex-direction: column; gap: 1px; }
.sb-nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .14s, color .14s; }
.sb-nav a svg.i { width: 18px; height: 18px; color: var(--muted); }
.sb-nav a:hover { background: var(--hover); color: var(--ink); }
.sb-nav a.on { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(28, 27, 24, .04); }
.sb-nav a.on svg.i { color: var(--ink); }
.sb-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 4px 0 6px; box-shadow: 0 -1px 0 var(--line); }
.sb-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.sb-user .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; font-weight: 650; color: var(--ink-2); flex: none; }
.sb-user .who { min-width: 0; line-height: 1.25; }
.sb-user b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user span { font-size: 11.5px; color: var(--muted); }

/* editor keeps a focused top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap;
  min-height: 56px; padding: 0 16px; background: rgba(247, 246, 242, .86);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); box-shadow: 0 1px 0 var(--line);
}
.topbar .grow { flex: 1; }
.topbar .brandmark .nm { font-size: 17px; }

/* ---------- page layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 44px 44px 96px; animation: rise .4s var(--ease); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head h1 { font-size: 40px; line-height: 1.05; }
.page-head p { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.card { background: var(--sheet); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); }
.card.pad { padding: 26px; }
.section-title, .side-title { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.side-title svg.i { width: 14px; height: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--warn-bg); color: #5d3d0b; font-size: 13px; line-height: 1.5; margin-bottom: 22px; }
.notice.info { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.notice.info svg.i { color: var(--muted); }
.notice svg.i { margin-top: 1px; width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel { border-radius: 6px; background: linear-gradient(90deg, var(--paper-3) 0%, var(--paper-2) 50%, var(--paper-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ---------- documents: summary ledger ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sheet); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); margin-bottom: 22px; overflow: hidden; }
.sum { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 17px; position: relative; transition: background .16s; }
.sum + .sum { box-shadow: inset 1px 0 0 var(--line); }
.sum:hover { background: #fcfbf9; }
.sum:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sum .n { font-family: var(--serif); font-size: 38px; line-height: 1; font-weight: 400; letter-spacing: -.02em; }
.sum .l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.sum.on::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; background: var(--ink); border-radius: 2px 2px 0 0; }

/* ---------- toolbar: underline tabs + search ---------- */
.toolbar { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.chips { display: inline-flex; gap: 22px; flex-wrap: wrap; }
.chip { height: 38px; padding: 0; border-radius: 0; font-size: 13px; font-weight: 520; color: var(--muted); background: transparent; box-shadow: none; gap: 6px; }
.chip:hover { color: var(--ink); background: transparent; box-shadow: none; }
.chip.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.chip .c { font-size: 11px; font-weight: 500; color: var(--faint); font-family: var(--mono); }
.chip.on .c { color: var(--muted); }
.search { position: relative; width: 220px; max-width: 100%; margin-bottom: 7px; }
.search svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 15px; height: 15px; pointer-events: none; }
.search input { padding-left: 32px; padding-right: 32px; min-height: 32px; height: 32px; background: transparent; box-shadow: inset 0 0 0 1px transparent; }
.search input:hover { background: var(--hover); box-shadow: none; }
.search input:focus { background: var(--sheet); }
.search .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* ---------- documents: ledger table ---------- */
.list { margin-top: 0; }
.lhead, .item { display: grid; grid-template-columns: minmax(0, 1fr) 132px 168px 92px; gap: 18px; align-items: center; padding: 0 8px; }
.lhead { height: 38px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); box-shadow: inset 0 -1px 0 var(--line-2); }
.lhead span:last-child { text-align: right; }
.item { padding: 14px 8px; cursor: pointer; box-shadow: inset 0 -1px 0 var(--line-2); transition: background .14s; border-radius: 0; outline-offset: -2px; }
.item:hover { background: rgba(255, 255, 255, .7); }
.item .t { font-weight: 600; font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.item .when { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.item .due { font-size: 11.5px; color: var(--warn); margin-top: 3px; font-weight: 520; }
.stack { display: flex; align-items: center; }
.stack .av {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 650; letter-spacing: .02em;
  color: color-mix(in srgb, var(--c) 82%, #000); background: color-mix(in srgb, var(--c) 13%, #fff); box-shadow: 0 0 0 2px var(--paper);
}
.item:hover .stack .av { box-shadow: 0 0 0 2px #fcfbf9; }
.stack .av + .av { margin-left: -6px; }
.stack .av.ok { color: #fff; background: color-mix(in srgb, var(--c) 78%, #000); }
.stack .av.more { --c: #7a766c; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 540; white-space: nowrap; color: var(--ink-2); }
.status svg.i { width: 16px; height: 16px; }
.status i { font-style: normal; color: var(--faint); font-weight: 450; font-variant-numeric: tabular-nums; margin-left: 2px; }
.st-sent svg.i { color: var(--warn); }
.st-completed svg.i { color: var(--ok); }
.st-draft { color: var(--muted); }
.st-declined, .st-voided, .st-expired { color: var(--bad); }
.progress { height: 3px; border-radius: 99px; background: var(--paper-3); overflow: hidden; margin-top: 7px; }
.progress > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .5s var(--ease); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: .01em; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.sent, .badge.viewed, .badge.pending { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.badge.completed, .badge.signed { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.badge.declined, .badge.voided, .badge.expired { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.badge.template { background: var(--sheet); color: var(--ink); }
.badge.draft { background: var(--paper-2); color: var(--muted); }
.empty { text-align: center; padding: 56px 24px 64px; }
.empty.slim { padding: 44px 24px; }
.empty .sheet-art { width: 210px; height: auto; color: var(--ink); margin: 0 auto 10px; display: block; }
.empty .sheet-art .sig { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 1.6s var(--ease) .3s forwards; }
.empty h3 { font-family: var(--serif); font-size: 26px; font-weight: 420; letter-spacing: -.015em; margin-bottom: 8px; }
.empty p { margin: 0 auto 22px; max-width: 380px; color: var(--muted); }
.empty .big-ic { width: 48px; height: 48px; border-radius: 50%; color: var(--ink-2); display: grid; place-items: center; margin: 0 auto 16px; box-shadow: inset 0 0 0 1px var(--line); }
.dropping { position: relative; }
.dropping::after { content: "Drop PDFs or photos to start"; position: fixed; inset: 12px; border-radius: 18px; border: 1.5px dashed var(--ink-2); background: rgba(247, 246, 242, .88); backdrop-filter: blur(3px);
  display: grid; place-items: center; font-family: var(--serif); font-size: 28px; color: var(--ink); z-index: 40; pointer-events: none; animation: fade .15s; }

/* ---------- templates ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 22px; }
.tcard { display: flex; flex-direction: column; background: var(--sheet); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line), var(--sh-1); overflow: hidden; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.tcard:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--sh-2); transform: translateY(-2px); }
.tcard .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); display: flex; justify-content: center; align-items: flex-start; overflow: hidden; padding-top: 22px; cursor: pointer; box-shadow: inset 0 -1px 0 var(--line); }
.tcard .thumb canvas { width: 62%; background: #fff; box-shadow: 0 0 0 1px rgba(28, 27, 24, .06), 0 10px 24px -8px rgba(28, 27, 24, .22); transition: transform .4s var(--ease); }
.tcard:hover .thumb canvas { transform: translateY(-4px) rotate(-.4deg); }
.tcard .tag { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); }
.tcard .tag svg.i { width: 13px; height: 13px; }
.tcard .body { padding: 14px 16px 2px; }
.tcard .body .t { font-family: var(--serif); font-size: 19px; font-weight: 460; letter-spacing: -.012em; line-height: 1.25; }
.tcard .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .actions { display: flex; align-items: center; gap: 2px; padding: 12px 10px 12px 16px; }
.tcard .actions .ghost { color: var(--muted); }
.tcard.new { align-items: center; justify-content: center; min-height: 300px; cursor: pointer; gap: 6px; height: auto; padding: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); border: 0; color: var(--muted); font-weight: 500; flex-direction: column; background-image: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(28, 27, 24, .025) 9px 10px); }
.tcard.new:hover { box-shadow: inset 0 0 0 1px var(--ink-2); color: var(--ink); transform: none; }
.tcard.new svg.i { width: 22px; height: 22px; margin-bottom: 6px; }
.tcard.new b { font-family: var(--serif); font-size: 20px; font-weight: 450; color: var(--ink); }
.tcard.new span { font-size: 12.5px; }

/* ---------- document detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 550; margin-bottom: 20px; text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg.i { width: 15px; height: 15px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.hero { padding: 28px 30px 26px; }
.hero .progress { display: none; }
.hero h1 { margin: 12px 0 8px; font-size: 34px; line-height: 1.12; }
.hero .meta { font-size: 12.5px; color: var(--muted); }
.hero-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; box-shadow: 0 -1px 0 var(--line-2); }
.signer-card { display: flex; gap: 14px; align-items: center; padding: 16px 0; }
.signer-card + .signer-card { box-shadow: 0 -1px 0 var(--line-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 12px; letter-spacing: .02em; color: #fff; flex: none; }
.signer-card b { font-weight: 600; }
.steps { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--faint); flex-wrap: wrap; margin-top: 6px; }
.steps span { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.steps span.done { color: var(--ok); }
.steps svg.i { width: 14px; height: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 20px; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; color: var(--ink-2); }
.timeline li b { color: var(--ink); font-weight: 600; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.timeline li:first-child::before { background: var(--ink); box-shadow: none; }
.timeline li::after { content: ""; position: absolute; left: 5px; top: 17px; bottom: 2px; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline .w { font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.hash { font-family: var(--mono); font-size: 10.5px; line-height: 1.6; word-break: break-all; color: var(--ink-2); background: var(--paper); padding: 10px 12px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.settings-tabs { margin-bottom: 26px; display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); }
.settings-tabs .chip { text-decoration: none; }
.group + .group { margin-top: 28px; padding-top: 24px; box-shadow: 0 -1px 0 var(--line-2); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .15s var(--ease), box-shadow .15s; }
.swatch:hover { transform: scale(1.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); background: inherit; }
.swatch.on { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3.5px var(--ink); }
.swatches input[type=color] { width: 40px; height: 28px; padding: 2px; border-radius: 7px; cursor: pointer; min-height: 0; }
.logo-drop { border-radius: var(--r); padding: 16px 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.logo-drop img { max-height: 44px; max-width: 170px; display: block; }
.preview-mail { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); font-size: 13px; background: var(--sheet); }
.preview-mail .head { padding: 16px 18px; box-shadow: inset 0 -1px 0 var(--line); background: var(--sheet) !important; }
.preview-mail .head .nm { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 18px; }
.preview-mail .bd { padding: 18px; }
.preview-mail .bd b { display: block; font-family: var(--serif); font-weight: 450; font-size: 18px; margin-bottom: 6px; }
.preview-mail .bd p { color: var(--muted); margin-bottom: 14px; }
.preview-mail .bd .btn { pointer-events: none; }
.save-bar { display: flex; align-items: center; gap: 12px; margin-top: 28px; }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 46%) 1fr; background: var(--paper); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px; background: var(--brand); color: color-mix(in srgb, var(--brand-ink) 92%, transparent); }
.auth-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 0% 100%, rgba(255, 255, 255, .07), transparent 60%); pointer-events: none; }
.aa-brand { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.aa-quote { margin-top: auto; font-family: var(--serif); font-size: clamp(34px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.02em; font-weight: 380; max-width: 9.5em; }
.aa-k { display: block; font-style: italic; font-weight: 400; }
.aa-seal { position: absolute; right: -36px; top: 42px; width: 260px; height: 260px; opacity: .55; animation: slowspin 90s linear infinite; }
.aa-points { list-style: none; margin: 34px 0 0; padding: 18px 0 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; opacity: .72; box-shadow: 0 -1px 0 rgba(255, 255, 255, .14); }
.aa-points li::before { content: "—"; margin-right: 8px; opacity: .6; }
@keyframes slowspin { to { transform: rotate(360deg); } }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth .card { width: 100%; max-width: 360px; padding: 0; background: transparent; box-shadow: none; animation: rise .45s var(--ease); }
.auth h1 { font-size: 38px; line-height: 1.05; }
.auth .card > p { margin: 10px 0 26px; color: var(--muted); }
.auth .card label { text-align: left; }
.auth-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.auth-note svg.i { width: 15px; height: 15px; }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: 316px 1fr; min-height: calc(100vh - 56px); }
.side { position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; background: var(--paper); box-shadow: 1px 0 0 var(--line); padding: 20px 18px 32px; }
.side h3 { margin: 26px 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.side label:first-child { margin-top: 0; }
.signer-box { border-radius: var(--r); padding: 11px 12px 9px 15px; margin-bottom: 8px; cursor: pointer; position: relative; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .18s var(--ease); }
.signer-box::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.signer-box.on { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 4px color-mix(in srgb, var(--c) 10%, transparent); }
.signer-box input:not([type=checkbox]) { margin-bottom: 6px; min-height: 32px; padding: 6px 9px; font-size: 13px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tools button { justify-content: flex-start; height: 34px; font-size: 12.5px; font-weight: 520; padding: 0 9px; gap: 8px; }
.tools button svg.i { color: var(--muted); width: 16px; height: 16px; }
.tools button.on { background: var(--ink); color: #fff; box-shadow: none; }
.tools button.on svg.i { color: inherit; }
.pages { min-width: 0; padding: 32px 28px 80px; background: var(--paper-3); min-height: calc(100vh - 56px); }
.page { position: relative; width: 100%; max-width: 860px; margin: 0 auto 26px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(28, 27, 24, .05), 0 2px 4px rgba(28, 27, 24, .04), 0 16px 36px -10px rgba(28, 27, 24, .18); }
.page canvas { width: 100%; height: 100%; display: block; border-radius: 2px; }
.layer { position: absolute; inset: 0; }
.layer.placing { cursor: var(--cur-place); }
.fld {
  position: absolute; border-radius: 4px; display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: -.005em; color: color-mix(in srgb, var(--c) 72%, #000);
  background: color-mix(in srgb, var(--c) 10%, rgba(255, 255, 255, .78)); box-shadow: inset 0 0 0 1.5px var(--c);
  cursor: move; user-select: none; touch-action: none; transition: box-shadow .15s;
}
.fld.sel { box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); z-index: 3; }
.fld .x { position: absolute; top: 2px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); color: #fff; font-size: 11px; line-height: 13px; text-align: center; cursor: pointer; display: none; }
.fld .rz { position: absolute; right: 0; bottom: 0; width: 8px; height: 8px; background: var(--c); border-radius: 3px 0 3px 0; cursor: nwse-resize; }
.fld.sel .x { display: block; }
.fld img { max-width: 100%; max-height: 100%; pointer-events: none; }
.fld.mine { background: rgba(255, 255, 255, .6); color: #1c2433; font-weight: 500; font-size: 12px; }
.fld.mine.empty { background: #fff1d1; box-shadow: inset 0 0 0 1.5px #c8932c; color: #6b4a0f; font-weight: 600; cursor: pointer; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 50% { background: #ffe6ad; } }
.me-row { display: flex !important; gap: 8px; align-items: center; color: var(--ink-2) !important; font-size: 12.5px !important; font-weight: 520 !important; margin: 0 0 9px !important; cursor: pointer; }
.mysig { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 7px; }
.mysig img { height: 30px; max-width: 150px; background: #fff; border-radius: 6px; padding: 2px 8px; box-shadow: inset 0 0 0 1px var(--line); }
.status-line { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.status-line svg.i { width: 14px; height: 14px; color: var(--ok); }

/* ---------- signing page ---------- */
.sign-top { background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.sign-top .inner { max-width: 960px; margin: 0 auto; padding: 0 22px; height: 60px; display: flex; align-items: center; gap: 12px; }
.secure { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 520; }
.secure svg.i { width: 15px; height: 15px; color: var(--ok); }
.sign-bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.sign-bar .inner { max-width: 960px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 16px; }
.sign-bar .grow { flex: 1; min-width: 0; }
.sign-bar .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 17px; font-weight: 480; letter-spacing: -.01em; }
.sign-bar .meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sign-bar .meta a { color: var(--muted); }
.sign-bar .progress { max-width: 220px; }
.sign-pages { max-width: 920px; margin: 0 auto; padding: 30px 18px 100px; }
body:has(.sign-pages) { background: var(--paper-3); }
.sfld {
  position: absolute; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
  font-size: clamp(8px, 1.3vw, 12.5px); font-weight: 650; letter-spacing: -.005em; color: #6b4a0f;
  background: #fff1d1; box-shadow: inset 0 0 0 1.5px #c8932c; min-width: 22px; min-height: 18px;
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.sfld:hover { background: #ffe6ad; }
.sfld.done { background: rgba(28, 36, 51, .03); box-shadow: inset 0 -1px 0 rgba(28, 36, 51, .25); color: #1c2433; font-weight: 500; justify-content: flex-start; padding-left: 4px; }
.sfld.done:hover { background: rgba(28, 36, 51, .06); }
.sfld img { max-width: 100%; max-height: 100%; }
.sfld input { border: 0; background: transparent; width: 100%; height: 100%; min-height: 0; padding: 0 4px; font-size: clamp(8px, 1.3vw, 13px); border-radius: 0; box-shadow: none; color: #1c2433; }
.sfld input:focus { box-shadow: none; background: rgba(45, 79, 124, .06); }
.sfld.flash { animation: flash .9s var(--ease) 2; }
@keyframes flash { 50% { box-shadow: inset 0 0 0 1.5px #c8932c, 0 0 0 6px rgba(200, 147, 44, .3); } }
.chk { font-size: 1.05em; }
.prefilled { position: absolute; display: flex; align-items: center; color: #1c2433; font-size: clamp(7px, 1.3vw, 13px); white-space: nowrap; overflow: hidden; pointer-events: none; }
.prefilled img { max-width: 100%; max-height: 100%; }
.welcome { max-width: 580px; margin: 0 auto; padding: 56px 20px 40px; animation: rise .45s var(--ease); }
.welcome .card { padding: 40px 40px 34px; border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(28, 27, 24, .25); }
.welcome h1 { font-size: 36px; line-height: 1.08; }
.welcome .lead { color: var(--muted); font-size: 15px; margin: 12px 0 26px; line-height: 1.55; }
.doc-chip { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 22px; }
.doc-chip .ic { width: 38px; height: 46px; border-radius: 3px; background: #fff; color: var(--ink-2); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 1px var(--line), 0 6px 12px -6px rgba(28, 27, 24, .2); }
.doc-chip .t { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.quote { position: relative; padding: 2px 0 2px 16px; margin: 0 0 24px; white-space: pre-wrap; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ink-2); box-shadow: inset 2px 0 0 var(--brand); }
.quote .from { font-family: var(--font); font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
details.disclosure { border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; color: var(--ink-2); }
details.disclosure summary { list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 560; color: var(--ink); display: flex; align-items: center; gap: 8px; }
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure summary svg.i { width: 16px; height: 16px; color: var(--muted); }
details.disclosure summary .chev { margin-left: auto; color: var(--faint); transition: transform .2s var(--ease); display: flex; }
details.disclosure[open] summary .chev { transform: rotate(90deg); }
details.disclosure ul { margin: 0; padding: 0 18px 14px 34px; }
details.disclosure li { margin-bottom: 6px; line-height: 1.5; } details.disclosure li:last-child { margin-bottom: 0; }
.agree { display: flex !important; gap: 11px; align-items: flex-start; font-size: 14px !important; color: var(--ink) !important; font-weight: 500 !important; margin: 22px 0 0 !important; cursor: pointer; line-height: 1.45; }
.agree input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.result { text-align: center; padding: 46px 36px 40px !important; }
.result .big-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; }
.result .big-ic svg.i { width: 28px; height: 28px; }
.result h1 { font-size: 34px; margin-bottom: 10px; }
.result p { color: var(--muted); margin: 0 auto 26px; max-width: 400px; font-size: 15px; }
.ic.amber { background: var(--warn-bg); color: var(--warn); }
.ic.green { background: var(--ok-bg); color: var(--ok); }
.ic.grey { background: var(--paper-2); color: var(--ink-2); }
.ic.red { background: var(--bad-bg); color: var(--bad); }
.ic.brand { background: var(--brand-soft); color: var(--brand); }
.foot-note { text-align: center; font-size: 12px; color: var(--muted); margin: 22px auto 0; max-width: 46ch; line-height: 1.5; text-wrap: balance; }
.foot-note svg.i { width: 14px; height: 14px; vertical-align: -2.5px; margin-right: 6px; color: var(--ok); }

/* ---------- seal stamp (signing finished) ---------- */
.seal-stamp { width: 136px; height: 136px; margin: 0 auto 26px; position: relative; animation: stampIn .75s cubic-bezier(.2, .9, .25, 1.12) .12s both; filter: drop-shadow(0 10px 18px rgba(28, 27, 24, .2)); }
.seal-stamp svg { width: 100%; height: 100%; display: block; }
.seal-stamp .s-disc { fill: var(--brand); }
.seal-stamp .s-edge { fill: none; stroke: rgba(255, 255, 255, .32); stroke-width: 1; stroke-dasharray: 2 3; }
.seal-stamp .s-in { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1; }
.seal-stamp .s-text { fill: rgba(255, 255, 255, .82); font: 600 8.6px var(--mono); }
.seal-stamp .s-tick { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease) .75s forwards; }
.seal-stamp::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); opacity: 0; animation: ripple 1.1s var(--ease) .62s; }
@keyframes stampIn { 0% { transform: scale(1.9) rotate(-16deg); opacity: 0; } 55% { transform: scale(.93) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes ripple { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }

/* ---------- modal, tabs, signature pad ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 27, 24, .34); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .18s var(--ease); }
.modal { width: 100%; max-width: 540px; max-height: 92vh; overflow: auto; background: var(--sheet); border-radius: var(--r-xl); padding: 28px 28px 22px; box-shadow: var(--sh-3); animation: pop .26s var(--ease); }
.modal h2 { font-size: 27px; line-height: 1.12; margin-bottom: 6px; }
.modal p.muted { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 9px; margin: 8px 0 16px; box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs button { height: 28px; padding: 0 16px; font-size: 12.5px; background: transparent; box-shadow: none; color: var(--muted); }
.tabs button:hover { color: var(--ink); background: transparent; box-shadow: none; }
.tabs button.on { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 1px rgba(28, 27, 24, .05); }
.sig-pad { display: block; width: 100%; height: 190px; border-radius: var(--r); touch-action: none; cursor: var(--cur-place); box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(transparent calc(72% - .5px), rgba(28, 27, 24, .14) calc(72% - .5px), rgba(28, 27, 24, .14) calc(72% + .5px), transparent calc(72% + .5px)), #fdfcfa; }
.typed { font-family: var(--sig-font); font-size: 46px; line-height: 1.2; color: #1c2433; padding: 16px 18px; border-radius: var(--r); min-height: 92px; background: #fdfcfa; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; white-space: nowrap; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.styles button { height: 52px; font-size: 24px; font-weight: 400; color: #1c2433; letter-spacing: 0; overflow: hidden; }
.styles button.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.linkbox { display: flex; gap: 6px; margin-top: 8px; }
.linkbox input { font-family: var(--mono); font-size: 11.5px; background: var(--paper); color: var(--ink-2); }
.link-row { padding: 14px 0; }
.link-row + .link-row { box-shadow: 0 -1px 0 var(--line-2); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--paper); padding: 11px 16px 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 520; box-shadow: 0 18px 40px -12px rgba(28, 27, 24, .45); animation: pop .25s var(--ease); }
.toast svg.i { width: 16px; height: 16px; color: #9ccfa9; }

/* ---------- accounts & security ---------- */
.code-input { font-family: var(--mono); font-size: 26px !important; letter-spacing: .3em; text-align: center; min-height: 56px !important; font-weight: 500; }
.steps-list { margin: 0 0 10px; padding-left: 20px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.qr { width: 184px; height: 184px; margin: 6px auto 12px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--sh-2); }
.qr img { width: 100%; height: 100%; display: block; }
details.manual { font-size: 12.5px; color: var(--muted); text-align: center; }
details.manual summary { cursor: pointer; list-style: none; }
details.manual summary::-webkit-details-marker { display: none; }
.key { display: inline-block; margin-top: 8px; font-size: 12.5px; letter-spacing: .06em; white-space: normal; word-break: break-all; padding: 6px 10px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; }
.setting-row + .setting-row { box-shadow: 0 -1px 0 var(--line-2); }
.switch { position: relative; width: 38px; height: 22px; flex: none; margin: 0 !important; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--paper-3); box-shadow: inset 0 0 0 1px rgba(28, 27, 24, .06); transition: background .22s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28, 27, 24, .25); transition: transform .22s var(--ease); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-ring); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.people .person { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.people .person + .person { box-shadow: 0 -1px 0 var(--line-2); }
.people .person.off { opacity: .55; }
.chain { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 540; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.chain.ok { background: var(--ok-bg); color: var(--ok); }
.chain.bad { background: var(--bad-bg); color: var(--bad); }
.log { max-height: 440px; overflow: auto; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); }
.log-row { display: grid; grid-template-columns: 90px 190px minmax(0, 1fr) 110px; gap: 12px; padding: 9px 12px; font-size: 12px; align-items: baseline; }
.log-row:nth-child(odd) { background: var(--paper); }
.log-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.log-row .when { color: var(--muted); }
.log-row .what.warn { color: var(--bad); font-weight: 540; }
.log-row .ip { text-align: right; font-size: 11px; font-family: var(--mono); }
.lock-badge { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); }
.lock-badge svg.i { width: 24px; height: 24px; }
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.code-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; border-radius: 7px; background: var(--warn-bg); color: #5d3d0b; font-size: 12px; }
.code-chip svg.i { width: 14px; height: 14px; }
.code-chip b { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; color: var(--ink); font-weight: 600; }
.code-chip.turn { background: var(--info-bg); color: var(--info); }
.mini-switch { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px !important; font-weight: 520 !important; color: var(--ink-2) !important; margin: 2px 0 8px !important; }
.mini-switch svg.i { width: 15px; height: 15px; color: var(--muted); }
.mini-switch .switch { transform: scale(.86); transform-origin: right center; }
.checklist { list-style: none; margin: 16px 0 6px; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; font-size: 13.5px; }
.checklist li + li { box-shadow: 0 -1px 0 var(--line-2); }
.checklist li svg.i { margin-top: 1px; }
.checklist li.ok svg.i { color: var(--ok); }
.checklist li.bad svg.i { color: var(--bad); }
.checklist li small { display: block; color: var(--bad); font-size: 12px; margin-top: 2px; }
.send-opts { margin-top: 8px; padding-top: 6px; box-shadow: 0 -1px 0 var(--line); }
.share.off { opacity: .35; pointer-events: none; filter: grayscale(1); transition: opacity .25s; }
.welcome.kiosk { max-width: 640px; padding-top: 8vh; }
.welcome.kiosk .card { padding: 48px 48px 40px; }
.welcome.kiosk h1 { font-size: 44px; }
.welcome.kiosk input { min-height: 52px; font-size: 18px; }
.ref-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 0; padding-top: 16px; box-shadow: 0 -1px 0 var(--line-2); font-size: 12px; color: var(--muted); }
.ref-line svg.i { width: 14px; height: 14px; color: var(--ok); }
.ref-line b { font-family: var(--mono); color: var(--ink-2); letter-spacing: .04em; font-weight: 600; }
.ref-check { margin-top: 26px; padding-top: 22px; box-shadow: 0 -1px 0 var(--line-2); }

/* ---------- motion ---------- */
.enter { animation: rise .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.confetti-canvas { display: none; }
.draw-check { display: block; margin: 0 auto; overflow: visible; }
.draw-check .ring { stroke: var(--ok); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s var(--ease) .1s forwards; }
.draw-check .tick { stroke: var(--ok); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .45s var(--ease) .7s forwards; }
.draw-check-wrap { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; background: var(--ok-bg); }
@keyframes draw { to { stroke-dashoffset: 0; } }
img.ink { animation: write 1.1s cubic-bezier(.45, .05, .25, 1) both; }
@keyframes write { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }
.pop-in { animation: popIn .35s var(--ease) both; }
@keyframes popIn { 0% { transform: scale(.88); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ready-pulse { animation: readyPulse 2s var(--ease) infinite; }
@keyframes readyPulse { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px var(--brand-hover), 0 0 0 0 var(--brand-ring); } 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px var(--brand-hover), 0 0 0 6px transparent; } }
.plane { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--ink); margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); }
.plane svg.i { width: 24px; height: 24px; animation: fly 1.1s cubic-bezier(.5, 0, .3, 1) both; }
@keyframes fly { 0% { transform: translate(-26px, 26px); opacity: 0; } 45% { opacity: 1; } 70% { transform: translate(3px, -3px); } 100% { transform: translate(0, 0); } }
.sheen { position: relative; overflow: hidden; }
.sheen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%); transform: translateX(-100%); animation: sheen 1.4s var(--ease) .9s; pointer-events: none; }
@keyframes sheen { to { transform: translateX(100%); } }
.boot { min-height: 70vh; display: grid; place-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--paper-3); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- phase 1: roles, order, field palette, field settings ---------- */
.tool-group + .tool-group { margin-top: 14px; }
.tool-group .tg { font-size: 11px; font-weight: 560; color: var(--faint); margin: 0 0 6px 2px; }
#toolbox.disabled { opacity: .4; pointer-events: none; filter: grayscale(1); }
.mini-switch.inline { margin: 0 !important; gap: 6px; font-size: 12px !important; color: var(--muted) !important; }
.sb-top { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; }
.seg { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--paper-2); gap: 2px; flex: 1; box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button { flex: 1; height: 26px; padding: 0 8px; font-size: 12px; font-weight: 540; border-radius: 5px; background: transparent; box-shadow: none; color: var(--muted); gap: 5px; justify-content: center; }
.seg button svg.i { width: 14px; height: 14px; }
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 1px rgba(28, 27, 24, .05); }
.role-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--c); }
.role-tag svg.i { width: 14px; height: 14px; }
.step { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 !important; font-size: 11.5px !important; font-weight: 600 !important; color: var(--c) !important; white-space: nowrap; }
.step input { width: 44px !important; min-height: 26px !important; height: 26px; padding: 0 4px 0 8px !important; margin: 0 !important; font-size: 13px !important; font-weight: 600; text-align: center; }
.signer-box.cc { background: #fbfaf7; }
.signer-box.cc::before { opacity: .45; }
.fld svg.i { width: 13px; height: 13px; flex: none; margin-right: 4px; opacity: .85; }
.fld > span:not(.x):not(.rz):not(.cbadge):not(.caret) { overflow: hidden; text-overflow: ellipsis; }
.fld.t-radio, .fld.t-radio.mine { border-radius: 50%; padding: 0; justify-content: center; }
.fld.t-checkbox { padding: 0; justify-content: center; }
.fld .dot { width: 50%; height: 50%; border-radius: 50%; background: #1c2433; }
.fld .caret { margin-left: auto; padding-left: 4px; opacity: .7; display: grid; }
.fld .caret svg.i { transform: rotate(90deg); margin: 0; }
.fld .pre { color: #1c2433; font-weight: 500; }
.fld .cbadge { margin-left: auto; padding-left: 4px; width: 19px; height: 15px; flex: none; color: var(--c); display: grid; place-items: center; }
.fld.t-checkbox .cbadge, .fld.t-radio .cbadge { display: none; }
.fld.has-cond { outline: 1.5px dashed var(--c); outline-offset: 2px; }
.fld .cbadge svg.i { width: 13px; height: 13px; margin: 0; opacity: 1; }
.props { margin-top: 22px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line); animation: rise .22s var(--ease); }
.props label { font-size: 12px; margin-top: 10px; }
.props input, .props select, .props textarea { min-height: 34px; font-size: 13px; }
.props-head { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; box-shadow: 0 1px 0 var(--line-2); }
.props-head b { font-size: 13.5px; font-weight: 600; }
.pi { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); flex: none; }
.pi svg.i { width: 17px; height: 17px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.cond { margin-top: 14px; padding-top: 12px; box-shadow: 0 -1px 0 var(--line-2); }
.cond-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.cond-h svg.i { width: 15px; height: 15px; color: var(--muted); }
.cond select { margin-bottom: 6px; }
.prop-actions { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.prop-actions .danger { margin-left: auto; }
.order-list { margin: 14px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
.order-list ol { list-style: none; margin: 0; padding: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; position: relative; }
.order-list li + li::before { content: ""; position: absolute; left: 10px; top: -6px; height: 8px; width: 1px; background: var(--line-strong); }
.step-dot { width: 21px; height: 21px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 10.5px var(--mono); color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line-strong); flex: none; }
.step-dot svg.i { width: 12px; height: 12px; }
.step-dot.sm { width: 19px; height: 19px; font-size: 10px; }
.seal-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 10px; border-radius: var(--r-sm); background: var(--ok-bg); }
.seal-row svg.i { color: var(--ok); flex: none; margin-top: 1px; }
.seal-row b { font-size: 13px; }
.modal.wide { max-width: 720px; }
.drop-zone { display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin: 16px 0 10px; border-radius: var(--r); border: 1px dashed var(--line-strong); background: var(--paper); transition: border-color .15s, background .15s; }
.drop-zone > svg.i { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.drop-zone.dropping { border-color: var(--ink-2); background: var(--paper-2); }
.drop-zone.dropping::after { display: none; }
.bulk-sum { font-size: 12.5px; margin: 14px 0 8px; }
.bulk-table { max-height: 220px; overflow: auto; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); }
.bulk-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bulk-table th { position: sticky; top: 0; background: var(--paper); text-align: left; font-weight: 600; color: var(--muted); padding: 7px 10px; box-shadow: 0 1px 0 var(--line); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.bulk-table td { padding: 7px 10px; border-top: 1px solid var(--line-2); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; border-color: rgba(255, 255, 255, .3); border-top-color: currentColor; }

/* signing page: new field kinds */
.sfld select, .sfld input[type=date] { border: 0; background: transparent; width: 100%; height: 100%; min-height: 0; padding: 0 4px; font-size: clamp(8px, 1.3vw, 13px); border-radius: 0; box-shadow: none; color: #1c2433; font-weight: 500; cursor: pointer; }
.sfld select { background-image: none; padding-right: 4px; }
.sfld select:focus, .sfld input[type=date]:focus { box-shadow: none; background: rgba(45, 79, 124, .06); }
.sfld.t-radio { border-radius: 50%; min-width: 18px; min-height: 18px; }
.sfld.t-radio.done { padding: 0; justify-content: center; box-shadow: inset 0 0 0 1.5px rgba(28, 36, 51, .35); background: #fff; }
.sfld.t-checkbox.done { box-shadow: inset 0 0 0 1.5px rgba(28, 36, 51, .35); background: #fff; }
.rdot { width: 46%; height: 46%; border-radius: 50%; transition: transform .2s var(--ease), background .2s; transform: scale(.4); background: transparent; display: block; }
.rdot.on { background: #1c2433; transform: scale(1); }
.prefilled .rdot { width: 10px; height: 10px; }
.sfld.t-checkbox.done, .sfld.t-radio.done { justify-content: center; padding-left: 0; }
.sfld.invalid { background: rgba(163, 57, 43, .07) !important; box-shadow: inset 0 0 0 1.5px var(--bad) !important; overflow: visible; }
.sfld.invalid::after { content: attr(data-err); position: absolute; left: 0; top: calc(100% + 4px); background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 560; padding: 3px 8px; border-radius: 5px; white-space: nowrap; z-index: 5; pointer-events: none; }
.sfld.locked { cursor: default; color: #1c2433; }
.sfld.t-attachment { gap: 6px; padding: 0 8px; justify-content: flex-start; white-space: nowrap; }
.sfld.t-attachment svg.i { width: 15px; height: 15px; flex: none; }
.sfld .att-name { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sfld .att-x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .08); font-size: 13px; flex: none; }
.sfld .att-x:hover { background: rgba(0, 0, 0, .16); }
.sfld.appear { animation: pop .3s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .detail, .settings { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .lhead, .item { grid-template-columns: minmax(0, 1fr) 150px; }
  .lhead span:nth-child(2), .lhead span:nth-child(4), .item .stack, .item .when { display: none; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .sum:nth-child(3) { box-shadow: inset 0 1px 0 var(--line); }
  .sum:nth-child(4) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; padding: 28px; }
  .aa-quote { font-size: 32px; margin-top: 40px; }
  .aa-points, .aa-seal { display: none; }
}
@media (max-width: 860px) {
  #app:has(> .sidebar) { padding-left: 0; }
  .sidebar { position: sticky; top: 0; bottom: auto; width: auto; height: 56px; flex-direction: row; align-items: center; gap: 6px; padding: 0 12px; box-shadow: inset 0 -1px 0 var(--line); background: rgba(241, 239, 233, .92); backdrop-filter: blur(14px); }
  .sb-brand { padding: 0; margin-right: auto; min-width: 0; }
  .sb-brand .nm { font-size: 17px; }
  .sb-nav { flex-direction: row; order: 2; }
  .sb-nav a { width: 36px; padding: 0; justify-content: center; }
  .sb-nav a span { display: none; }
  .sb-action { order: 3; }
  .sb-action button { width: 36px; padding: 0; justify-content: center; }
  .sb-action button span, .sb-action .kbd { display: none; }
  .sb-foot { order: 4; margin: 0; padding: 0; box-shadow: none; }
  .sb-user { display: none; }
}
@media (max-width: 800px) {
  .editor { grid-template-columns: 1fr; }
  .side { position: static; height: auto; box-shadow: 0 1px 0 var(--line); }
  .pages { padding: 16px 10px 40px; }
  .hide-sm { display: none !important; }
  .topbar { padding: 8px 12px; }
  .wrap { padding: 28px 16px 64px; }
  .page-head h1 { font-size: 32px; }
  .search { width: 100%; }
  .search .kbd { display: none; }
  .toolbar { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; gap: 18px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .sum { padding: 14px 16px; }
  .sum .n { font-size: 30px; }
  .sum.on::after { left: 16px; right: 16px; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .styles { grid-template-columns: 1fr; }
  .styles button { font-size: 24px !important; height: 48px; }
  .sign-bar .progress { display: none; }
  .welcome { padding-top: 22px; }
  .welcome .card { padding: 28px 22px 24px; }
  .welcome h1 { font-size: 30px; }
  .modal { padding: 22px 20px 18px; }
  .modal h2 { font-size: 23px; }
  .log-row { grid-template-columns: 70px minmax(0, 1fr); }
  .log-row .who, .log-row .ip { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .seal-stamp .s-tick { stroke-dashoffset: 0; } .empty .sheet-art .sig { stroke-dashoffset: 0; } }

/* ---------- phase 2: totals, payments ---------- */
.chips-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chips-row button { font-family: var(--mono); font-size: 11.5px; font-weight: 500; height: 24px; padding: 0 7px; }
.sfld.calc { justify-content: flex-end; padding-right: 6px; font-weight: 650; color: #1c2433; font-variant-numeric: tabular-nums; background: rgba(28, 36, 51, .04); box-shadow: inset 0 -1px 0 rgba(28, 36, 51, .35); cursor: default; }
.sfld.pay { justify-content: flex-start; gap: 6px; padding: 0 8px; background: #fff; box-shadow: inset 0 0 0 1.5px #1c2433; color: #1c2433; font-weight: 600; cursor: default; white-space: nowrap; }
.sfld.pay svg.i { width: 14px; height: 14px; color: var(--ok); flex: none; }
.sfld.pay span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sfld.pay .val { margin-left: auto; font-variant-numeric: tabular-nums; }
.pay-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 2px 0 6px; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--ink-2); }
.pay-note svg.i { color: var(--ok); width: 16px; height: 16px; margin-top: 1px; flex: none; }
.result b { color: var(--ink); }

/* intake form */
.q { animation: rise .25s var(--ease); }
.q-check, .q-opt { display: flex !important; align-items: center; gap: 10px; margin: 16px 0 0 !important; font-size: 14px !important; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; padding: 12px 14px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); background: var(--sheet); transition: box-shadow .15s; }
.q-check:hover, .q-opt:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.q-check:has(input:checked), .q-opt:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.q-check input, .q-opt input { width: 17px; height: 17px; min-height: 0; padding: 0; box-shadow: none; flex: none; accent-color: var(--brand); }
.q-opt { margin-top: 6px !important; }
.q-price { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
fieldset.q-choice { border: 0; margin: 16px 0 0; padding: 0; }
fieldset.q-choice legend { font-size: 12px; font-weight: 560; color: var(--ink-2); padding: 0; margin-bottom: 0; }

/* ==========================================================================
   Refinement pass: identity, quieter UI, no badges
   ========================================================================== */
body { font-stretch: 96%; }
h1 { font-weight: 400; }
.page-head h1 { font-size: 36px; }
.page-head p { margin-top: 8px; }

/* identity */
.sk-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); white-space: nowrap; }
.sk-mark { flex: none; display: block; }
.sk-wm { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; letter-spacing: -.02em; line-height: 1; }
.sb-product { padding: 0 8px 4px; margin-top: auto; opacity: .5; transition: opacity .2s; }
.sb-product:hover { opacity: .9; }
.sb-product .sk-wm { font-size: 15px; }
.sidebar .sb-foot { margin-top: 0; }

/* section labels in sentence case, not shouty caps */
.section-title, .side-title { text-transform: none; letter-spacing: -.005em; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.side h3 { text-transform: none; letter-spacing: -.005em; font-size: 12.5px; color: var(--ink); }
.lhead { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--faint); }
.bulk-table th { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* status marks */
.status svg.glyph { width: 15px; height: 15px; flex: none; }
.st-sent .glyph { color: var(--warn); }
.st-completed .glyph { color: var(--ok); }
.st-draft .glyph { color: var(--faint); }
.st-declined .glyph, .st-voided .glyph, .st-expired .glyph { color: var(--bad); }
.st-declined, .st-voided, .st-expired { color: var(--ink-2); }

/* recipients: side by side, never clipped */
.stack { gap: 4px; }
.stack .av, .item:hover .stack .av { box-shadow: none; }
.stack .av + .av { margin-left: 0; }
.stack .av { width: 24px; height: 24px; font-size: 9.5px; }

/* setup notes: a quiet margin note instead of a boxed alert */
.notes { margin: 0 0 24px; padding: 2px 0 2px 14px; box-shadow: inset 2px 0 0 var(--warn); font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.notes b { font-weight: 600; color: var(--ink); }
.notes p + p { margin-top: 2px; }

.sealed-note { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.sealed-note b { color: var(--ink); font-weight: 600; }
.tcard .tag { gap: 0; }

/* sign-in: quiet and centred, the product's name small at the top */
.auth { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; min-height: 100vh; background: var(--paper); }
.auth-top { padding: 26px 32px; }
.auth-main { display: grid; place-items: center; padding: 24px; }
.auth .card { max-width: 340px; }
.auth h1 { font-size: 34px; line-height: 1.1; }
.auth .card > p { margin: 10px 0 26px; }
.auth-logo { display: block; max-height: 36px; max-width: 180px; margin-bottom: 24px; }
.auth-foot { text-align: center; padding: 24px; font-size: 12px; color: var(--faint); }

/* signing pages */
.sign-top .inner { height: 64px; }
.hdr-link { margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.hdr-link:hover { color: var(--ink); }
.welcome .card { box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(28, 27, 24, .04); }
.welcome .hello { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.welcome h1 { font-size: 34px; line-height: 1.1; }
.doc-meta { color: var(--muted); font-size: 13.5px; margin: 12px 0 26px; }
.quote { box-shadow: inset 2px 0 0 var(--line-strong); padding-left: 18px; }
.ref-line { justify-content: space-between; gap: 12px; box-shadow: 0 -1px 0 var(--line-2); color: var(--muted); }
.ref-line a { color: var(--ink-2); }
.stepper { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.stepper b { color: var(--ink); font-weight: 600; }
.sk-foot { max-width: 540px; margin: 22px auto 0; padding: 0 6px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sk-foot .by { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sk-foot .sk-wm { font-size: 14px; color: var(--ink-2); }
.result.quiet h1 { margin-top: 4px; }
.result { padding: 48px 40px 40px !important; }

/* the signed moment: their own signature, written onto a line */
.signed-moment { width: 270px; max-width: 100%; margin: 0 auto 30px; }
.signed-moment img { display: block; height: 76px; max-width: 250px; margin: 0 auto -4px; object-fit: contain; }
.signed-moment .ink-check { display: block; width: 58px; height: 36px; margin: 0 auto 6px; }
.signed-moment .ink-check path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw .9s var(--ease) .25s forwards; }
.signed-moment .line { display: block; height: 1px; background: var(--line-strong); transform-origin: left center; animation: lineIn .7s var(--ease) both; }
.signed-moment figcaption { margin-top: 10px; font-size: 12.5px; font-weight: 560; color: var(--ink-2); }
.signed-moment figcaption span { display: block; margin-top: 3px; font: 500 11px var(--mono); color: var(--faint); }
@keyframes lineIn { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .signed-moment .ink-check path { stroke-dashoffset: 0; } }
@media (max-width: 560px) { .auth-top { padding: 18px 20px; } .sk-foot { justify-content: center; text-align: center; } }

.quote .from { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 560; color: var(--muted); }
.ref-line b { margin-left: 6px; }
.steps { gap: 0; }
.steps span { font-weight: 500; color: var(--faint); }
.steps { row-gap: 3px; }
.steps span { white-space: nowrap; }
.steps span:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--line-strong); } /* dot trails, so a wrapped line never starts with one */
.steps span.done { color: var(--ink-2); }

.chain { background: transparent !important; padding: 0 0 0 14px; border-radius: 0; font-weight: 500; }
.chain.ok { box-shadow: inset 2px 0 0 var(--ok); color: var(--ink-2); }
.chain.bad { box-shadow: inset 2px 0 0 var(--bad); color: var(--bad); }
@media (max-width: 860px) { .sb-product { display: none; } }

.verdict { padding: 2px 0 2px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.verdict.ok { box-shadow: inset 2px 0 0 var(--ok); }
.verdict.bad { box-shadow: inset 2px 0 0 var(--bad); }
.verdict b { color: var(--ink); }

/* SignKnox wordmark */
.sk-wm { font-family: var(--serif); font-style: normal; font-weight: 560; font-size: 20px; letter-spacing: -.025em; line-height: 1; color: var(--ink); }
.auth-top .sk-wm { font-size: 21px; }
.sb-product { opacity: .45; }
.sb-product .sk-wm { font-size: 15px; }
.sk-foot .sk-wm { font-size: 13.5px; color: var(--ink-2); }

/* ==========================================================================
   SignKnox brand: lock, wordmark, sign-in animation
   ========================================================================== */
.sk-word, .sk-mark { display: block; fill: currentColor; overflow: visible; }
.sk-logo .sk-mark { width: auto; margin-top: -2px; }
.auth-top .sk-logo { gap: 10px; }
.auth-top .sk-mark { height: 26px; }
.sb-product .sk-logo { gap: 8px; }
.sb-product .sk-mark { height: 18px; }
.sk-foot .sk-logo { gap: 6px; }
.sk-foot .sk-mark { height: 16px; color: var(--ink-2); }
.sk-logo { color: var(--ink); line-height: 0; }
.auth-top .sk-word { height: 22px; width: auto; }
.sb-product { opacity: .5; padding-left: 9px; }
.sb-product .sk-word { height: 15px; width: auto; }
.sk-foot .by { gap: 7px; }
.sk-foot .sk-word { height: 14px; width: auto; color: var(--ink-2); }

.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--paper); cursor: pointer;
  transition: opacity .55s var(--ease), visibility .55s; }
.intro.out { opacity: 0; visibility: hidden; }
.intro.out .intro-stage { transform: translateY(-6px) scale(.985); }
.intro-stage { display: flex; flex-direction: column; align-items: center; transition: transform .55s var(--ease); }
.intro-lock { width: 116px; height: auto; overflow: visible; color: var(--ink); }
.lk-seam { fill: var(--paper); }
/* 1. the case draws itself in ink, then fills */
.intro-lock .lk-body { fill: var(--ink); fill-opacity: 0; stroke: var(--ink); stroke-width: .7; stroke-linejoin: round;
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  animation: trace .6s cubic-bezier(.6, 0, .25, 1) 0s forwards, fillIn .35s var(--ease) .45s forwards; }
/* 2. the shackle draws in raised, then drops with a soft spring */
.intro-lock .lk-shackle { transform: translateY(-15px); stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200);
  animation: trace .5s cubic-bezier(.5, 0, .25, 1) .15s forwards, shackleDrop .45s .62s forwards; }
/* 3. on the click: a small thunk, one soft ripple, the seam slides shut, a sheen crosses the case */
.intro-lock .lk-case { animation: thunk .3s cubic-bezier(.3, .7, .4, 1) .85s; }
.intro-lock .lk-ripple { fill: none; stroke: var(--ink); stroke-width: .6; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%;
  animation: lkRipple .7s cubic-bezier(.2, .6, .3, 1) .85s; }
.intro-lock .lk-seam { transform: scaleX(0); transform-box: fill-box; transform-origin: 0 50%; animation: seamIn .4s cubic-bezier(.7, 0, .2, 1) .88s forwards; }
.intro-lock .lk-sheen { transform: skewX(-16deg); animation: sheenPass .8s cubic-bezier(.45, 0, .25, 1) .95s forwards; }
/* 5. warm light comes on behind the keyhole */
.intro-lock .lk-light, .intro-lock .lk-glow { opacity: 0; animation: lightOn .45s var(--ease) 1.95s forwards; }
/* 4. the wordmark is written in, left to right, out of a soft blur */
.intro-word { height: 27px; width: auto; margin-top: 30px; fill: var(--ink); opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 44%, transparent 56%); mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: writeIn .75s cubic-bezier(.4, 0, .2, 1) .9s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill-opacity: 1; } }
@keyframes shackleDrop {
  0% { transform: translateY(-15px); animation-timing-function: cubic-bezier(.55, 0, .9, .45); }
  52% { transform: translateY(1.1px); animation-timing-function: ease-out; }
  70% { transform: translateY(-.55px); animation-timing-function: ease-in-out; }
  86% { transform: translateY(.18px); animation-timing-function: ease-in-out; }
  100% { transform: none; } }
@keyframes thunk { 30% { transform: translateY(1.4px); } 100% { transform: none; } }
@keyframes lkRipple { 0% { opacity: .3; transform: scale(1); } 100% { opacity: 0; transform: scale(1.24); } }
@keyframes seamIn { to { transform: scaleX(1); } }
@keyframes sheenPass { 0% { transform: translateX(0) skewX(-16deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(175px) skewX(-16deg); opacity: 0; } }
@keyframes lightOn { to { opacity: 1; } }
@keyframes writeIn {
  0% { opacity: 1; -webkit-mask-position: 100% 0; mask-position: 100% 0; filter: blur(3px); transform: translateY(3px); }
  100% { opacity: 1; -webkit-mask-position: 0 0; mask-position: 0 0; filter: blur(0); transform: none; } }
@media (max-width: 560px) { .intro-lock { width: 92px; } .intro-word { height: 22px; margin-top: 24px; } }

/* keyhole dive */
.intro-hole { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
.intro-hole .lz-sheet, .intro-hole .lz-paper { fill: var(--paper); }
.intro-hole .lz-ink { fill: var(--ink); }
.intro-hole .lz-light { opacity: 0; }
.intro-stage { position: relative; } /* paints above the dive layer while both are up */
.intro-hole .lz-ink-stroke { stroke: var(--ink); }
.intro.window { background: transparent; transition: none; }
.intro.window .intro-stage { visibility: hidden; }

/* ==========================================================================
   Phase 3: action needed, identity checks, developers
   ========================================================================== */
.sum.alert .n { color: var(--bad); }
.due.bad { color: var(--bad); }
.bad { color: var(--bad); }
.verify-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.verify-pick select { width: auto; max-width: 62%; padding: 5px 28px 5px 9px; font-size: 12.5px; }
.dev-list { border-top: 1px solid var(--line); }
.dev-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dev-row .mono, .mono { font-family: var(--mono); }
.dev-acts { gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 52%; }
.wrap-any { overflow-wrap: anywhere; }
.hash.secret { font-size: 13px; padding: 14px 16px; user-select: all; overflow-wrap: anywhere; }
.check-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 400; }
.check-line input { width: auto; margin: 0; }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 4px; }
.modal .log-row { grid-template-columns: 80px 170px minmax(0, 1fr) 60px; }
@media (max-width: 640px) {
  .dev-row { flex-direction: column; }
  .dev-acts { max-width: none; justify-content: flex-start; }
  .ev-grid { grid-template-columns: 1fr; }
}
.group-host > .group:first-child { margin-top: 28px; padding-top: 24px; box-shadow: 0 -1px 0 var(--line-2); }
.group-host:empty { display: none; }

/* ==========================================================================
   SignKnox frame (dark sidebar, gold accents) and the dashboard
   ========================================================================== */
:root { --side: #1b1a17; --side-2: #25231f; --side-line: rgba(255, 255, 255, .08); --side-ink: #efeadf; --side-muted: #a39d90; --gold: #d6ae58; --gold-hover: #e2bd6c; }
.sidebar { background: var(--side); box-shadow: none; color: var(--side-ink); gap: 20px; padding: 22px 14px 14px; }
.sb-brand { padding: 2px 8px 0; color: var(--side-ink); }
.sb-brand .sk-logo { color: var(--side-ink); gap: 9px; }
.sb-brand .sk-mark { color: var(--gold); height: 23px; }
.sb-brand .sk-word { height: 19px; width: auto; }
.sb-ws { display: block; margin-top: 10px; font-size: 12px; color: var(--side-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .sb-action .primary { background: var(--gold); color: #1c1b18; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); font-weight: 650; }
.sidebar .sb-action .primary:hover { background: var(--gold-hover); }
.sidebar .sb-action .primary .kbd { color: rgba(28, 27, 24, .7); background: rgba(28, 27, 24, .1); box-shadow: none; }
.sidebar .sb-nav a { color: var(--side-muted); position: relative; }
.sidebar .sb-nav a svg.i { color: var(--side-muted); }
.sidebar .sb-nav a:hover { background: rgba(255, 255, 255, .05); color: var(--side-ink); }
.sidebar .sb-nav a.on { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; }
.sidebar .sb-nav a.on svg.i { color: var(--gold); }
.sidebar .sb-nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.sidebar .sb-foot { box-shadow: 0 -1px 0 var(--side-line); margin-top: auto; }
.sidebar .sb-user .av { background: rgba(255, 255, 255, .09); box-shadow: none; color: var(--side-ink); }
.sidebar .sb-user b { color: var(--side-ink); }
.sidebar .sb-user span { color: var(--side-muted); }
.sidebar .sb-foot button.ghost { color: var(--side-muted); }
.sidebar .sb-foot button.ghost:hover { color: var(--side-ink); background: rgba(255, 255, 255, .06); }
.sb-product { display: none; }
@media (max-width: 860px) {
  .sidebar { background: var(--side); box-shadow: none; backdrop-filter: none; gap: 4px; padding: 0 10px; }
  .sb-ws { display: none; }
  .sb-brand .sk-word { height: 16px; }
  .sb-brand .sk-mark { height: 19px; }
  .sidebar .sb-nav a.on::before { display: none; }
}
@media (max-width: 860px) { .sidebar .sb-foot { margin: 0; box-shadow: none; } }
@media (max-width: 350px) { .sb-brand .sk-word { display: none; } }

.dash-head .date { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 4px 0 24px; }
.stat { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 17px; border-radius: 14px; position: relative; overflow: hidden;
  background: var(--t-bg); box-shadow: inset 0 0 0 1px var(--t-line); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--t); }
.stat:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--t-line), 0 12px 26px -18px var(--t); }
.stat:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }
.stat-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--t-deep); }
.stat-top svg.glyph { width: 16px; height: 16px; color: var(--t); flex: none; }
.stat .n { font-family: var(--serif); font-size: 46px; line-height: .9; letter-spacing: -.02em; color: var(--t-deep); }
.stat .note { font-size: 12.5px; color: var(--muted); }
.tone-action { --t: #b4432f; --t-deep: #8c2f20; --t-bg: #fbeeea; --t-line: #f0d7cf; }
.tone-sent { --t: #b67d16; --t-deep: #7a540c; --t-bg: #fbf3e2; --t-line: #eedfbd; }
.tone-soon { --t: #3d5f96; --t-deep: #2a4572; --t-bg: #edf2f9; --t-line: #d5e0ef; }
.tone-completed { --t: #2f7a4f; --t-deep: #215a39; --t-bg: #eaf4ee; --t-line: #cde3d5; }
.stat.quiet { --t: #9b9588; --t-deep: var(--ink-2); --t-bg: var(--sheet); --t-line: var(--line); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.feed { list-style: none; margin: 6px 0 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.feed li:first-child { border-top: 0; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--dot, #b9b3a6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, #b9b3a6) 18%, transparent); }
.feed a { color: var(--ink); font-weight: 600; text-decoration: none; }
.feed a:hover { text-decoration: underline; }
.feed .w { font-size: 12px; color: var(--faint); margin-top: 1px; }
.ev-signed, .ev-completed, .ev-paid { --dot: #2f7a4f; }
.ev-sent, .ev-reassigned { --dot: #b67d16; }
.ev-viewed { --dot: #3d5f96; }
.ev-declined, .ev-email_failed, .ev-expired, .ev-voided { --dot: #b4432f; }
.bars { display: flex; align-items: stretch; gap: 10px; height: 128px; margin-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 34px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: #cde3d5; }
.bar.now i { background: #2f7a4f; }
.bar b { font-size: 11.5px; font-weight: 650; color: var(--ink-2); min-height: 14px; }
.bar span { font-size: 11px; color: var(--faint); }
.tpl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tpl-row:first-of-type { border-top: 0; }
.tpl-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.chip-alert .c { color: #b4432f; }
@media (max-width: 1040px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stats { gap: 10px; } .stat { padding: 15px 14px 14px; gap: 9px; } .stat .n { font-size: 36px; } .stat-top { font-size: 12px; } }

/* ==========================================================================
   v3 design layer (2026-11-23): one sans typeface, neutral surfaces, hairlines,
   colour only where it carries meaning (status, data). Overrides earlier layers.
   ========================================================================== */
:root {
  --paper: #f7f7f6; --paper-2: #f0f0ee; --paper-3: #e7e7e4; --sheet: #fff;
  --ink: #121211; --ink-2: #3b3b38; --muted: #6c6c67; --faint: #a0a09b;
  --line: #e5e5e2; --line-2: #eeeeeb; --line-strong: #d3d3cf;
  --hover: rgba(18, 18, 17, .04); --press: rgba(18, 18, 17, .07);
  --ok: #15803d; --ok-bg: #e9f6ee; --warn: #b45309; --warn-bg: #fdf3e3; --bad: #c2372d; --bad-bg: #fdeeec; --info: #2563c9; --info-bg: #ebf1fd;
  --serif: var(--font);
  --sh-1: 0 1px 2px rgba(18, 18, 17, .04);
  --sh-2: 0 1px 2px rgba(18, 18, 17, .04), 0 6px 16px -6px rgba(18, 18, 17, .10);
  --sh-3: 0 0 0 1px rgba(18, 18, 17, .06), 0 16px 40px -12px rgba(18, 18, 17, .22), 0 4px 10px -4px rgba(18, 18, 17, .08);
  --surface-2: #fafaf9;
  --m-action: #c2372d; --m-sent: #c26a0a; --m-soon: #2563c9; --m-completed: #15803d;
}
body { letter-spacing: -.006em; }
h1 { font-weight: 640; letter-spacing: -.03em; }
h2 { font-weight: 620; letter-spacing: -.02em; }
.page-head h1 { font-size: 28px; line-height: 1.15; }
.page-head p { font-size: 14px; margin-top: 6px; }
.empty h3 { font-size: 18px; font-weight: 620; letter-spacing: -.015em; }
.tcard .body .t { font-size: 15px; font-weight: 620; letter-spacing: -.012em; }
.tcard.new b { font-size: 15px; font-weight: 620; }
.preview-mail .head .nm, .preview-mail .bd b { font-weight: 640; font-size: 16px; letter-spacing: -.015em; }
.sign-bar .grow b { font-size: 15px; font-weight: 620; letter-spacing: -.012em; }
.quote { font-style: normal; font-size: 14.5px; color: var(--ink-2); }
.brandmark .nm { font-weight: 640; letter-spacing: -.02em; font-size: 17px; }
a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }

/* buttons and fields: crisp, quick feedback */
button, .btn { font-weight: 580; border-radius: 8px; transition: background .12s, box-shadow .12s, color .12s, transform .06s; }
button:hover, .btn:hover { background: #fafaf9; }
button:active:not(:disabled), .btn:active { transform: scale(.985); }
button.primary, .btn.primary { background: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(18, 18, 17, .2), inset 0 1px 0 rgba(255, 255, 255, .1); }
button.primary:hover, .btn.primary:hover { background: #2a2a28; }
button.primary .kbd { color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); box-shadow: none; }
input, textarea, select { border-radius: 8px; }
input:focus, textarea:focus, select:focus { box-shadow: inset 0 0 0 1px var(--ink-2), 0 0 0 3px rgba(18, 18, 17, .08); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%236c6c67' d='M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0Zm-96-84.68L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48a8 8 0 0 0 11.32 11.32Z'/%3E%3C/svg%3E"); }
.card { border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.item:hover { background: #fff; }
.stack .av { box-shadow: 0 0 0 2px var(--paper); }
.item:hover .stack .av { box-shadow: 0 0 0 2px #fff; }

/* page changes: a short cross-fade; the sidebar stays put */
.wrap { animation: none; }
@supports not (view-transition-name: none) { .wrap { animation: fade .16s ease-out; } }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root) { animation: vt-out .12s ease-in both; }
::view-transition-new(root) { animation: vt-in .2s cubic-bezier(.2, .75, .25, 1) both; }
::view-transition-group(sidebar), ::view-transition-old(sidebar), ::view-transition-new(sidebar) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(3px); } }

/* sidebar: neutral ink, white primary, gold only on the lock and the active marker */
:root { --side: #141413; --side-ink: #ecece9; --side-muted: #9a9a95; }
.sidebar { background: var(--side); }
.sidebar .sb-action .primary { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.sidebar .sb-action .primary:hover { background: #ececea; }
.sidebar .sb-action .primary .kbd { color: var(--muted); background: var(--paper-2); }
.sidebar .sb-nav a { height: 32px; font-size: 13.5px; }
.sidebar .sb-nav a.on { background: rgba(255, 255, 255, .07); }

/* popover menu (Start, row actions) */
.pop { position: fixed; z-index: 120; min-width: 248px; max-width: 320px; padding: 5px; background: #fff; border-radius: 11px; box-shadow: var(--sh-3); animation: pop-in .14s cubic-bezier(.2, .75, .25, 1); transform-origin: top; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-3px) scale(.985); } }
.pop button { width: 100%; height: auto; min-height: 34px; justify-content: flex-start; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 7px; background: transparent; box-shadow: none; text-align: left; white-space: normal; font-weight: 500; }
.pop button:hover, .pop button:focus-visible { background: var(--paper-2); outline: none; }
.pop button svg.i { width: 16px; height: 16px; color: var(--muted); margin-top: 1px; }
.pop button b { display: block; font-size: 13.5px; font-weight: 580; color: var(--ink); letter-spacing: -.008em; }
.pop button small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.pop button.danger b, .pop button.danger svg.i { color: var(--bad); }
.pop hr { border: 0; height: 1px; background: var(--line-2); margin: 5px 4px; }

/* dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head .date { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.dash-head h1 { font-size: 30px; line-height: 1.12; }
.dash-head .lede { margin-top: 8px; color: var(--muted); font-size: 14px; }
.dash-head .lede a { color: var(--bad); font-weight: 560; text-decoration: none; }
.dash-head .lede a:hover { text-decoration: underline; }
.head-actions .primary { height: 36px; padding: 0 12px 0 11px; gap: 6px; }
.head-actions .primary svg.i:last-child { width: 13px; height: 13px; opacity: .7; margin-left: 2px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); overflow: hidden; margin-bottom: 22px; }
.metric { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 16px; position: relative; transition: background .12s; }
.metric + .metric { box-shadow: inset 1px 0 0 var(--line-2); }
.metric:hover { background: #fafaf9; }
.metric:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.m-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 540; color: var(--ink-2); }
.m-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mc); flex: none; }
.m-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.m-value { font-size: 30px; line-height: 1; font-weight: 620; letter-spacing: -.035em; font-variant-numeric: normal; font-feature-settings: normal; color: var(--ink); }
.m-note { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { width: 76px; height: 26px; flex: none; overflow: visible; }
.spark .ln { fill: none; stroke: var(--mc); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: color-mix(in srgb, var(--mc) 10%, transparent); }
.spark circle { fill: var(--mc); }
.spark rect { fill: color-mix(in srgb, var(--mc) 75%, #fff); }
.spark rect.zero { fill: var(--line); }
.m-action { --mc: var(--m-action); } .m-sent { --mc: var(--m-sent); } .m-soon { --mc: var(--m-soon); } .m-completed { --mc: var(--m-completed); }
.metric.is-zero .m-dot { background: var(--line-strong); }
.metric.is-zero .spark .ln { stroke: var(--line-strong); }
.metric.is-zero .spark circle { fill: var(--line-strong); }
.metric.is-zero .spark .area { fill: transparent; }
.metric.is-zero .m-value { color: var(--faint); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-side { display: grid; gap: 18px; }
.panel { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); padding: 6px 0 4px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 8px; }
.panel-head h2 { font-size: 14px; font-weight: 620; letter-spacing: -.01em; }
.panel-head a { font-size: 12.5px; color: var(--muted); text-decoration: none; font-weight: 520; }
.panel-head a:hover { color: var(--ink); }
.panel-empty { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.panel-empty b { color: var(--ink); font-weight: 600; }
.feed { list-style: none; margin: 0; padding: 0 8px 4px; }
.feed li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 9px 10px; border: 0; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.feed li:hover { background: #fafaf9; }
.feed .dot { width: 7px; height: 7px; margin: 0 0 1px 3px; box-shadow: none; align-self: center; }
.feed .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .what b { font-weight: 580; color: var(--ink); }
.feed .what a { font-weight: 520; color: var(--ink-2); text-decoration: none; }
.feed .what a:hover { color: var(--ink); text-decoration: underline; }
.feed time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-signed, .ev-completed, .ev-paid { --dot: var(--m-completed); }
.ev-sent, .ev-reassigned { --dot: var(--m-sent); }
.ev-viewed { --dot: var(--m-soon); }
.ev-declined, .ev-email_failed, .ev-expired, .ev-voided { --dot: var(--m-action); }
.rows { list-style: none; margin: 0; padding: 0 8px 4px; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.rows li:hover { background: #fafaf9; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.row-main b { font-size: 13.5px; font-weight: 580; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash .notes { margin: -4px 0 22px; }
@media (max-width: 1040px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric:nth-child(3) { box-shadow: inset 0 1px 0 var(--line-2); } .metric:nth-child(4) { box-shadow: inset 1px 0 0 var(--line-2), inset 0 1px 0 var(--line-2); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .metric { padding: 14px 14px 13px; gap: 8px; } .m-value { font-size: 26px; } .spark { width: 56px; } .dash-head h1 { font-size: 25px; } .dash-head { margin-bottom: 18px; } }

/* sign-in: the form in a card, a quiet signing scene beside it */
.auth { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(0, 1.08fr); grid-template-rows: none; min-height: 100vh; background: var(--paper); }
.auth-side { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.auth-top { padding: 28px 36px; }
.auth-top .sk-mark { height: 24px; color: var(--ink); }
.auth-top .sk-word { height: 20px; }
.auth-main { display: grid; place-items: center; padding: 12px 28px 28px; }
.auth-card { width: 100%; max-width: 400px; padding: 34px 34px 30px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(18, 18, 17, .04), 0 18px 44px -22px rgba(18, 18, 17, .22); animation: rise .35s cubic-bezier(.2, .75, .25, 1); }
.auth .auth-card h1 { font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
.auth .auth-card > p { margin: 7px 0 22px; color: var(--muted); font-size: 14px; }
.auth .auth-card label { margin-top: 14px; }
.auth .auth-card .primary.big { height: 42px; border-radius: 9px; font-size: 14px; }
.auth-logo { margin-bottom: 20px; }
.auth-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 36px; font-size: 12.5px; color: var(--faint); text-align: left; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--ink); }
.auth-show { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 92px; padding: 56px clamp(32px, 5vw, 80px); background: #121211; color: #ecece9; }
.auth-show::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 38%, rgba(214, 174, 88, .10), transparent 70%); pointer-events: none; }
.show-copy { position: relative; max-width: 440px; align-self: center; width: 100%; }
.show-copy h2 { text-wrap: balance; color: #fff; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; font-weight: 620; }
.show-copy p { margin-top: 10px; color: #9a9a95; font-size: 14px; line-height: 1.55; }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-show { display: none; } }
@media (max-width: 560px) { .auth-top { padding: 20px; } .auth-main { padding: 4px 14px 20px; } .auth-card { padding: 26px 22px 24px; border-radius: 14px; } .auth-foot { padding: 18px 20px; } }

/* Mona Sans's tabular figures use a slashed zero and a serifed one; the default figures read cleaner */
*, *::before, *::after { font-variant-numeric: normal !important; }

/* documents ledger (v3): one panel, filters on top, selection and row menus */
.dtable { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); overflow: hidden; }
.dt-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 4px 16px 0 18px; box-shadow: inset 0 -1px 0 var(--line); }
.dt-bar .chips { gap: 20px; }
.dt-tools { display: flex; align-items: center; gap: 8px; padding: 8px 0 9px; }
.dt-tools select { width: auto; min-height: 32px; height: 32px; padding: 0 28px 0 10px; font-size: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.dt-tools .search { margin: 0; width: 230px; }
.dt-tools .search input { box-shadow: inset 0 0 0 1px var(--line); }
.dt-bulk { display: flex; align-items: center; gap: 12px; min-height: 51px; padding: 8px 16px 8px 18px; background: #fafaf9; box-shadow: inset 0 -1px 0 var(--line); animation: fade .12s; }
.dt-bulk b { font-size: 13px; font-weight: 600; }
.dt-bulk-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dtable .lhead, .dtable .item { grid-template-columns: 22px minmax(0, 1fr) 128px 176px 88px 30px; gap: 14px; padding-left: 18px; padding-right: 12px; }
.dtable .lhead { height: 36px; background: #fcfcfb; }
.dtable .item { box-shadow: inset 0 -1px 0 var(--line-2); }
.dtable .item:last-child { box-shadow: none; }
.dtable .item:hover { background: #fafaf9; }
.dtable .item.sel { background: #f4f6fb; }
.ck { display: grid; place-items: center; margin: 0; cursor: pointer; }
.ck input { width: 15px; height: 15px; accent-color: var(--ink); }
.dtable .item .ck { opacity: .35; transition: opacity .12s; }
.dtable .item:hover .ck, .dtable .item.sel .ck, .dtable .item .ck:focus-within { opacity: 1; }
.kebab { color: var(--muted); opacity: 0; transition: opacity .12s; }
.item:hover .kebab, .kebab:focus-visible, .kebab[aria-expanded] { opacity: 1; }
.kebab svg.i { width: 18px; height: 18px; }
.mini-progress { width: 84px; height: 3px; border-radius: 3px; background: var(--paper-3); margin-top: 6px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--m-sent); border-radius: 3px; }
.dtable .empty { padding: 48px 24px 56px; }
@media (hover: none) { .kebab, .dtable .item .ck { opacity: 1; } }
@media (max-width: 860px) {
  .dtable .lhead { display: none; }
  .dtable .item { grid-template-columns: 22px minmax(0, 1fr) auto 30px; row-gap: 6px; }
  .dtable .item .stack { display: none; }
  .dtable .item .when { display: none; }
  .dt-tools { width: 100%; } .dt-tools .search { flex: 1; width: auto; }
}

/* recipient type-ahead */
.suggest { position: fixed; z-index: 130; padding: 4px; background: #fff; border-radius: 10px; box-shadow: var(--sh-3); animation: pop-in .12s cubic-bezier(.2, .75, .25, 1); }
.suggest button { width: 100%; height: auto; justify-content: flex-start; gap: 10px; padding: 7px 8px; border-radius: 7px; background: transparent; box-shadow: none; text-align: left; font-weight: 500; }
.suggest button:hover, .suggest button.on { background: var(--paper-2); }
.suggest .sg-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 650; background: var(--paper-2); color: var(--ink-2); }
.suggest b { display: block; font-size: 13px; font-weight: 580; color: var(--ink); }
.suggest small { display: block; font-size: 11.5px; color: var(--muted); }

/* reports */
.rp-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-range select { width: auto; }
.rp-range #custom { display: inline-flex; align-items: center; gap: 6px; }
.rp-range #custom[hidden] { display: none; }
.rp-range input[type=date] { width: auto; min-height: 34px; padding: 5px 9px; }
.rp-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric.static { cursor: default; }
.metric.static:hover { background: transparent; }
.rp-kpis .m-value { font-size: 26px; }
.rp-chart { margin-bottom: 18px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.lg-sent { background: color-mix(in srgb, var(--m-sent) 55%, #fff); } .lg-done { background: var(--m-completed); }
.chart { display: flex; align-items: stretch; gap: 3px; height: 190px; padding: 8px 18px 14px; }
.chart .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bars2 { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line); }
.bars2 i { display: block; width: 42%; max-width: 14px; min-height: 0; border-radius: 3px 3px 0 0; transition: height .3s var(--ease); }
.b-sent { background: color-mix(in srgb, var(--m-sent) 55%, #fff); } .b-done { background: var(--m-completed); }
.chart .col > span { font-size: 10.5px; color: var(--faint); white-space: nowrap; height: 14px; overflow: visible; }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.rp-table .panel-head button svg.i { width: 14px; height: 14px; }
.tscroll { overflow-x: auto; padding: 0 8px 6px; }
.rp-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-table th { text-align: left; font-weight: 520; font-size: 12px; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rp-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table td b { font-weight: 580; color: var(--ink); }
.rp-table td small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.rp-table td a { color: inherit; text-decoration: none; }
.rp-table td a:hover b, .rp-table td a:hover { text-decoration: underline; }
.rp-table th:not(:first-child), .rp-table td:not(:first-child) { white-space: nowrap; }
@media (max-width: 1040px) { .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-kpis .metric:nth-child(n+3) { box-shadow: inset 0 1px 0 var(--line-2); } .rp-grid { grid-template-columns: 1fr; } }

/* editor: undo/redo and zoom */
.ed-tools { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; }
.ed-tools button.icon.small { width: 30px; height: 30px; }
.ed-tools button:disabled { opacity: .35; }
.ed-zoom { min-width: 50px; font-size: 12px; color: var(--ink-2); padding: 0 6px; }
.ed-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.pages { overflow-x: auto; }
.pages .page { width: min(calc(100% * var(--zoom, 1)), calc(860px * var(--zoom, 1))); max-width: none; transition: width .18s cubic-bezier(.2, .75, .25, 1); }
@media (max-width: 800px) { .ed-tools { display: none; } }

/* signature: upload a photo */
.up-drop { display: grid; place-items: center; min-height: 150px; margin: 0; padding: 18px; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: #fcfcfb; cursor: pointer; text-align: center; transition: border-color .12s, background .12s; }
.up-drop:hover { border-color: var(--ink-2); background: #fff; }
.up-drop #upTxt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.up-drop #upTxt[hidden] { display: none; }
.up-drop svg.i { width: 24px; height: 24px; color: var(--muted); margin-bottom: 4px; }
.up-drop b { font-size: 13.5px; font-weight: 600; }
.up-drop small { font-size: 12px; color: var(--muted); max-width: 300px; }
.up-drop img { max-width: 100%; max-height: 120px; }

/* note fields: a quiet instruction, not an input */
.sfld.note { display: flex; align-items: flex-start; gap: 6px; padding: 5px 7px; font-size: clamp(9px, 1.2vw, 12.5px); line-height: 1.35; color: #6b4a07; background: #fff8e6; box-shadow: inset 0 0 0 1px #f0dca8; border-radius: 6px; overflow: auto; cursor: default; }
.sfld.note svg.i { width: 14px; height: 14px; flex: none; margin-top: 1px; color: #b57a08; }
.fld.t-note { align-items: flex-start; }
.fld.t-note span { white-space: normal; line-height: 1.3; overflow: hidden; }

/* sending settings */
.remind-line { font-size: 14px; color: var(--ink-2); line-height: 2.2; }
.num-in { width: 64px; min-height: 32px; height: 32px; padding: 0 8px; text-align: center; display: inline-block; margin: 0 4px; }

/* command palette */
.sb-search { width: 100%; height: 32px; justify-content: flex-start; gap: 9px; padding: 0 10px; margin-top: -8px; font-size: 13px; font-weight: 500; color: var(--side-muted); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.sb-search:hover { background: rgba(255, 255, 255, .08); color: var(--side-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.sb-search svg.i { width: 16px; height: 16px; }
.sb-search .kbd { margin-left: auto; color: var(--side-muted); background: rgba(255, 255, 255, .06); box-shadow: none; }
@media (max-width: 860px) { .sb-search { width: 36px; margin: 0; padding: 0; justify-content: center; order: 1; background: transparent; box-shadow: none; } .sb-search span { display: none; } }
.palette-bg { position: fixed; inset: 0; z-index: 140; background: rgba(18, 18, 17, .32); display: flex; justify-content: center; align-items: flex-start; padding: 13vh 16px 16px; animation: fade .12s; }
.palette { width: min(640px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px rgba(18, 18, 17, .08), 0 30px 80px -20px rgba(18, 18, 17, .45); overflow: hidden; animation: pop-in .16s cubic-bezier(.2, .75, .25, 1); }
.pl-in { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.pl-in svg.i { width: 18px; height: 18px; color: var(--muted); }
.pl-in input { flex: 1; border: 0; box-shadow: none !important; padding: 0; min-height: 0; height: 100%; font-size: 15px; background: transparent; }
.pl-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; }
.pl-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 560; color: var(--faint); }
.pl-item { width: 100%; height: 38px; justify-content: flex-start; gap: 10px; padding: 0 10px; border-radius: 8px; background: transparent; box-shadow: none; font-weight: 500; text-align: left; }
.pl-item:hover { background: transparent; }
.pl-item.on { background: var(--paper-2); }
.pl-item svg.i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.pl-label { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pl-hint { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.pl-empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.pl-foot { display: flex; gap: 16px; justify-content: flex-end; padding: 9px 14px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); background: #fcfcfb; }
.pl-foot .kbd { margin-right: 3px; }

/* descenders (g, p, y) must never clip inside one-line buttons */
.pl-label, .pl-hint, .pop button b, .pop button small, .suggest b, .suggest small, .row-main b, .row-main span, .feed .what { line-height: 1.4; }
.pop button { line-height: 1.3; }

/* recipient card: more options */
.sb-more { margin-top: 8px; }
.sb-more summary { cursor: pointer; font-size: 12px; font-weight: 520; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; }
.sb-more summary::-webkit-details-marker { display: none; }
.sb-more summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.sb-more[open] summary::before { transform: rotate(45deg); }
.sb-more summary:hover { color: var(--ink); }
.sb-more .me-row { margin: 8px 0 6px !important; font-size: 12.5px; }
.sb-more textarea { font-size: 12.5px; min-height: 0; }
.quote.private { box-shadow: inset 2px 0 0 var(--m-soon); }

/* placing / drawing cursor: dark crosshair with a white halo, visible on white pages and dark ones (the system crosshair renders white on white in Edge/Chrome on Windows) */
:root { --cur-place: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg stroke-linecap='round'%3E%3Cpath d='M12 2.5v6M12 15.5v6M2.5 12h6M15.5 12h6' stroke='%23fff' stroke-width='3.6'/%3E%3Cpath d='M12 2.5v6M12 15.5v6M2.5 12h6M15.5 12h6' stroke='%23121211' stroke-width='1.5'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2' fill='%23fff'/%3E%3Ccircle cx='12' cy='12' r='1.1' fill='%23121211'/%3E%3C/svg%3E") 12 12, crosshair; }

/* Settings, Firm: website sign-ups */
.lead-list { list-style: none; margin: 0; padding: 0; }
.lead-list li { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 2px; font-size: 13px; color: var(--ink-2); }
.lead-list li:last-child { border-bottom: 0; }
.lead-list b { color: var(--ink); font-weight: 600; }
.lead-list small { color: var(--faint); font-size: 12px; }
.lead-list q { margin-top: 4px; color: var(--muted); font-size: 12.5px; quotes: none; }
.preview-mail .head.sk { background: #fff; border-bottom: 1px solid var(--line); }
.auth-foot .af-links { display: inline-flex; gap: 20px; flex-wrap: wrap; }

/* passwords: show/hide, strength bar, live checklist (account.js pwNew) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); height: 28px; min-height: 0; padding: 0 9px; border-radius: 6px; background: transparent; box-shadow: none; font-size: 12.5px; font-weight: 560; color: var(--muted); }
.pw-eye:hover { background: var(--paper-2); color: var(--ink); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 4px; margin-top: 9px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--line); transition: background .25s; }
.pw-meter span { min-width: 46px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: #c2372d; }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: #d97706; }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: #65a30d; }
.pw-meter[data-s="4"] i:nth-child(-n+4) { background: #15803d; }
.pw-meter[data-s="1"] span { color: #c2372d; } .pw-meter[data-s="2"] span { color: #b45309; } .pw-meter[data-s="3"] span, .pw-meter[data-s="4"] span { color: #15803d; }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.pw-rules li { position: relative; padding-left: 21px; font-size: 12.5px; line-height: 1.4; color: var(--muted); transition: color .2s; }
.pw-rules li::before { content: ""; position: absolute; left: 3px; top: 4px; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background .2s, box-shadow .2s; }
.pw-rules li.ok { color: var(--ink-2); }
.pw-rules li.ok::before { top: 3px; width: 12px; height: 12px; left: 1.5px; background: #15803d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 6.2l1.9 1.9 3.8-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; box-shadow: none; }
.pw-rules.tried li:not(.ok) { color: var(--bad); }
.pw-rules.tried li:not(.ok)::before { box-shadow: inset 0 0 0 1.5px var(--bad); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.label-row label { margin: 0 !important; }
.label-row + .pw-wrap, .label-row + input { margin-top: 6px; }
.forgot { font-size: 12.5px; font-weight: 560; color: var(--muted); text-decoration: none; }
.forgot:hover { color: var(--ink); text-decoration: underline; }
.auth-ok { display: flex; align-items: center; gap: 9px; margin: -6px 0 16px; padding: 10px 12px; border-radius: 9px; background: var(--ok-bg); color: var(--ok); font-size: 13.5px; font-weight: 540; }
.auth-ok svg.i { width: 17px; height: 17px; flex: none; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: 13.5px; }
.auth-alt a { color: var(--muted); }
.auth-alt a:hover { color: var(--ink); }
.auth .error a { color: inherit; font-weight: 600; }
.pw-change { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.pw-change .pw-new label { margin-top: 0; }
@media (max-width: 640px) { .pw-change { grid-template-columns: 1fr; } }

/* ---------- phones: app bar on top, tab bar at the bottom ---------- */
@media (max-width: 860px) {
  .sidebar { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; gap: 4px; background: var(--side); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 40; }
  .sb-brand { order: 0; flex: 1; }
  .sb-search { order: 1; color: var(--side-muted); }
  .sb-action { order: 2; }
  .sb-foot { order: 3; }
  .sidebar .sb-action .primary { width: 36px; height: 36px; border-radius: 10px; }
  .sb-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; order: 9; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    height: calc(58px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: var(--side); box-shadow: 0 -1px 0 rgba(255, 255, 255, .06); view-transition-name: tabbar; }
  .sb-nav a, .sidebar .sb-nav a { width: auto; height: 58px; flex-direction: column; justify-content: center; gap: 3px; padding: 0; border-radius: 0; background: transparent !important; box-shadow: none !important; }
  .sb-nav a span { display: block; font-size: 10.5px; font-weight: 560; letter-spacing: 0; }
  .sb-nav a svg.i { width: 21px; height: 21px; }
  .sidebar .sb-nav a.on, .sidebar .sb-nav a.on svg.i { color: #fff; }
  .sidebar .sb-nav a.on::before { display: none; }
  #app:has(> .sidebar) { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  /* Settings tabs scroll sideways instead of being cut off */
  .settings-tabs { overflow-x: auto; scrollbar-width: none; gap: 20px; margin-left: -16px; margin-right: -16px; padding: 0 16px; scroll-padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tabs > * { flex: none; white-space: nowrap; }
  /* wide report tables scroll inside their card */
  .rp-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rp-table table { min-width: 520px; }
}
@media (max-width: 380px) { .sb-nav a span { font-size: 9.5px; } }

/* Edge draws its own eye in password boxes; ours is the Show button */
input::-ms-reveal, input::-ms-clear { display: none; }
@media (max-width: 560px) { .sign-bar .inner { padding: 10px 16px; gap: 12px; } .sign-bar .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.forgot-row { display: flex; justify-content: flex-start; margin-top: 18px; }
.forgot-row .forgot { font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.forgot-row .forgot:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- SignKnox brand: the Seal in cobalt, "signknox" in deep navy ink ---------- */
:root { --sk-blue: #2747ff; --sk-blue-hover: #1b38e8; --sk-navy: #0e1433; --sk-blue-on-dark: #7b90ff;
  --gold: var(--sk-blue-on-dark); --gold-hover: #9aabff; }
.sk-logo { color: var(--sk-navy); gap: 8px; }
.sk-mark { color: var(--sk-blue); }
.auth-top .sk-mark { color: var(--sk-blue); height: 24px; }
.auth-top .sk-word { height: 21px; }
.sk-foot .sk-mark { color: var(--sk-blue); }
/* on the dark sidebar and tab bar: white disc, cobalt keyhole, light wordmark */
.sb-brand .sk-logo { color: var(--side-ink); }
.sb-brand .sk-mark { color: #fff; --sk-hole: var(--sk-blue); height: 22px; }
.sb-brand .sk-word { height: 20px; }
.sidebar .sb-action .primary { background: var(--sk-blue); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.sidebar .sb-action .primary:hover { background: var(--sk-blue-hover); }
.sidebar .sb-action .primary .kbd { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .16); }
/* the sign-in scene's glow, and the intro */
.auth-show::before { background: radial-gradient(60% 45% at 50% 38%, rgba(39, 71, 255, .16), transparent 70%); }
.intro-lock { color: var(--sk-blue); }
.intro-lock .lk-body { fill: var(--sk-blue); stroke: var(--sk-blue); }
.intro-lock .lk-ripple { stroke: var(--sk-blue); }
.intro-word { fill: var(--sk-navy); }
.intro-hole .lz-ink { fill: var(--sk-blue); }
.brandmark .sk-logo { color: var(--sk-navy); }

/* ---------- cobalt through the whole flow: buttons, focus, toggles, tabs, progress; navy for dark surfaces ---------- */
:root { --brand: #2747ff; --brand-ink: #fff; --brand-hover: #1b38e8; --brand-ring: rgba(39, 71, 255, .18);
  --side: #0c1230; --side-2: #141b3d; --side-ink: #eef0ff; --side-muted: #98a2c8; }
button.primary, .btn.primary { background: var(--sk-blue); color: #fff; box-shadow: 0 1px 2px rgba(14, 20, 51, .22), inset 0 1px 0 rgba(255, 255, 255, .14); }
button.primary:hover, .btn.primary:hover { background: var(--sk-blue-hover); }
button.primary:active, .btn.primary:active { background: #1630d1; }
button.primary:disabled { background: var(--paper-3); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
button.primary .kbd { color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .14); }
button:focus-visible, .btn:focus-visible, a:focus-visible, .item:focus-visible { outline-color: var(--sk-blue); }
input:focus, textarea:focus, select:focus { box-shadow: inset 0 0 0 1px var(--sk-blue), 0 0 0 3px var(--brand-ring); }
.switch input:checked + span { background: var(--sk-blue); }
.chip.on { box-shadow: inset 0 -2px 0 var(--sk-blue); }
.progress > i { background: var(--sk-blue); }
::selection { background: rgba(39, 71, 255, .18); }
a.link, .forgot-row .forgot:hover { color: var(--sk-blue); }
.sidebar { background: var(--side); }
.sidebar .sb-nav a.on, .sidebar .sb-nav a.on svg.i { color: #fff; }
.sidebar .sb-nav a.on::before { background: var(--sk-blue-on-dark); }
.auth-show { background: #0c1230; }
.sx-toast { background: #182050; }
@media (max-width: 860px) { .sb-nav { background: var(--side); } }
/* log in: the button stays blue while it works; the animation fades in over the page instead of cutting */
button.primary.busy { pointer-events: none; background: var(--sk-blue-hover); }
.intro { animation: introIn .28s ease-out backwards; }
@keyframes introIn { from { opacity: 0; } }

/* Continue with Google */
.g-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; margin: 4px 0 0; border-radius: 9px; background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 2px rgba(14, 20, 51, .05); transition: box-shadow .15s, background .15s; }
.g-btn:hover { background: #fafbff; box-shadow: inset 0 0 0 1px #9aa6d6, 0 1px 2px rgba(14, 20, 51, .06); }
.g-btn .g-logo { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-bad { margin: -6px 0 16px; padding: 10px 12px; border-radius: 9px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; line-height: 1.45; }

/* ---------- dashboard: where your documents are ---------- */
.attn { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #fff4f2; box-shadow: inset 0 0 0 1px #f6d4cf; color: #8f2a1e; text-decoration: none; font-size: 14px; transition: background .15s; }
.attn:hover { background: #ffece8; }
.attn > svg.i { width: 18px; height: 18px; color: #c2372d; flex: none; }
.attn > span:first-of-type { flex: 1; min-width: 0; }
.attn b { font-weight: 650; color: #7c2317; margin-right: 8px; }
.attn-why { color: #a2483b; }
.attn-go { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.attn-go svg.i { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.attn:hover .attn-go svg.i { transform: translateX(2px); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); align-items: stretch; margin-bottom: 22px; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.flow-step { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 16px; border-radius: 10px; position: relative; transition: background .15s; }
.flow-step:hover { background: #f6f7fb; }
.flow-step:focus-visible { outline: 2px solid var(--sk-blue); outline-offset: -2px; }
.fs-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fs-label svg.i { width: 18px; height: 18px; padding: 5px; box-sizing: content-box; border-radius: 8px; }
.fs-draft .fs-label svg.i { color: #5b6275; background: #f0f1f5; }
.fs-sent .fs-label svg.i { color: var(--sk-blue); background: #edf0ff; }
.fs-completed .fs-label svg.i { color: #15803d; background: #e9f6ee; }
.fs-num { margin-top: 10px; font-size: 38px; line-height: 1; font-weight: 640; letter-spacing: -.04em; color: var(--ink); }
.flow-step.is-zero .fs-num { color: #b9bcc8; }
.fs-note { font-size: 13px; color: var(--muted); }
.fs-warn { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 6px; padding: 3px 8px 3px 6px; border-radius: 99px; background: #fff6e5; color: #9a5b06; font-size: 12px; font-weight: 600; }
.fs-warn svg.i { width: 13px; height: 13px; }
.flow-sep { display: grid; place-items: center; color: #c5c8d3; }
.flow-sep svg.i { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; padding: 4px; }
  .flow-sep { display: none; }
  .flow-step { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label num" "note num" "warn warn"; align-items: center; padding: 14px 14px; }
  .flow-step + .flow-sep + .flow-step { box-shadow: inset 0 1px 0 var(--line-2); border-radius: 0; }
  .fs-label { grid-area: label; } .fs-num { grid-area: num; margin: 0; font-size: 30px; } .fs-note { grid-area: note; padding-left: 36px; } .fs-warn { grid-area: warn; margin-left: 36px; }
}
/* activity: a small icon per event */
.feed li { grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; }
.feed .ev-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f2f3f7; color: #5b6275; }
.feed .ev-ic svg.i { width: 14px; height: 14px; }
.feed .ev-signed .ev-ic, .feed .ev-completed .ev-ic, .feed .ev-paid .ev-ic { background: #e9f6ee; color: #15803d; }
.feed .ev-viewed .ev-ic { background: #edf0ff; color: var(--sk-blue); }
.feed .ev-sent .ev-ic { background: #edf0ff; color: var(--sk-blue); }
.feed .ev-declined .ev-ic, .feed .ev-email_failed .ev-ic, .feed .ev-voided .ev-ic { background: #fff1ef; color: #c2372d; }
.feed .ev-expired .ev-ic { background: #fff6e5; color: #b45309; }
.feed .dot { display: none; }

/* ---------- tabs with icons, count pills and a sliding underline (Documents, Settings) ---------- */
.tabs-ink { position: relative; }
.tabs-ink .chip { display: inline-flex; align-items: center; gap: 7px; height: 44px; font-size: 13.5px; font-weight: 540; color: var(--muted); box-shadow: none !important; transition: color .15s; }
.tabs-ink .chip svg.i { width: 16px; height: 16px; color: #9aa0b2; transition: color .15s; }
.tabs-ink .chip:hover, .tabs-ink .chip:hover svg.i { color: var(--ink); }
.tabs-ink .chip.on { color: var(--ink); font-weight: 620; }
.tabs-ink .chip.on svg.i { color: var(--sk-blue); }
.tabs-ink .chip .c { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: #eef0f4; color: #5b6275; font: 600 11.5px/1 var(--font); }
.tabs-ink .chip .c.zero { background: transparent; color: #b4b8c4; box-shadow: inset 0 0 0 1px #e6e8ee; }
.tabs-ink .chip.on .c { background: #e8ecff; color: var(--sk-blue); }
.tabs-ink .chip.chip-alert .c { background: #fdecea; color: #c2372d; }
.tab-ink { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; border-radius: 2px 2px 0 0; background: var(--sk-blue); transition: transform .32s cubic-bezier(.2, .75, .25, 1), width .32s cubic-bezier(.2, .75, .25, 1); pointer-events: none; }
/* Settings: the header, the tab row and the underline hold still while only the panel changes */
main:has(.settings-tabs) .page-head h1 { view-transition-name: settings-title; }
.settings-tabs { view-transition-name: settings-tabs; }
.settings-tabs .tab-ink { view-transition-name: tab-ink; }
::view-transition-group(tab-ink) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2, .75, .25, 1); }
/* the title and tab row don't fade at all: the new ones simply replace the old (same place, same look) */
::view-transition-old(settings-tabs), ::view-transition-old(settings-title) { display: none; }
::view-transition-new(settings-tabs), ::view-transition-new(settings-title), ::view-transition-group(settings-tabs), ::view-transition-group(settings-title) { animation: none; }
::view-transition-old(tab-ink), ::view-transition-new(tab-ink) { animation: none; }
/* page changes: the old page clears a beat before the new one arrives, so the two never show double */
::view-transition-old(root) { animation: vt-out .1s ease-in both; }
::view-transition-new(root) { animation: vt-in .2s cubic-bezier(.2, .75, .25, 1) .07s both; }
@keyframes vt-fade { from { opacity: 0; } }
/* quieter icons: colour only, no tinted boxes */
.fs-label svg.i { padding: 0; background: none !important; width: 18px; height: 18px; }
.feed .ev-ic { background: none !important; width: 18px; height: 26px; }
.feed .ev-ic svg.i { width: 16px; height: 16px; }
.feed li { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; }
/* leaving or entering Settings from another page: the title, tabs and underline fade with the page
   (only when Settings is on both sides do they hold still and the underline slides) */
::view-transition-old(tab-ink):only-child, ::view-transition-old(settings-tabs):only-child, ::view-transition-old(settings-title):only-child { display: block; animation: vt-out .1s ease-in both; }
::view-transition-new(tab-ink):only-child, ::view-transition-new(settings-tabs):only-child, ::view-transition-new(settings-title):only-child { animation: vt-in .2s cubic-bezier(.2, .75, .25, 1) .07s both; }

/* ---------- the logo lockup: one rule for every place it appears ----------
   --wh is the letter height (baseline to the top of the k); the Seal is 1.12x that, centred on the letters,
   with a gap of a third; the g hangs below like it does in text. */
.sk-logo { --wh: 14px; gap: calc(var(--wh) * .34) !important; align-items: center; line-height: 0; }
.sk-logo .sk-word { height: var(--wh) !important; width: auto !important; overflow: visible; }
.sk-logo .sk-mark { height: calc(var(--wh) * 1.12) !important; width: auto !important; margin: 0 !important; }
.sb-brand .sk-logo { --wh: 15.5px; }
.auth-top .sk-logo { --wh: 17px; }
.brandmark .sk-logo { --wh: 14px; }
.sk-foot .sk-logo { --wh: 11px; }
.preview-mail .sk-logo { --wh: 12.5px; }
.sb-product .sk-logo { --wh: 11px; }
@media (max-width: 860px) { .sb-brand .sk-logo { --wh: 14.5px; } }

/* ---------- pop-ups that arrive and leave smoothly ---------- */
.toast { animation: toast-in .32s cubic-bezier(.2, .75, .25, 1) both; transition: opacity .22s ease, transform .26s cubic-bezier(.4, 0, .6, 1); view-transition-name: toast; }
.toast.out { opacity: 0; transform: translate(-50%, 6px) scale(.985); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }
::view-transition-group(toast), ::view-transition-old(toast), ::view-transition-new(toast) { animation: none; }
.modal-bg { animation: fade .18s ease-out both; }
.modal { animation: modal-in .26s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-bg.closing { animation: fade-out .17s ease-in both; }
.modal-bg.closing .modal { animation: modal-out .17s ease-in both; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(4px) scale(.99); } }
@media (prefers-reduced-motion: reduce) { .toast, .modal, .modal-bg { animation: none !important; transition: none !important; } }

/* ---------- page changes: one calm cross-fade, and the sidebar highlight slides to the new page ---------- */
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-fade .2s ease-out both; }
@media (min-width: 861px) { .sb-nav { position: relative; } } /* desktop only: on phones the tab bar is pinned to the bottom */
.sb-nav a { position: relative; z-index: 1; }
.sidebar .sb-nav a.on { background: transparent !important; }
.sidebar .sb-nav a.on::before { display: none !important; }
.sb-hl { position: absolute; left: 0; right: 0; top: 0; height: 32px; border-radius: 7px; background: rgba(255, 255, 255, .08); pointer-events: none; opacity: 0; view-transition-name: nav-hl; }
.sb-hl::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sk-blue-on-dark); }
::view-transition-group(nav-hl) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .75, .25, 1); }
::view-transition-old(nav-hl), ::view-transition-new(nav-hl) { animation: none; }
::view-transition-old(nav-hl) { display: none; }
@media (max-width: 860px) { .sb-hl { display: none; } }

/* clients: the firm's address book */
.cl-table .lhead, .cl-table .item { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 150px 92px 96px; gap: 14px; padding-left: 18px; padding-right: 18px; }
.cl-table .lhead span:last-child, .cl-table .item .when { text-align: right; }
.cl-bar { align-items: center; }
.cl-count { font-size: 13px; font-weight: 560; color: var(--ink-2); padding: 12px 0; }
.cl-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-who .doc { min-width: 0; }
.cl-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11.5px; font-weight: 650; color: #2747ff; background: #eef0ff; }
.cl-av.lg { width: 44px; height: 44px; font-size: 15px; }
.cl-cell { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faint { color: var(--faint); }
.cl-offer { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 14px 12px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
.cl-offer > svg.i { width: 20px; height: 20px; color: #2747ff; flex: none; }
.cl-offer > div { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; }
.cl-offer b { display: block; font-weight: 600; color: var(--ink); }
.cl-offer span { color: var(--muted); }
.cl-mhead { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.cl-mhead h2 { margin: 0; }
.cl-mhead p { margin: 2px 0 0; font-size: 13px; }
.cl-mhead .grow { min-width: 0; }
.cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cl-form label { margin-top: 14px; }
.cl-hint { margin: 2px 0 8px; }
.cl-det { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.cl-docs { margin-top: 20px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cl-docs-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 14px 8px; }
.cl-doc { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; color: inherit; box-shadow: inset 0 1px 0 var(--line-2); transition: background .12s; }
.cl-doc:hover { background: #fafaf9; }
.cl-doc .t { font-size: 13.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-doc .when { font-size: 12px; color: var(--muted); text-align: right; }
.cl-more { display: block; padding: 10px 14px; font-size: 13px; box-shadow: inset 0 1px 0 var(--line-2); }
.suggest .sg-tag { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 600; color: #2747ff; background: #eef0ff; border-radius: 5px; padding: 2px 6px; }
@media (max-width: 860px) {
  .cl-table .lhead { display: none; }
  .cl-table .item { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .cl-table .item .cl-cell { display: none; }
  .cl-grid { grid-template-columns: 1fr; }
  .cl-mhead { flex-wrap: wrap; }
  .cl-offer { flex-wrap: wrap; }
  .sb-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .sb-nav a span { font-size: 10px; }
}
.page-head .head-actions { display: flex; gap: 8px; align-items: center; }
.head-actions > button { height: 36px; }

/* email templates (Settings, Emails) */
.em-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.em-list { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.em-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 16px; }
.em-row + .em-row { box-shadow: inset 0 1px 0 var(--line-2); }
.em-row.on { background: #f7f8ff; }
.em-main { flex: 1; min-width: 0; }
.em-main b { display: block; font-size: 13.5px; font-weight: 600; }
.em-main span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.em-def { font-size: 11px; font-weight: 600; color: #2747ff; background: #eef0ff; border-radius: 5px; padding: 3px 8px; flex: none; }
.modal.em-modal { max-width: 1060px; }
.em-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4px 26px; }
.em-edit h2 { margin: 0; }
.em-form textarea { font-size: 14px; line-height: 1.55; resize: vertical; min-height: 220px; }
.em-form input[readonly], .em-form textarea[readonly] { background: var(--paper); color: var(--ink-2); }
.em-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.em-tags > span { font-size: 12px; color: var(--muted); margin-right: 2px; }
.em-tag { height: 26px; padding: 0 8px; font: 500 12px/1 var(--mono); border-radius: 6px; color: var(--ink-2); }
.em-prev { display: flex; flex-direction: column; min-height: 0; }
.em-prev-h { display: flex; gap: 8px; align-items: baseline; padding: 10px 14px; border-radius: 10px 10px 0 0; box-shadow: inset 0 0 0 1px var(--line); background: #fff; font-size: 13px; }
.em-prev-h b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-prev iframe { flex: 1; width: 100%; min-height: 470px; border: 0; border-radius: 0 0 10px 10px; box-shadow: inset 0 0 0 1px var(--line); background: #f5f6fa; margin-top: -1px; }
.em-acts { grid-column: 1 / -1; }
.em-acts .grow { flex: 1; }
@media (max-width: 860px) {
  .em-edit { grid-template-columns: 1fr; }
  .em-prev iframe { min-height: 380px; }
  .em-row { flex-wrap: wrap; }
}

/* free trial sign-up */
.auth-legal { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--faint); }
.auth-legal a { color: var(--muted); }
.auth-alt .dot { margin: 0 8px; color: var(--faint); }
.code-in { font: 600 22px/1 var(--mono); letter-spacing: .32em; text-align: center; height: 52px; }

/* free trial: the allowance in the sidebar, the trial home and the plans prompt */
.sb-trial { display: block; margin: -4px 0 0; padding: 11px 12px 10px; border-radius: 9px; text-decoration: none; color: var(--side-ink); background: rgba(123, 144, 255, .12); box-shadow: inset 0 0 0 1px rgba(123, 144, 255, .28); transition: background .15s; }
.sb-trial:hover { background: rgba(123, 144, 255, .2); }
.sb-trial b { display: block; font-size: 12.5px; font-weight: 650; }
.sb-trial span { display: block; font-size: 12px; color: var(--side-muted); margin-top: 1px; }
.sb-trial i { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--sk-blue-on-dark); }
.sb-trial i svg.i { width: 12px; height: 12px; }
.tr-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; background: #fff; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--sh-1); overflow: hidden; }
.tr-steps { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 18px; }
.tr-step { display: flex; gap: 14px; align-items: flex-start; }
.tr-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; color: #2747ff; background: #eef0ff; }
.tr-step > div > b { display: block; font-size: 14px; font-weight: 600; }
.tr-step > div > span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.tr-cta { padding: 18px; background: #fafaf9; box-shadow: inset 1px 0 0 var(--line); display: flex; }
.tr-drop { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 18px; border-radius: 12px; border: 1.5px dashed var(--line-strong); text-align: center; transition: border-color .15s, background .15s; }
.tr-drop > svg.i { width: 30px; height: 30px; color: #2747ff; }
.tr-drop > b { font-size: 15px; font-weight: 600; }
.tr-drop > span { font-size: 12.5px; color: var(--faint); }
.tr-start.dropping .tr-drop { border-color: #2747ff; background: #f4f6ff; }
.tr-doc { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.tr-doc-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #2747ff; background: #eef0ff; }
.tr-doc-ic svg.i { width: 20px; height: 20px; }
.tr-doc-main { flex: 1; min-width: 0; }
.tr-doc .t { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-doc .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tr-up { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 20px 22px; border-radius: 14px; background: #0e1433; color: #eef0ff; }
.tr-up h3 { margin: 0; font-size: 16px; font-weight: 650; color: #fff; }
.tr-up p { margin: 4px 0 0; font-size: 13.5px; color: #aab3d9 !important; max-width: 520px; }
.tr-up .row { flex: none; gap: 8px; }
.tr-up .btn:not(.primary) { background: transparent; color: #eef0ff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.up-modal { text-align: center; }
.up-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 14px; color: #2747ff; background: #eef0ff; }
.up-ic svg.i { width: 22px; height: 22px; }
.up-modal h2 { margin: 0; }
.up-modal > p { margin: 8px auto 0; max-width: 380px; }
.up-list { list-style: none; padding: 0; margin: 18px auto 4px; max-width: 340px; text-align: left; display: grid; gap: 8px; }
.up-list li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.up-list svg.i { width: 15px; height: 15px; color: #2747ff; flex: none; }
.up-modal .modal-actions { justify-content: center; }
@media (max-width: 860px) {
  .sb-trial { display: none; }
  .tr-start { grid-template-columns: 1fr; }
  .tr-cta { box-shadow: inset 0 1px 0 var(--line); }
  .tr-up { flex-direction: column; align-items: flex-start; }
  .tr-doc { flex-wrap: wrap; }
}
button.g-btn { width: 100%; justify-content: center; }

/* intro wordmark: taller box so the g's tail isn't masked; the letters keep their size and place */
.intro-word { height: calc(27px * var(--dk, 1)); margin-bottom: calc(-27px * (var(--dk, 1) - 1)); }
@media (max-width: 560px) { .intro-word { height: calc(22px * var(--dk, 1)); margin-bottom: calc(-22px * (var(--dk, 1) - 1)); } }

/* ---------- switching pass (2026-11-23): languages, roles, stamps, masked boxes, in person ---------- */
.hdr-link { margin-left: 0; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12.5px; }
.lang-pick svg.i { width: 15px; height: 15px; }
.lang-pick select { height: 30px; width: auto; padding: 0 26px 0 8px; font-size: 12.5px; border-radius: 7px; background-color: transparent; }
@media (max-width: 560px) { .sign-top .hdr-link { display: none; } .lang-pick svg.i { display: none; } }
.sign-note { background: var(--paper-2); box-shadow: 0 1px 0 var(--line); }
.sign-note .inner { max-width: 960px; margin: 0 auto; padding: 10px 22px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.sign-note svg.i { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sfld.t-stamp, .fld.t-stamp { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.sfld.t-stamp img, .fld.t-stamp img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sfld.t-stamp span { font-size: 12px; }
.sfld.masked input { letter-spacing: .12em; padding-right: 26px; }
.sfld .mask-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); height: 22px; width: 22px; padding: 0; background: transparent; box-shadow: none; color: var(--muted); }
.sfld .mask-eye svg.i { width: 14px; height: 14px; }
.seg button { padding: 0 5px; gap: 4px; }
.seg button svg.i { width: 13px; height: 13px; }
@media (max-width: 1280px) { .signer-box .seg button svg.i { display: none; } }
.doc-opts { margin-top: 14px; }
.doc-opts .me-row { margin-top: 8px !important; }
/* folders, scheduled, custom fields, page views, alerts */
.dt-tools #folder { width: auto; max-width: 200px; }
.sched { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 540; }
.sched svg.i, .item .sub svg.i { width: 13px; height: 13px; vertical-align: -2px; }
.sched-banner { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: #eef1ff; color: #1d2a6b; font-size: 13.5px; box-shadow: 0 1px 0 var(--line); }
.sched-banner svg.i { width: 16px; height: 16px; }
.sched-banner span { flex: 1; }
.meta-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
.meta-row input { height: 32px; font-size: 13px; }
.meta-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.meta-dl dt { color: var(--muted); }
.meta-dl dd { margin: 0; font-weight: 540; overflow-wrap: anywhere; }
.fold-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.fold-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.fold-row input { height: 34px; }
.pv { padding: 10px 0; border-top: 1px solid var(--line); }
.pv:first-of-type { border-top: 0; padding-top: 0; }
.pv-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 8px; }
.pv-bars i { flex: 1; max-width: 22px; height: var(--h); min-height: 2px; background: var(--sk-blue, #2747ff); border-radius: 2px 2px 0 0; opacity: .85; }
.pv-bars i[style*="--h:0%"] { background: var(--line-2); opacity: 1; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; margin-top: 10px; }
.chk-grid .me-row { margin: 0 !important; }
.role-sel { height: 26px; width: auto; padding: 0 24px 0 8px; font-size: 12px; border-radius: 6px; }
.sso-stack { display: grid; gap: 10px; }
.sso-stack .g-btn { margin: 0; }
.sign-note.test { background: #fff1f0; } .sign-note.test .inner { gap: 8px; color: #8a1c14; }
/* four roles fit the recipient card: labels only, equal columns */
.signer-box .seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.signer-box .seg button { padding: 0 2px; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signer-box .seg button svg.i { display: none; }
.side-more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 6px; }
.side .row.between > h3 { margin-bottom: 10px; }
/* phones: the stamp box shows its icon only; the line of links under the title wraps instead of running off */
.sfld.t-stamp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 560px) {
  .sfld.t-stamp span { display: none; }
  .sign-bar .meta { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.55; }
}
.side .row.between:has(#findF) { align-items: center; margin: 26px 0 10px; }
.side .row.between:has(#findF) h3 { margin: 0; }

/* questions and answers */
.qa-list { max-height: 320px; overflow: auto; display: grid; gap: 8px; margin: 6px 0 14px; }
.qa { padding: 10px 12px; border-radius: 10px; background: var(--paper-2); max-width: 92%; }
.qa.me { justify-self: end; background: #eef1ff; }
.qa-h { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
.qa-h span { color: var(--muted); }
.qa p { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa-thread { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.qa-thread:first-of-type { border-top: 0; padding-top: 0; }
.qa-reply { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.qa-reply textarea { min-height: 0; font-size: 13.5px; }

.grp-l { margin-top: 10px !important; font-size: 12.5px; }
.signer-box textarea[data-group] { font-size: 12.5px; min-height: 0; }
.badge.skipped { background: var(--paper-2); color: var(--muted); }

/* phones: the fill-in panel slides up from the bottom */
@media (max-width: 699px) {
  .modal-bg:has(.sheet-modal) { align-items: flex-end; padding: 0; }
  .modal.sheet-modal { width: 100%; max-width: none; border-radius: 18px 18px 0 0; margin: 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.fill-sheet label { font-size: 15px; font-weight: 600; margin: 0 0 8px; display: block; }
.fill-sheet .req { color: var(--red); }
.fill-sheet input, .fill-sheet select { height: 52px; font-size: 17px; width: 100%; }
