/* CreaterDigital — cobalt for action, teal only for cryptographically verified states. */
@import url('/vendor/fonts/ibm-plex-sans/400.css');
@import url('/vendor/fonts/ibm-plex-sans/500.css');
@import url('/vendor/fonts/ibm-plex-sans/600.css');
@import url('/vendor/fonts/ibm-plex-mono/400.css');

:root {
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --ink: #121a26;
  --ink-2: #4b5668;
  --ink-3: #7f8a9c;
  --line: #e2e7ef;
  --line-2: #cdd4df;
  --cobalt: #2747d6;
  --cobalt-ink: #1b34a8;
  --cobalt-wash: #eaeefc;
  --seal: #0e8c7e;
  --seal-ink: #0a6a60;
  --seal-wash: #e3f4f1;
  --warn: #a35e00;
  --warn-wash: #fbf0dc;
  --danger: #b42329;
  --danger-wash: #fbe8e8;
  --pen: #1f3a9e;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 5px;
  --r-md: 9px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.012em; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 15.5px; }
p { margin: 0 0 1em; }
a { color: var(--cobalt); text-underline-offset: 2px; }
small, .muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { margin: 0 8px 18px; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; }
.side a.nav svg { width: 18px; height: 18px; flex: none; }
.side a.nav:hover { background: var(--canvas); color: var(--ink); }
.side a.nav[aria-current="page"] { background: var(--cobalt-wash); color: var(--cobalt-ink); }
.side .grow { flex: 1; }
.side .who { border-top: 1px solid var(--line); padding: 12px 8px 0; font-size: 13px; }
.side .who strong { display: block; font-size: 14px; }
.plan-chip { display: block; margin: 0 4px 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--canvas); font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.plan-chip b { color: var(--ink); font-weight: 600; }
.main { min-width: 0; }
.mobile-bar { display: none; }
.banner { padding: 9px 24px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.banner-warn { background: var(--warn-wash); color: #5d3600; }
.banner-test { background: #fff7d6; color: #5c4a00; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 60; transform: translateX(-105%); transition: transform .18s; height: 100%; box-shadow: 0 0 40px rgba(18,26,38,.2); }
  .side.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand .tld { color: var(--ink-3); font-weight: 400; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 30px 28px 64px; }
.wrap-narrow { max-width: 760px; }
@media (max-width: 640px) { .wrap { padding: 22px 16px 56px; } }

/* -------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 500 14px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-ink); border-color: var(--cobalt-ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--canvas); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }

label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 38px; padding: 0 11px; font: 15px var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-wash); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink); font-size: 14.5px; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--cobalt); flex: none; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 160px; }
.row-tight { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin-bottom: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }

.alert { padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 16px; border-left: 3px solid; }
.alert-error { background: var(--danger-wash); border-color: var(--danger); color: #6b1418; }
.alert-warn { background: var(--warn-wash); border-color: var(--warn); color: #5d3600; }
.alert-ok { background: var(--seal-wash); border-color: var(--seal); color: var(--seal-ink); }
.alert-info { background: var(--cobalt-wash); border-color: var(--cobalt); color: var(--cobalt-ink); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: #eef1f5; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-sent, .status-completing { background: var(--cobalt-wash); color: var(--cobalt-ink); }
.status-completed { background: var(--seal-wash); color: var(--seal-ink); }
.status-declined, .status-voided { background: var(--danger-wash); color: var(--danger); }
.status-expired { background: var(--warn-wash); color: var(--warn); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--r-sm); font-size: 14px; z-index: 100; max-width: calc(100% - 32px); }

dialog { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; width: min(540px, calc(100% - 32px)); color: var(--ink); }
dialog::backdrop { background: rgba(18, 26, 38, .45); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------------------- public site */
.site-top { display: flex; align-items: center; gap: 28px; padding: 16px 32px; max-width: 1200px; margin: 0 auto; }
.site-top nav { display: flex; gap: 22px; flex: 1; }
.site-top nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.site-top nav a:hover, .site-top nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) { .site-top { padding: 14px 16px; gap: 14px; flex-wrap: wrap; } .site-top nav { order: 3; flex-basis: 100%; gap: 16px; } }

.hero { max-width: 1200px; margin: 0 auto; padding: 56px 32px 72px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.028em; margin-bottom: 18px; max-width: 15ch; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 28px 16px 48px; gap: 36px; } .hero h1 { font-size: 34px; } }

/* The memorable element: a document whose fingerprint resolves into a seal. */
.proof { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(18,26,38,.28); }
.proof-doc { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 20px 14px; background: #fcfdfe; }
.proof-doc .ln { height: 7px; border-radius: 4px; background: #e9edf3; margin: 0 0 9px; }
.proof-sig { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.proof-sig div { border-top: 1px solid var(--line-2); padding-top: 6px; font-size: 12px; color: var(--ink-3); position: relative; }
.proof-sig svg { position: absolute; bottom: 22px; left: 0; width: 120px; height: 40px; }
.proof-sig path { fill: none; stroke: var(--pen); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: ink 1.4s ease-out forwards; }
.proof-sig div:nth-child(2) path { animation-delay: 1.2s; }
.proof-hash { margin-top: 16px; font: 12px/1.5 var(--mono); color: var(--ink-3); word-break: break-all; }
.proof-hash .done { color: var(--seal-ink); }
.proof-seal { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--seal-wash); color: var(--seal-ink); font-size: 13.5px; font-weight: 500; opacity: 0; animation: appear .5s 2.9s forwards; }
.proof-seal svg { width: 20px; height: 20px; flex: none; }
@keyframes ink { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .proof-sig path { animation: none; stroke-dashoffset: 0; } .proof-seal { animation: none; opacity: 1; } }

.section { max-width: 1200px; margin: 0 auto; padding: 56px 32px; }
.section h2 { font-size: 28px; letter-spacing: -.02em; max-width: 26ch; }
.section-intro { color: var(--ink-2); max-width: 60ch; font-size: 16px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; margin-top: 30px; }
.features h3 { font-size: 16px; margin-bottom: 6px; }
.features p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.flow { list-style: none; counter-reset: f; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.flow li { counter-increment: f; padding: 14px 16px 0 0; font-size: 14px; color: var(--ink-2); }
.flow li::before { content: counter(f); display: block; font: 600 13px var(--mono); color: var(--cobalt); margin-bottom: 8px; }
.flow li strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.band { background: var(--ink); color: #dbe2ee; }
.band h2 { color: #fff; }
.band a { color: #fff; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .flow { grid-template-columns: 1fr 1fr; } .section { padding: 40px 16px; } }

.site-foot { border-top: 1px solid var(--line); padding: 28px 32px; font-size: 13px; color: var(--ink-3); display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-foot a { color: var(--ink-3); }

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; }
.price.featured { border: 2px solid var(--cobalt); }
.price .amount { font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.price .amount small { font-size: 15px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 18px 0 22px; font-size: 14.5px; }
.price li { padding: 7px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.price li span:last-child { font-weight: 500; text-align: right; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }

/* auth pages */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .brand { margin-bottom: 26px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px; font: 500 14.5px var(--sans); color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--cobalt); }

/* -------------------------------------------------------------- dashboard */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.overview { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 18px; }
.overview a { padding: 16px 18px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); }
.overview a:first-child { border-left: 0; }
.overview a:hover { background: #fafbfd; }
.overview .n { font-size: 26px; font-weight: 600; letter-spacing: -.02em; display: block; line-height: 1.1; }
.overview .l { font-size: 13px; color: var(--ink-3); }
@media (max-width: 760px) { .overview { grid-template-columns: 1fr 1fr; } .overview a:nth-child(3) { border-left: 0; } .overview a:nth-child(n+3) { border-top: 1px solid var(--line); } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.side-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.side-list li { padding: 9px 0; border-top: 1px solid var(--line); }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.meter { height: 6px; background: #e8ecf2; border-radius: 3px; overflow: hidden; margin: 6px 0 2px; }
.meter span { display: block; height: 100%; background: var(--cobalt); }
.meter.full span { background: var(--warn); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 300px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters .n { opacity: .65; margin-left: 4px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 120px 110px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #fafbfd; }
.list-row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .s { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 5px; background: #e8ecf2; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--cobalt); }
.list-row .done .progress span { background: var(--seal); }
.empty { text-align: center; padding: 52px 24px; }
.empty h2 { margin-bottom: 6px; }
@media (max-width: 760px) { .list-row { grid-template-columns: 1fr auto; } .list-row .c3, .list-row .c4 { display: none; } }

.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 30px 20px; text-align: center; background: #fbfcfe; cursor: pointer; }
.dropzone.over { border-color: var(--cobalt); background: var(--cobalt-wash); }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }

/* ----------------------------------------------------------------- editor */
.steps { display: flex; counter-reset: s; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps button { counter-increment: s; background: none; border: 0; padding: 10px 18px 12px 0; margin-right: 20px; font: 500 14px var(--sans); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.steps button::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; font-size: 12px; margin-right: 8px; }
.steps button[aria-current="step"] { color: var(--ink); border-color: var(--cobalt); }
.steps button.done::before { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

.rcp-list { display: flex; flex-direction: column; gap: 10px; }
.rcp { display: grid; grid-template-columns: 30px 54px minmax(0,1.2fr) minmax(0,1.4fr) 140px 38px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--ink-3)); border-radius: var(--r-sm); background: var(--surface); }
.rcp .order { width: 54px; text-align: center; padding: 0 4px; }
.rcp .handle { text-align: center; color: var(--ink-3); font-weight: 600; }
.rcp .phone { grid-column: 3 / 5; }
@media (max-width: 760px) { .rcp { grid-template-columns: 1fr 1fr; } .rcp .handle { display: none; } .rcp .phone { grid-column: 1 / -1; } }

.editor { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.palette { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 14px; }
.tool { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font: 500 14px var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.tool:hover { border-color: var(--c, var(--ink-3)); }
.tool[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 3px 0 0 var(--c); }
.tool svg { width: 18px; height: 18px; flex: none; color: var(--c, var(--ink-2)); }
.props { font-size: 13.5px; }
.doc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 6px 12px; font: 500 13px var(--sans); cursor: pointer; color: var(--ink-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-tabs button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .palette { position: static; } }

/* ------------------------------------------------------------ PDF viewer */
.doc { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.page { position: relative; background: #fff; box-shadow: 0 1px 2px rgba(18,26,38,.12), 0 6px 20px rgba(18,26,38,.07); width: 100%; }
.page canvas { display: block; width: 100%; height: auto; }
.page .layer { position: absolute; inset: 0; }
.page-no { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: -10px; }
.doc-title { align-self: stretch; font-weight: 600; font-size: 14px; padding-top: 6px; border-top: 1px solid var(--line-2); }

.fld {
  position: absolute; border: 1.5px solid var(--c, var(--pen)); background: color-mix(in srgb, var(--c, var(--pen)) 12%, transparent);
  border-radius: 3px; font-size: 11.5px; color: var(--ink); display: flex; align-items: center; justify-content: center;
  overflow: hidden; user-select: none; touch-action: none; line-height: 1.1; text-align: center;
}
.editing .fld { cursor: move; }
.fld.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); z-index: 2; }
.fld .rz { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; background: var(--c); cursor: nwse-resize; border-radius: 2px 0 2px 0; }
.fld .lbl { pointer-events: none; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: color-mix(in srgb, var(--c) 75%, #000); }

/* ----------------------------------------------------------- signer view */
.sign-bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 20px; flex-wrap: wrap; }
.sign-bar .t { font-weight: 500; flex: 1; min-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 120px; }
.signer-fld { cursor: pointer; border-style: dashed; background: color-mix(in srgb, var(--pen) 9%, #fff); }
.signer-fld.req::after { content: "*"; position: absolute; top: 0; right: 3px; color: var(--danger); font-weight: 600; }
.signer-fld.filled { border-style: solid; background: rgba(255,255,255,.6); }
.signer-fld img { max-width: 100%; max-height: 100%; }
.signer-fld input[type=text] { height: 100%; width: 100%; border: 0; background: transparent; padding: 0 4px; font-size: inherit; border-radius: 0; }
.signer-fld input[type=checkbox] { width: 80%; height: 80%; margin: 0; accent-color: var(--pen); }
.signer-fld.pulse { animation: pulse 1.2s ease-in-out 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--pen) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .signer-fld.pulse { animation: none; } }
.gate { max-width: 620px; margin: 36px auto; padding: 0 16px; }
.gate .panel { padding: 28px; }
.consent-text { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; font-size: 14px; background: #fbfcfe; margin-bottom: 18px; }
.consent-text p:last-child { margin: 0; }
.otp { font: 500 26px var(--mono); letter-spacing: 10px; text-align: center; height: 56px !important; }
.sender-note { background: #fbfcfe; border-left: 3px solid var(--line-2); padding: 10px 14px; white-space: pre-wrap; font-size: 14px; margin: 10px 0 16px; }

.pad-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.pad-tabs button { border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; border-radius: 99px; font: 500 13.5px var(--sans); cursor: pointer; color: var(--ink-2); }
.pad-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pad { position: relative; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; height: 170px; touch-action: none; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.pad .baseline { position: absolute; left: 34px; right: 22px; bottom: 44px; border-bottom: 1px solid var(--line-2); pointer-events: none; }
.pad .x { position: absolute; left: 14px; bottom: 44px; font-size: 18px; color: var(--ink-3); pointer-events: none; }
.pad .ph { position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: var(--ink-3); font-size: 13.5px; pointer-events: none; }
.done-mark { width: 60px; height: 60px; color: var(--seal); }

.kv { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

.verified { color: var(--seal-ink); }
.seal-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--seal-wash); color: var(--seal-ink); }
.seal-box svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* -------------------------------------------------------------- assistant */
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; height: calc(100vh - 140px); min-height: 520px; }
.chat-list { overflow: auto; }
.chat-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-sm); font: 14px var(--sans); color: var(--ink-2); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list button[aria-current="true"], .chat-list button:hover { background: var(--surface); color: var(--ink); }
.chat-main { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-height: 0; }
.chat-log { flex: 1; overflow: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 76ch; font-size: 14.5px; }
.msg.user { align-self: flex-end; background: var(--cobalt-wash); color: var(--cobalt-ink); padding: 9px 13px; border-radius: 12px 12px 3px 12px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; }
.msg.assistant .body p { margin: 0 0 .6em; }
.msg.assistant .body ul { margin: 0 0 .6em; padding-left: 1.2em; }
.msg.note { align-self: center; font-size: 12.5px; color: var(--ink-3); }
.steps-used { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.steps-used span { border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.proposal { border: 1px solid var(--line-2); border-left: 3px solid var(--warn); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 8px; background: #fffdf8; }
.proposal p { margin: 0 0 10px; font-size: 14px; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { min-height: 44px; max-height: 180px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; }
.suggestions button { border: 1px solid var(--line); background: var(--canvas); border-radius: 99px; padding: 6px 12px; font: 13.5px var(--sans); cursor: pointer; color: var(--ink-2); }
@media (max-width: 900px) { .chat { grid-template-columns: 1fr; height: auto; } .chat-list { display: none; } .chat-main { min-height: 70vh; } }

.legal { max-width: 74ch; }
.legal h2 { margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal table { border-collapse: collapse; font-size: 14px; margin: 0 0 1em; }
.legal th, .legal td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* refinements after visual review */
.section .panel h2 { font-size: 19px; max-width: none; }
.page .layer { container-type: size; }
.fld { font-size: clamp(6px, 2.1cqw, 12.5px); }
@media (max-width: 600px) { .sign-bar .brand { display: none; } .sign-bar { padding: 8px 12px; gap: 8px; } .sign-bar .t { min-width: 0; flex-basis: 100%; } }
