/* Firmly Sign RE — forest #1f4d3a, mint #3ddc97, warm paper neutrals, Plus Jakarta Sans */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 300; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 300; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(/vendor/fonts/plus-jakarta-sans-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Dancing Script"; font-weight: 600; font-display: block; src: url(/vendor/fonts/dancing-script-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Dancing Script"; font-weight: 600; font-display: block; src: url(/vendor/fonts/dancing-script-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #1f4d3a;
  --brand-2: #2a6650;
  --accent: #3ddc97;
  --accent-soft: #e4f8ee;
  --ink: #16211c;
  --muted: #5c6862;
  --line: #e3ded4;
  --bg: #f7f4ee;
  --card: #ffffff;
  --ok: #0f9d58;
  --ok-soft: #e4f5ec;
  --warn: #b26a00;
  --warn-soft: #fff4dd;
  --bad: #c62828;
  --bad-soft: #fdecec;
  --sign: #ffd84d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 45, 34, .06), 0 6px 20px rgba(20, 45, 34, .07);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; font-size: 17px; line-height: 1.45; }
a { color: #1a7550; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; }
.topbar .inner { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 22px; color: #f4efe6; text-decoration: none; display: flex; align-items: baseline; gap: 6px; }
.brand .dot, .auth-brand .dot { color: var(--accent); }
.brand .prod, .auth-brand .prod { font-weight: 600; font-size: .72em; color: var(--accent); letter-spacing: 0; }
.brand .prod .re, .auth-brand .prod .re { margin-left: .3em; font-weight: 400; opacity: .8; }
.pill-test { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(61, 220, 151, .18); color: #a9f0cf; padding: 3px 8px; border-radius: 99px; }
.topbar .spacer { flex: 1; }
.topbar a.navlink { color: #d3e8dd; text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar a.navlink:hover { color: #fff; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 120px; }
.narrow { max-width: 640px; }

h1, h2, h3 { color: var(--brand); line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 700; }
.lead { color: var(--muted); margin: 0 0 20px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }

/* Buttons */
.btn { appearance: none; border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; line-height: 1.1; min-height: 46px; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--brand); }
.btn-primary:hover:not(:disabled) { background: #2fcb87; }
.btn-navy { background: var(--brand); color: #fff; }
.btn-navy:hover:not(:disabled) { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 8px 12px; min-height: 36px; font-size: 14px; border-radius: 8px; }
.btn-big { font-size: 19px; min-height: 56px; padding: 14px 28px; }
.btn-block { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }

/* Forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span, div.field > span { display: block; font-weight: 700; font-size: 14px; color: var(--brand); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input:not([type]), textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 17px; min-height: 48px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 151, .2); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check.on { border-color: var(--accent); background: var(--accent-soft); }

/* Status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.wait { background: var(--warn-soft); color: var(--warn); }
.chip.idle { background: #efebe3; color: var(--muted); }
.chip.info { background: var(--accent-soft); color: #167a52; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* Contract list */
.clist { display: grid; gap: 12px; }
.citem { display: flex; gap: 16px; align-items: center; padding: 16px 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; border: 1.5px solid transparent; }
.citem:hover { border-color: var(--accent); }
.citem .t { font-weight: 700; color: var(--brand); font-size: 18px; }
.citem .s { color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 50px 20px; }
.empty .icon { font-size: 44px; }

/* Steps */
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; color: var(--muted); font-weight: 700; font-size: 15px; border: 1.5px solid var(--line); }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #efebe3; font-size: 14px; }
.step.on { color: var(--brand); border-color: var(--accent); }
.step.on .n { background: var(--accent); color: var(--brand); }
.step.done .n { background: var(--brand); color: #fff; }

.dropzone { border: 2.5px dashed #c4bcae; border-radius: var(--radius); padding: 40px 20px; text-align: center; background: #fcfbf8; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .big { font-size: 40px; }

.signer-row { display: grid; grid-template-columns: 14px 1fr 1fr 40px; gap: 10px; align-items: center; margin-bottom: 10px; }
@media (max-width: 640px) { .signer-row { grid-template-columns: 14px 1fr 40px; } .signer-row .em { grid-column: 2 / 3; } }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; color: var(--muted); }
.icon-btn:hover { border-color: var(--bad); color: var(--bad); }

/* Field editor */
.editor { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } }
.palette { position: sticky; top: 12px; }
.palette .group { margin-bottom: 16px; }
.palette .lbl { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; margin-bottom: 6px; text-align: left; }
.opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #f1f8f4; }
.opt .ic { width: 26px; text-align: center; }
.pages { display: grid; gap: 18px; }
.page-wrap { position: relative; background: #fff; box-shadow: var(--shadow); border-radius: 4px; overflow: visible; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.page-wrap canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.page-wrap .layer { position: absolute; inset: 0; }
.page-wrap.placing .layer { cursor: crosshair; }
.page-no { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 4px; }

.fbox { position: absolute; border: 2px solid var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--brand); cursor: move; overflow: visible; touch-action: none; }
.fbox .tag { pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.fbox .del { position: absolute; top: -11px; right: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; border: 2px solid #fff; font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.fbox .rs { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 2px solid var(--c, var(--accent)); cursor: nwse-resize; }

/* Signing page */
.sbox { position: absolute; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; border: 0; }
.sbox.todo { background: rgba(255, 216, 77, .55); outline: 2px solid #e0a800; box-shadow: 0 0 0 0 rgba(224, 168, 0, .6); animation: pulse 1.8s infinite; }
.sbox.todo .lab { font-weight: 900; font-size: clamp(9px, 1.6vw, 13px); color: #6b4b00; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 4px; }
.sbox.done { background: rgba(61, 220, 151, .06); outline: 1.5px dashed rgba(61, 220, 151, .45); container-type: size; }
.sbox.done img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
/* Signed: thin green bracket, "Signed with Firmly" above and the signature code below (same as the signed copy) */
.sf { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0 1px 0 clamp(2px, .5vw, 4px); border-left: 1.5px solid var(--brand); pointer-events: none; }
.sf::before, .sf::after { content: ""; position: absolute; left: -1.5px; width: min(12%, 9px); border-top: 1.5px solid var(--brand); }
.sf::before { top: 0; }
.sf::after { bottom: 0; }
.sf.ini::before, .sf.ini::after { width: min(12%, 5px); }
.sf img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; object-position: left bottom; }
.sf-lab { flex: none; font-size: clamp(5px, 16cqh, 9px); line-height: 1.2; white-space: nowrap; overflow: hidden; max-width: 100%; color: var(--brand); font-weight: 700; }
.sf-code { color: var(--muted); font-weight: 600; letter-spacing: .02em; margin-left: .7em; }
@container (max-height: 26px) { .sf-lab { display: none; } }
.sbox.auto { background: rgba(61, 220, 151, .06); cursor: default; justify-content: flex-start; padding-left: 3px; font-size: clamp(8px, 1.4vw, 12px); color: var(--ink); white-space: nowrap; overflow: hidden; }
.sbox.other { background: rgba(120, 130, 145, .1); outline: 1px dashed rgba(120, 130, 145, .5); cursor: default; }
.sbox.text input { width: 100%; height: 100%; min-height: 0; padding: 0 4px; border-radius: 3px; border: 2px solid #e0a800; background: rgba(255, 216, 77, .35); font-size: clamp(9px, 1.5vw, 13px); }
.sbox.text.filled input { border-color: rgba(61, 220, 151, .6); background: rgba(61, 220, 151, .06); }
.sbox.current { outline-width: 3px; outline-color: var(--brand); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 168, 0, .55); } 70% { box-shadow: 0 0 0 8px rgba(224, 168, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 168, 0, 0); } }

.signbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(20,45,34,.08); z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.signbar .inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.progress { flex: 1; }
.progress .bar { height: 8px; background: #e9e4da; border-radius: 99px; overflow: hidden; margin-top: 5px; }
.progress .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.progress .txt { font-weight: 700; color: var(--brand); font-size: 15px; }
.signbar #finishOpen.btn-ghost { background: #fff; color: var(--muted); }
@media (max-width: 560px) {
  .signbar .inner { gap: 8px; }
  .signbar .btn-big { font-size: 17px; min-height: 50px; padding: 12px 15px; }
  .progress { min-width: 0; }
  .progress .txt { font-size: 14px; }
}
/* "End of document" marker under the last page — they need to get here before they can finish */
.doc-end { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.doc-end::before, .doc-end::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line); }
/* What's still to do before they can finish */
.todo-list { display: grid; gap: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.todo-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.todo-item b { display: block; font-size: 16px; }
.todo-item .small { display: block; margin-top: 2px; }
.todo-dot { flex: none; width: 14px; height: 14px; border-radius: 4px; background: rgba(255, 216, 77, .6); border: 2px solid #e0a800; }
.todo-go { flex: none; font-weight: 700; color: var(--brand); font-size: 14px; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 16px; }
.banner.info { background: var(--accent-soft); color: #135e40; }
.banner.ok { background: var(--ok-soft); color: #0b6b3c; }
.banner.warn { background: var(--warn-soft); color: #7a4a00; }
.banner.bad { background: var(--bad-soft); color: #8e1c1c; }
.banner .i { font-size: 20px; line-height: 1.1; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 18, 43, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .modal-bg { align-items: center; padding: 20px; } }
.modal { background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); max-height: 94vh; overflow: auto; }
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.sticky-actions { position: sticky; bottom: 0; background: #fff; padding: 14px 0 4px; margin-top: 2px; box-shadow: 0 -10px 12px -10px rgba(20, 45, 34, .18); }
.tabs { display: flex; background: #efebe3; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pad { position: relative; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; touch-action: none; }
.pad canvas { display: block; width: 100%; border-radius: 12px; }
.pad .baseline { position: absolute; left: 18px; right: 18px; bottom: 30%; border-bottom: 1.5px solid #d3ccbf; pointer-events: none; }
.pad .x { position: absolute; left: 18px; bottom: calc(30% + 4px); color: #b3ab9d; font-size: 20px; pointer-events: none; }
.pad .hint { position: absolute; inset: 0; display: grid; place-items: center; color: #b3ab9d; pointer-events: none; font-size: 16px; }
.pad .clear { position: absolute; top: 8px; right: 8px; }
.typed { font-family: "Dancing Script", cursive; font-weight: 600; font-size: 44px; color: #14213d; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 12px; min-height: 90px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.pad-label { font-weight: 700; color: var(--brand); font-size: 14px; margin: 14px 0 6px; display: flex; justify-content: space-between; align-items: center; }

/* History list */
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hist li:last-child { border-bottom: 0; }
.hist .when { color: var(--muted); width: 190px; flex: none; font-size: 14px; }
@media (max-width: 640px) { .hist li { flex-direction: column; gap: 2px; } .hist .when { width: auto; } }

.sgrid { display: grid; gap: 12px; }
.scard { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.scard .who { font-weight: 700; color: var(--brand); font-size: 17px; display: flex; align-items: center; gap: 8px; }
.scard .meta { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.scard .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 100; box-shadow: var(--shadow); max-width: 90vw; }

.result { text-align: center; padding: 28px 20px; border-radius: var(--radius); }
.result .big { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.result.ok { background: var(--ok-soft); }
.result.bad { background: var(--bad-soft); }
.spinner { width: 36px; height: 36px; border: 4px solid #d6e7de; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; }

/* ---------- Logins ---------- */
.auth-screen { position: fixed; inset: 0; z-index: 200; background: linear-gradient(160deg, var(--brand) 0%, #13301f 100%); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
/* The card sets its own text colour: on the green Enter Firmly page the page text is cream, and typed text was picking that up. */
.auth-card, .auth-card input, .modal, .modal input, .modal textarea, .modal select { color: var(--ink); }
.auth-card { background: #fff; width: 100%; max-width: 420px; border-radius: 18px; padding: 28px 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.auth-brand { display: flex; align-items: baseline; gap: 7px; font-weight: 800; letter-spacing: -.02em; font-size: 28px; color: var(--brand); margin-bottom: 18px; }
.auth-brand .prod { color: #1f9a68; }
.auth-brand .mark, .auth-alt { margin-top: 14px; }
body.auth-open { overflow: hidden; }
.linkbtn { background: none; border: 0; padding: 0; color: #1a7550; font-weight: 600; cursor: pointer; font-size: 15px; }
.topbar .linkbtn { color: #d3e8dd; }
.topbar .linkbtn:hover { color: #fff; }
.who-am-i { color: #fff; font-weight: 600; font-size: 15px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.25); }
@media (max-width: 640px) {
  .who-am-i { display: none; }
  /* Phones: everything on one row when it fits (it does without the old "Test version" badge); on a very narrow phone the
     links drop to a second row so nothing runs off the screen. */
  .topbar .inner { flex-wrap: wrap; row-gap: 6px; gap: 8px; padding: 10px 12px; }
  .topbar .spacer { flex: 1 1 0; min-width: 0; }
  .topbar .brand { white-space: nowrap; font-size: 20px; gap: 5px; }
  .topbar a.navlink { font-size: 13.5px; white-space: nowrap; }
  .topbar .who-btn { padding: 4px; gap: 0; }
  .topbar .who-btn .who-chev { display: none; }
}

/* ---------- New contract: documents + saved documents sidebar ---------- */
/* Step 1: Documents to sign on top, then Templates and Saved documents side by side underneath */
.step1 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; grid-template-areas: "docs saved" "tpl saved"; gap: 18px; align-items: start; }
.step1 > .card { margin: 0; }
.s1-docs { grid-area: docs; }
.s1-saved { grid-area: saved; }
.s1-tpl { grid-area: tpl; }
@media (max-width: 860px) { .step1 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "docs" "saved" "tpl"; } }
.side-card h3 { margin-bottom: 4px; }
.doclist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.docitem { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.docitem .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.docitem .nm { font-weight: 700; color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docitem .sub { color: var(--muted); font-size: 13px; }
.docitem .grow { min-width: 0; }
.docitem .mini { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); font-size: 14px; flex: none; }
.docitem .mini:hover:not(:disabled) { border-color: var(--accent); color: var(--brand); }
.docitem .mini:disabled { opacity: .35; cursor: default; }
.saved { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.saved li { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 10px; background: #f8f6f1; border: 1.5px solid transparent; }
.saved li.added { border-color: var(--accent); background: var(--accent-soft); }
.saved .nm { font-weight: 600; color: var(--brand); font-size: 15px; line-height: 1.2; }
.saved .sub { font-size: 12.5px; color: var(--muted); }
.saved li.muted { display: block; }
.saved .trash { background: none; border: 0; cursor: pointer; color: #a69f92; font-size: 15px; padding: 4px; }
.saved .trash:hover { color: var(--bad); }
.upbar { height: 6px; background: #e9e4da; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.upbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.dropzone.compact { padding: 22px 16px; }
.dropzone.compact .big { font-size: 28px; }

/* ---------- Editor: cross-outs and added text ---------- */
.sizes { display: flex; gap: 6px; margin-top: 6px; }
.sizes button { flex: 1; padding: 6px 0; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; color: var(--muted); }
.sizes button.on { border-color: var(--brand); color: var(--brand); }
.page-wrap.tool-line .layer { cursor: crosshair; }
.page-wrap.tool-text .layer { cursor: text; }
.edits-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.edits-svg line { stroke: #14213d; stroke-linecap: round; }
.edits-svg line.preview { stroke: #e6007e; stroke-dasharray: 4 3; }
.edit-del { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #e6007e; color: #fff; border: 2px solid #fff; font-size: 11px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; z-index: 3; }
.etext { position: absolute; z-index: 2; }
.etext textarea { display: block; width: 100%; border: 1.5px dashed #e6007e; background: rgba(255, 255, 255, .6); color: #14213d; font-family: "Liberation Sans", Arial, Helvetica, sans-serif; font-size: calc(var(--pt) * var(--size)); line-height: 1.22; padding: 0; margin: 0; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; font-kerning: none; min-height: 0; border-radius: 2px; }
.etext textarea:not(:focus) { border-color: transparent; background: transparent; }
.etext:hover textarea { border-color: rgba(230, 0, 126, .5); }
.etext .grip { position: absolute; left: -16px; top: 0; width: 14px; height: 14px; cursor: move; color: #e6007e; font-size: 12px; line-height: 14px; text-align: center; opacity: .7; touch-action: none; }
.etext .wres { position: absolute; right: -5px; top: 0; bottom: 0; width: 10px; cursor: ew-resize; touch-action: none; }
.etext .wres::after { content: ""; position: absolute; right: 3px; top: 50%; height: 14px; margin-top: -7px; width: 4px; border-radius: 2px; background: #e6007e; opacity: 0; }
.etext:hover .wres::after, .etext:focus-within .wres::after { opacity: .8; }
.etext .edit-del { left: auto; right: -12px; top: -12px; margin: 0; }

/* Signing page: jump between documents */
.docnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.docnav button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 600; color: var(--brand); cursor: pointer; font-size: 14px; }

/* ---------- Step buttons ---------- */
button.step { font: inherit; cursor: pointer; }
button.step:hover:not(:disabled) { border-color: var(--accent); }
button.step:disabled { cursor: default; }

/* ---------- Field panel (DocuSign-style); scrolls on its own ---------- */
.palette { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 0 !important; display: flex; flex-direction: column; }
.pal-toggle { display: none; }
@media (max-width: 640px) {
  /* New contract's 1-2-3-4 steps: one row that slides, with the step you're on kept in view */
  #steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 0 14px; gap: 6px; }
  #steps::-webkit-scrollbar { display: none; }
  #steps .step { flex: none; white-space: nowrap; font-size: 14px; padding: 6px 12px 6px 6px; }
}
@media (max-width: 860px) {
  /* Phones and small tablets: the tools fold into a bar that stays at the top of the screen. Tap it to choose a tool; it
     folds away again once you've picked, so the document is what you see. */
  .palette { position: sticky; top: 0; z-index: 30; max-height: none; overflow: visible; border-radius: 0 0 14px 14px; margin: 0 -8px; box-shadow: 0 6px 18px rgba(20, 45, 34, .14); }
  .pal-toggle { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: #fff; padding: 11px 14px; font: inherit; font-weight: 700; color: var(--brand); cursor: pointer; text-align: left; border-radius: inherit; }
  .pal-toggle .pt-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
  .pal-toggle .pt-ic { display: inline-grid; flex: none; }
  .pal-toggle .pt-ic svg { width: 20px; height: 20px; }
  .pal-toggle .pt-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pal-toggle .pt-txt span { font-weight: 500; color: var(--muted); }
  .pal-toggle .pt-change { flex: none; font-size: 13px; color: #1a7550; display: inline-flex; align-items: center; gap: 4px; }
  .pal-toggle .pt-change::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
  .palette.open .pal-toggle .pt-change::after { transform: rotate(-135deg) translateY(-2px); }
  .palette:not(.open) .pal-sec { display: none; }
  .palette.open { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
  .palette.open .pal-toggle { border-bottom: 1px solid var(--line); border-radius: 0; position: sticky; top: 0; z-index: 1; }
  .zoombar { top: 58px; }
}
.pal-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-h { font-weight: 700; color: var(--brand); font-size: 15px; margin-bottom: 8px; }
.pal-g { font-weight: 600; color: var(--muted); font-size: 13.5px; margin: 12px 0 6px; }
.pal-foot { padding: 14px 16px; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); margin-top: auto; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* Side panel on wide screens: one button per row, so long names (e.g. Agreement date) always fit */
@media (min-width: 861px) { .palette .fgrid { grid-template-columns: minmax(0, 1fr); gap: 6px; } .palette .fbtn { min-height: 40px; } }
.fbtn { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); text-align: left; line-height: 1.15; min-height: 44px; }
.fbtn:hover { border-color: #c4bcae; }
.fbtn.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #f1f8f4; }
.fbtn svg, .fbtn .txt-ic { flex: none; color: var(--brand); }
.txt-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; font-weight: 800; font-size: 12px; letter-spacing: -.02em; text-decoration: underline; text-underline-offset: 2px; }
.hint { margin-top: 8px; min-height: 0; }
.signer-pick { position: relative; }
.spick { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 99px; padding: 8px 14px 8px 8px; background: color-mix(in srgb, var(--c) 28%, white); cursor: pointer; font-weight: 600; font-size: 16px; color: var(--ink); }
.spick .av { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, white); border: 2px solid var(--c); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.spick .nm { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smenu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 45, 34, .18); border: 1px solid var(--line); padding: 6px; z-index: 30; }
.smenu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; text-align: left; }
.smenu button:hover, .smenu button.on { background: #f4f1ea; }
.sel-panel { background: #f1f8f4; }
.sel-panel .row { gap: 8px; }
.fbox.sel { outline: 2.5px solid var(--brand); outline-offset: 1px; z-index: 4; }
.fbox .tag svg { width: 13px; height: 13px; vertical-align: -2px; }
.fbox .tag .txt-ic { width: 14px; height: 12px; font-size: 9px; }
.fbox.tiny .tag { display: none; }

/* Signing page: new box types */
.sbox.check { background: rgba(255, 216, 77, .55); outline: 2px solid #e0a800; color: #14213d; font-weight: 900; font-size: clamp(9px, 1.6vw, 14px); line-height: 1; }
.sbox.check.optional { background: rgba(255, 255, 255, .7); outline: 1.5px solid #c4bcae; animation: none; }
.sbox.check.ticked { background: rgba(61, 220, 151, .08); outline: 1.5px solid rgba(61, 220, 151, .7); animation: none; }
.sbox.text.optional input { border-color: #c4bcae; background: rgba(255, 255, 255, .7); }
.signer-msg { background: #f8f6f1; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 6px; margin: 0 0 16px; white-space: pre-wrap; }

/* ---------- Bar under the selected box ---------- */
.selbar { position: absolute; z-index: 20; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(20, 45, 34, .2); border: 1px solid var(--line); padding: 6px 8px; cursor: default; white-space: nowrap; }
.sb-row { display: flex; align-items: center; gap: 6px; }
.sb-sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.sb-signer { display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.sb-signer:hover { background: #f4f1ea; }
.sb-signer .av { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 22%, white); border: 2px solid var(--c); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.sb-signer .chev { font-size: 12px; color: var(--ink); }
.sb-icon { width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.sb-icon:hover { background: #f4f1ea; }
.sb-icon.on { color: #1a7550; }
.sb-del:hover { color: var(--bad); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink); padding: 0 4px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 99px; background: #cfc8bb; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { left: 21px; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.sb-menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 200px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 45, 34, .18); border: 1px solid var(--line); padding: 6px; }
.sb-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; text-align: left; }
.sb-menu button:hover, .sb-menu button.on { background: #f4f1ea; }
.sb-labelrow { margin-top: 6px; }
.sb-labelrow input { min-height: 38px; padding: 7px 10px; font-size: 14px; min-width: 300px; }

/* ---------- Step 1 cards ---------- */
.saved .tpl-sub { font-size: 12.5px; color: var(--muted); }
.docitem.slot { border-style: dashed; border-color: #e0a800; background: #fffbea; }

/* ---------- Step 2: people rows ---------- */
.prow { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.35fr) 252px 40px; gap: 8px; align-items: center; margin-bottom: 10px; }
.prow.no-order { grid-template-columns: 14px minmax(0, 1fr) minmax(0, 1.35fr) 252px 40px; }
.prow .ord { display: flex; align-items: center; gap: 6px; }
.prow .ord select { min-height: 44px; padding: 6px 8px; width: 60px; }
.prow .rl { grid-column: 2 / -1; font-size: 13px; font-weight: 700; color: var(--brand); margin-bottom: -6px; text-transform: uppercase; letter-spacing: .04em; }
.prow select.role { min-height: 48px; }
@media (max-width: 720px) { .prow, .prow.no-order { grid-template-columns: 40px 1fr 40px; } .prow .em, .prow select.role { grid-column: 2 / 3; } }

/* ---------- Zoom bar ---------- */
.pages-col { min-width: 0; }
.zoombar { position: sticky; top: 12px; z-index: 25; display: flex; align-items: center; gap: 6px; width: max-content; margin: 0 auto 12px; background: #fff; border-radius: 99px; box-shadow: var(--shadow); padding: 5px 8px; }
.zoombar .zb { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--brand); display: grid; place-items: center; }
.zoombar .zb:hover { border-color: var(--accent); }
.zoombar select { min-height: 34px; padding: 4px 10px; border-radius: 99px; width: auto; font-weight: 700; font-size: 15px; }
#pages .page-wrap { width: 100%; max-width: none; }
#pages.zoomed { overflow-x: auto; padding-bottom: 10px; }
#pages.zoomed .pages { width: max-content; min-width: 100%; justify-items: center; }
.tpl-doc { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tpl-doc input { flex: 1; }
.tplrole > span { display: flex; align-items: center; gap: 6px; }

/* ---------- Step 4 settings grid ---------- */
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .setgrid { grid-template-columns: 1fr; } }

/* ---------- Contract page extras ---------- */
.order-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.chip.next { background: #fff4dd; color: #8a5300; }
.chip.cc { background: #efebe3; color: var(--brand); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.inline-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; background: #f8f6f1; border-radius: 10px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Saved contact suggestions ---------- */
.prow { position: relative; }
.suggest { position: absolute; z-index: 40; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(20, 45, 34, .16); max-height: 320px; overflow: auto; padding: 4px; }
.sg-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sg-item.on, .sg-item:hover { background: var(--accent-soft); }
.sg-av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.sg-nm { font-weight: 700; color: var(--brand); }
.sg-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.sg-x:hover { background: #fff; color: var(--bad); }
.sg-from { font-size: 12px; font-weight: 600; color: #1a7550; margin-top: 1px; }
.sg-from .ico { width: 13px; height: 13px; vertical-align: -2px; }
.suggest mark { background: #fff1a8; color: inherit; padding: 0; border-radius: 2px; }

/* ---------- Settings: email switches ---------- */
.optlist { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.opt input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.check.dim { opacity: .55; }

/* ---------- Step 3: page navigation pane (right-hand side) ---------- */
#main { max-width: 1180px; }
#main.wide { max-width: 1460px; }
.editor.has-nav { grid-template-columns: 250px minmax(0, 1fr) 200px; }
.editor:not(.has-nav) .navpane { display: none; }
.navpane { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 0 !important; margin: 0; }
.nav-head { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); color: var(--brand); }
.nav-doc { border-bottom: 1px solid var(--line); }
.nav-doc > button { width: 100%; display: flex; gap: 8px; align-items: center; text-align: left; background: #fff; border: 0; padding: 12px 12px 12px 14px; cursor: pointer; font: inherit; color: var(--brand); }
.nav-doc > button:hover { background: #f8f6f1; }
.nav-doc.open > button { background: #f4f1ea; box-shadow: inset 3px 0 0 var(--accent); }
.nav-doc .nd-name { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-doc .nd-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.nav-doc .chev { margin-left: auto; flex: none; transition: transform .15s; color: var(--muted); }
.nav-doc.open .chev { transform: rotate(180deg); }
.nav-pages { display: none; padding: 10px 14px 14px; gap: 12px; }
.nav-doc.open .nav-pages { display: grid; }
.nav-page { position: relative; display: block; width: 100%; border: 2px solid transparent; border-radius: 8px; padding: 6px 6px 4px; background: #efebe3; cursor: pointer; font: inherit; color: var(--brand); }
.nav-page:hover { border-color: #bdefd8; }
.nav-page.on { border-color: var(--accent); background: #e4f8ee; }
.nav-page .thumb { display: block; width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(20, 45, 34, .18); border-radius: 2px; }
.nav-page .pn { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; padding: 4px 2px 0; }
.nav-page .marks { display: flex; gap: 3px; }
.nav-page .marks i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.zsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.page-ind { font-size: 13.5px; font-weight: 700; color: var(--brand); min-width: 84px; text-align: center; }
.zoombar .zb.wide { border-radius: 10px; width: 38px; }
.zoombar .zb[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 1100px) { .editor.has-nav { grid-template-columns: 250px minmax(0, 1fr); } .editor .navpane { display: none; } #navToggle { display: none; } }
@media (max-width: 860px) { .editor.has-nav { grid-template-columns: 1fr; } }

/* ---------- Contract history: grouped steps ---------- */
.hist .hmail { font-size: 14.5px; margin-top: 3px; }
.hist .hsteps { margin-top: 6px; font-size: 13.5px; }
.hist .hsteps summary { cursor: pointer; color: #167a52; font-weight: 600; width: max-content; }
.hist .hsteps ul { list-style: none; margin: 6px 0 0; padding: 8px 12px; background: #f8f6f1; border-radius: 8px; display: grid; gap: 6px; }
.hist .hsteps ul li { display: block; padding: 0; margin: 0; border: 0; grid-template-columns: none; }
.hist .hsteps ul li + li { padding-top: 6px; border-top: 1px solid var(--line); }
.selbar .sb-note { font-size: 13px; font-weight: 600; color: var(--brand); padding: 0 6px; max-width: 240px; line-height: 1.25; }
.sbox.other.agree { display: flex; align-items: center; padding: 0 4px; font-size: clamp(8px, 1.2vw, 11px); color: #475569; font-style: italic; white-space: nowrap; overflow: hidden; }
.sc-row { display: grid; grid-template-columns: 1fr 1.3fr 40px; gap: 8px; align-items: center; }
.sc-extra { display: grid; gap: 8px; }

/* ---------- Floating Back / Next ---------- */
body.has-flownav { padding-bottom: 96px; }
.flownav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 22px calc(18px + env(safe-area-inset-bottom)); pointer-events: none; }
.flownav .fn-btn { pointer-events: auto; box-shadow: 0 8px 24px rgba(20, 45, 34, .22); min-height: 52px; padding: 0 22px; font-size: 16.5px; }
.flownav #navBack { background: #fff; }
.flownav #navNext { margin-left: auto; }
.flownav .hidden { display: none; }
/* leave room above the floating buttons on the editor's side panels */
body.has-flownav .palette, body.has-flownav .navpane { max-height: calc(100vh - 110px); }
.zoombar .zb:disabled { opacity: .35; cursor: default; }

/* ---------- Main page: welcome bar, Past agreements filter + search ---------- */
.welcome { background: var(--brand); color: #f4efe6; border-top: 1px solid rgba(255, 255, 255, .1); }
.welcome .inner { max-width: 1080px; margin: 0 auto; padding: 22px 20px 26px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.welcome h1 { color: #f4efe6; margin: 0 0 4px; }
.welcome h1 .name { color: var(--accent); }
.welcome .sub { margin: 0; color: #c9ddd2; font-size: 16px; }
.welcome .linkbtn { color: #a9f0cf; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.welcome .linkbtn:hover { color: #fff; }
.list-title { font-size: 24px; margin: 4px 0 14px; }
.list-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter { display: inline-flex; background: #efebe3; border-radius: 10px; padding: 4px; gap: 2px; }
.filter button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 15px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; white-space: nowrap; }
.filter button:hover { color: var(--brand); }
.filter button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
/* Just mine | Whole team (only for people who can see teammates' work) */
.who { display: inline-flex; background: #efebe3; border-radius: 10px; padding: 4px; gap: 2px; }
.who.hidden { display: none; }
.who button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 15px; min-height: 40px; font-family: inherit; }
.who button:hover { color: var(--brand); }
.who button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.filter .n { font-size: 12px; background: rgba(31, 77, 58, .08); padding: 1px 7px; border-radius: 99px; min-width: 22px; text-align: center; }
.filter .n:empty { display: none; }
.filter button[aria-pressed="true"] .n { background: var(--accent-soft); color: #167a52; }
.search { flex: 1; min-width: 240px; position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding: 11px 14px 11px 44px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; min-height: 48px; }
.result-note { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.result-note:empty { display: none; }
.citem mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.no-match { text-align: center; padding: 28px 20px; color: var(--muted); }
.no-match p { margin: 0 0 12px; }
@media (max-width: 640px) {
  .welcome .inner { padding: 18px 20px 20px; }
  .welcome h1 { font-size: 26px; }
  .welcome .btn-big { width: 100%; }
  /* The filters stay on one row; if there are too many to fit, the row slides sideways. */
  .list-tools .filter { display: flex; flex-wrap: nowrap; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity; }
  .list-tools .filter::-webkit-scrollbar { display: none; }
  .list-tools .who:not(.hidden) { display: flex; width: 100%; }
  .list-tools .who button { flex: 1 1 0; padding: 8px 10px; }
  .list-tools .filter button { flex: 1 0 auto; white-space: nowrap; padding: 8px 11px; gap: 5px; scroll-snap-align: start; }
  .search { min-width: 100%; }
}

/* Past agreements: compact rows, sent date on the top line, ☰ menu for unfinished ones */
#list.clist { gap: 8px; grid-template-columns: minmax(0, 1fr); }
#list .citem { position: relative; padding: 10px 10px 10px 16px; gap: 10px; }
#list .citem .cmain { min-width: 0; color: inherit; text-decoration: none; }
#list .citem .cmain::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole row opens the agreement */
#list .citem .top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
#list .citem .t { font-size: 16px; }
#list .citem .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
#list .citem .s { font-size: 13.5px; margin-top: 2px; }
#list .citem .chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#list .citem .chip { font-size: 12.5px; padding: 2px 9px; }
.cmenu { position: relative; z-index: 2; flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cmenu:hover, .cmenu[aria-expanded="true"] { background: #efebe3; }
.cmenu-space { flex: none; width: 36px; }
.cmenu-pop { position: absolute; right: 8px; top: calc(100% - 6px); z-index: 20; display: grid; min-width: 170px; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 45, 34, .18), 0 1px 3px rgba(0, 0, 0, .08); }
.cmenu-pop.up { top: auto; bottom: calc(100% - 6px); }
.cmenu-pop button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 7px; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; }
.cmenu-pop button:hover, .cmenu-pop button:focus-visible { background: var(--accent-soft); outline: none; }
.cmenu-pop .danger { color: var(--bad); }
.cmenu-pop .danger:hover, .cmenu-pop .danger:focus-visible { background: var(--bad-soft); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a51f1f; }
.mlist { display: grid; gap: 10px; margin: 0 0 14px; }
.mperson { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; }
.mperson.done { background: #faf8f4; }
.mperson .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) {
  /* Phones: status labels go on their own line under the names. */
  #list .citem { flex-wrap: wrap; align-items: flex-start; padding-left: 14px; row-gap: 6px; }
  #list .citem .cmain { flex: 1 1 0; }
  #list .citem .chips { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .cmenu-space { display: none; }
  .mperson .two { grid-template-columns: 1fr; }
}

/* Past agreements: 10 per page, paused chip, Correct documents box */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.pager:empty { display: none; }
.pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 1.5px solid var(--line); background: #fff; border-radius: 9px; font-weight: 700; font-size: 15px; color: var(--brand); cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--accent); }
.pager button[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .gap { color: var(--muted); padding: 0 2px; }
.pager .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.chip.paused { background: #e7edf3; color: #2f4a63; }
.modal ul.steps { margin: 0 0 14px; padding-left: 20px; }
.modal ul.steps li { margin-bottom: 4px; }
.banner.small { font-size: 14px; padding: 10px 12px; }
@media (max-width: 640px) { .pager { gap: 5px; } .pager button { min-width: 38px; padding: 0 10px; } .pager .lbl { display: none; } .pager .count { flex-basis: 100%; margin-left: 0; } }

/* Correct documents: note that the original is paused */
.paused-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, .08); }

/* Completed contract: Date the contract */
.modal.wide { max-width: 920px; }
/* Date box: pages scroll in the middle, the button bar sits flush with the bottom */
.modal.date-modal { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.modal.date-modal .date-pages { flex: 1 1 auto; min-height: 0; overflow: auto; }
.date-foot { display: flex; align-items: center; gap: 10px; margin: 12px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.date-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.date-bar input[type=date] { width: auto; min-width: 180px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; min-height: 46px; }
.date-pages { display: grid; gap: 14px; background: #efebe3; padding: 14px; border-radius: 10px; }
.date-pages .layer { cursor: crosshair; }
.date-mark { position: absolute; transform: translateY(-50%); line-height: 1; white-space: nowrap; color: #16211c; background: rgba(61, 220, 151, .28); outline: 1.5px dashed #1f9a68; padding: 1px 2px; pointer-events: none; }
.dated-line { width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--accent-soft); border-radius: 8px; color: #135e40; }

/* Agreement page: matching option buttons, hover explanations, back button, compliance documents */
.toolbar-actions { display: block; margin-top: 12px; }
.opt-group + .opt-group { margin-top: 14px; }
.opt-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.opt { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand); font: inherit; font-weight: 700; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; line-height: 1.2; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 151, .25); }
.opt .ic { flex: none; width: 22px; text-align: center; }
.opt.danger { color: var(--bad); }
.opt.danger:hover { border-color: #f1b5b5; background: var(--bad-soft); }
.opt.sm { min-height: 38px; padding: 7px 12px; font-size: 14px; gap: 7px; }
.opt[data-tip]:hover::after, .opt[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 30;
  width: max-content; max-width: 270px; padding: 9px 11px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; white-space: normal; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); pointer-events: none;
}
.opt[data-tip]:hover::before, .opt[data-tip]:focus-visible::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); z-index: 30;
  border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; pointer-events: none;
}
.back-btn { width: fit-content; margin-bottom: 4px; }
.doc-row { display: flex; gap: 6px; flex-wrap: nowrap; }
.doc-row .opt { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 7px 10px; gap: 6px; }
.doc-row .opt .ic { width: 18px; }
@media (max-width: 720px) { .doc-row { flex-wrap: wrap; } .doc-row .opt { flex: 1 1 calc(50% - 8px); } }

/* Firmly icons (instead of emojis): sized to the text around them */
.ico { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex: none; }
.banner .i .ico { width: 22px; height: 22px; vertical-align: 0; display: block; margin-top: 1px; }
.big .ico, .empty .icon .ico { width: 1em; height: 1em; }
.citem .who { display: inline-flex; align-items: center; gap: 4px; }
.citem .who .ico { width: 15px; height: 15px; vertical-align: 0; }
.citem .who.signed .ico { color: var(--ok); }
.citem .who.viewed .ico { color: #2f6fb0; }
.citem .who.pending .ico { color: #8a958f; }

/* Celebratory download buttons on a finished agreement (mint, on brand) */
.opt.win { border-color: transparent; color: #0d3a28; background: linear-gradient(135deg, #5fe8ad 0%, #3ddc97 45%, #22c07f 100%); box-shadow: 0 4px 14px rgba(34, 192, 127, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.opt.win:hover { border-color: transparent; background: linear-gradient(135deg, #6ff0b8 0%, #44e29d 45%, #27c886 100%); box-shadow: 0 6px 20px rgba(34, 192, 127, .42), inset 0 1px 0 rgba(255, 255, 255, .4); transform: translateY(-1px); }
.opt.win:active { transform: translateY(0); }
.opt.win .ic .ico { stroke-width: 2.3; }

/* Signing page: download to read first, decline to sign */
.sign-extras { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.sign-extras .linkbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.sign-extras .decline-btn { color: var(--bad); }
.doc-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.leave-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#draftNote .ico { width: 15px; height: 15px; }
.cdel { position: relative; z-index: 2; flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cdel:hover { background: var(--bad-soft); color: var(--bad); }
#list .citem.draft { border-style: dashed; border-color: var(--line); }
#list .citem.draft:hover { border-color: var(--accent); }
.filter { flex-wrap: wrap; }

.fbtn { min-width: 0; }
@media (max-width: 600px) { .zoombar { flex-wrap: wrap; justify-content: center; max-width: 100%; row-gap: 6px; } .zoombar .zsep { display: none; } }

/* Settings → Your emails */
.look-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.look-form .swatches { margin-bottom: 14px; }
.look-preview iframe { width: 100%; height: 720px; border: 1.5px solid var(--line); border-radius: 12px; background: #F4F1EA; }
.pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
@media (max-width: 520px) { .pics { grid-template-columns: minmax(0, 1fr); } }
.pic { display: flex; gap: 12px; align-items: flex-start; }
.pic-prev { flex: none; width: 64px; height: 64px; border-radius: 10px; background: #f4f1ea; border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.pic-prev.round { border-radius: 50%; }
.pic-prev img { width: 100%; height: 100%; object-fit: contain; }
.pic-prev.round img { object-fit: cover; }
.pic-prev .ico { width: 26px; height: 26px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; position: relative; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); background: #fff; }
.sw.on { box-shadow: 0 0 0 2.5px var(--accent); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dim { opacity: .5; }
.sizes .lw { display: block; width: 26px; margin: 0 auto 5px; background: currentColor; border-radius: 2px; }
#lineWidths button { padding: 8px 0 6px; font-size: 13px; }

/* Settings → Your emails: colour code, description counter, photo framing */
.colour-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.colour-row .swatches { margin: 0; }
.look-form .colour-row .swatches { margin-bottom: 0; }
.hexbox { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; min-height: 40px; }
.hexbox:focus-within { border-color: var(--accent); }
.hex-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.hexbox input { border: 0 !important; outline: 0; padding: 0 !important; min-height: 0 !important; width: 84px; font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; background: transparent; box-shadow: none !important; }
.hexbox input.bad { color: var(--bad); }
#hexHelp { display: block; margin: 6px 0 16px; }
.field .count { display: block; margin-top: 6px; font-size: 13px; }
.field .count.full { color: #9a6a00; }
.pic-prev.round.has-img { border: 3px solid var(--brand); }
.crop-modal { max-width: 400px; text-align: center; }
.crop-modal h2, .crop-modal p { text-align: left; }
.crop-stage { position: relative; margin: 0 auto; overflow: hidden; border-radius: 14px; background: #222; cursor: grab; touch-action: none; user-select: none; }
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(15, 25, 20, .55); outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 280px; margin: 14px auto 0; }
.crop-zoom input[type=range] { flex: 1; accent-color: var(--brand); }
.crop-zoom .zbtn { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.crop-zoom .zbtn:hover { border-color: var(--accent); }
.crop-zoom .zbtn .ico { width: 20px; height: 20px; }

/* ---------- Name menu in the top bar ---------- */
.usermenu { position: relative; }
.who-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font: inherit; font-weight: 600; font-size: 15px; padding: 5px 10px 5px 5px; border-radius: 99px; cursor: pointer; }
.who-btn:hover, .who-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }
.who-ini { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.who-chev { width: 16px; height: 16px; opacity: .8; }
.um-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 35, 25, .22); border: 1px solid var(--line); padding: 6px; }
.um-head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-head b { font-size: 15px; color: var(--brand); }
.um-head span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.um-head .um-team { margin-top: 4px; font-weight: 700; color: #1f9a68; font-size: 12.5px; }
.um-pop a, .um-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 9px; color: var(--ink); text-decoration: none; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.um-pop a:hover, .um-pop button:hover, .um-pop a:focus-visible, .um-pop button:focus-visible { background: #f4f1ea; outline: none; }
.um-pop a.on { color: var(--brand); background: var(--accent-soft); }
.um-pop .ico { width: 18px; height: 18px; color: var(--brand); }
.um-pop #logoutBtn { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 6px; padding-top: 11px; color: var(--muted); }
@media (max-width: 640px) { .who-name { display: none; } .who-btn { padding-right: 8px; } }

/* ---------- Login screens ---------- */
.auth-switch { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch > span { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.auth-switch > span::before, .auth-switch > span::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch .btn { color: var(--brand); text-decoration: none; }
.auth-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.code-in { font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; letter-spacing: .35em; text-align: center; }
.pw-hints { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 7px; }
.pwh { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.pwh .ico { width: 15px; height: 15px; }
.pwh.ok { color: #1f9a68; font-weight: 600; }
.choice-list { display: grid; gap: 8px; margin: 6px 0 4px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }

/* ---------- Create account ---------- */
.signup-body { background: linear-gradient(170deg, #eef4ef 0%, var(--paper, #f4f1ea) 40%); min-height: 100vh; }
.su-top { max-width: 760px; margin: 0 auto; padding: 22px 20px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.su-brand { margin: 0; text-decoration: none; }
.su-top a:not(.su-brand) { color: var(--brand); font-weight: 700; }
.su-wrap { max-width: 760px; margin: 0 auto; padding: 8px 20px 60px; }
.su-card { padding: 28px 28px 26px; }
.su-card h1 { font-size: 28px; margin: 0 0 10px; }
.su-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 10px 0 16px; counter-reset: s; flex-wrap: wrap; }
.su-steps li { counter-increment: s; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.su-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: #efebe2; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; }
.su-steps li.on { color: var(--brand); border-color: var(--accent); }
.su-steps li.on::before { background: var(--accent); color: var(--brand); }
.su-steps li.done::before { content: "✓"; background: var(--brand); color: #fff; }
body.joining .team-only { display: none !important; }
body.not-owner .owner-only { display: none !important; }
.fgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 0 12px; }
@media (max-width: 620px) { .fgrid2, .fgrid3 { grid-template-columns: minmax(0, 1fr); } }
.field .hint, small.hint { display: block; margin-top: 6px; font-size: 13px; }
.opt-tag { font-style: normal; font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.person-row { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 14px 8px; margin-bottom: 12px; background: #fbfaf7; }
.perm-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -4px 0 6px; }
.perm { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.perm input { width: 17px; height: 17px; accent-color: var(--brand); }
.perm-row .rm { margin-left: auto; color: var(--bad); font-size: 14px; }
.perm-key { display: grid; gap: 3px; margin-top: 14px; padding: 12px 14px; background: #f4f1ea; border-radius: 12px; }
.su-look { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.su-look .look-preview iframe { height: 560px; }
.su-done { text-align: center; padding: 10px 0 6px; }
.su-done .ico-big { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: #1f9a68; align-items: center; justify-content: center; margin-bottom: 6px; }
.su-done .ico-big .ico { width: 34px; height: 34px; }

/* ---------- Team page ---------- */
.members { display: grid; gap: 10px; }
.member { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.member.invited { background: #fbfaf7; border-style: dashed; }
.m-ini { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.m-main { flex: 1; min-width: 0; }
.m-name { font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-perms { margin: 8px 0 2px; }
.m-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #efebe2; color: var(--muted); }
.tag.owner { background: #fff4d6; color: #8a6400; }
.tag.owner .ico { width: 13px; height: 13px; }
.tag.wait { background: #e8f1fb; color: #1d5b99; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.perm.locked { cursor: default; opacity: .8; }
.perm.locked input { accent-color: #7b8a83; }
.danger-text { color: var(--bad) !important; }
@media (max-width: 620px) { .member { flex-wrap: wrap; } .m-acts { width: 100%; justify-content: flex-start; } }

/* ---------- Contacts ---------- */
.ct-tools { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; }
.ct-tools .search { flex: 1; min-width: 240px; }
.ct-list { display: grid; gap: 8px; }
.ct { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ct-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ct-name { font-weight: 700; color: var(--brand); font-size: 16px; }
.ct-lines { display: flex; gap: 14px; flex-wrap: wrap; }
.ct-lines a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); text-decoration: none; }
.ct-lines a:hover { color: var(--brand); text-decoration: underline; }
.ct-lines .ico { width: 15px; height: 15px; color: var(--muted); }
.ct .m-acts .ico { width: 15px; height: 15px; }
.empty-ct { text-align: center; padding: 34px 20px; }
.empty-ct .ico-big { display: inline-flex; width: 58px; height: 58px; border-radius: 50%; background: var(--accent-soft); color: #1f9a68; align-items: center; justify-content: center; }
.empty-ct .ico-big .ico { width: 30px; height: 30px; }
@media (max-width: 620px) { .ct { flex-wrap: wrap; } .ct .m-acts { width: 100%; justify-content: flex-start; } }

/* ---------- Plan & billing ---------- */
.bill-stat { display: flex; flex-direction: column; align-items: flex-end; }
.bill-stat b { font-size: 30px; color: var(--brand); line-height: 1; }
.bill-stat span { font-size: 13px; color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 620px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plan.featured { border-color: var(--accent); background: #f6fcf9; }
.plan h3 { margin: 0; color: var(--brand); }
.plan ul { margin: 2px 0 6px; padding-left: 18px; }
.plan .price { font-weight: 800; color: var(--brand); margin: auto 0 6px; }

/* ---------- Settings: details, security, locks ---------- */
.sect-h { margin: 30px 0 10px; font-size: 22px; }
.devices { display: grid; gap: 6px; }
.device { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; font-weight: 600; font-size: 15px; }
.locked { pointer-events: none; opacity: .55; }
/* Phones: the top bar wraps, so the menu drops down full width under it. */
@media (max-width: 640px) {
  .topbar .inner { position: relative; }
  .usermenu { position: static; }
  .um-pop { left: 12px; right: 12px; top: calc(100% - 4px); min-width: 0; }
}

/* ---------- Settings: quick links, Team & permissions ---------- */
.set-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; }
.set-nav a { font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.set-nav a:hover { border-color: var(--accent); }
#meCard, #secCard, #lookCard, #team, #teamSettingsH { scroll-margin-top: 16px; }
.team-name-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 0 12px; align-items: end; margin: 14px 0 4px; }
.team-name-row .tn-save { display: flex; gap: 8px; align-items: center; padding-bottom: 14px; }
@media (max-width: 680px) { .team-name-row { grid-template-columns: minmax(0, 1fr); } .team-name-row .tn-save { justify-content: flex-end; } }
.perm-help { background: #f4f1ea; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; font-size: 14.5px; }
.perm-help ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.perm-grid { display: grid; gap: 8px; }
.pg-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(5, minmax(64px, 1fr)); gap: 6px; align-items: center; }
.m-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 3px; }
.m-links:empty { display: none; }
.m-links .linkbtn { font-size: 13.5px; font-weight: 600; padding: 0; }
.pg-headrow { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0 12px; }
.pg-headrow .pg-col { text-align: center; line-height: 1.2; cursor: help; }
.perm-grid .member { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; }
.perm-grid .member.leader { background: #fffbef; border-color: #f0dca0; }
.pg-person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.m-sub { overflow: hidden; text-overflow: ellipsis; }
.m-full { color: #8a6400; font-weight: 700; }
.pg-cell { display: flex; justify-content: center; align-items: center; gap: 6px; cursor: pointer; }
.pg-cell input { width: 19px; height: 19px; accent-color: var(--brand); }
.pg-cell .pg-lab { display: none; }
.pg-cell.locked { cursor: default; }
.pg-cell.locked input { accent-color: #9aa79f; }
@media (max-width: 760px) {
  .pg-headrow { display: none; }
  .pg-row { grid-template-columns: minmax(0, 1fr); }
  .pg-cell { justify-content: flex-start; font-size: 14px; font-weight: 600; }
  .pg-cell .pg-lab { display: inline; }
  .pg-cell { padding-left: 48px; }
}
.add-person { border: 1.5px solid var(--accent); border-radius: 14px; padding: 14px; background: #f6fcf9; }
.perm-q { font-weight: 700; color: var(--brand); margin: 2px 0 8px; font-size: 15px; }
.perm-q .muted { font-weight: 400; font-size: 13.5px; }
.perm-list { display: grid; gap: 7px; }
.perm-line { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.perm-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.leave-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.su-nav { gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
@media (max-width: 520px) { .su-nav .btn-big { flex: 1 1 100%; order: -1; } .su-nav .grow { display: none; } }

/* Optional boxes (e.g. a checkbox that doesn't have to be ticked) have a dashed outline in the editor. */
.fbox.optional { border-style: dashed !important; }

/* ---------- Agent notes on a contract ---------- */
.notes { display: grid; gap: 8px; margin-bottom: 12px; }
.note { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: #fbfaf7; padding: 9px 12px; }
.note-meta { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.note-meta b { color: var(--brand); }
.note-lock { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #1f9a68; margin-left: auto; }
.note-lock .ico { width: 13px; height: 13px; }
.note-text { margin-top: 4px; font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
.note-form textarea { width: 100%; min-height: 84px; resize: vertical; font: inherit; font-size: 15px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.note-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 151, .2); }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
#notesCard h2 + span .ico, #notesCard .small .ico { width: 14px; height: 14px; vertical-align: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------------- Help page ---------------- */
.help-wrap { max-width: 820px; }
.help-wrap h1 { text-transform: none; font-size: 30px; margin-bottom: 4px; }
.help-intro { margin-top: 0; font-size: 17px; }
.help-search { position: relative; margin: 18px 0 12px; }
.help-search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.help-search input { width: 100%; padding: 14px 14px 14px 44px; font-size: 17px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.help-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.help-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.help-nav a { padding: 7px 12px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); color: var(--brand); font-weight: 700; font-size: 14px; text-decoration: none; }
.help-nav a:hover { border-color: var(--accent); background: var(--accent-soft); }
.help-sec { margin: 26px 0; scroll-margin-top: 16px; }
.help-sec > h2 { text-transform: none; font-size: 21px; margin: 0 0 4px; }
.help-for { margin: 0 0 10px; }
.qa { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; margin-top: 8px; scroll-margin-top: 16px; }
.qa > summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 700; color: var(--ink); font-size: 16px; position: relative; }
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.qa[open] > summary::after { transform: translateY(-30%) rotate(225deg); }
.qa[open] { border-color: #cfe9dc; }
.qa > div { padding: 0 16px 14px; color: var(--ink); line-height: 1.55; }
.qa > div p { margin: 0 0 10px; }
.qa > div ol, .qa > div ul { margin: 0 0 10px; padding-left: 22px; }
.qa > div li { margin-bottom: 5px; }
#contact { padding: 22px; }
.help-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 640px) { .help-types { grid-template-columns: 1fr; } }
.help-type { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.help-type input { position: absolute; opacity: 0; pointer-events: none; }
.help-type.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.help-type:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.help-who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .help-who { grid-template-columns: 1fr; } }
.help-wrap textarea { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.help-sent { text-align: center; padding: 10px 0; }
.help-sent .big { font-size: 46px; color: var(--ok); }
.help-sent .big .ico { width: 46px; height: 46px; }
.help-sent h3 { margin: 6px 0; font-size: 21px; }
.topbar a.navlink .ico { width: 17px; height: 17px; vertical-align: -3px; }
.auth-help { text-align: center; margin: 14px 0 0; } .auth-help a { color: var(--brand); font-weight: 600; }

/* ---- Firmly product switcher (next to the product name in the top bar) */
.prodmenu { position: relative; display: inline-flex; align-items: center; margin-left: -4px; }
.prod-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0; }
.prod-btn:hover, .prod-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
.prod-btn .ico { width: 16px; height: 16px; }
.pm-pop { position: absolute; top: calc(100% + 10px); left: -8px; z-index: 60; width: 290px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 18, 43, .22); padding: 8px; color: var(--ink); }
.pm-head { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.pm-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pm-item .pm-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pm-item b { font-size: 15px; color: var(--brand); }
.pm-item .pm-txt span { font-size: 13px; color: var(--muted); }
a.pm-item:hover { background: var(--accent-soft); }
.pm-item.on { background: #f1f8f4; }
.pm-here { color: var(--ok); display: inline-flex; }
.pm-item.soon { opacity: .7; cursor: default; }
.pm-tag { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: #efebe2; color: var(--muted); }
@media (max-width: 640px) { .pm-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

/* ---- "How signing works" on the signer's welcome screen (before they agree) */
.how-sign { background: #f8f6f1; border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; font-size: 15px; color: var(--ink); line-height: 1.5; }
.how-sign .hs-title { font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.how-sign ol { margin: 0 0 8px; padding-left: 20px; }
.how-sign li { margin-bottom: 4px; }
.how-sign p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.how-sign .hs-more { margin: 0; }
.how-sign a { color: var(--brand); font-weight: 600; }

/* ---- Settings → Close my account */
.close-card { border: 1.5px solid #f1d4d4; }
.close-card h2 { color: var(--bad); }
.danger-text { color: var(--bad); }
.close-body ul { padding-left: 20px; }
.close-body li { margin-bottom: 6px; }
.dl-step { background: #f8f6f1; border-radius: 12px; padding: 14px; margin: 6px 0 14px; }
.dl-step .dl-status { margin-top: 6px; }

/* Sign-up: the simple Firmly Files only form */
.files-only { display: none; }
.files-signup .files-only { display: revert; }
.files-signup .sign-only, .files-signup .team-only, .files-signup #suSteps { display: none !important; }
/* A Firmly Files only account: Settings leaves out the signing parts */
.files-acct #teamSettingsH, .files-acct #emailCard, .files-acct #form { display: none !important; }

/* ---------- Settings in sections: a side menu on wide screens, a drop-down on phones ---------- */
.set-wrap { max-width: 1040px; }
.set-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; }
.set-side { position: sticky; top: 14px; }
.set-menu { display: grid; gap: 2px; }
.set-menu button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; }
.set-menu button svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.set-menu button:hover { background: #efece4; }
.set-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.set-menu button[aria-current="true"] { background: var(--brand); color: #fff; }
.set-menu button[aria-current="true"] svg { color: var(--accent); }
.set-pick { display: none; }
.set-main { min-width: 0; }
.set-main > .card:first-child, .set-main > .sect-h:first-child { margin-top: 0; }
.set-main .sect-h { margin-top: 0; }
.cat-off { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.web-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.web-pick label { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #f4f1ea; }
.web-pick label.dark { background: #2b2f2d; }
.web-pick label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent); }
.web-pick label .nm { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.web-pick label.dark .nm { color: #fff; }
@media (max-width: 860px) {
  .set-grid { grid-template-columns: 1fr; gap: 12px; }
  .set-side { position: static; }
  .set-menu { display: none; }
  .set-pick { display: block; }
  .set-pick select { width: 100%; font-weight: 700; }
}

/* ---------- Phone fixes for the editor (30 Nov 2026) ---------- */
@media (max-width: 860px) {
  /* The zoom bar sits just under the folded tools bar, never behind it (this has to come after the main .zoombar rule),
     and stays on one row: undo/redo, zoom, page number. */
  .zoombar { top: 58px; flex-wrap: nowrap; gap: 3px; padding: 5px 7px; max-width: calc(100vw - 16px); box-sizing: border-box; }
  .zoombar .zsep, .zoombar #navToggle { display: none; }
  .zoombar .zb { width: 30px; height: 30px; flex: none; }
  .zoombar select { min-height: 30px; font-size: 13.5px; padding: 2px 4px; max-width: 92px; flex: 0 1 auto; min-width: 0; }
  .zoombar .page-ind { font-size: 12px; white-space: nowrap; padding: 0 3px; flex: none; }
  /* Back and Next never touch: a gap between them, and each shrinks to fit */
  .flownav { gap: 12px; padding-left: 12px; padding-right: 12px; }
  .flownav .fn-btn { min-width: 0; padding: 0 14px; font-size: 15px; line-height: 1.2; }
  .flownav #navBack { flex: 0 1 auto; }
  .flownav #navNext { flex: 0 1 auto; }
}
/* Zoomed in: the page can be dragged sideways as well as up and down */
#pages.zoomed { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
/* (not while a cross-out tool is in hand: there a sideways drag draws the line) */
#pages.zoomed .page-wrap:not(.tool-line) { touch-action: pan-x pan-y; }

/* ---------- First-time checklist, and the "where it was made" tag on agreements ---------- */
.guide { margin-bottom: 18px; border: 1.5px solid var(--accent); }
.guide-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.guide-head h2 { margin: 0; }
.guide-head #guideSkip { margin-left: auto; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.guide-steps li:first-child { border-top: 0; }
.guide-steps .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: #1a7550; }
.guide-steps li.done .tick { border-color: transparent; }
.guide-steps li.done .tick svg { width: 24px; height: 24px; }
.guide-steps li.done b { color: var(--muted); font-weight: 600; }
.guide-steps .btn { flex: none; white-space: nowrap; }
.under-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; background: #eef1ec; color: #3d4d45; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
@media (max-width: 520px) { .guide-steps li { flex-wrap: wrap; } .guide-steps .btn { margin-left: 36px; } }

/* ---------- The site notice from Firmly support (Back end → Site notice) ---------- */
.site-notice { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #e7f6ee; color: #14402e; border-bottom: 1px solid #cfe9db; font-size: 14.5px; font-weight: 600; }
.site-notice.warn { background: #fff4dc; color: #5c3d00; border-bottom-color: #f2dfae; }
.site-notice .i { display: inline-flex; flex: none; }
.site-notice .i svg { width: 18px; height: 18px; }
.site-notice .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-notice .x { all: unset; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 6px; flex: none; }
.site-notice .x:hover { background: rgba(0, 0, 0, .07); }
.site-notice .x:focus-visible { outline: 2px solid currentColor; }
.site-notice .x svg { width: 16px; height: 16px; }

/* ---------- Terms, buyer terms and privacy pages ---------- */
.terms-page .su-card { max-width: 760px; }
.terms-page h1 { margin-bottom: 8px; }
.terms-page .lead { font-size: 17px; }
.terms-page h2 { margin: 30px 0 8px; padding-top: 14px; border-top: 1px solid var(--line, #e6e1d6); font-size: 21px; }
.terms-page h3 { margin: 18px 0 6px; font-size: 16px; }
.terms-page ul, .terms-page ol { padding-left: 22px; margin: 6px 0 10px; }
.terms-page li { margin: 6px 0; line-height: 1.55; }
.terms-page .terms-list li { margin: 10px 0; }
.terms-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.terms-toc a { background: #efebe3; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--brand); }
.terms-foot { margin-top: 28px; }
/* Blanks still to fill in before launch (Back end → Site health reminds you while terms.mts says there are some) */
mark.blank { background: #fff1b8; color: inherit; border-radius: 4px; padding: 0 3px; }
.terms-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.terms-table th, .terms-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.terms-table th { background: #f6f3ec; font-weight: 800; }
