:root {
  --navy: #0b1640; --blue: #1d3fae; --blue-2: #3d6bff; --gold: #c8921a; --gold-2: #f6d77c;
  --bg: #f4f6fb; --card: #ffffff; --line: #e2e6ef; --text: #0b1640; --muted: #5b6478;
  --green: #0f7a43; --red: #b42318; --amber: #a15c00; --chip: #eef2ff;
  --radius: 12px; --shadow: 0 1px 2px rgba(11,22,64,.06), 0 4px 16px rgba(11,22,64,.05);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--blue); }
h1 { font-size: 24px; margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; padding: 48px 16px; }
.pos { color: var(--green); } .neg { color: var(--red); } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Top bar */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.top img { height: 34px; }
.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.top nav a.on, .top nav a:hover { color: var(--blue); background: var(--chip); }
.top .right { display: flex; gap: 8px; align-items: center; }
main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Buttons and inputs */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--blue-2); }
button.primary, .btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
button.primary:hover { background: #17338f; }
button.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
button.danger { color: var(--red); }
button.link { border: 0; background: none; color: var(--blue); padding: 4px 6px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }
textarea { width: 100%; min-height: 90px; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
form.stack { display: grid; gap: 12px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--blue); border-bottom-color: var(--blue); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--blue); }
.pill.ok { background: #e7f6ee; color: var(--green); } .pill.warn { background: #fff4e0; color: var(--amber); } .pill.bad { background: #fdecea; color: var(--red); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.sub td { font-weight: 700; } tr.total td { font-weight: 800; font-size: 16px; border-top: 2px solid var(--navy); }
tr.sec td { color: var(--blue); font-weight: 700; padding-top: 16px; border-bottom: 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Auth screens */
.auth { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.auth .logo { display: block; margin: 0 auto 24px; height: 56px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--blue-2); background: var(--chip); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--chip); color: var(--navy); margin-bottom: 12px; }
.notice.warn { background: #fff4e0; } .notice.bad { background: #fdecea; color: var(--red); }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 16px; background: #fffbef; border: 1px solid var(--gold-2); padding: 10px; border-radius: 8px; user-select: all; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); z-index: 50; }
#toast.show { opacity: 1; } #toast.err { background: var(--red); }

@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; } .top img { height: 28px; } main { padding: 16px 12px 48px; }
  .top nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; } .top nav a { white-space: nowrap; padding: 6px 10px; }
  .top .right { margin-left: auto; } .kpi .value { font-size: 24px; }
}
[hidden] { display: none !important; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--chip); }
details > summary { cursor: pointer; padding: 6px 0; }
.notice.ok { background: #e7f6ee; color: var(--green); }
.top { padding-top: env(safe-area-inset-top); }
body { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Crown Sign ---------- */
.kpi { padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 30px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
a.kpi:hover { border-color: var(--blue-2); }
.hero { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(120deg, var(--navy), var(--blue) 70%); color: #fff; border: 0; }
.hero h1 { color: #fff; } .hero p { margin: 4px 0 0; opacity: .85; }
.hero .gold { box-shadow: 0 2px 10px rgba(0,0,0,.2); font-size: 16px; padding: 12px 18px; }
.status { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-draft { background: #eef0f4; color: #4a5160; } .st-sent { background: #fff4e0; color: var(--amber); } .st-completed { background: #e7f6ee; color: var(--green); }
.st-declined, .st-voided, .st-expired { background: #fdecea; color: var(--red); } .st-template { background: var(--chip); color: var(--blue); }
.who { display: flex; gap: 4px; flex-wrap: wrap; }
.who span { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: #f1f3f8; color: var(--muted); }
.who span.ok { background: #e7f6ee; color: var(--green); } .who span.no { background: #fdecea; color: var(--red); }
.pbar { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin-top: 6px; max-width: 140px; }
.pbar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty img { height: 54px; opacity: .9; margin-bottom: 8px; }

/* steps */
.steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.steps a { flex: 1 1 140px; text-decoration: none; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.steps a b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--chip); color: var(--blue); font-size: 13px; }
.steps a.on { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 3px rgba(61,107,255,.12); }
.steps a.done b { background: var(--green); color: #fff; }

/* recipients */
.rec { display: grid; grid-template-columns: 34px 1.2fr 1.4fr 1fr 130px auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.dot { width: 26px; flex: none; height: 26px; border-radius: 99px; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.rec input, .rec select { width: 100%; }
.rec .order { width: 56px; }
.rec .more { grid-column: 2 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 860px) { .rec { grid-template-columns: 34px 1fr 1fr; } .rec .more { grid-column: 1 / -1; } }

/* editor */
.editor { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.palette { position: sticky; top: 76px; }
.palette .card { padding: 14px; }
.palette .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.palette button.tool { width: 100%; justify-content: flex-start; padding: 9px 8px; font-size: 13px; height: 40px; }
.palette button.tool.on { border-color: var(--blue); background: var(--chip); color: var(--blue); }
.palette button.tool i { font-style: normal; width: 22px; text-align: center; }
.palette .recpick { display: grid; gap: 6px; margin-bottom: 12px; }
.palette .recpick button { justify-content: flex-start; padding: 7px 10px; font-size: 13px; }
.palette .recpick button .sw { width: 12px; height: 12px; border-radius: 3px; }
.palette .recpick button.on { outline: 2px solid currentColor; }
.pages { display: grid; gap: 18px; justify-items: center; }
.pg { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(11,22,64,.15), 0 8px 24px rgba(11,22,64,.08); width: 100%; max-width: 900px; user-select: none; }
.pg canvas { display: block; width: 100%; height: auto; }
.pg .num { position: absolute; top: -18px; right: 0; font-size: 12px; color: var(--muted); }
.pg .layer { position: absolute; inset: 0; }
.pg.placing .layer { cursor: crosshair; }
.fld { position: absolute; border: 1.5px solid; border-radius: 4px; display: flex; align-items: flex-end; justify-content: flex-start; padding-bottom: 1px; font-size: 12px; font-weight: 700; overflow: visible; cursor: move; touch-action: none; }
.fld .lbl { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; pointer-events: none; }
.fld .rs { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 2px solid; cursor: nwse-resize; }
.fld .x { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 99px; background: var(--red); color: #fff; border: 0; padding: 0; font-size: 13px; line-height: 1; display: none; justify-content: center; }
.fld.sel { box-shadow: 0 0 0 3px rgba(61,107,255,.35); z-index: 3; }
.fld.sel .x { display: inline-flex; }
.fld.opt { border-style: dashed; }
.props { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } .palette { position: static; } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(11,22,64,.45); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h2 { margin-bottom: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.copybox { display: flex; gap: 6px; } .copybox input { flex: 1; font-size: 13px; }

/* signature pad */
.sigtabs { display: flex; gap: 4px; margin-bottom: 10px; }
.sigtabs button { flex: 1; } .sigtabs button.on { border-color: var(--blue); color: var(--blue); background: var(--chip); }
.sigpad { position: relative; height: 180px; border: 1.5px dashed #c9ced8; border-radius: 12px; background: #fff; }
.sigpad.small { height: 130px; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sigpad .sigline { position: absolute; left: 24px; right: 24px; bottom: 36px; border-top: 1px solid #c9ced8; padding-top: 4px; font-size: 12px; color: #8a91a0; pointer-events: none; }
.typed { display: grid; gap: 8px; }
.typed .opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-size: 34px; color: #0b1640; background: #fff; text-align: left; white-space: nowrap; overflow: hidden; }
.typed .opt.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61,107,255,.12); }
@font-face { font-family: 'Crown Script A'; src: url('/fonts/dancing-script.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Crown Script B'; src: url('/fonts/great-vibes.woff2') format('woff2'); font-display: block; }

/* signer page: one centered column, same width for header, pages and footer */
body.signer { background: #eef1f7; }
.sbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.sbar-in, .sfoot-in, .smain, .sprog-in { max-width: 860px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.sbar-in { height: 60px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.sbar img { height: 30px; display: block; } .sbar .grow { min-width: 0; text-align: center; }
.sbar .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sbar .s { font-size: 12px; color: var(--muted); }
.sbar .acts { display: flex; gap: 8px; justify-content: flex-end; }
.sbar .acts button { height: 36px; padding: 0 12px; font-size: 13px; }
.sprog { background: #fff; border-bottom: 1px solid var(--line); }
.sprog-in { height: 6px; padding-top: 0; padding-bottom: 0; }
.sprog i { display: block; height: 4px; margin-top: 1px; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 99px; transition: width .3s; }
.smain { padding-top: 24px; padding-bottom: 130px; }
.smain .pages { gap: 24px; }
.smain .pg { max-width: 828px; border-radius: 4px; }
.sfoot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgba(11,22,64,.06); }
.sfoot-in { height: 76px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.sfoot .grow { font-size: 15px; color: var(--muted); } .sfoot .grow b { color: var(--text); font-size: 17px; display: block; }
.sfoot button.primary, .sfoot button.gold { height: 50px; min-width: 190px; justify-content: center; font-size: 16px; border-radius: 12px; }

/* fields the signer fills */
.sf { position: absolute; border: 2px solid var(--gold); background: rgba(246,215,124,.35); border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  font-size: 12px; font-weight: 800; color: #6b4a00; padding: 0 4px; overflow: visible; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.sf:hover { background: rgba(246,215,124,.6); }
.sf .tag { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sf.done { background: transparent; border: 0; border-bottom: 2px solid rgba(15,122,67,.55); border-radius: 0; color: #000; justify-content: flex-start; align-items: flex-end; padding: 0 2px 1px; }
.sf.cur::before { content: attr(data-here); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: var(--gold); color: #fff; font-size: 12px; font-weight: 800;
  padding: 5px 10px 5px 9px; border-radius: 6px 0 0 6px; clip-path: polygon(0 0, 82% 0, 100% 50%, 82% 100%, 0 100%); padding-right: 18px; white-space: nowrap; }
.sf.cur:not(.done) { box-shadow: 0 0 0 4px rgba(200,146,26,.35); }
.sf img { height: 100%; max-width: 100%; object-fit: contain; object-position: left bottom; pointer-events: none; }
.sf input[type=text] { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 2px; border-radius: 0; color: #000; font-weight: 500; }
.sf input[type=text]:focus { outline: none; }
.sf.txt { justify-content: flex-start; padding: 0; } .sf.txt.done { align-items: stretch; }
.sf .val { color: #000; font-weight: 500; white-space: nowrap; overflow: hidden; width: 100%; text-align: left; pointer-events: none; line-height: 1; }
.sf.chk { padding: 0; font-size: 14px; color: #000; border-radius: 3px; } .sf.chk.done { border: 2px solid rgba(15,122,67,.55); border-radius: 3px; align-items: center; justify-content: center; }

/* welcome: one card, sections with the same spacing */
.welcome { max-width: 560px; margin: 32px auto 0; padding: 0 16px; }
.welcome .card { padding: 28px; display: grid; gap: 18px; }
.welcome .sec { display: grid; gap: 6px; }
.welcome .sec + .sec { border-top: 1px solid var(--line); padding-top: 18px; }
.welcome .k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.welcome .big { font-size: 20px; font-weight: 800; margin: 0; line-height: 1.3; }
.welcome .doc { display: flex; gap: 12px; align-items: center; } .welcome .doc .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; font-size: 22px; flex: none; }
.welcome .doc b { font-size: 17px; }
.welcome .msg { white-space: pre-wrap; background: #f6f7fb; border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 6px; margin: 0; }
.welcome label.chk { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--text); font-weight: 500; margin: 0; line-height: 1.5; }
.welcome label.chk input { width: 22px; height: 22px; margin: 1px 0 0; }
.welcome .go { width: 100%; height: 52px; justify-content: center; font-size: 17px; border-radius: 12px; }
.welcome .center-ic { width: 72px; height: 72px; border-radius: 99px; display: grid; place-items: center; font-size: 36px; margin: 0 auto; }
.signers-line { display: flex; gap: 6px; flex-wrap: wrap; }
.secure { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.lang-sw button { height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 640px) {
  .sbar-in { grid-template-columns: auto 1fr auto; gap: 10px; } .sbar .s { display: none; } .sbar .t { font-size: 14px; }
  .sfoot-in { grid-template-columns: 1fr auto; } .sfoot button.primary, .sfoot button.gold { min-width: 150px; font-size: 15px; }
  .smain { padding-left: 10px; padding-right: 10px; }
  .sf.cur::before { display: none; }
  .welcome .card { padding: 22px; }
}

.sbar img.ic { display: none; height: 32px; }
@media (max-width: 640px) { .sbar img.wm { display: none; } .sbar img.ic { display: block; } }

/* ===== One grid for everything (8-point scale): same edges, same gaps, same control heights ===== */
:root { --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --ctl: 44px; --ctl-sm: 36px; --r-ctl: 10px; --r-card: 14px; }
main { padding: var(--s4) var(--s3) 64px; }
.top-in { padding: 0 var(--s3); height: 64px; gap: var(--s3); }
.card { padding: var(--s3); margin-bottom: var(--s2); border-radius: var(--r-card); }
.grid { gap: var(--s2); margin-bottom: var(--s2); }
.card > h2, .card h2:first-child { margin: 0 0 var(--s2); font-size: 18px; line-height: 24px; }
.head { margin-bottom: var(--s3); gap: var(--s2); align-items: center; }
.head h1 { margin: 0; line-height: 32px; }
button, .btn { height: var(--ctl); padding: 0 var(--s2); border-radius: var(--r-ctl); justify-content: center; line-height: 1; }
button.link { height: auto; }
.top .right button.link { height: var(--ctl-sm); }
input:not([type=checkbox]):not([type=radio]), select { height: var(--ctl); padding: 0 12px; border-radius: var(--r-ctl); }
textarea { padding: 12px; border-radius: var(--r-ctl); min-height: 96px; }
label { gap: var(--s1); line-height: 16px; }
.form-grid { gap: var(--s2); align-items: end; }
form.stack { gap: var(--s2); }
.row { gap: var(--s2); }
.notice { padding: 12px var(--s2); border-radius: var(--r-ctl); margin-bottom: var(--s2); line-height: 20px; }
.card .notice:last-child { margin-bottom: 0; }
/* actions: full-width primary, then full-width secondary, same height (as in the example) */
.actions { display: grid; gap: 12px; margin-top: var(--s3); }
.actions > * { width: 100%; }
.actions.two { grid-template-columns: 1fr 1fr; }
.btn-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
/* headers with actions: buttons share one height and spacing */
.head .row { gap: 12px; }
.hero { padding: var(--s4) var(--s3); }
.hero .gold { height: 48px; padding: 0 var(--s3); }
.kpi { padding: var(--s3); }
.kpi .value { line-height: 36px; margin-top: var(--s1); }
.steps { gap: var(--s2); margin-bottom: var(--s3); }
.steps a { height: 52px; padding: 0 var(--s2); border-radius: var(--r-ctl); }
/* lists: one avatar column, one text column, one status column */
td { padding: 12px var(--s1); } td:first-child { padding-left: 0; } td:last-child { padding-right: 0; }
.dot { width: 32px; height: 32px; font-size: 14px; }
td.ava { width: 48px; }
.rec { grid-template-columns: 32px 1.2fr 1.4fr 1fr 150px var(--ctl); gap: 12px; padding: var(--s2); margin-bottom: 12px; border-radius: var(--r-ctl); }
.rec .more { gap: var(--s2); }
.rec .more input { height: var(--ctl-sm); }
.rec button.link { height: var(--ctl); width: var(--ctl); }
.palette .card { padding: var(--s2); }
.palette .recpick { gap: var(--s1); margin-bottom: var(--s2); }
.palette .recpick button { height: 40px; justify-content: flex-start; }
.palette .tools { gap: var(--s1); }
.palette button.tool { height: 44px; padding: 0 10px; }
.palette #auto { height: 48px; margin: var(--s2) 0 0; }
.editor { gap: var(--s3); grid-template-columns: 264px 1fr; }
.modal { padding: var(--s3); border-radius: var(--r-card); }
.modal h2 { margin-bottom: var(--s2); }
.modal .foot { gap: 12px; margin-top: var(--s3); }
.copybox { gap: var(--s1); }
.tabs { margin-bottom: var(--s3); }
.empty { padding: var(--s4) var(--s2); }
.sigtabs { gap: var(--s1); margin: var(--s2) 0 12px; }
.typed { gap: var(--s1); }
@media (max-width: 640px) {
  main { padding: var(--s2) var(--s2) 48px; } .top-in { padding: 8px var(--s2); height: auto; }
  .card { padding: var(--s2); } .hero { padding: var(--s3) var(--s2); }
  .actions.two { grid-template-columns: 1fr; } .btn-row { grid-auto-flow: row; }
}

.sbar-in { grid-template-columns: 1fr minmax(0, 2fr) 1fr; }
.sbar-in > :first-child { justify-self: start; }
.sbar .acts { justify-self: end; }
@media (max-width: 640px) { .sbar-in { grid-template-columns: 44px minmax(0, 1fr) auto; } }
@media (max-width: 640px) { .actions.two > :last-child { order: -1; } }
.lbl-inline { display: inline; font-weight: 500; }
