:root {
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f1f5f9; --card: #ffffff;
  --accent: #0f766e; --accent-dark: #115e59; --accent-soft: #ccfbf1;
  --ok: #15803d; --err: #b91c1c; --err-soft: #fee2e2; --warn-soft: #fef3c7; --warn: #92400e;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .75rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
a { color: var(--accent-dark); }
.muted { color: var(--muted); }
.top { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .01em; }
.tag { margin-left: .5rem; font-size: .7rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); text-transform: uppercase; }
.who { font-size: .9rem; color: var(--muted); }
.wrap { max-width: 980px; margin: 1.5rem auto; padding: 0 1rem 3rem; }
.narrow { max-width: 640px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.span2 { grid-column: span 2; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .top { padding: .75rem 1rem; } }
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 600; }
.field input, .field select { font: inherit; font-weight: 400; padding: .6rem .7rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.hint { font-size: .85rem; font-weight: 400; min-height: 1.3em; }
.hint.err { color: var(--err); } .hint.ok { color: var(--ok); } .hint.muted { color: var(--muted); }
.btn { font: inherit; font-weight: 600; padding: .65rem 1.1rem; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--accent-dark); }
.btn.ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn.small { padding: .3rem .65rem; font-size: .85rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.alert { padding: .75rem 1rem; border-radius: 8px; font-size: .92rem; margin: 0 0 1rem; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.ok { background: var(--accent-soft); color: var(--accent-dark); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .25rem 0 .75rem; }
th.pick, td.pick { width: 2rem; padding-right: 0; }
td.pick input, th.pick input { width: 1.1rem; height: 1.1rem; cursor: pointer; }
td.pick input:disabled { cursor: not-allowed; opacity: .35; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e2e8f0; color: #334155; }
.badge.signed { background: #dcfce7; color: #166534; }
.badge.awaiting_signature, .badge.opened { background: #fef9c3; color: #854d0e; }
.badge.expired, .badge.cancelled { background: #f1f5f9; color: #64748b; }
.linkbox { display: flex; gap: .5rem; margin: .5rem 0; }
.linkbox input { flex: 1; font: inherit; font-size: .85rem; padding: .5rem .6rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
/* investor stepper */
.steps { display: flex; gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.steps li { flex: 1; font-size: .8rem; color: var(--muted); border-top: 3px solid var(--line); padding-top: .4rem; }
.steps li.on { color: var(--accent-dark); border-color: var(--accent); font-weight: 600; }
.steps li.done { border-color: var(--accent); }
dl.review { display: grid; grid-template-columns: 9rem 1fr; gap: .4rem 1rem; margin: 0 0 .75rem; }
dl.review dt { color: var(--muted); font-size: .9rem; } dl.review dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (max-width: 520px) {
  dl.review { grid-template-columns: 6.5rem 1fr; gap: .3rem .75rem; font-size: .92rem; }
  .card { padding: 1rem; } .wrap { margin: 1rem auto; padding-bottom: 1rem; } h1 { font-size: 1.3rem; }
  .steps { margin-bottom: .75rem; }
  .top { padding: .6rem 1rem; } .top .who { display: none; }
  .brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hint { font-size: .8rem; }
}
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; margin: .75rem 0; }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; }
.pdfframe { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pad { width: 100%; height: 160px; border: 1px dashed #94a3b8; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.big-check { font-size: 2.5rem; color: var(--ok); line-height: 1; }
.grid.pair { grid-template-columns: 1fr 1fr; gap: .75rem; } /* stays two columns on phones */
.summary { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem; font-size: .9rem; }
.summary .muted { font-size: .85rem; }
.small { font-size: .85rem; }
.stack > * + * { margin-top: .75rem; }
.stack > .hint { margin-top: .3rem; }

[hidden] { display: none !important; }
