/* Okayform app. Mobile first, usable at 360 px. Tokens and type follow okayform.com's globals.css. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2"); }
:root {
  --ink: #0f1b2d; --body: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #ffffff; --soft: #f5f7fb; --soft-2: #eef3fb;
  --brand: #1d5fd6; --brand-dark: #154aa8; --brand-tint: #e8f0fd; --ok: #15803d; --ok-tint: #e7f6ec; --warn-tint: #fff7e6;
  --cta: #c2410c; --cta-dark: #9a3412; --danger: #b91c1c; --radius: 14px; --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: 1.6rem; margin: 18px 0 10px; }
h2 { font-size: 1.2rem; margin: 26px 0 8px; }
h3 { font-size: 1.05rem; margin: 16px 0 6px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 20; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; justify-content: space-between; align-items: center; min-height: 56px; gap: 8px; flex-wrap: wrap; }
.brand-link { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .9rem; }
header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
header nav a, header nav button.link { color: var(--body); text-decoration: none; font-weight: 600; font-size: .88rem; padding: 10px 8px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
header nav a:hover { background: var(--soft); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; }
label { display: block; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; min-height: 44px; padding: 10px 0; margin: 0; }
label.check input { width: 22px; height: 22px; flex: 0 0 22px; margin: 1px 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=date], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid #cbd5e1; border-radius: 10px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; color: var(--ink); padding: 0; margin: 14px 0 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 1.5px solid #c9d8f5; background: #fff; color: var(--brand); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--brand); background: var(--brand-tint); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn.primary:hover { background: var(--cta-dark); }
.btn.big { width: 100%; min-height: 54px; font-size: 1.05rem; margin-top: 20px; }
.btn.small { min-height: 44px; padding: 8px 12px; font-size: .9rem; }
.btn.danger { color: var(--danger); border-color: #f3c4c4; }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > span { flex: 1 1 140px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: ui-monospace, monospace; font-size: .85rem; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--soft-2); border: 1px solid #cfdcf5; margin: 12px 0; }
.notice.warn { background: var(--warn-tint); border-color: #f6dfae; }
.notice.error { background: #fdecec; border-color: #f3c4c4; color: #7f1d1d; }
ul.notice { padding-left: 30px; }
.test-banner { margin: 0; padding: 8px 16px; background: #fde68a; color: #713f12; font-weight: 700; text-align: center; font-size: .9rem; }
.cards { list-style: none; padding: 0; display: grid; gap: 10px; }
.card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.card-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pill.live { background: var(--ok-tint); color: var(--ok); } .pill.test { background: #fde68a; color: #713f12; }
.field-error { color: var(--danger); font-size: .9rem; margin: 4px 0; }
/* H1: a field with a problem: red bar on its left and red outline on its box */
.field.has-error { border-left: 4px solid var(--danger); padding-left: 10px; margin-left: -14px; }
.field.has-error .field-error { font-weight: 600; }
.field.has-error input:not([type=checkbox]):not([type=radio]), .field.has-error textarea, .field.has-error .sig { border-color: var(--danger); border-width: 2px; }
.field.has-error canvas.sig-pad { outline: 2px solid var(--danger); }
.problem-count { color: var(--danger); font-weight: 700; text-align: center; margin: 10px 0 0; }
.form-error { color: #7f1d1d; background: #fdecec; border: 1px solid #f3c4c4; padding: 10px 12px; border-radius: 10px; }
.req { color: var(--muted); font-weight: 500; font-size: .8rem; }
.field { margin: 6px 0 14px; }
.block { margin: 18px 0; padding: 14px; background: var(--soft); border-radius: 12px; }
.block h2, .block h3 { margin-top: 0; }
.sig { border: 1.5px solid #cbd5e1; border-radius: 12px; padding: 4px 12px 12px; }
.seg { display: inline-flex; border: 1.5px solid #c9d8f5; border-radius: 10px; overflow: hidden; margin: 4px 0 10px; }
.seg-btn { min-height: 44px; min-width: 80px; border: 0; background: #fff; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.seg-btn.on { background: var(--brand); color: #fff; }
canvas.sig-pad { display: block; width: 100%; height: 160px; background: #fff; border: 1px dashed #94a3b8; border-radius: 10px; touch-action: none; -webkit-user-select: none; user-select: none; }
.typed-sig { font-size: 1.4rem; font-style: italic; display: block; }
.sig-img { max-width: 100%; height: auto; border-bottom: 1px solid var(--line); background: #fff; }
footer.safety { max-width: 720px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
footer.safety a { color: var(--muted); }
.builder-bar { position: sticky; top: 57px; z-index: 5; background: #fff; display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.builder-bar [data-of="save-state"] { margin-right: auto; font-size: .9rem; }
ol.fields { list-style: none; padding: 0; display: grid; gap: 12px; margin: 16px 0; }
.field-card label:first-of-type { margin-top: 8px; }
.add select { flex: 1 1 180px; }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
table.facts { border-collapse: collapse; width: 100%; font-size: .9rem; table-layout: fixed; }
table.facts th, table.facts td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
table.facts th { background: var(--soft); width: 38%; }
.ans { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.search { padding: 12px; background: var(--soft); border-radius: 12px; margin: 10px 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0; }
canvas[data-of="qr"] { display: block; width: 240px; height: 240px; image-rendering: pixelated; margin: 8px 0; }
#link { flex: 1 1 200px; }
@media (min-width: 720px) { h1 { font-size: 2rem; } main { padding-bottom: 60px; } }
/* ---------- builder v2: start screen (T1) ---------- */
main.wide { max-width: 1012px; }
.start { padding: 20px 0 60px; }
.start h1 { text-align: center; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: 12px 0 8px; }
.start .lede { text-align: center; color: var(--muted); margin: 0 0 24px; }
.tgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tcard-form { margin: 0; height: 100%; }
.tcard { width: 100%; height: 100%; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; font: inherit; color: inherit; cursor: pointer; }
.tcard:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tthumb { background: var(--soft-2); padding: 14px; height: 110px; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tthumb i { display: block; height: 8px; border-radius: 4px; background: #cbd5e1; }
.tthumb i.w1 { width: 55%; } .tthumb i.w2 { width: 65%; } .tthumb i.w3 { width: 75%; } .tthumb i.w4 { width: 85%; }
.tthumb i.y { background: #fcd34d; width: 100%; }
.tthumb i.s { height: 22px; background: #fff; border: 1px dashed #94a3b8; width: 60%; }
.tbody { display: block; padding: 12px 14px; }
.tbody b { color: var(--ink); display: block; }
.tbody span { font-size: .8rem; color: var(--muted); }
@media (max-width: 520px) { .tgrid { grid-template-columns: 1fr 1fr; gap: 10px; } .tthumb { height: 84px; padding: 10px; } .start { padding-top: 8px; } }
/* ---------- builder v2: editor (T2 to T7) ---------- */
main.editor { max-width: 760px; }
.doc { padding: 16px 0 160px 64px; }
.doc-title { font-size: 2rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin: 8px 0 14px; padding: 2px 4px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.blk { position: relative; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; }
.blk:hover { background: #fafbfd; }
.q { font-weight: 600; color: var(--ink); margin-bottom: 8px; font-size: 1.02rem; }
.q .lbl { padding: 1px 3px; display: inline-block; min-width: 40px; }
.check-q { display: flex; gap: 10px; align-items: flex-start; }
.check-q .box { width: 20px; height: 20px; border: 2px solid #94a3b8; border-radius: 4px; flex: none; margin-top: 3px; }
.tb-h { font-weight: 700; color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; padding: 1px 3px; }
.tb-body { white-space: pre-wrap; color: var(--body); min-height: 24px; padding: 1px 3px; }
.inert { pointer-events: none; }
.inert input, .inert textarea { background: var(--soft); }
.inert input.date { max-width: 220px; }
.pad-look { position: relative; border: 1.5px dashed #cbd5e1; border-radius: 12px; background: #fff; height: 120px; max-width: 520px; }
.pad-line { position: absolute; left: 16px; right: 16px; bottom: 30px; border-bottom: 1px solid #cbd5e1; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dot { width: 16px; height: 16px; border: 2px solid #94a3b8; border-radius: 50%; flex: none; }
.newline { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; padding: 4px 12px; }
.nl-plus { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; color: var(--muted); flex: none; cursor: pointer; }
input.slash-in { flex: 1; border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; padding: 8px 2px; min-width: 0; min-height: 44px; background: none; }
input.slash-in:focus { box-shadow: none; border-bottom-color: var(--brand); }
@media (max-width: 700px) { .doc { padding: 8px 0 160px 44px; } .doc-title { font-size: 1.5rem; } }
[contenteditable] { outline: none; cursor: text; border-radius: 6px; }
[contenteditable]:focus { background: var(--soft-2); }
[data-ph]:empty:before { content: attr(data-ph); color: #94a3b8; }
.gutter { position: absolute; left: -60px; top: 8px; display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .12s; }
.blk:hover .gutter, .blk.sel .gutter, .blk:focus-within .gutter { opacity: 1; }
.g-plus { width: 28px; height: 32px; border: 0; background: none; border-radius: 7px; color: #94a3b8; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.g-plus:hover { background: var(--soft); color: var(--ink); }
.between { height: 12px; position: relative; list-style: none; }
.bt-plus { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 16px; line-height: 1; opacity: 0; transition: opacity .12s; z-index: 2; cursor: pointer; padding: 0; }
.between:hover .bt-plus { opacity: 1; }
.between:hover:before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; border-top: 1px dashed var(--line); }
.newline { display: block; margin: 10px 0; padding: 4px 12px; list-style: none; }
.nl-row { display: flex; gap: 8px; align-items: center; }
.slash-menu { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: #fff; padding: 6px; max-width: 360px; }
.sm-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 4px 8px; }
.sm-i { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 8px; min-height: 44px; border-radius: 8px; text-align: left; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
.sm-i.hi, .sm-i:hover { background: var(--brand-tint); }
.ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--soft); color: var(--ink); font-size: .78rem; font-weight: 700; flex: none; }
@media (max-width: 700px) { .gutter { left: -44px; top: 6px; flex-direction: column; opacity: .35; } .g-plus { width: 40px; height: 40px; } .between .bt-plus { display: none; } }
@media (hover: none) { .gutter { opacity: .35; } .blk:focus-within .gutter, .blk.sel .gutter { opacity: 1; } }
.handle { display: inline-grid; place-items: center; width: 28px; height: 32px; border-radius: 7px; color: #94a3b8; cursor: grab; touch-action: none; font-size: 15px;
  letter-spacing: -3px; user-select: none; -webkit-user-select: none; flex: none; border: 0; background: none; padding: 0; font-family: inherit; }
.handle:hover { background: var(--soft); color: var(--ink); }
@media (pointer: coarse) { .handle { width: 40px; height: 44px; font-size: 18px; } }
body.dragging, body.dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
.ghost { position: fixed !important; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: .92; box-shadow: 0 12px 32px rgba(15, 27, 45, .22);
  background: #fff; border-radius: 12px; max-height: 160px; overflow: hidden; list-style: none; }
.dragsrc { opacity: .3; }
.dropline { position: fixed; height: 3px; background: var(--brand); border-radius: 3px; z-index: 999; pointer-events: none; box-shadow: 0 0 0 3px rgba(29, 95, 214, .18); }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(29, 95, 214, .5); } 30% { box-shadow: 0 0 0 8px rgba(29, 95, 214, .25); } 100% { box-shadow: none; } }
.pop-back { position: fixed; inset: 0; z-index: 940; background: transparent; }
.pop { position: fixed; z-index: 950; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 27, 45, .18); padding: 6px; }
.pop-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px; }
.pop-i { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 0; background: none; padding: 10px; border-radius: 8px;
  text-align: left; font: inherit; font-size: .95rem; color: var(--ink); min-height: 44px; cursor: pointer; }
.pop-i:hover { background: var(--soft); }
.pop-i.danger { color: var(--danger); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
@media (max-width: 700px) {
  .pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 16px 16px 0 0; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
  .pop-back { background: rgba(15, 27, 45, .35); }
  .pop-i { min-height: 48px; font-size: 1rem; }
}
.star { color: var(--danger); font-weight: 700; margin-left: 2px; }
/* R2: the star and the Optional chip are buttons */
button.star, .opt-chip { font: inherit; cursor: pointer; vertical-align: middle; }
button.star { border: 0; background: none; min-width: 32px; min-height: 28px; padding: 0 6px; margin: -8px 0 -6px; border-radius: 8px; font-size: 1.1rem; line-height: 1; color: var(--danger); }
button.star:hover { background: #fdecec; }
.opt-chip { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin-left: 6px; min-height: 24px; position: relative; }
button.star { position: relative; }
.opt-chip:before, button.star:before { content: ""; position: absolute; inset: -8px -4px; }
.opt-chip:hover { color: var(--ink); border-color: #94a3b8; }
.ed-opts .opt-t { flex: 1; padding: 2px 4px; min-width: 40px; }
.x { border: 0; background: none; color: #94a3b8; font-size: 20px; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; flex: none; padding: 0; }
.x:hover { background: var(--soft); color: var(--danger); }
.x[disabled] { visibility: hidden; }
button.link.small { color: var(--brand); font-weight: 600; min-height: 44px; padding: 4px 2px; }
.sw { width: 36px; height: 20px; border-radius: 999px; background: #cbd5e1; position: relative; flex: none; transition: background .12s; }
.sw:after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .12s; }
.sw.on { background: var(--brand); } .sw.on:after { left: 18px; }
body:has(main.editor) > header { position: static; }
.ed-top { position: sticky; top: 0; z-index: 30; background: #fff; }
.builder-bar { position: static; }
.wbar { background: var(--warn-tint); border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .9rem; }
.wbar.ok { background: var(--ok-tint); border-color: #bbf7d0; }
.wbar b { color: var(--ink); }
.promptbox { background: var(--warn-tint); border: 2px dashed #f59e0b; border-radius: 12px; padding: 12px; }
.promptbox .tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #b45309; margin-bottom: 6px; }
.promptbox .rep { margin-top: 8px; }
.promptbox.done { background: none; border-color: transparent; padding: 0; }
.promptbox.done .tag, .promptbox.done .rep { display: none; }
.blk.problem { border-color: #f3c4c4; background: #fff8f8; }
@media (max-width: 520px) { .wbar .wbar-hint { display: none; } }
.modal-back { position: fixed; inset: 0; background: rgba(15, 27, 45, .45); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-back[hidden] { display: none; }
.sheet { background: #fff; border-radius: 18px; max-width: 460px; width: 100%; padding: 22px; box-shadow: 0 20px 50px rgba(15, 27, 45, .3); max-height: calc(100dvh - 32px); overflow: auto; }
.sheet:focus { outline: none; }
.sheet h2 { margin: 0 0 4px; font-size: 1.3rem; }
.sheet .muted { margin: 0 0 8px; }
.share-row { flex-wrap: nowrap; margin: 0 0 14px; }
.share-row input { flex: 1 1 auto; min-width: 0; }
.qr-box { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.qr-box canvas[data-of="qr"] { width: 120px; height: 120px; flex: none; margin: 0; }
.qr-box b { color: var(--ink); }
.qr-box p { margin: 4px 0 8px; }
.wide-btn { width: 100%; }
@media (max-width: 520px) { .modal-back { align-items: flex-end; padding: 0; } .sheet { border-radius: 18px 18px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .share-row { flex-direction: column; align-items: stretch; } .qr-box canvas[data-of="qr"] { width: 104px; height: 104px; } }
.doc-sub { color: var(--muted); font-size: .88rem; margin: -8px 0 14px 4px; }
.between.first .bt-plus:focus-visible { opacity: 1; }
@media (max-width: 700px) { .between.first { height: 36px; } .between.first .bt-plus { display: block; opacity: .5; width: 32px; height: 32px; } }
@media (hover: none) { .between.first .bt-plus { opacity: .5; } }
/* ---------- signing v2 ---------- */
.tap-hint { display: none; }
@media (max-width: 700px), (pointer: coarse) and (max-height: 520px) { .draw-hint { display: none; } .tap-hint { display: block; } canvas.sig-pad { cursor: pointer; } }
html.sig-open, html.sig-open body { overflow: hidden; }
.sig-full { position: fixed; inset: 0; z-index: 3000; background: #f5f7fb; touch-action: none; overscroll-behavior: contain; }
.sig-full[hidden] { display: none; }
.sig-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; display: flex; flex-direction: column; padding: 10px 14px; gap: 8px; }
.sf-top { display: flex; align-items: center; gap: 12px; }
.sf-title { font-weight: 700; color: var(--ink); }
.sf-pad { position: relative; flex: 1; min-height: 0; background: #fff; border: 1.5px dashed #94a3b8; border-radius: 14px; }
.sf-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; border-radius: 14px; }
.sf-bar { display: flex; gap: 12px; justify-content: flex-end; }
.sf-btn { min-width: 120px; min-height: 52px; font-size: 1.05rem; }
header.biz-head { position: static; }
.biz-name { font-weight: 700; font-size: 1.1rem; color: var(--ink); overflow-wrap: anywhere; }
.summary { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 10px; margin: 16px 0; }
.summary h2 { margin-top: 12px; }
.summary dl { margin: 0; }
.summary dt { font-weight: 600; color: var(--ink); margin-top: 8px; font-size: .9rem; }
.summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.esign-line { margin: 20px 0 0; font-size: .9rem; color: var(--ink); }
.esign-line + .btn.big { margin-top: 8px; }
/* S7: a faint baseline with an x, drawn by the page around the canvas, never into the signature's pixels */
.pad-wrap { position: relative; }
.pad-base { position: absolute; left: 22px; right: 22px; bottom: 30%; border-bottom: 1.5px solid #cbd5e1; pointer-events: none; }
.pad-base::before { content: "\00d7"; position: absolute; left: -2px; bottom: 2px; color: #94a3b8; font-size: 22px; line-height: 1; }
.sf-base { left: 36px; right: 36px; bottom: 26%; }
.sf-base::before { font-size: 30px; }
.biz { margin: 16px 0 0; font-weight: 600; }
/* ---------- builder v3 ---------- */
/* R1: the selected question and its bar */
.blk.sel { border-color: #bfd3f6; background: #f8fbff; }
.qbar { display: flex; align-items: center; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.qb { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; border: 0; background: none; border-radius: 8px;
  color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; padding: 0 8px; }
.qb:hover { background: var(--soft); }
.qb-req { margin-right: auto; padding-left: 4px; }
.qb-del { color: var(--danger); }
.qb-more { font-size: 20px; line-height: 1; }
.qb-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* R3: a tighter editor; each question about half its v2 height, and the wording chip scrolls with the page */
main.editor > .notice { padding: 8px 12px; margin: 8px 0; font-size: .88rem; }
.wbar { display: inline-flex; flex-wrap: nowrap; max-width: 100%; border-radius: 999px; padding: 4px 4px 4px 12px; margin: 8px 0 0; gap: 8px; font-size: .85rem; }
.wbar b { white-space: nowrap; }
.wbar .btn.small { min-height: 36px; padding: 4px 12px; border-radius: 999px; font-size: .85rem; white-space: nowrap; }
.wbar.ok { padding-right: 12px; }
.doc-title { margin: 4px 0 6px; }
.doc-sub { margin: 0 0 6px 4px; font-size: .82rem; }
.blk { padding: 3px 8px; }
.q { margin-bottom: 3px; font-size: .98rem; line-height: 1.35; }
.inert input, .inert textarea { display: block; min-height: 0; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .85rem; }
.inert textarea { height: 30px; }
.inert input.date { max-width: 160px; }
.pad-look { height: 56px; }
.pad-line { bottom: 14px; }
.opt { padding: 2px 8px; }
.between { height: 4px; }
.promptbox { padding: 8px 10px; }
.tb-h { font-size: 1.05rem; margin-bottom: 2px; }
@media (max-width: 700px) {
  .doc { padding-top: 0; }
  .doc-title { font-size: 1.3rem; }
  .gutter { top: 2px; }
  .gutter .g-plus { display: none; }
  .blk.sel .gutter .g-plus { display: block; }
  .between.first { height: 32px; }
  .between.first .bt-plus { width: 32px; height: 32px; }
}
@media (pointer: coarse) { .handle { width: 40px; height: 40px; } }
/* R4: why the signer's name can't be optional */
.name-lock { margin: 6px 0 2px; padding: 6px 10px; border-radius: 8px; background: var(--soft-2); color: var(--ink); font-size: .85rem; }
