/* Eazy-eSign. Black and gold, Inter for text, Grenze Gotisch for the wordmark only. */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Grenze Gotisch"; src: url("/static/fonts/grenze-gotisch-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --black:#000; --gold:#C2B067; --gold-ink:#6f5f1f; --ink:#141414; --ink-2:#3a3a3a; --muted:#5f5f5f;
  --line:#e6e6e2; --line-2:#dcdcd8; --bg:#f5f5f3; --card:#fff; --ok:#1f6b3d; --bad:#b3261e;
  --radius:14px; --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin:0; font-family: var(--font); color:var(--ink); background:var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-ink); }
p { line-height:1.55; }
h1 { font-size:26px; font-weight:700; letter-spacing:-0.01em; margin:0 0 12px; }
h2 { font-size:17px; font-weight:650; margin:24px 0 10px; }
.muted { color:var(--muted); font-size:14px; }
.center { text-align:center; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size:12px; word-break:break-all; color:var(--ink-2); }

/* ---------- header ---------- */
header.top { background:var(--black); min-height:64px; padding:0 24px; display:flex; align-items:center; gap:20px; position:sticky; top:0; z-index:20; }
header.top .brand { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
header.top .brand img { width:36px; height:36px; display:block; }
.wordmark { font-family:"Grenze Gotisch", serif; font-weight:600; font-size:30px; line-height:1; color:var(--gold); letter-spacing:.01em; }
header.top .brand.team { color:var(--gold); font-weight:700; font-size:16px; letter-spacing:.2px; padding:20px 0; }
.main-nav { display:flex; gap:4px; flex-grow:1; }
.main-nav a { color:#c4c4c4; text-decoration:none; font-size:15px; font-weight:500; padding:9px 14px; border-radius:9px; }
.main-nav a:hover { color:#fff; }
.main-nav a.active { color:#fff; background:#1d1d1d; font-weight:600; }
.new-pack { gap:8px; }
details.menu { position:relative; }
details.menu summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; color:#c4c4c4; min-height:44px; padding:0 4px; }
details.menu summary::-webkit-details-marker { display:none; }
details.menu summary:hover { color:#fff; }
.avatar { width:36px; height:36px; border-radius:999px; background:#2a2a2a; color:var(--gold); font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.menu-pop { position:absolute; right:0; top:54px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(0,0,0,.18); min-width:250px; padding:8px; display:flex; flex-direction:column; }
.menu-pop a { color:var(--ink); text-decoration:none; padding:11px 12px; border-radius:8px; font-size:15px; }
.menu-pop a:hover { background:#f3f3f0; }
.menu-label { margin:6px 12px 2px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.menu-pop form { margin:4px 0 0; border-top:1px solid var(--line); padding-top:4px; }
.menu-pop .menu-signout { width:100%; justify-content:flex-start; background:none; color:var(--bad); padding:11px 12px; font-weight:500; border-radius:8px; }
.menu-pop .menu-signout:hover { background:#fdf1f0; }
.mobile-only { display:none; }
.bell { position:relative; color:#c4c4c4; width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:10px; flex-shrink:0; }
.bell:hover, .bell.active { color:#fff; background:#1d1d1d; }
.bell-count { position:absolute; top:4px; right:2px; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:var(--gold); color:#000; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; border:2px solid #000; }

/* ---------- page frame ---------- */
main { padding:28px 32px 48px; max-width:1200px; margin:0 auto; }
body.wide main { max-width:none; padding:0; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.page-head h1 { margin:0 0 4px; }
.page-head p { margin:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; margin:0 0 18px; }
.narrow { max-width:520px; margin-left:auto; margin-right:auto; }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.stack { display:flex; flex-direction:column; gap:12px; }

/* ---------- controls ---------- */
label { display:block; font-weight:600; margin:14px 0 6px; font-size:14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=file], input[type=date], textarea, select {
  width:100%; padding:11px 12px; border:1px solid var(--line-2); border-radius:10px; font-size:15px; font-family:inherit; background:#fff; color:var(--ink);
}
input:focus, textarea:focus, select:focus { outline:2px solid var(--gold); outline-offset:0; border-color:var(--gold); }
textarea { min-height:90px; }
button, .btn { background:var(--black); color:#fff; border:0; border-radius:10px; padding:10px 18px; min-height:44px; font-size:15px; font-weight:600; font-family:inherit; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
button.secondary, .btn.secondary { background:#fff; color:var(--ink); border:1px solid var(--line-2); }
button.secondary:hover, .btn.secondary:hover { border-color:#bdbdb8; }
button.danger, .btn.danger { background:var(--bad); }
button.gold, .btn.gold { background:var(--gold); color:#000; }
button:disabled { opacity:.5; cursor:not-allowed; }
label.check { display:flex; align-items:center; gap:10px; font-weight:500; }
label.check input { width:18px; height:18px; margin:0; accent-color:#000; }
.error { background:#fdecea; color:var(--bad); padding:11px 14px; border-radius:10px; margin:10px 0; font-size:14px; }
.notice { background:#eaf5ee; color:var(--ok); padding:11px 14px; border-radius:10px; margin:10px 0; font-size:14px; }

/* ---------- tables and badges ---------- */
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:12px 10px; border-bottom:1px solid #efefec; vertical-align:top; }
th { color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.pill, .badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; background:#efefed; color:#4a4a4a; white-space:nowrap; }
.pill.completed, .pill.signed, .badge.done { background:#e3f3e8; color:var(--ok); }
.pill.declined, .pill.voided, .pill.expired, .badge.ended { background:#fdecea; color:var(--bad); }
.pill.sent, .pill.in_progress, .pill.notified, .pill.viewed, .pill.verified, .pill.consented, .badge.out { background:#fff4d6; color:#7a5600; }
.badge.approval { background:#efe9fb; color:#5b3aa8; }

/* ---------- packs list ---------- */
.toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom:16px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chips a { text-decoration:none; font-size:14px; font-weight:500; padding:8px 14px; border-radius:999px; border:1px solid var(--line-2); background:#fff; color:#333; white-space:nowrap; }
.chips a.on { background:var(--ink); border-color:var(--ink); color:#fff; font-weight:600; }
.search { display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line-2); border-radius:10px; padding:0 12px; min-height:44px; width:320px; max-width:100%; margin:0; }
.search input { border:0; padding:10px 0; outline:0; }
.search input:focus { outline:0; }
.pack-list { background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.pack-row { display:grid; grid-template-columns:minmax(0,2.3fr) minmax(0,1.5fr) minmax(0,1.3fr) minmax(0,1.4fr) minmax(0,.9fr); gap:16px; padding:16px 20px; align-items:center; border-bottom:1px solid #f0f0ee; color:inherit; text-decoration:none; }
a.pack-row:hover { background:#fafaf8; }
.pack-row:last-child { border-bottom:0; }
.pack-head { padding:12px 20px; font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.pack-title { display:flex; align-items:center; gap:12px; min-width:0; }
.doc-ico { width:40px; height:48px; border-radius:6px; background:#f3f1ea; border:1px solid #e3dfd0; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#8a7a3a; }
.pack-title strong { display:block; font-size:15px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pack-title span { font-size:13px; color:var(--muted); }
.signer-line { display:flex; align-items:center; gap:8px; font-size:14px; margin:3px 0; }
.dot { width:10px; height:10px; border-radius:999px; flex-shrink:0; display:inline-block; }
.state-signed { color:var(--ok); } .state-waiting { color:#8a6200; } .state-idle { color:var(--muted); } .state-bad { color:var(--bad); }
.status-cell { display:flex; flex-direction:column; gap:7px; align-items:flex-start; }
.progress { height:4px; width:120px; background:#ececea; border-radius:999px; overflow:hidden; }
.progress > i { display:block; height:4px; background:var(--gold); border-radius:999px; }
.updated { font-size:14px; color:var(--muted); }
.empty { padding:48px 20px; text-align:center; color:var(--muted); }

/* ---------- packs: tools, tags, views ---------- */
.pack-tools { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; margin:0 0 14px; }
.tool-field { margin:0; font-weight:500; display:flex; flex-direction:column; gap:4px; min-width:150px; }
.tool-field > span { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.tool-field select, .tool-field input { padding:9px 10px; font-size:14px; }
.tool-field.grow { flex:1 1 240px; }
.view-switch { margin-left:auto; display:flex; background:#fff; border:1px solid var(--line-2); border-radius:10px; padding:3px; gap:2px; }
.view-switch a { width:40px; height:36px; display:flex; align-items:center; justify-content:center; color:var(--muted); border-radius:8px; }
.view-switch a:hover { color:var(--ink); background:#f3f3f0; }
.view-switch a.on { background:var(--ink); color:#fff; }
.tags { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tag { display:inline-block; font-size:12px; font-weight:600; padding:3px 9px; border-radius:6px; background:#f3f1ea; color:#5a4d1a; border:1px solid #e6e0cb; white-space:nowrap; }
.tag.deal { background:#eef3fe; color:#24448f; border-color:#d9e3fb; }
.tag.archived { background:#efefed; color:#555; border-color:#e0e0dc; }
.money strong { display:block; font-size:15px; }
.money span, .sig-sub { font-size:13px; color:var(--muted); }
.sig-sub { display:flex; align-items:center; gap:6px; }
.pc-dots { display:inline-flex; gap:3px; }
.pack-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:14px; }
.pack-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:16px; display:flex; flex-direction:column; gap:12px; color:inherit; text-decoration:none; transition:box-shadow .15s, border-color .15s; }
.pack-card:hover { border-color:#cfc6a0; box-shadow:0 6px 18px rgba(0,0,0,.07); }
.pc-top { display:flex; gap:12px; align-items:flex-start; }
.pc-ico { width:42px; height:42px; border-radius:10px; background:#111; color:var(--gold); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.pc-name { min-width:0; }
.pc-name strong { display:block; font-size:16px; line-height:1.3; }
.pc-name span { font-size:13px; color:var(--muted); }
.pc-facts { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0; padding:10px 0; border-top:1px solid #f0f0ee; border-bottom:1px solid #f0f0ee; }
.pc-facts dt, .facts dt { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.pc-facts dd, .facts dd { margin:2px 0 0; font-weight:600; font-size:15px; }
.pc-sign { display:flex; justify-content:space-between; align-items:center; }
.progress.wide { width:100%; }
.pack-compact { background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.cp-row { display:grid; grid-template-columns:minmax(0,2.4fr) minmax(0,1fr) minmax(0,1.1fr) minmax(0,.9fr) minmax(0,.9fr) minmax(0,1.1fr) minmax(0,.8fr); gap:12px; padding:9px 16px; align-items:center; font-size:14px; border-bottom:1px solid #f0f0ee; color:inherit; text-decoration:none; }
.cp-row:last-child { border-bottom:0; }
a.cp-row:hover { background:#fafaf8; }
.cp-row > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cp-head { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.cp-addr strong { font-weight:600; }
.updated { white-space:nowrap; }

/* ---------- activity and notifications ---------- */
.act-day { font-size:13px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin:22px 0 8px; }
.activity > .act-day:first-child { margin-top:0; }
.act-list { background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.act-row { display:flex; align-items:center; gap:14px; padding:13px 18px; border-bottom:1px solid #f0f0ee; color:inherit; text-decoration:none; }
.act-row:last-child { border-bottom:0; }
.act-row:hover { background:#fafaf8; }
.act-row.unread { background:#fffbea; }
.act-dot { width:10px; height:10px; border-radius:999px; background:#c9c9c4; flex-shrink:0; }
.act-dot.good { background:var(--ok); } .act-dot.bad { background:var(--bad); } .act-dot.ask { background:#7c3aed; }
.act-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.act-main strong { font-size:15px; font-weight:600; }
.act-main span { font-size:13px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.act-time { font-size:13px; color:var(--muted); white-space:nowrap; display:flex; align-items:center; gap:8px; }
.new-tag { font-size:11px; font-weight:700; background:var(--gold); color:#000; border-radius:999px; padding:2px 8px; }

/* ---------- pack page ---------- */
.facts { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:14px 20px; margin:14px 0 16px; }
.edit-details > summary { list-style:none; display:inline-flex; }
.edit-details > summary::-webkit-details-marker { display:none; }
.edit-details[open] > summary { margin-bottom:6px; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.detail-grid .span-2 { grid-column:span 2; }
.detail-grid .two { display:grid; grid-template-columns:1fr 1.3fr; gap:0 10px; }
.pack-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
.actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:14px; }
.actions form { margin:0; }
.signer-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.signer-card { border:1px solid var(--line); border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:6px; }
.signer-card .name { font-weight:600; display:flex; align-items:center; gap:8px; }
.table-wrap { overflow-x:auto; }
.signer-rows .signer-row { display:grid; grid-template-columns:1fr 1fr 1fr 110px; gap:10px; align-items:end; margin-bottom:10px; }
.signer-rows label { margin-top:0; }

/* ---------- signing view (clients) ---------- */
.doc-wrap { position:relative; margin:0 auto 16px; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.12); max-width:100%; }
.doc-wrap canvas { display:block; width:100%; height:auto; }
.field { position:absolute; border:2px dashed var(--gold); background:rgba(194,176,103,.18); border-radius:4px; display:flex; align-items:center; justify-content:center; font-size:11px; color:#5a4b10; cursor:pointer; overflow:hidden; }
.field.done { border-style:solid; background:rgba(31,107,61,.10); border-color:var(--ok); color:var(--ok); }
.field.other { border-color:#bbb; background:rgba(0,0,0,.04); cursor:default; color:#888; }
.field input[type=text] { width:100%; height:100%; border:0; background:transparent; font-size:12px; padding:0 2px; border-radius:0; }
.field input[type=checkbox] { width:80%; height:80%; margin:0; }
.field img { max-width:100%; max-height:100%; }
.sigbar { position:sticky; bottom:0; background:#fff; border-top:1px solid var(--line); padding:12px 16px; display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; z-index:5; }
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:30; padding:12px; }
.modal-bg.open { display:flex; }
.modal { background:#fff; border-radius:14px; padding:20px; width:100%; max-width:520px; max-height:92vh; overflow:auto; }
.pad { border:1px solid var(--line-2); border-radius:10px; width:100%; height:160px; touch-action:none; background:#fff; }
.tabs { display:flex; gap:6px; }
.typed-preview { font-family: "Times New Roman", Times, serif; font-style:italic; font-size:34px; color:#0d1a59; padding:10px; border:1px solid var(--line); border-radius:10px; min-height:64px; overflow:hidden; }
.consent { white-space:pre-wrap; background:#fafaf8; border:1px solid var(--line); padding:14px; border-radius:10px; max-height:50vh; overflow:auto; font-size:14px; line-height:1.55; }

/* ---------- field editor ---------- */
.ed-bar { background:#111; color:#fff; padding:10px 20px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; border-top:1px solid #222; }
.ed-bar .back { color:#c4c4c4; display:flex; align-items:center; justify-content:center; width:40px; height:40px; text-decoration:none; }
.ed-bar .title { flex-grow:1; min-width:0; }
.ed-bar .title strong { display:block; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ed-bar .title span { font-size:12px; color:#9a9a9a; }
.ed-bar .btn.secondary { background:transparent; color:#fff; border-color:#444; }
.steps { list-style:none; margin:0; padding:0; display:flex; gap:6px; align-items:center; font-size:13px; color:#9a9a9a; }
.steps li { display:flex; align-items:center; gap:6px; }
.steps .n { width:22px; height:22px; border-radius:999px; background:#2a2a2a; color:var(--gold); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.steps .on { color:#fff; font-weight:600; } .steps .on .n { background:var(--gold); color:#000; }
.steps .sep { color:#555; }
.ed { display:grid; grid-template-columns:280px minmax(0,1fr) 150px; height:calc(100vh - 64px - 61px); min-height:520px; background:#ecebe7; }
.ed-side { background:#fff; border-right:1px solid #e2e1dc; padding:18px; overflow:auto; display:flex; flex-direction:column; gap:18px; }
.ed-side h3 { margin:0 0 8px; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.signer-pick { display:flex; flex-direction:column; gap:8px; }
.signer-pick button { justify-content:flex-start; background:#fff; color:var(--ink); border:1px solid #e2e1dc; font-weight:500; text-align:left; width:100%; }
.signer-pick button .order { margin-left:auto; font-size:12px; color:var(--muted); font-weight:500; }
.signer-pick button[aria-pressed=true] { border:2px solid var(--c); background:color-mix(in srgb, var(--c) 9%, #fff); font-weight:600; }
.tools { display:flex; flex-direction:column; gap:8px; }
.tool { justify-content:flex-start; background:#fafaf8; color:var(--ink); border:1px solid #e2e1dc; font-weight:500; width:100%; cursor:grab; touch-action:none; user-select:none; }
.tool[aria-pressed=true] { border-color:var(--c, #000); background:color-mix(in srgb, var(--c, #000) 8%, #fff); }
.tool .mk { width:28px; height:28px; border-radius:7px; background:color-mix(in srgb, var(--c, #2563eb) 12%, #fff); color:var(--c, #2563eb); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0; }
.drag-ghost { position:fixed; z-index:50; pointer-events:none; border:2px dashed var(--c); background:color-mix(in srgb, var(--c) 14%, #fff); color:var(--c); border-radius:6px; font-size:12px; font-weight:700; display:flex; align-items:center; padding:0 8px; }
.ed-pages { overflow:auto; padding:24px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.ed-pages .page-label { font-size:12px; color:var(--muted); align-self:center; }
.ed-pages .doc-wrap { width:min(100%, 820px); flex-shrink:0; }
.ed .field { --c:#2563eb; border:2px dashed var(--c); background:color-mix(in srgb, var(--c) 10%, transparent); color:color-mix(in srgb, var(--c) 75%, #000); cursor:move; font-weight:600; touch-action:none; user-select:none; justify-content:flex-start; padding:0 6px; white-space:nowrap; overflow:visible; }
.ed .field .lbl { overflow:hidden; text-overflow:ellipsis; }
.ed .field.checkbox { justify-content:center; padding:0; }
.ed .field.selected { border-style:solid; box-shadow:0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); z-index:3; }
.ed .field .who { margin-left:auto; font-size:9px; letter-spacing:.04em; opacity:.85; padding-left:4px; }
.ed .field .grip { position:absolute; right:-8px; bottom:-8px; width:16px; height:16px; background:#fff; border:2px solid var(--c); border-radius:3px; cursor:nwse-resize; display:none; touch-action:none; }
.ed .field.selected .grip { display:block; }
.ed-props { border:1px solid #e2e1dc; border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:10px; }
.ed-props label { margin:0; }
.ed-props .row button { flex:1; }
.ed-thumbs { background:#f7f6f2; border-left:1px solid #e2e1dc; padding:16px 14px; overflow:auto; display:flex; flex-direction:column; gap:6px; align-items:center; }
.ed-thumbs h3 { margin:0 0 6px; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; align-self:flex-start; }
.thumb { position:relative; width:96px; background:#fff; border:1px solid var(--line-2); border-radius:4px; padding:0; min-height:0; cursor:pointer; overflow:hidden; display:block; flex-shrink:0; }
.thumb canvas { display:block; width:100%; height:auto; }
.thumb.on { border:2px solid var(--gold); }
.thumb .count { position:absolute; bottom:4px; right:4px; font-size:10px; background:#111; color:#fff; border-radius:999px; padding:1px 6px; }
.thumb-label { font-size:12px; color:#444; margin-bottom:8px; }
.ed-msg { font-size:13px; color:var(--muted); min-height:18px; margin:0; }
.ed-msg.bad { color:var(--bad); }

/* ---------- black sign-in pages ---------- */
body.dark { background:#000; color:#f2f2f2; }
body.dark header.top { position:static; }
body.dark .card { background:#000; border:0; }
.logo-hero { text-align:center; margin:0 0 8px; }
.logo-hero img { width:360px; max-width:100%; height:auto; }
body.dark h1 { color:var(--gold); text-align:center; }
body.dark .muted { color:#aaa; }
body.dark input[type=text], body.dark input[type=email], body.dark input[type=password], body.dark input[type=tel] { background:#141414; color:#fff; border-color:#333; }
body.dark button[type=submit] { background:var(--gold); color:#000; width:100%; }
body.dark .error { background:#3a1210; color:#ffb4ab; }
body.dark .notice { background:#10261a; color:#9fe0b4; }
body.dark button.secondary { background:#000; color:#fff; border:1px solid #555; }
body.dark button.gold-outline { background:#000; color:var(--gold); border:1px solid var(--gold); width:100%; }
body.dark hr { border:0; border-top:1px solid #333; margin:18px 0; }
body.dark a { color:var(--gold); }
.or { text-align:center; color:var(--muted); font-size:13px; margin:14px 0 6px; }
body.dark .or { color:#888; }
.code-choices { display:flex; gap:10px; flex-wrap:wrap; }
.code-choices button { flex:1; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .ed { grid-template-columns:240px minmax(0,1fr); }
  .ed-thumbs { display:none; }
  .steps { display:none; }
}
@media (max-width: 760px) {
  header.top { padding:0 12px; gap:10px; min-height:58px; }
  .wordmark { font-size:25px; }
  header.top .brand img { width:32px; height:32px; }
  .main-nav { display:none; }
  .mobile-only { display:block; }
  header.top .new-pack { margin-left:auto; padding:8px 12px; min-height:40px; font-size:14px; }
  details.menu summary .avatar { display:none; }
  .menu-pop { top:50px; right:-4px; min-width:240px; }
  main { padding:18px 14px 40px; }
  h1 { font-size:23px; }
  .card { padding:18px; }
  .search { width:100%; }
  .chips { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; margin:0 -14px; padding-left:14px; padding-right:14px; }
  .pack-list { background:transparent; border:0; border-radius:0; display:flex; flex-direction:column; gap:10px; overflow:visible; }
  .pack-head { display:none; }
  .pack-row { grid-template-columns:1fr; gap:10px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:14px; }
  .pack-row:last-child { border-bottom:1px solid var(--line); }
  .doc-ico { display:none; }
  .pack-title strong { white-space:normal; }
  .status-cell { flex-direction:row; align-items:center; justify-content:space-between; width:100%; }
  .progress { width:100px; }
  .pack-row .tags, .pack-row .money { order:0; }
  .money { display:flex; justify-content:space-between; align-items:baseline; }
  .pack-tools { gap:8px; }
  .tool-field { min-width:0; flex:1 1 calc(50% - 8px); }
  .view-switch { margin-left:0; flex:1 1 100%; justify-content:center; }
  .view-switch a { flex:1; }
  .pack-grid { grid-template-columns:1fr; }
  .cp-head { display:none; }
  .cp-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; padding:10px 12px; }
  .cp-row > span:nth-child(2), .cp-row > span:nth-child(3), .cp-row > span:nth-child(5) { display:none; }
  .cp-row > span:nth-child(4) { grid-column:1; grid-row:2; color:var(--muted); font-size:13px; }
  .cp-row > span:nth-child(6) { grid-column:2; grid-row:1; }
  .cp-row > span:nth-child(7) { grid-column:2; grid-row:2; text-align:right; font-size:13px; }
  .act-row { padding:12px 14px; gap:10px; }
  .detail-grid { grid-template-columns:1fr; }
  .detail-grid .span-2 { grid-column:auto; }
  .bell { width:40px; height:40px; }
  .card table, .table-wrap table { display:block; overflow-x:auto; }
  .signer-rows .signer-row { grid-template-columns:1fr 1fr; padding-bottom:10px; border-bottom:1px solid var(--line); }
  .ed-bar { padding:8px 12px; }
  .ed-bar .title strong { font-size:15px; }
  .ed { grid-template-columns:1fr; height:auto; min-height:0; }
  .ed-side { border-right:0; border-bottom:1px solid #e2e1dc; padding:14px; gap:14px; }
  .tools { flex-direction:row; flex-wrap:wrap; }
  .tool { width:auto; flex:1 1 140px; }
  .ed-pages { padding:12px 8px; overflow:visible; }
  .sigbar { padding:10px 12px; }
  .sigbar button, .sigbar .btn { flex:1; }
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], textarea, select { font-size:16px; }
}
