@font-face { font-family: "ESign Allura"; src: url("../fonts/signatures/Allura-Regular.ttf") format("truetype"); font-display: swap; font-style: normal; font-weight: 400; }
@font-face { font-family: "ESign Dancing Script"; src: url("../fonts/signatures/DancingScript-Variable.ttf") format("truetype"); font-display: swap; font-style: normal; font-weight: 400 700; }
@font-face { font-family: "ESign Great Vibes"; src: url("../fonts/signatures/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; font-style: normal; font-weight: 400; }





/* Linequill: neutral surfaces; green is reserved for interaction and status. */
:root {
  --accent: #01B280;
  --accent-hover: #009B6F;
  --button-primary: #007F5B;
  --button-primary-hover: #006C4D;
  --button-primary-text: #ffffff;
  --accent-text: #007A57;
  --accent-text-hover: #005F44;
  --accent-soft: rgb(1 178 128 / 9%);
  --accent-ring: rgb(1 178 128 / 25%);
  --on-accent: #111111;
  --success-text: var(--accent-text);
  --ink: #242424;
  --muted: #6b6b6b;
  --line: #e1e1e1;
  --soft: #f4f4f4;
  --surface: #ffffff;
  --nav: #ffffff;
  --nav-soft: var(--accent-soft);
  --control: #ffffff;
  --control-border: #c9c9c9;
  --label: #404040;
  --subtle: #f7f7f7;
  --subtle-strong: #ededed;
  --amber: #90601e;
  --red: #bd3f4b;
  --shadow: 0 12px 36px rgb(0 0 0 / 7%);
  --radius: 16px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --accent-text: var(--accent);
  --accent-text-hover: #29C496;
  --accent-soft: rgb(1 178 128 / 12%);
  --nav-soft: var(--accent-soft);
  --success-text: var(--accent-text);
  --ink: #eeeeee;
  --muted: #ababab;
  --line: #333333;
  --soft: #121212;
  --surface: #1c1c1c;
  --nav: #181818;
  --control: #171717;
  --control-border: #4a4a4a;
  --label: #d4d4d4;
  --subtle: #222222;
  --subtle-strong: #2b2b2b;
  --amber: #e7a849;
  --red: #ff8490;
  --shadow: 0 14px 38px rgb(0 0 0 / 28%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--soft); }
body { margin: 0; min-height: 100vh; font-size: 15px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-text-hover); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
input, select, textarea { width: 100%; border: 1px solid var(--control-border); border-radius: 9px; background: var(--control); color: var(--ink); padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px rgba(98, 98, 98, .13); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: var(--label); font-weight: 650; }
label input, label select, label textarea { font-weight: 400; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.65rem, 2.7vw, 2.35rem); letter-spacing: -.04em; line-height: 1.12; }
h2 { margin-bottom: 6px; font-size: 1.05rem; }
p { color: var(--muted); line-height: 1.6; }
small { display: block; color: var(--muted); font-size: .79rem; line-height: 1.45; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 244px; display: flex; flex-direction: column; padding: 24px 16px 16px; color: #e6e6e6; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #7e7e7e, #515151); color: white; font-weight: 900; box-shadow: 0 6px 18px rgba(96, 96, 96, .3); }
.side-nav { display: grid; gap: 5px; margin-top: 38px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px; color: #bababa; font-weight: 600; }
.side-nav a span { width: 19px; text-align: center; font-size: 1.05rem; }
.side-nav a:hover, .side-nav a.active { color: white; background: var(--nav-soft); }
.side-nav a.active { box-shadow: inset 3px 0 0 #8c8c8c; }
.sidebar-foot { display: grid; gap: 14px; margin-top: auto; }
.company-label { padding: 10px 12px; border-top: 1px solid #353535; color: #ababab; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
.company-switch { display: grid; gap: 5px; }
.company-switch label { color: #a1a1a1; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.company-switch select { color: white; background: #292929; border-color: #424242; font-size: .83rem; padding: 8px; }
.user-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 11px; border-radius: 10px; background: #252525; }
.user-card strong { display: block; overflow: hidden; color: white; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.user-card small { color: #a1a1a1; }
.user-card a { color: #a1a1a1; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e7e7e7; color: #565656; font-weight: 800; }
.avatar.small { width: 27px; height: 27px; font-size: .75rem; }
.main-content { min-height: 100vh; margin-left: 244px; padding: 42px clamp(24px, 4vw, 64px) 70px; }
.mobile-menu { display: none; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin: 0 auto 28px; max-width: 1420px; }
.page-header p { margin-bottom: 0; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--accent-text); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.heading-status { display: flex; align-items: center; gap: 12px; }
.heading-status .eyebrow { margin: 0; }
.panel { position: relative; margin: 0 auto 22px; max-width: 1420px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 18px rgba(31, 31, 31, .035); }
.panel.flush { padding: 0; overflow: hidden; }
.panel.narrow, .narrow { max-width: 760px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading p { margin: 0; font-size: .9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; background: var(--surface); color: var(--ink); font-weight: 700; line-height: 1.2; white-space: nowrap; }
.button.primary { background: var(--button-primary); color: var(--button-primary-text); box-shadow: 0 6px 14px rgba(98, 98, 98, .2); }
.button.primary:hover { background: var(--button-primary-hover); color: var(--button-primary-text); }
.button.secondary { border-color: #d4d4d4; color: #3f3f3f; }
.button.secondary:hover { border-color: #b6b6b6; background: #fafafa; color: var(--ink); }
.button.danger { border-color: #ecc1c6; background: #f9f9f9; color: var(--red); }
.button.wide { width: 100%; }
.small-button { min-height: 34px; padding: 6px 10px; font-size: .82rem; }
.button-row { display: flex; align-items: center; gap: 9px; }
.button-row form { margin: 0; }
.button-stack { display: grid; gap: 9px; }
.messages { position: relative; z-index: 30; display: grid; gap: 8px; max-width: 1420px; margin: 0 auto 18px; }
.message { padding: 12px 15px; border: 1px solid #d7d7d7; border-radius: 9px; background: #f4f4f4; color: #4c4c4c; font-weight: 600; }
.message.error { border-color: #f0c4c8; background: #f5f5f5; color: #9d2f3a; }
.message.success { border-color: #d9d9d9; background: #f7f7f7; color: #5d5d5d; }
.notice { max-width: 1420px; margin: 0 auto 20px; padding: 13px 16px; border: 1px solid #dadada; border-radius: 9px; background: #f5f5f5; color: #515151; line-height: 1.5; }
.muted { color: var(--muted); }
.optional { color: #969696; font-size: .75rem; font-weight: 500; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; max-width: 1420px; margin: 0 auto 22px; }
.stat-card { display: grid; min-height: 156px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--ink); box-shadow: 0 4px 18px rgba(31, 31, 31, .035); }
.stat-card:hover { transform: translateY(-2px); border-color: #c8c8c8; color: var(--ink); box-shadow: var(--shadow); }
.stat-card > span { color: var(--muted); font-weight: 700; }
.stat-card strong { align-self: end; font-size: 2.2rem; letter-spacing: -.05em; }
.stat-card.accent { border-color: #d7d7d7; background: linear-gradient(140deg, #ffffff, #f7f7f7); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; color: #7e7e7e; background: #fafafa; font-size: .71rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 15px 16px; border-top: 1px solid #f0f0f0; vertical-align: middle; }
td strong { display: block; }
.row-link { font-weight: 700; }
.avatar-stack { display: flex; }
.avatar-stack span, .recipient-dot { display: grid; place-items: center; width: 29px; height: 29px; margin-left: -5px; border: 2px solid white; border-radius: 50%; background: #e8e8e8; color: #595959; font-size: .7rem; font-weight: 800; }
.avatar-stack span:first-child { margin-left: 0; }
.recipient-dot.signed { background: #e7e7e7; color: #5d5d5d; }
.recipient-dot.declined, .recipient-dot.voided { background: #f6d8db; color: #a52f3a; }
.recipient-progress { display: flex; }
.empty-state { display: grid; justify-items: center; padding: 55px 25px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 15px; border-radius: 16px; background: #f2f2f2; color: var(--accent-text); font-size: 1.5rem; }
.empty-state p { max-width: 440px; }
.status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; background: #f1f1f1; color: #5f5f5f; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status.sent, .status.opened, .status.read, .status.queued { background: #efefef; color: #575757; }
.status.completed, .status.signed, .status.accepted, .status.captured { background: #f0f0f0; color: #616161; }
.status.declined, .status.voided, .status.failed, .status.revoked, .status.expired { background: #ececec; color: #a73944; }
.status.draft, .status.pending { background: #efefef; color: #90601e; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1420px; margin: 0 auto 17px; }
.filter-tabs { display: flex; gap: 5px; overflow-x: auto; }
.filter-tabs a { padding: 8px 11px; border-radius: 8px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.filter-tabs a:hover, .filter-tabs a.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(31, 31, 31, .1); }
.search-form { display: flex; gap: 7px; }
.search-form input { width: 220px; }

.stack-form { display: grid; gap: 17px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row.split { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.field-help { margin: -8px 0 0; font-size: .8rem; }
.check { display: flex; grid: none; align-items: flex-start; gap: 9px; font-size: .88rem; font-weight: 500; line-height: 1.45; }
.check input { width: auto; margin-top: 2px; }
.input-suffix { display: flex; align-items: center; }
.input-suffix input { border-radius: 9px 0 0 9px; }
.input-suffix span { padding: 10px 12px; border: 1px solid #d4d4d4; border-left: 0; border-radius: 0 9px 9px 0; background: #f9f9f9; color: var(--muted); font-weight: 500; }
.errorlist { margin: 0; padding-left: 18px; color: var(--red); font-size: .82rem; font-weight: 600; }

.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; max-width: 1420px; margin: 0 auto; }
.composer-main .panel { margin-bottom: 18px; }
.composer-summary { position: sticky; top: 28px; }
.composer-summary h2 { font-size: 1.4rem; }
.section-number, .step-number { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 15px; border-radius: 9px; background: #f0f0f0; color: var(--accent-text); font-size: .8rem; font-weight: 900; }
.choice-grid { display: grid; grid-template-columns: 1fr 42px 1fr; align-items: center; gap: 18px; }
.or-divider { display: grid; place-items: center; align-self: stretch; color: #a1a1a1; }
.or-divider::before, .or-divider::after { content: ""; width: 1px; height: 38%; background: var(--line); }
.or-divider span { font-size: .75rem; }
.upload-zone { position: relative; display: grid; justify-items: center; padding: 28px 20px; border: 1.5px dashed #bcbcbc; border-radius: 12px; background: #fbfbfb; text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--accent-text); background: #f8f8f8; }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .upload-icon { font-size: 1.6rem; color: var(--accent-text); }
.upload-zone small { margin-top: 5px; }
.selected-document, .document-card { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfb; }
.selected-document div, .document-card div { flex: 1; }
.file-icon { display: grid; place-items: center; width: 43px; height: 48px; border-radius: 8px; background: #f8dfe2; color: #ac3440; font-size: .7rem; font-weight: 900; }
.recipient-list { display: grid; gap: 11px; margin-bottom: 14px; }
.recipient-row { position: relative; display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fcfcfc; }
.recipient-index { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ebebeb; color: #5d5d5d; font-weight: 800; }
.recipient-fields { grid-template-columns: 1.2fr 1.2fr .9fr 100px; align-items: end; }
.order-pill { align-self: center; padding: 8px 10px; border-radius: 8px; background: #f2f2f2; color: #636363; font-size: .82rem; font-weight: 700; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #7e7e7e; font-size: 1.25rem; }
.icon-button:hover { background: #f1f1f1; }
.icon-button.danger:hover { background: #ececec; color: var(--red); }
.check-list { display: grid; gap: 9px; margin: 20px 0 24px; padding: 0; list-style: none; color: #606060; }
.check-list li::before { content: "✓"; margin-right: 8px; color: var(--success-text); font-weight: 900; }

.editor-layout { display: grid; grid-template-columns: minmax(500px, 1fr) 390px; align-items: start; gap: 20px; max-width: 1420px; margin: 0 auto; }
.document-workspace { margin: 0; }
.pdf-preview { width: 100%; height: min(61vh, 730px); border: 1px solid #d8d8d8; border-radius: 10px; background: #ededed; }
.document-picker { display: grid; grid-template-columns: auto minmax(180px, 360px); align-items: center; gap: 10px; margin-bottom: 12px; }
.inline-form { display: inline; margin-left: 8px; }
.placement-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 18px 0 10px; color: var(--muted); font-size: .83rem; }
.placement-toolbar label { display: flex; align-items: center; gap: 7px; }
.placement-toolbar input { width: 76px; padding: 6px 8px; }
.page-map { position: relative; width: min(100%, 760px); margin: 0 auto; overflow: hidden; border: 1px solid #d5d5d5; border-radius: 5px; background: white; box-shadow: 0 10px 27px rgba(31, 31, 31, .1); cursor: crosshair; }
.pdf-page-image { display: block; width: 100%; height: auto; min-height: 300px; background: #f4f4f4; user-select: none; }
.page-controls { display: flex; align-items: center; gap: 7px; }
.page-controls .icon-button { border: 1px solid var(--line); background: white; font-size: 1rem; }
.page-controls .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.placed-field { position: absolute; z-index: 2; min-width: 40px; min-height: 20px; overflow: hidden; border: 1px solid #626262; border-radius: 3px; background: rgba(98, 98, 98, .14); color: #454545; font-size: .63rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.placement-ghost { position: absolute; z-index: 3; display: grid; place-items: center; overflow: hidden; border: 2px dashed #717171; border-radius: 4px; background: rgba(121, 121, 121, .18); color: #555555; font-size: .7rem; font-weight: 900; pointer-events: none; }
.page-label { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 5px; background: rgba(27, 27, 27, .82); color: white; font-size: .68rem; }
.editor-controls { display: grid; gap: 0; }
.editor-controls .panel { width: 100%; margin-bottom: 16px; }
.coordinate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.coordinate-grid label { font-size: .72rem; }
.coordinate-grid input { padding: 8px 6px; }
.field-list { display: grid; gap: 8px; }
.field-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.field-item span { flex: 1; }
.field-item strong { display: block; font-size: .86rem; }
.recipient-group { display: grid; gap: 7px; margin-bottom: 14px; }
.recipient-group > div, .role-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.recipient-group > div small, .role-list > div small { white-space: nowrap; }
.role-list { display: grid; gap: 9px; margin-bottom: 14px; }
details summary { color: #515151; font-weight: 700; cursor: pointer; }
details[open] summary { margin-bottom: 13px; }
.add-recipient { margin-top: 14px; }
.danger-panel { border-color: #dedede; box-shadow: none; }
.danger-panel p { font-size: .86rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 20px; max-width: 1420px; margin: 0 auto; }
.detail-main .panel, .detail-side .panel { margin-bottom: 18px; }
.recipient-timeline { display: grid; }
.recipient-timeline article { position: relative; display: grid; grid-template-columns: 35px 1fr auto; gap: 13px; padding: 12px 0 21px; }
.recipient-timeline article:not(:last-child)::after { content: ""; position: absolute; top: 46px; bottom: -1px; left: 16px; width: 1px; background: var(--line); }
.timeline-dot { z-index: 1; display: grid; place-items: center; width: 33px; height: 33px; border: 2px solid white; border-radius: 50%; background: #e9e9e9; color: #666666; font-size: .75rem; font-weight: 900; box-shadow: 0 0 0 1px #dddddd; }
.timeline-dot.signed { background: #e4e4e4; color: #595959; }
.timeline-dot.sent, .timeline-dot.opened, .timeline-dot.read { background: #e8e8e8; color: #575757; }
.recipient-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.decline-note { margin: 8px 0 0; color: var(--red); }
.document-card { margin-bottom: 9px; }
.meta-list dl { display: grid; gap: 11px; margin-bottom: 0; }
.meta-list dl div { padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.meta-list dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.meta-list dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: .85rem; }
.hash-label { padding: 5px 8px; border-radius: 6px; background: #f4f4f4; color: #727272; font: .72rem ui-monospace, monospace; }
.audit-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.audit-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.audit-list li > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #f1f1f1; color: #6f6f6f; font-size: .7rem; font-weight: 800; }
.audit-list code { color: #828282; font-size: .7rem; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; max-width: 1420px; margin: 0 auto; }
.template-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 4px 18px rgba(31, 31, 31, .035); }
.template-preview { display: flex; align-items: flex-end; justify-content: space-between; height: 145px; padding: 18px; background: linear-gradient(145deg, #f1f1f1, #e7e7e7); color: #7a7a7a; }
.template-preview span { display: grid; place-items: center; width: 64px; height: 82px; border-radius: 5px 12px 5px 5px; background: white; color: #b33d48; font-size: .8rem; font-weight: 900; box-shadow: 0 8px 18px rgba(31, 31, 31, .12); }
.template-body { padding: 20px; }
.template-body h2 { margin-top: 15px; font-size: 1.15rem; }
.template-body p { min-height: 45px; font-size: .86rem; }
.template-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.setting-toggle strong, .setting-toggle small { display: block; }
.setting-toggle input { width: 19px; height: 19px; }
.source-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 900px; margin: 0 auto 18px; }
.source-tab { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); box-shadow: 0 3px 12px rgba(31, 31, 31, .03); }
.source-tab small { color: var(--muted); }
.source-tab.active { border-color: #a2a2a2; background: #f5f5f5; box-shadow: 0 0 0 2px rgba(98, 98, 98, .1); }
.builder-form { max-width: 1100px; margin: 0 auto; }
.native-builder { display: grid; gap: 18px; }
.builder-intro { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.builder-intro h3 { margin: 2px 0 5px; }
.builder-intro p { margin: 0; }
.builder-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #f9f9f9; }
.builder-palette > span { margin-right: 3px; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.builder-palette button { padding: 7px 10px; border: 1px solid #d3d3d3; border-radius: 7px; background: white; color: #4d4d4d; font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; }
.builder-palette button:hover { border-color: #a5a5a5; background: #f4f4f4; color: #575757; }
.builder-block-list { display: grid; gap: 9px; }
.builder-block { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.builder-block textarea { min-height: 44px; resize: vertical; }
.builder-block-actions { display: flex; gap: 4px; }
.builder-block-actions button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; color: #636363; cursor: pointer; }
.builder-block-actions button[data-remove-builder-block]:hover { border-color: #e4aeb4; background: #ececec; color: var(--red); }
.builder-required { grid-column: 2; }

/* Built-in document editor */
.visual-document-editor { display: grid; gap: 16px; min-width: 0; }
.document-editor-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.document-editor-heading h3 { margin: 2px 0 5px; }
.document-editor-heading p { margin: 0; }
.document-title-field { display: grid; grid-template-columns: auto minmax(220px, 1fr); align-items: center; gap: 14px; max-width: 720px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.document-title-field input { font-size: 1rem; font-weight: 650; }
.document-editor-frame { overflow: visible; border: 1px solid #d4d4d4; border-radius: 13px; background: #ebebeb; box-shadow: 0 8px 28px rgba(31, 31, 31, .08); }
.document-format-toolbar { position: relative; z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 52px; padding: 8px 10px; border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; background: rgba(255, 255, 255, .97); box-shadow: 0 2px 7px rgba(30, 30, 30, .04); }
.document-toolbar-group { display: flex; align-items: center; gap: 2px; padding-right: 7px; border-right: 1px solid var(--line); }
.document-format-toolbar button { display: grid; place-items: center; min-width: 33px; height: 33px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #535353; font: inherit; font-size: .82rem; cursor: pointer; }
.document-format-toolbar button:hover:not(:disabled) { border-color: #d5d5d5; background: #f3f3f3; color: #545454; }
.document-format-toolbar button.is-active,
.document-format-toolbar button[aria-pressed="true"] { border-color: #b6b6b6; background: #f0f0f0; color: #575757; }
.document-format-toolbar button:disabled { opacity: .35; cursor: default; }
.document-format-toolbar select { width: 124px; height: 33px; padding: 4px 28px 4px 8px; border-radius: 7px; font-size: .76rem; }
.document-toolbar-spacer { flex: 1; }
.document-format-toolbar .document-toolbar-labeled { display: inline-flex; gap: 6px; width: auto; white-space: nowrap; }
.document-toolbar-insert-group { gap: 5px; }
.document-toolbar-menu { position: relative; display: block; flex: 0 0 auto; width: max-content; height: 33px; margin: 0; padding: 0; line-height: normal; }
.document-toolbar-menu[open] { width: max-content; height: 33px; }
.document-toolbar-menu summary { box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: max-content; height: 33px; margin: 0; padding: 0 9px; border: 1px solid #d1d1d1; border-radius: 7px; background: #fafafa; color: #515151; font-size: .72rem; font-weight: 800; line-height: 1; list-style: none; white-space: nowrap; cursor: pointer; }
.document-toolbar-menu summary::-webkit-details-marker { display: none; }
.document-toolbar-menu summary::after { margin-left: 2px; color: #8e8e8e; content: "▾"; font-size: .65rem; }
.document-toolbar-menu[open] summary,
.document-toolbar-menu summary:hover { border-color: #aaaaaa; background: #f3f3f3; color: #565656; }
.document-toolbar-menu-popover { position: absolute; top: 41px; left: 0; z-index: 60; box-sizing: border-box; display: grid; width: 270px; margin: 0; padding: 7px; border: 1px solid #c9c9c9; border-radius: 10px; background: white; box-shadow: 0 13px 34px rgba(32, 32, 32, .22); }
.document-format-toolbar .document-toolbar-menu-popover button { box-sizing: border-box; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; justify-items: start; gap: 9px; width: 100%; height: auto; min-height: 48px; margin: 0; padding: 7px 8px; border-radius: 7px; color: #454545; text-align: left; }
.document-toolbar-menu-popover button > span:first-child { display: grid; place-items: center; width: 32px; height: 30px; border-radius: 7px; background: #f1f1f1; color: #595959; font-size: .66rem; font-weight: 900; }
.document-toolbar-menu-popover button > span:last-child { width: 100%; min-width: 0; text-align: left; }
.document-toolbar-menu-popover.is-fields button > span:first-child { background: #f3f3f3; color: #5d5d5d; }
.document-toolbar-menu-popover button strong,
.document-toolbar-menu-popover button small { display: block; line-height: 1.25; }
.document-toolbar-menu-popover button strong { color: inherit; font-size: .75rem; }
.document-toolbar-menu-popover button small { margin-top: 2px; color: #7f7f7f; font-size: .64rem; font-weight: 500; }
.document-editor-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 33px; padding: 6px 14px; border-bottom: 1px solid #dcdcdc; background: #fafafa; color: #717171; font-size: .7rem; }
.document-editor-status span:last-child { flex: 0 0 auto; }
.document-editor-workplace { max-height: 73vh; min-height: 650px; overflow: auto; padding: 44px max(24px, calc((100% - 816px) / 2)); background-color: #ebebeb; background-image: radial-gradient(#cfcfcf 0.6px, transparent 0.6px); background-size: 12px 12px; scrollbar-color: #b2b2b2 transparent; }
.document-paper { box-sizing: border-box; width: 816px; max-width: 100%; min-height: 1056px; margin: 0 auto; padding: 66px 68px 84px; background: white; color: #323232; box-shadow: 0 4px 24px rgba(28, 28, 28, .18); color-scheme: light; counter-reset: section; }
.document-block { position: relative; margin: 1px 0; padding: 8px 9px; border: 1px solid transparent; border-radius: 5px; transition: border-color .12s, background .12s, box-shadow .12s; }
.document-block:hover { border-color: #d4d4d4; background: rgba(245, 245, 245, .55); }
.document-block.is-selected { z-index: 2; border-color: #878787; background: rgba(245, 245, 245, .75); box-shadow: 0 0 0 2px rgba(98, 98, 98, .11); }
.document-block.is-dragging { opacity: .38; }
.document-block.drop-before::before,
.document-block.drop-after::after { position: absolute; right: -4px; left: -4px; z-index: 7; height: 3px; border-radius: 3px; background: #626262; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); content: ""; }
.document-block.drop-before::before { top: -4px; }
.document-block.drop-after::after { bottom: -4px; }
.document-paper.is-drop-target::after { display: block; margin: 12px 0; height: 3px; border-radius: 3px; background: #626262; content: ""; }
.document-block-handle { position: absolute; top: 7px; left: -57px; display: flex; align-items: center; gap: 3px; min-width: 51px; height: 27px; padding: 0 6px; border: 1px solid #c0c0c0; border-radius: 6px; background: white; color: #6d6d6d; font: inherit; font-size: .58rem; font-weight: 800; text-transform: uppercase; cursor: grab; opacity: 0; box-shadow: 0 2px 6px rgba(46, 46, 46, .09); transition: opacity .12s; }
.document-block-handle > span:first-child { font-size: .9rem; letter-spacing: -.12em; }
.document-block:hover .document-block-handle,
.document-block.is-selected .document-block-handle { opacity: 1; }
.document-block-handle:active { cursor: grabbing; }
.document-block-actions { position: absolute; top: -29px; right: 0; display: none; overflow: hidden; border: 1px solid #c6c6c6; border-radius: 6px; background: white; box-shadow: 0 3px 10px rgba(38, 38, 38, .12); }
.document-block.is-selected .document-block-actions { display: flex; }
.document-block-actions button { width: 28px; height: 27px; padding: 0; border: 0; border-right: 1px solid #dfdfdf; background: white; color: #646464; font-size: .84rem; cursor: pointer; }
.document-block-actions button:last-child { border-right: 0; }
.document-block-actions button:hover { background: #f3f3f3; color: #585858; }
.document-block-actions button[data-document-block-action="delete"]:hover { background: #f0f0f0; color: #b52b3b; }
.document-block-body { min-width: 0; }
.document-block [contenteditable="true"] { outline: 0; cursor: text; }
.document-block [contenteditable="true"]:empty::before { color: #aeaeae; content: attr(data-placeholder); pointer-events: none; }
.document-heading { color: #2a2a2a; font-weight: 750; line-height: 1.25; }
.document-heading.level-1 { margin: 5px 0 8px; font-size: 1.55rem; }
.document-heading.level-2 { margin: 4px 0 6px; font-size: 1.22rem; }
.document-heading.level-3 { margin: 3px 0 5px; font-size: 1rem; }
.document-paragraph,
.document-list { margin: 0; font-size: .91rem; line-height: 1.55; }
.document-list { padding-left: 25px; }
.document-list-item { min-height: 1.4em; padding-left: 2px; }
.document-list-item:empty::before { color: #aeaeae; content: attr(data-placeholder); pointer-events: none; }
.document-divider { height: 1px; margin: 9px 0; background: #b8b8b8; }
.document-page-break { display: flex; align-items: center; gap: 10px; margin: 8px -10px; color: #828282; font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.document-page-break::before,
.document-page-break::after { height: 1px; flex: 1; border-top: 1px dashed #9e9e9e; content: ""; }
.document-page-break span { padding: 3px 7px; border: 1px solid #cecece; border-radius: 10px; background: #f8f8f8; }
.document-table-scroll { overflow-x: auto; }
.document-table-body table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .8rem; }
.document-table-body th,
.document-table-body td { padding: 6px 7px; border: 1px solid #c7c7c7; background: white; color: #3b3b3b; text-align: left; vertical-align: top; }
.document-table-body th { background: #f3f3f3; font-weight: 750; }
.document-table-cell { min-height: 1.3em; word-break: break-word; }
.document-table-controls { display: none; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; }
.document-block.is-selected .document-table-controls { display: flex; }
.document-table-controls button { padding: 4px 7px; border: 1px solid #cbcbcb; border-radius: 5px; background: white; color: #626262; font-size: .65rem; cursor: pointer; }
.document-table-controls label { margin-left: auto; color: #6d6d6d; font-size: .65rem; font-weight: 700; }
.document-table-controls input { width: auto; margin: 0 3px 0 0; }
.document-field-body { width: min(100%, 360px); padding: 3px 0; }
.document-field-body.is-question { width: 100%; }
.document-field-body.is-initials { width: min(100%, 180px); }
.document-field-body.is-date { width: min(100%, 220px); }
.document-field-label-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; margin-bottom: 6px; }
.document-field-label { min-width: 0; overflow-wrap: anywhere; color: #474747; font-size: .73rem; font-weight: 800; }
.document-field-required { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 7px; border: 1px solid #d7d7d7; border-radius: 999px; background: #f8f8f8; color: #757575; font-size: .61rem; font-weight: 750; white-space: nowrap; }
.document-field-required input { width: 13px; height: 13px; margin: 0 4px 0 0; }
.document-field-preview { display: flex; align-items: center; min-height: 37px; padding: 8px 11px; border: 1px solid #a4a4a4; border-radius: 4px; background: #fdfdfd; color: #949494; font-size: .72rem; font-style: italic; }
.document-field-body.is-signature .document-field-preview { min-height: 46px; font-family: cursive; font-size: .9rem; }
.document-field-body.is-checkbox .document-field-preview { gap: 9px; min-height: 28px; padding: 2px 0; border: 0; background: transparent; font-style: normal; }
.document-checkbox-preview { width: 19px; height: 19px; border: 1px solid #939393; border-radius: 3px; background: white; }
.document-image-frame { width: 40%; min-width: 90px; }
.document-image-frame img { display: block; width: 100%; height: auto; max-height: 520px; border-radius: 3px; object-fit: contain; }
.document-image-controls { display: none; grid-template-columns: minmax(160px, 1fr) minmax(170px, 1.4fr) auto; align-items: end; gap: 10px; margin-top: 9px; padding: 9px; border: 1px solid #d2d2d2; border-radius: 8px; background: #f9f9f9; color: #6c6c6c; font-size: .65rem; }
.document-block.is-selected .document-image-controls { display: grid; }
.document-image-controls label { display: grid; gap: 4px; }
.document-image-size-row { display: grid; grid-template-columns: minmax(80px, 1fr) 44px; align-items: center; gap: 7px; }
.document-image-size-row input { padding: 0; }
.document-image-size-row output { text-align: right; font-weight: 800; }
.document-image-controls input[type="text"] { height: 31px; padding: 5px 7px; font-size: .7rem; }
.document-image-controls button { height: 31px; padding: 5px 9px; border: 1px solid #c7c7c7; border-radius: 6px; background: white; color: #575757; font-size: .68rem; font-weight: 750; cursor: pointer; }
.document-editor-security { margin: -3px 0 0; color: var(--muted); font-size: .72rem; }
.document-editor-security span { margin-right: 4px; color: #727272; }
.document-editor-frame.is-previewing .document-block { border-color: transparent; background: transparent; box-shadow: none; }
.document-editor-frame.is-previewing .document-block-handle,
.document-editor-frame.is-previewing .document-block-actions,
.document-editor-frame.is-previewing .document-table-controls,
.document-editor-frame.is-previewing .document-image-controls,
.document-editor-frame.is-previewing .document-field-required { display: none; }
.document-editor-frame.is-previewing .document-field-preview { background: white; }
.document-editor-frame.is-fullscreen { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto auto minmax(0, 1fr); border: 0; border-radius: 0; }
.document-editor-frame.is-fullscreen .document-format-toolbar { padding-right: 18px; padding-left: 18px; }
.document-editor-frame.is-fullscreen .document-editor-workplace { max-height: none; min-height: 0; }
body.document-editor-fullscreen { overflow: hidden; }
.method-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.method-card { display: flex; grid-template-columns: none; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfb; cursor: pointer; }
.method-card:has(input:checked) { border-color: #9c9c9c; background: #f4f4f4; box-shadow: 0 0 0 2px rgba(98, 98, 98, .09); }
.method-card input { width: 18px; }
.method-card span, .method-card strong, .method-card small { display: block; }
.method-card small { margin-top: 3px; color: var(--muted); }
.section-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.section-divider::before, .section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.person-cell { display: flex; align-items: center; gap: 10px; }
.outbox-row details { margin-top: 7px; }
.outbox-row pre { max-width: 650px; padding: 10px; overflow: auto; border-radius: 7px; background: #f7f7f7; color: #4b4b4b; font-size: .75rem; white-space: pre-wrap; }

.auth-body { background: var(--soft); }
.auth-shell { display: grid; place-items: center; min-height: 100vh; padding: 35px 18px; }
.auth-shell > .messages { position: fixed; top: 18px; width: min(92vw, 620px); }
.auth-card { width: min(100%, 490px); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 22px 70px rgba(31, 31, 31, .12); }
.auth-card-wide { width: min(100%, 680px); }
.compact-card { width: min(100%, 440px); }
.auth-brand { margin-bottom: 35px; color: var(--ink); }
.auth-heading { margin-bottom: 23px; }
.auth-heading h1 { font-size: 1.8rem; }
.auth-heading p { margin-bottom: 0; }
.auth-heading.centered { text-align: center; }
.auth-foot { margin: 24px 0 0; text-align: center; font-size: .88rem; }
.security-icon { display: grid; place-items: center; width: 55px; height: 55px; margin: 0 auto 18px; border-radius: 17px; background: #f0f0f0; color: var(--accent-text); font-size: 1.5rem; }
.mfa-qr { display: block; width: min(240px, 100%); height: auto; margin: 12px auto 20px; border: 10px solid white; border-radius: 10px; box-shadow: 0 4px 18px rgba(31, 31, 31, .1); }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 1050px; margin: 0 auto; }
.setup-grid .panel { width: 100%; margin: 0; }
.copy-row { display: flex; gap: 7px; }
.break-code { display: block; overflow-wrap: anywhere; color: #6b6b6b; font-size: .72rem; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 25px; }
.recovery-grid code { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #f9f9f9; text-align: center; }
.success-state { display: grid; justify-items: center; padding: 25px; text-align: center; }
.success-state > span { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 15px; border-radius: 50%; background: #eeeeee; color: var(--success-text); font-size: 1.6rem; }

.signing-body { background: #f5f5f5; }
.signing-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 12px clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); box-shadow: 0 3px 12px rgba(31, 31, 31, .04); backdrop-filter: blur(14px); }
.signing-header .brand { color: var(--ink); }
.secure-label { color: #6f6f6f; font-size: .8rem; font-weight: 700; }
.signing-shell { padding: 26px clamp(14px, 3vw, 44px) 65px; }
.signer-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; max-width: 1480px; margin: 0 auto 19px; }
.signer-overview h1 { font-size: clamp(1.45rem, 2.3vw, 2rem); }
.signer-overview p { max-width: 760px; margin: 6px 0 0; }
.signer-packet-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.signer-packet-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .73rem; white-space: nowrap; }
.signer-packet-meta strong { color: var(--ink); }
.signer-workspace { display: grid; grid-template-columns: minmax(560px, 1fr) 350px; align-items: start; gap: 18px; max-width: 1480px; margin: 0 auto; }
.signer-document-area { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 20px rgba(31, 31, 31, .055); }
.signer-document-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.signer-document-heading h2 { margin: 0 0 3px; font-size: 1rem; }
.signer-document-heading p { margin: 0; font-size: .78rem; }
.signer-load-status { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--subtle); color: var(--muted); font-size: .68rem; font-weight: 750; }
.signer-load-status.is-ready { background: #f3f3f3; color: #606060; }
.signer-load-status.is-error { background: #f3f3f3; color: #a83440; }
.signer-document-scroll { height: calc(100vh - 175px); min-height: 620px; overflow: auto; overscroll-behavior: contain; background: #e3e3e3; scrollbar-color: #a6a6a6 transparent; }
.signer-document + .signer-document { border-top: 1px solid #c7c7c7; }
.signer-document-bar { position: sticky; top: 0; z-index: 14; display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 49px; padding: 8px 14px; border-bottom: 1px solid #d1d1d1; background: rgba(250, 250, 250, .96); color: #383838; backdrop-filter: blur(10px); }
.signer-document-bar span { min-width: 0; }
.signer-document-bar strong { display: block; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.signer-document-bar small { font-size: .65rem; }
.signer-document-bar a { flex: 0 0 auto; font-size: .7rem; font-weight: 750; }
.signer-pages { display: grid; gap: 25px; min-width: min-content; padding: 25px; }
.signer-page { position: relative; width: min(816px, calc(100vw - 470px)); min-width: 520px; aspect-ratio: 8.5 / 11; margin: 0 auto; background: white; box-shadow: 0 5px 22px rgba(31, 31, 31, .24), 0 0 0 1px rgba(31, 31, 31, .1); color-scheme: light; }
.signer-page > img { position: relative; z-index: 1; display: block; width: 100%; height: auto; background: white; user-select: none; }
.signer-page-number { position: absolute; top: 10px; right: 0; z-index: 5; padding: 4px 8px; border-radius: 5px 0 0 5px; background: rgba(27, 27, 27, .78); color: white; font-size: .62rem; font-weight: 750; pointer-events: none; }
.signer-page-loader { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #7b7b7b; font-size: .76rem; }
.signer-page:not(.is-loading) .signer-page-loader:empty { display: none; }
.signer-page.has-error { background: #f5f5f5; }
.signer-page.is-loading .signer-field { opacity: 0; pointer-events: none; }
.signer-field { position: absolute; z-index: 6; left: var(--field-x); top: var(--field-y); display: flex; width: var(--field-width); height: var(--field-height); min-width: 22px; min-height: 18px; overflow: visible; border: 1.5px solid #686868; border-radius: 4px; background: rgba(242, 242, 242, .94); color: #232323; box-shadow: 0 1px 4px rgba(61, 61, 61, .16); transition: border-color .14s, background .14s, box-shadow .14s, outline-color .14s, opacity .14s; }
.signer-field:hover { z-index: 8; border-color: #494949; box-shadow: 0 3px 10px rgba(61, 61, 61, .25); }
.signer-field.is-active { z-index: 9; outline: 4px solid rgba(98, 98, 98, .26); outline-offset: 2px; box-shadow: 0 0 0 2px white, 0 5px 13px rgba(47, 47, 47, .25); }
.signer-field.is-complete { border-color: #6b6b6b; background: rgba(243, 243, 243, .96); }
.signer-field.is-complete.is-active { outline-color: rgba(107, 107, 107, .25); }
.signer-field.is-line { flex-direction: column; border: 0; border-radius: 2px; background: transparent; box-shadow: none; }
.signer-field.is-line .signer-field-control { flex: 1 1 auto; min-height: 0; border: 0; border-bottom: 1.5px solid #686868; border-radius: 3px 3px 0 0; background: rgba(242, 242, 242, .94); }
.signer-field.is-line.is-complete .signer-field-control { border-bottom-color: #6b6b6b; background: rgba(243, 243, 243, .96); }
.signer-field-control { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 0; padding: 1px 4px; overflow: hidden; border: 0; border-radius: 3px; background: transparent; color: #232323; font-size: clamp(7px, .9vw, 11px); font-weight: 650; text-align: center; text-overflow: ellipsis; white-space: nowrap; outline: 0; color-scheme: light; }
input.signer-field-control { cursor: text; }
.signer-field-control:focus { box-shadow: inset 0 0 0 2px rgba(98, 98, 98, .25); }
.signer-field-caption { flex: 0 0 10px; min-width: 0; padding: 1px 2px 0; overflow: hidden; color: #535353; font-size: clamp(5px, .58vw, 7px); font-weight: 650; line-height: 9px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.signer-signature-button { cursor: pointer; }
.signer-field-placeholder { color: #484848; font-size: clamp(6px, .75vw, 10px); font-weight: 800; }
.signer-typed-signature { display: block; max-width: 100%; overflow: hidden; color: #222222; font-size: clamp(13px, 2.2vw, 29px); font-weight: 400; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.signer-drawn-signature { display: block; width: 100%; height: 100%; }
.signer-drawn-signature polyline { fill: none; stroke: #222222; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.signer-checkbox-control { display: grid; width: 100%; height: 100%; place-items: center; cursor: pointer; }
.signer-checkbox-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.signer-checkbox-control span { display: grid; width: min(72%, 24px); aspect-ratio: 1; place-items: center; border: 2px solid #686868; border-radius: 3px; background: #f4f4f4; color: transparent; font-size: clamp(8px, 1.3vw, 16px); font-weight: 900; }
.signer-checkbox-control input:checked + span { border-color: #6b6b6b; background: #6b6b6b; color: white; }
.signer-checkbox-control input:focus-visible + span { outline: 4px solid rgba(98, 98, 98, .25); outline-offset: 2px; }
.signer-guide { position: sticky; top: 82px; max-height: calc(100vh - 100px); padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); scrollbar-width: thin; }
.signer-guide-heading .eyebrow { margin-bottom: 8px; }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.progress-head h2 { margin: 0; font-size: 1.08rem; }
.progress-head strong { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.progress-track { height: 7px; margin: 10px 0 0; overflow: hidden; border-radius: 999px; background: #eaeaea; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--success-text); transition: width .22s; }
.signer-guide-navigation { margin: 17px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); }
.signer-guide-navigation p { min-height: 18px; margin: 0 0 9px; font-size: .72rem; font-weight: 650; line-height: 1.45; }
.signer-guide-actions { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 7px; }
.signer-guide-actions .button { min-height: 39px; padding: 7px 10px; }
.signer-guide-actions .button.primary { display: flex; gap: 8px; }
.signing-form { display: grid; gap: 16px; }
.signer-identity { font-size: .76rem; }
.signer-identity input { padding: 9px 10px; font-size: .82rem; }
.signer-identity small { font-size: .66rem; }
.signer-step-list { display: grid; gap: 5px; max-height: 28vh; padding: 2px 3px 2px 0; overflow-y: auto; }
.signer-step { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.signer-step:hover { border-color: var(--line); background: var(--subtle); }
.signer-step.is-active { border-color: #adadad; background: #f3f3f3; box-shadow: 0 0 0 2px rgba(98, 98, 98, .08); }
.signer-step-state { display: grid; width: 22px; height: 22px; place-items: center; border: 1.5px solid #b0b0b0; border-radius: 50%; color: transparent; font-size: .68rem; font-weight: 900; }
.signer-step-state::before { content: ""; }
.signer-step.is-complete .signer-step-state { border-color: var(--success-text); background: var(--success-text); color: white; }
.signer-step.is-complete .signer-step-state::before { content: "✓"; }
.signer-step > span:last-child { min-width: 0; }
.signer-step strong, .signer-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signer-step strong { font-size: .76rem; }
.signer-step small { margin-top: 2px; font-size: .61rem; }
.signer-no-fields { margin: 0; font-size: .75rem; }
.consent-box { display: grid; gap: 7px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.consent-box legend { padding: 0 5px; font-size: .77rem; font-weight: 800; }
.consent-box .check { grid-template-columns: auto 1fr; align-items: start; gap: 8px; padding: 5px; font-size: .69rem; line-height: 1.4; }
.consent-box .check input { width: 16px; margin: 1px 0 0; }
.sign-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; }
.decline-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .75rem; }
.decline-box .stack-form { margin-top: 12px; }
.signer-empty-document { padding: 60px 20px; color: var(--muted); text-align: center; }
.signer-signature-dialog { position: fixed; inset: 0; z-index: 80; display: grid; padding: 18px; place-items: center; }
.signer-signature-dialog[hidden] { display: none; }
.signer-dialog-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(12, 12, 12, .72); cursor: default; }
.signer-signature-card { position: relative; width: min(620px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 28px 80px rgba(0, 0, 0, .34); }
.signer-signature-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.signer-signature-heading h2 { margin: 0; font-size: 1.25rem; }
.signer-dialog-close { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); color: var(--muted); font-size: 1.35rem; line-height: 1; }
.signature-tabs { display: flex; gap: 5px; margin-bottom: 13px; }
.signature-tabs button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: .76rem; font-weight: 700; }
.signature-tabs button.active { border-color: #aeaeae; background: #f1f1f1; color: #575757; }
.signer-font-picker { margin: 16px 0; padding: 0; border: 0; }
.signer-font-picker legend { margin-bottom: 8px; color: var(--label); font-size: .76rem; font-weight: 750; }
.signer-font-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.signer-font-options button { position: relative; display: grid; min-width: 0; min-height: 82px; padding: 10px 12px 8px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.signer-font-options button:hover { border-color: #aaaaaa; background: #fbfbfb; }
.signer-font-options button.is-selected { border: 2px solid var(--accent-text); padding: 9px 11px 7px; background: #f3f3f3; box-shadow: 0 0 0 3px rgba(98, 98, 98, .1); }
.signer-font-options button.is-selected::after { content: "✓"; position: absolute; top: 6px; right: 7px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: var(--accent-text); color: white; font: 800 10px/1 Inter, ui-sans-serif, sans-serif; }
.signer-font-options button span { display: block; max-width: 100%; overflow: hidden; font-size: clamp(1.45rem, 4vw, 2.15rem); font-weight: 400; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.signer-font-options button small { margin-top: 5px; color: var(--muted); font: 650 .64rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.signature-font-allura { font-family: "ESign Allura", "Segoe Script", cursive; }
.signature-font-dancing-script { font-family: "ESign Dancing Script", "Segoe Script", cursive; }
.signature-font-great-vibes { font-family: "ESign Great Vibes", "Segoe Script", cursive; }
.signature-font-classic { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.signer-preview-label { display: block; margin: 2px 0 7px; color: var(--muted); font-size: .66rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.typed-preview { display: grid; min-height: 112px; padding: 12px 16px; place-items: center; overflow: hidden; border: 1px solid #d5d5d5; border-radius: 10px; background: linear-gradient(180deg, #ffffff, #fbfbfb); color: #222222; font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 400; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; box-shadow: inset 0 -1px 0 rgba(31, 31, 31, .04); color-scheme: light; }
.signer-signature-card canvas { display: block; width: 100%; height: 190px; border: 1px dashed #a0a0a0; border-radius: 9px; background: white; touch-action: none; color-scheme: light; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: var(--accent-text); font-size: .76rem; font-weight: 700; }
.signer-signature-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.signer-dialog-open { overflow: hidden; }
.signer-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(390px, calc(100vw - 40px)); padding: 12px 15px; border-radius: 9px; background: #222222; color: white; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); font-size: .8rem; font-weight: 650; }
.signer-toast[hidden] { display: none; }
.sign-result { width: min(100%, 650px); margin: 10vh auto 0; padding: 45px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); text-align: center; }
.result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: #ededed; color: #6f6f6f; font-size: 1.8rem; }
.result-icon.success { background: #eeeeee; color: var(--success-text); }
.result-icon.danger { background: #eaeaea; color: var(--red); }
.centered-row { justify-content: center; }

/* Visual field studio */
.placement-workspace { max-width: 1600px; padding: 0; overflow: hidden; }
.placement-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.placement-workspace-heading h2 { margin-bottom: 4px; font-size: 1.15rem; }
.placement-workspace-heading p { margin: 0; font-size: .86rem; }
.placement-workspace-actions { display: flex; align-items: end; gap: 10px; }
.placement-workspace-actions .document-picker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .76rem; white-space: nowrap; }
.placement-workspace-actions .document-picker select { min-width: 220px; padding-block: 7px; }
.field-studio { display: grid; grid-template-columns: 224px minmax(500px, 1fr) 276px; min-height: min(760px, calc(100vh - 210px)); background: #ededed; }
.field-studio-panel { position: relative; z-index: 4; min-width: 0; padding: 18px; background: var(--surface); }
.field-palette-panel { border-right: 1px solid var(--line); }
.field-inspector-panel { border-left: 1px solid var(--line); }
.field-panel-heading { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 8px; margin-bottom: 15px; }
.field-panel-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -2px; }
.field-panel-heading h2 { margin: 0; font-size: 1.08rem; }
.field-count { padding: 4px 7px; border-radius: 999px; background: var(--subtle-strong); color: var(--muted); font-size: .66rem; font-weight: 800; white-space: nowrap; }
.field-assignee-label { margin-bottom: 14px; font-size: .75rem; }
.field-assignee-label select { padding: 8px 9px; font-size: .8rem; }
.field-tool-list { display: grid; gap: 6px; }
.field-tool { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; cursor: grab; transition: border-color .14s, background .14s, transform .14s, box-shadow .14s; }
.field-tool:hover { border-color: #b4b4b4; background: #fafafa; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(31, 31, 31, .07); }
.field-tool.is-active { border-color: #8a8a8a; background: #f1f1f1; box-shadow: 0 0 0 2px rgba(98, 98, 98, .12); }
.field-tool:active { cursor: grabbing; }
.field-tool-glyph { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: #f0f0f0; color: #575757; font-size: .59rem; font-weight: 900; letter-spacing: .02em; }
.field-tool strong, .field-tool small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-tool strong { font-size: .78rem; }
.field-tool small { font-size: .65rem; }
.field-tool-grip { color: #a5a5a5; font-size: .72rem; letter-spacing: -5px; transform: rotate(90deg); }
.field-editor-tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px; border: 1px solid #d7d7d7; border-radius: 8px; background: #f5f5f5; color: #5a5a5a; font-size: .71rem; line-height: 1.45; }
.field-editor-tip > span:first-child { flex: 0 0 auto; color: var(--accent-text); font-size: 1rem; }
.field-editor-tip.locked { border-color: var(--line); background: var(--subtle); color: var(--muted); }
.field-shortcuts { display: grid; gap: 6px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .67rem; }
.field-shortcuts strong { margin-bottom: 2px; color: var(--ink); font-size: .7rem; }
kbd { display: inline-block; min-width: 42px; margin-right: 4px; padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--subtle); color: var(--label); font: 600 .62rem ui-monospace, monospace; text-align: center; }
.field-document-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-width: 0; background: #ededed; }
.field-editor-toolbar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 49px; padding: 7px 12px; border-bottom: 1px solid #d5d5d5; background: rgba(255, 255, 255, .96); }
.editor-page-nav, .editor-toolbar-actions, .editor-zoom { display: flex; align-items: center; gap: 5px; }
.editor-tool-button, .editor-page-button, .editor-zoom-value, .editor-preview-button { min-height: 32px; padding: 5px 9px; border: 1px solid #d4d4d4; border-radius: 7px; background: white; color: #4f4f4f; font-size: .74rem; font-weight: 750; }
.editor-tool-button { min-width: 32px; padding-inline: 7px; font-size: .9rem; }
.editor-tool-button:hover, .editor-page-button:hover, .editor-zoom-value:hover, .editor-preview-button:hover { border-color: #a5a5a5; background: #fafafa; color: var(--ink); }
.editor-tool-button:disabled { opacity: .35; cursor: not-allowed; }
.editor-page-button strong { color: var(--accent-text); }
.editor-zoom { padding: 2px; border: 1px solid #d4d4d4; border-radius: 8px; background: white; }
.editor-zoom .editor-tool-button, .editor-zoom-value { min-height: 26px; border: 0; background: transparent; }
.editor-zoom-value { min-width: 48px; padding-inline: 4px; }
.editor-preview-button[aria-pressed="true"] { border-color: #7a7a7a; background: #f0f0f0; color: #535353; }
.field-editor-statusbar { display: flex; align-items: center; justify-content: space-between; min-height: 31px; padding: 5px 14px; border-bottom: 1px solid #dbdbdb; background: #fafafa; color: #848484; font-size: .67rem; font-weight: 650; }
.save-status { display: inline-flex; align-items: center; gap: 6px; }
.save-status i { width: 7px; height: 7px; border-radius: 50%; background: #a1a1a1; }
.save-status.is-saved i { background: var(--success-text); }
.save-status.is-saving i { background: var(--accent-text); animation: save-pulse .8s ease-in-out infinite alternate; }
.save-status.is-unsaved i { background: var(--amber); }
.save-status.is-error { color: var(--red); }
.save-status.is-error i { background: var(--red); }
@keyframes save-pulse { to { opacity: .3; transform: scale(.75); } }
.pdf-editor-scroll { position: relative; min-height: 560px; max-height: calc(100vh - 260px); overflow: auto; overscroll-behavior: contain; background: #e3e3e3; scrollbar-color: #a6a6a6 transparent; }
.pdf-editor-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; min-width: min-content; min-height: 100%; padding: 28px; }
.pdf-editor-page { position: relative; flex: 0 0 auto; width: 816px; aspect-ratio: 8.5 / 11; overflow: visible; border-radius: 3px; background: white; box-shadow: 0 4px 18px rgba(31, 31, 31, .22), 0 0 0 1px rgba(31, 31, 31, .11); transition: box-shadow .15s; }
.pdf-editor-page.is-drop-target { box-shadow: 0 0 0 4px rgba(98, 98, 98, .28), 0 10px 28px rgba(31, 31, 31, .24); }
.pdf-editor-page > img { display: block; width: 100%; height: 100%; border-radius: inherit; background: white; object-fit: fill; user-select: none; pointer-events: none; }
.pdf-page-number { position: absolute; top: 10px; right: -1px; z-index: 2; padding: 4px 8px; border-radius: 5px 0 0 5px; background: rgba(27, 27, 27, .79); color: white; font-size: .62rem; font-weight: 750; pointer-events: none; }
.pdf-page-loader { position: absolute; inset: 0; display: grid; place-items: center; color: #878787; font-size: .78rem; pointer-events: none; }
.pdf-editor-page:not(.is-loading) .pdf-page-loader { display: none; }
.pdf-editor-page.has-error { background: #f5f5f5; }
.pdf-editor-pages.is-placing .pdf-editor-page { cursor: crosshair; }
.recipient-preview-banner { position: sticky; top: 12px; z-index: 8; width: min(560px, calc(100% - 34px)); margin: 12px auto -4px; padding: 9px 12px; border: 1px solid #b3b3b3; border-radius: 9px; background: rgba(243, 243, 243, .96); color: #555555; box-shadow: 0 5px 16px rgba(31, 31, 31, .12); font-size: .72rem; text-align: center; }
.recipient-preview-banner strong { margin-right: 6px; }
.placed-field-rich { position: absolute; z-index: 3; min-width: 24px; min-height: 18px; border: 1.5px solid var(--field-color); border-radius: 4px; background: color-mix(in srgb, var(--field-color) 12%, white); color: #212121; cursor: grab; outline: none; touch-action: none; user-select: none; }
.placed-field-rich:hover { z-index: 5; box-shadow: 0 2px 9px rgba(31, 31, 31, .18); }
.placed-field-rich.is-selected { z-index: 6; border-width: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--field-color) 22%, transparent), 0 4px 12px rgba(31, 31, 31, .2); }
.placed-field-rich.is-moving, .placed-field-rich.is-resizing { z-index: 9; cursor: grabbing; opacity: .92; box-shadow: 0 8px 20px rgba(31, 31, 31, .25); }
.field-overlay-content { width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.placed-field-rich:not(.is-line):not(.is-compact) .field-overlay-content { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
.field-overlay-glyph { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--field-color); color: white; font-size: .5rem; font-weight: 900; }
.field-overlay-copy { display: block; min-width: 0; line-height: 1.1; }
.field-overlay-copy strong, .field-overlay-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-overlay-copy strong { color: #2d2d2d; font-size: clamp(.52rem, 1vw, .7rem); }
.field-overlay-copy small { margin-top: 2px; color: #636363; font-size: clamp(.43rem, .8vw, .57rem); }
.placed-field-rich.is-line .field-overlay-content { display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 2px 5px; }
.field-line-value { display: flex; align-items: flex-end; min-width: 0; overflow: hidden; border-bottom: 1px solid var(--field-color); color: #282828; font-size: clamp(.55rem, 1.15vw, .85rem); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.field-line-caption { overflow: hidden; padding-top: 1px; color: #636363; font-size: clamp(.38rem, .7vw, .51rem); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.placed-field-rich.is-preview .field-line-value { font-weight: 500; }
.placed-field-rich.is-preview[data-field-type="signature"] .field-line-value { font-family: "Segoe Script", "Brush Script MT", cursive; }
.placed-field-rich.is-compact .field-overlay-content { display: flex; align-items: center; gap: 4px; padding: 3px; }
.field-checkbox-mark { display: grid; flex: 0 0 auto; place-items: center; width: min(100%, 22px); aspect-ratio: 1; border: 1.5px solid var(--field-color); border-radius: 2px; color: #2e2e2e; font-size: .72rem; font-weight: 900; }
.placed-field-rich.is-compact .field-overlay-copy { display: none; }
.editor-remove-field { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 9px; border: 1px solid #e3aab1; border-radius: 7px; background: #f7f7f7; color: #a92d3c; font-size: .7rem; font-weight: 800; cursor: pointer; }
.editor-remove-field:hover { border-color: #c65c69; background: #ececec; }
.editor-remove-field span { font-size: .95rem; line-height: 1; }
.editor-remove-field[hidden] { display: none; }
.field-resize-handle { position: absolute; z-index: 5; display: none; width: 10px; height: 10px; border: 2px solid white; border-radius: 2px; background: var(--field-color); box-shadow: 0 1px 4px rgba(31, 31, 31, .3); }
.placed-field-rich.is-selected .field-resize-handle { display: block; }
.field-resize-handle.is-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.field-resize-handle.is-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.field-resize-handle.is-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.field-resize-handle.is-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.field-snap-guide { position: absolute; z-index: 8; background: #606060; box-shadow: 0 0 0 1px rgba(255, 255, 255, .85); pointer-events: none; }
.field-snap-guide.is-vertical { top: -12px; bottom: -12px; width: 1px; }
.field-snap-guide.is-horizontal { right: -12px; left: -12px; height: 1px; }
.field-snap-guide.is-gap { background: repeating-linear-gradient(0deg, #555555 0 4px, transparent 4px 7px); box-shadow: none; }
.field-snap-guide.is-horizontal.is-gap { background: repeating-linear-gradient(90deg, #555555 0 4px, transparent 4px 7px); }
.field-inspector-empty { display: grid; justify-items: center; margin-top: 32px; color: var(--muted); text-align: center; }
.field-inspector-empty > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 13px; background: var(--subtle-strong); color: var(--accent-text); font-size: 1.15rem; }
.field-inspector-empty strong { color: var(--ink); }
.field-inspector-empty p { margin: 6px 0 0; font-size: .75rem; line-height: 1.5; }
.field-inspector-empty.is-preview > span { background: #f0f0f0; }
.field-inspector-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.field-inspector-heading strong, .field-inspector-heading small { display: block; }
.field-inspector-glyph { display: grid; flex: 0 0 auto; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: var(--field-color); color: white; font-size: .62rem; font-weight: 900; }
.field-inspector-panel > label { margin-bottom: 13px; font-size: .73rem; }
.field-inspector-panel input, .field-inspector-panel select { padding: 8px 9px; font-size: .78rem; }
.field-size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; }
.field-size-grid label { font-size: .7rem; }
.field-size-grid label > span { position: relative; display: block; }
.field-size-grid input { padding-right: 24px; }
.field-size-grid i { position: absolute; top: 50%; right: 8px; color: var(--muted); font-size: .68rem; font-style: normal; transform: translateY(-50%); }
.field-required-check { margin-block: 4px 15px !important; }
.inspector-button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 7px; }
.field-layout-save { display: flex; align-items: center; justify-content: flex-end; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.editor-support-grid { display: grid; grid-template-columns: minmax(360px, 1.5fr) minmax(250px, 1fr) minmax(230px, .8fr); align-items: start; gap: 18px; max-width: 1600px; margin: 0 auto; }
.editor-support-grid .panel { width: 100%; margin: 0; }
.editor-recipient-list { display: grid; gap: 8px; margin-bottom: 15px; }
.editor-recipient-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--subtle); }
.editor-recipient-row strong, .editor-recipient-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-help-panel .check-list { margin: 13px 0 0; }

.field-studio.is-previewing .field-palette-panel { opacity: .68; }
.field-studio.is-previewing .field-shortcuts { display: none; }
.field-studio.is-previewing .pdf-editor-scroll { background: #f0f0f0; }

@media (max-width: 1250px) {
  .field-studio { grid-template-columns: 205px minmax(430px, 1fr) 245px; }
  .field-studio-panel { padding: 14px; }
  .editor-support-grid { grid-template-columns: 1fr 1fr; }
  .editor-support-grid .danger-panel { grid-column: 1 / -1; }
}

@media (max-width: 1050px) {
  .field-studio { grid-template-columns: 190px minmax(0, 1fr); }
  .field-inspector-panel { grid-column: 1 / -1; min-height: 190px; border-top: 1px solid var(--line); border-left: 0; }
  .field-inspector-empty { margin-top: 10px; }
  .field-inspector-panel:not(:has(.field-inspector-empty)) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .field-inspector-heading { grid-row: span 2; margin: 0; padding: 0 12px 0 0; border-right: 1px solid var(--line); border-bottom: 0; }
  .field-inspector-panel > label, .field-size-grid, .inspector-button-row { margin: 0; }
}

/* Appearance control */
.theme-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle-strong); }
.theme-switcher button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 6px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 750; line-height: 1; }
.theme-switcher button:hover { color: var(--ink); }
.theme-switcher button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(31, 31, 31, .14); }
.sidebar .theme-switcher { border-color: #333333; background: #151515; }
.sidebar .theme-switcher button { color: #a0a0a0; }
.sidebar .theme-switcher button:hover { color: white; }
.sidebar .theme-switcher button.active { background: #343434; color: white; box-shadow: none; }
.auth-theme-control { position: fixed; top: 18px; right: 18px; z-index: 40; }
.auth-theme-control .theme-switcher { min-width: 220px; background: var(--subtle-strong); box-shadow: var(--shadow); }
.signing-header-actions { display: flex; align-items: center; gap: 14px; }
.signing-header .theme-switcher { min-width: 220px; }

/* Dark appearance */
html[data-theme="dark"] body { background-color: var(--soft); }
html[data-theme="dark"] ::selection { background: #565656; color: white; }
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .template-card,
html[data-theme="dark"] .source-tab,
html[data-theme="dark"] .builder-block,
html[data-theme="dark"] .sign-document,
html[data-theme="dark"] .signing-panel,
html[data-theme="dark"] .sign-result { background: var(--surface); box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .button.secondary { border-color: #545454; color: #dadada; }
html[data-theme="dark"] .button.secondary:hover { border-color: #717171; background: var(--subtle-strong); color: white; }
html[data-theme="dark"] .button.danger { border-color: #693640; background: #2b171d; }
html[data-theme="dark"] .message { border-color: #4c4c4c; background: #222222; color: #bebebe; }
html[data-theme="dark"] .message.error { border-color: #6e3640; background: #2a171c; color: #ff9ca6; }
html[data-theme="dark"] .message.success { border-color: #4d4d4d; background: #232323; color: #bfbfbf; }
html[data-theme="dark"] .notice { border-color: #494949; background: #212121; color: #bdbdbd; }
html[data-theme="dark"] .optional { color: #949494; }
html[data-theme="dark"] .stat-card:hover { border-color: #636363; }
html[data-theme="dark"] .stat-card.accent { border-color: #4d4d4d; background: linear-gradient(140deg, #212121, #191919); }
html[data-theme="dark"] th { color: #aaaaaa; background: #171717; }
html[data-theme="dark"] td { border-color: #313131; }
html[data-theme="dark"] .avatar { background: #383838; color: #bdbdbd; }
html[data-theme="dark"] .avatar-stack span,
html[data-theme="dark"] .recipient-dot { border-color: var(--surface); background: #363636; color: #bdbdbd; }
html[data-theme="dark"] .recipient-dot.signed { background: #3b3b3b; color: #c1c1c1; }
html[data-theme="dark"] .recipient-dot.declined,
html[data-theme="dark"] .recipient-dot.voided { background: #4b242c; color: #ffa0aa; }
html[data-theme="dark"] .empty-state > span { background: #2a2a2a; }
html[data-theme="dark"] .status { background: #2f2f2f; color: #bfbfbf; }
html[data-theme="dark"] .status.sent,
html[data-theme="dark"] .status.opened,
html[data-theme="dark"] .status.read,
html[data-theme="dark"] .status.queued { background: #2f2f2f; color: #b8b8b8; }
html[data-theme="dark"] .status.completed,
html[data-theme="dark"] .status.signed,
html[data-theme="dark"] .status.accepted,
html[data-theme="dark"] .status.captured { background: #323232; color: #bebebe; }
html[data-theme="dark"] .status.declined,
html[data-theme="dark"] .status.voided,
html[data-theme="dark"] .status.failed,
html[data-theme="dark"] .status.revoked,
html[data-theme="dark"] .status.expired { background: #48242b; color: #ff9da7; }
html[data-theme="dark"] .status.draft,
html[data-theme="dark"] .status.pending { background: #40331f; color: #efbd70; }
html[data-theme="dark"] .filter-tabs a:hover,
html[data-theme="dark"] .filter-tabs a.active { background: var(--surface); box-shadow: 0 1px 5px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .input-suffix span { border-color: var(--control-border); background: var(--subtle); }
html[data-theme="dark"] .section-number,
html[data-theme="dark"] .step-number,
html[data-theme="dark"] .security-icon { background: #2b2b2b; }
html[data-theme="dark"] .upload-zone { border-color: #5f5f5f; background: #171717; }
html[data-theme="dark"] .upload-zone:hover { border-color: var(--accent-text); background: #212121; }
html[data-theme="dark"] .selected-document,
html[data-theme="dark"] .document-card,
html[data-theme="dark"] .recipient-row,
html[data-theme="dark"] .method-card,
html[data-theme="dark"] .sign-input-card { background: var(--subtle); }
html[data-theme="dark"] .file-icon { background: #48242b; color: #ff9da7; }
html[data-theme="dark"] .recipient-index { background: #323232; color: #c4c4c4; }
html[data-theme="dark"] .order-pill,
html[data-theme="dark"] .hash-label,
html[data-theme="dark"] .audit-list li > span { background: var(--subtle-strong); color: #bababa; }
html[data-theme="dark"] .icon-button { color: #b0b0b0; }
html[data-theme="dark"] .icon-button:hover { background: var(--subtle-strong); }
html[data-theme="dark"] .icon-button.danger:hover { background: #48242b; }
html[data-theme="dark"] .check-list { color: #bfbfbf; }
html[data-theme="dark"] .pdf-preview { border-color: #484848; background: #0d0d0d; }
html[data-theme="dark"] .page-controls .icon-button { background: var(--control); }
html[data-theme="dark"] details summary { color: #cbcbcb; }
html[data-theme="dark"] .danger-panel { border-color: #5b3038; }
html[data-theme="dark"] .timeline-dot { border-color: var(--surface); background: #333333; color: #c0c0c0; box-shadow: 0 0 0 1px #4f4f4f; }
html[data-theme="dark"] .timeline-dot.signed { background: #3b3b3b; color: #c1c1c1; }
html[data-theme="dark"] .timeline-dot.sent,
html[data-theme="dark"] .timeline-dot.opened,
html[data-theme="dark"] .timeline-dot.read { background: #323232; color: #bcbcbc; }
html[data-theme="dark"] .meta-list dl div { border-color: #343434; }
html[data-theme="dark"] .audit-list code { color: #9f9f9f; }
html[data-theme="dark"] .template-preview { background: linear-gradient(145deg, #282828, #1f1f1f); color: #aaaaaa; }
html[data-theme="dark"] .template-preview span { background: #f8f8f8; color: #a93340; }
html[data-theme="dark"] .source-tab.active,
html[data-theme="dark"] .method-card:has(input:checked) { border-color: #777777; background: #282828; box-shadow: 0 0 0 2px rgba(163, 163, 163, .1); }
html[data-theme="dark"] .builder-palette { background: var(--subtle); }
html[data-theme="dark"] .builder-palette button { border-color: #545454; background: var(--control); color: #cecece; }
html[data-theme="dark"] .builder-palette button:hover { border-color: #909090; background: #2b2b2b; color: #c5c5c5; }
html[data-theme="dark"] .builder-block-actions button { background: var(--subtle); color: #bbbbbb; }
html[data-theme="dark"] .builder-block-actions button[data-remove-builder-block]:hover { border-color: #75404a; background: #48242b; }
html[data-theme="dark"] .document-editor-frame { border-color: #414141; background: #0d0d0d; box-shadow: 0 8px 28px rgba(0, 0, 0, .24); }
html[data-theme="dark"] .document-format-toolbar { border-color: #3b3b3b; background: rgba(26, 26, 26, .98); }
html[data-theme="dark"] .document-format-toolbar button { color: #c3c3c3; }
html[data-theme="dark"] .document-format-toolbar button:hover:not(:disabled) { border-color: #636363; background: #282828; color: white; }
html[data-theme="dark"] .document-format-toolbar button.is-active,
html[data-theme="dark"] .document-format-toolbar button[aria-pressed="true"] { border-color: #787878; background: #2e2e2e; color: #c8c8c8; }
html[data-theme="dark"] .document-toolbar-menu summary { border-color: #545454; background: #1e1e1e; color: #c8c8c8; }
html[data-theme="dark"] .document-toolbar-menu[open] summary,
html[data-theme="dark"] .document-toolbar-menu summary:hover { border-color: #797979; background: #2b2b2b; color: #cccccc; }
html[data-theme="dark"] .document-toolbar-menu-popover { border-color: #4e4e4e; background: #202020; box-shadow: 0 15px 38px rgba(0, 0, 0, .48); }
html[data-theme="dark"] .document-toolbar-menu-popover button { color: #d1d1d1; }
html[data-theme="dark"] .document-toolbar-menu-popover button:hover { background: #2e2e2e; }
html[data-theme="dark"] .document-toolbar-menu-popover button small { color: #9f9f9f; }
html[data-theme="dark"] .document-editor-status { border-color: #363636; background: #171717; color: #9c9c9c; }
html[data-theme="dark"] .document-editor-workplace { background-color: #0c0c0c; background-image: radial-gradient(#2d2d2d 0.6px, transparent 0.6px); scrollbar-color: #545454 transparent; }
/* The document remains white in dark mode so its PDF colors are represented accurately. */
html[data-theme="dark"] .document-paper { background: white; color: #323232; box-shadow: 0 5px 30px rgba(0, 0, 0, .55); color-scheme: light; }
html[data-theme="dark"] .outbox-row pre { background: #151515; color: #c5c5c5; }
html[data-theme="dark"] .auth-body { background: var(--soft); }
html[data-theme="dark"] .auth-card { background: rgba(28, 28, 28, .97); box-shadow: 0 22px 70px rgba(0, 0, 0, .38); }
html[data-theme="dark"] .break-code { color: #aeaeae; }
html[data-theme="dark"] .recovery-grid code { background: var(--subtle); }
html[data-theme="dark"] .success-state > span,
html[data-theme="dark"] .result-icon.success { background: #343434; }
html[data-theme="dark"] .signing-body { background: var(--soft); }
html[data-theme="dark"] .signing-header { background: rgba(21, 21, 21, .96); box-shadow: 0 3px 12px rgba(0, 0, 0, .24); }
html[data-theme="dark"] .secure-label { color: #b1b1b1; }
html[data-theme="dark"] .signer-document-area { box-shadow: 0 8px 25px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .signer-document-scroll { background: #0c0c0c; scrollbar-color: #545454 transparent; }
html[data-theme="dark"] .signer-document + .signer-document { border-color: #3a3a3a; }
html[data-theme="dark"] .signer-document-bar { border-color: #3a3a3a; background: rgba(26, 26, 26, .96); color: #e4e4e4; }
html[data-theme="dark"] .signer-document-bar small { color: #a1a1a1; }
html[data-theme="dark"] .signer-load-status.is-ready { background: #343434; color: #bebebe; }
html[data-theme="dark"] .signer-load-status.is-error { background: #48242b; color: #ff9da7; }
html[data-theme="dark"] .progress-track { background: #343434; }
html[data-theme="dark"] .signature-tabs button { background: var(--control); color: var(--muted); }
html[data-theme="dark"] .signature-tabs button.active { border-color: #787878; background: #2d2d2d; color: #c4c4c4; }
html[data-theme="dark"] .typed-preview { color: #222222; }
html[data-theme="dark"] .signer-font-options button { background: var(--control); }
html[data-theme="dark"] .signer-font-options button:hover { border-color: #757575; background: #262626; }
html[data-theme="dark"] .signer-font-options button.is-selected { border-color: var(--accent-text); background: #2e2e2e; }
html[data-theme="dark"] .sign-check { background: var(--subtle); }
html[data-theme="dark"] .signer-step.is-active { border-color: #787878; background: #2e2e2e; }
html[data-theme="dark"] .signer-signature-card { box-shadow: 0 28px 80px rgba(0, 0, 0, .58); }
html[data-theme="dark"] .result-icon { background: #333333; color: #bdbdbd; }
html[data-theme="dark"] .result-icon.danger { background: #48242b; }
html[data-theme="dark"] .mobile-menu { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .theme-switcher button.active { box-shadow: 0 1px 5px rgba(0, 0, 0, .34); }
html[data-theme="dark"] .field-studio,
html[data-theme="dark"] .field-document-panel { background: #0d0d0d; }
html[data-theme="dark"] .field-tool:hover { border-color: #6b6b6b; background: #262626; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .field-tool.is-active { border-color: #848484; background: #2b2b2b; box-shadow: 0 0 0 2px rgba(163, 163, 163, .12); }
html[data-theme="dark"] .field-tool-glyph { background: #313131; color: #bebebe; }
html[data-theme="dark"] .field-editor-tip { border-color: #4c4c4c; background: #242424; color: #bebebe; }
html[data-theme="dark"] .field-editor-toolbar { border-color: #3b3b3b; background: rgba(26, 26, 26, .97); }
html[data-theme="dark"] .editor-tool-button,
html[data-theme="dark"] .editor-page-button,
html[data-theme="dark"] .editor-zoom-value,
html[data-theme="dark"] .editor-preview-button { border-color: #494949; background: #1e1e1e; color: #c8c8c8; }
html[data-theme="dark"] .editor-tool-button:hover,
html[data-theme="dark"] .editor-page-button:hover,
html[data-theme="dark"] .editor-zoom-value:hover,
html[data-theme="dark"] .editor-preview-button:hover { border-color: #6e6e6e; background: #282828; color: white; }
html[data-theme="dark"] .editor-remove-field { border-color: #713a43; background: #321b21; color: #ff9da8; }
html[data-theme="dark"] .editor-remove-field:hover { border-color: #9a4a57; background: #48242b; color: #ffbbc1; }
html[data-theme="dark"] .editor-zoom { border-color: #494949; background: #1e1e1e; }
html[data-theme="dark"] .editor-zoom .editor-tool-button,
html[data-theme="dark"] .editor-zoom-value { border: 0; background: transparent; }
html[data-theme="dark"] .editor-preview-button[aria-pressed="true"] { border-color: #787878; background: #2e2e2e; color: #c8c8c8; }
html[data-theme="dark"] .field-editor-statusbar { border-color: #363636; background: #171717; color: #9c9c9c; }
html[data-theme="dark"] .pdf-editor-scroll { background: #0c0c0c; scrollbar-color: #545454 transparent; }
html[data-theme="dark"] .recipient-preview-banner { border-color: #6a6a6a; background: rgba(39, 39, 39, .96); color: #cccccc; }
html[data-theme="dark"] .field-studio.is-previewing .pdf-editor-scroll { background: #131313; }
html[data-theme="dark"] .field-inspector-empty.is-preview > span { background: #2f2f2f; }
html[data-theme="dark"] .editor-recipient-row { background: var(--subtle); }
html[data-theme="dark"] .field-layout-save { background: var(--surface); }

/* PDFs and signature pads intentionally stay white so document colors and ink remain accurate. */
html[data-theme="dark"] .page-map,
html[data-theme="dark"] .pdf-page-image,
html[data-theme="dark"] .signature-widget canvas,
html[data-theme="dark"] .mfa-qr { color-scheme: light; }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .composer-grid, .editor-layout, .detail-grid, .signing-layout { grid-template-columns: 1fr; }
  .composer-summary, .signing-panel { position: static; }
  .signing-panel { order: -1; }
  .signer-overview { grid-template-columns: 1fr; gap: 13px; }
  .signer-packet-meta { justify-content: flex-start; }
  .signer-workspace { grid-template-columns: 1fr; }
  .signer-guide { position: static; order: -1; max-height: none; }
  .signer-step-list { max-height: 240px; }
  .signer-page { width: min(816px, calc(100vw - 80px)); }
  .recipient-fields { grid-template-columns: repeat(2, 1fr); }
  .editor-controls { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .editor-controls .panel { margin: 0; }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-menu { position: fixed; top: 12px; left: 12px; z-index: 25; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .main-content { margin-left: 0; padding: 68px 16px 45px; }
  .page-header { display: grid; }
  .stat-grid, .form-grid.two, .setup-grid, .editor-controls { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-form input { width: 100%; }
  .choice-grid { grid-template-columns: 1fr; }
  .source-tabs, .method-choice { grid-template-columns: 1fr; }
  .builder-block { grid-template-columns: 1fr auto; }
  .builder-block textarea { grid-column: 1 / -1; }
  .builder-block-actions { grid-column: 2; grid-row: 1; }
  .builder-required { grid-column: 1 / -1; }
  .document-editor-heading { display: grid; }
  .document-title-field { grid-template-columns: 1fr; gap: 6px; }
  .document-format-toolbar { align-items: center; }
  .document-toolbar-spacer { display: none; }
  .document-editor-status { align-items: start; flex-direction: column; gap: 2px; }
  .document-editor-workplace { min-height: 560px; padding: 22px 10px; }
  .document-paper { min-height: 850px; padding: 42px 28px 60px; }
  .document-block { padding-right: 5px; padding-left: 5px; }
  .document-block-handle { top: -26px; left: 0; }
  .document-block-actions { top: -28px; }
  .document-block { margin-top: 29px; }
  .document-block:first-child { margin-top: 1px; }
  .document-field-label-row { align-items: center; gap: 6px; }
  .document-image-controls { grid-template-columns: 1fr; }
  .document-image-controls button { justify-self: start; }
  .document-toolbar-menu-popover { width: min(270px, calc(100vw - 40px)); }
  .or-divider { display: flex; gap: 10px; }
  .or-divider::before, .or-divider::after { width: 100%; height: 1px; }
  .recipient-row { grid-template-columns: 30px 1fr; }
  .recipient-row .icon-button { position: absolute; top: 8px; right: 8px; }
  .recipient-fields { grid-template-columns: 1fr; }
  .coordinate-grid { grid-template-columns: repeat(2, 1fr); }
  .signing-header { padding-left: 18px; }
  .secure-label { display: none; }
  .signing-shell { padding: 22px 12px 45px; }
  .signer-document-heading { align-items: flex-start; }
  .signer-document-scroll { height: 70vh; min-height: 520px; }
  .signer-pages { padding: 18px; }
  .signer-page { width: min(816px, calc(100vw - 62px)); min-width: 0; }
  .signer-field-control { font-size: clamp(6px, 1.5vw, 10px); }
  .signer-field-caption { font-size: clamp(4px, 1vw, 7px); }
  .sign-result { padding: 30px 20px; }
  .form-row.split, .button-row { align-items: stretch; flex-direction: column; }
  .placement-workspace-heading, .placement-workspace-actions { align-items: stretch; flex-direction: column; }
  .placement-workspace-actions .document-picker { align-items: stretch; flex-direction: column; }
  .placement-workspace-actions .document-picker select { min-width: 0; }
  .field-studio { grid-template-columns: 1fr; }
  .field-palette-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .field-tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-shortcuts strong { grid-column: 1 / -1; }
  .field-document-panel { min-height: 600px; }
  .field-editor-toolbar { align-items: stretch; flex-direction: column; }
  .editor-page-nav, .editor-toolbar-actions { justify-content: space-between; }
  .pdf-editor-scroll { min-height: 520px; max-height: 70vh; }
  .field-inspector-panel, .field-inspector-panel:not(:has(.field-inspector-empty)) { display: block; }
  .field-inspector-panel > label, .field-size-grid, .inspector-button-row { margin-bottom: 13px; }
  .field-inspector-heading { margin-bottom: 16px; padding: 0 0 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-support-grid { grid-template-columns: 1fr; }
  .editor-support-grid .danger-panel { grid-column: auto; }
}

@media (max-width: 520px) {
  .auth-theme-control { top: 10px; right: 10px; }
  .auth-theme-control .theme-switcher { min-width: 0; }
  .auth-theme-control .theme-switcher button span:last-child,
  .signing-header .theme-switcher button span:last-child { display: none; }
  .signing-header .theme-switcher { min-width: 108px; }
  .signing-shell { padding-top: 16px; }
  .signer-overview { margin-bottom: 14px; }
  .signer-packet-meta span { font-size: .65rem; }
  .signer-document-heading { display: grid; }
  .signer-load-status { justify-self: start; }
  .signer-document-scroll { min-height: 470px; }
  .signer-pages { gap: 16px; padding: 12px; }
  .signer-page { width: calc(100vw - 50px); }
  .signer-guide { padding: 16px; }
  .signer-step-list { max-height: 210px; }
  .signer-signature-card { padding: 18px; }
  .signer-signature-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media print {
  html[data-theme="dark"] { --ink: #1f1f1f; --muted: #737373; --line: #e5e5e5; --soft: #ffffff; --surface: #ffffff; color-scheme: light; }
  body { background: white !important; }
  .sidebar, .mobile-menu, .button, .page-header p { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  .panel { border: 0; box-shadow: none; }
}
/* Signing presets remain native radios for keyboard and screen-reader access. */
.signing-security-options { border: 0; padding: 0; margin: 1.25rem 0; min-width: 0; }
.signing-security-options legend { font-weight: 700; margin-bottom: .6rem; }
.signing-security-choice { display: flex; align-items: flex-start; gap: .7rem; padding: .65rem 0; cursor: pointer; }
.signing-security-choice input { width: auto; flex: 0 0 auto; margin-top: .25rem; }
.signing-security-choice span { display: grid; gap: .15rem; }
.signing-security-choice small { font-weight: 400; line-height: 1.4; }
.signing-security-choice.disabled { opacity: .55; cursor: default; }
