:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #14213d;
  --muted: #5e6979;
  /* Brand colours from the RiderSign logo package */
  --accent: #0b1f3a;
  --accent-hover: #1d3a66;
  --gold: #c9a45c;
  --accent-soft: #e8eef8;
  --green: #1d7348; --green-soft: #e2f3e9;
  --amber: #965800; --amber-soft: #fcf0da;
  --blue: #234f9c; --blue-soft: #e6edfa;
  --gray: #5e6979; --gray-soft: #eef0f3;
  --ins: #135b37; --ins-bg: #d9f2e2;
  --del: #a02828; --del-bg: #fbe1e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --serif: Palatino, 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font: 600 28px/1.2 var(--serif); letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.amber-text { color: var(--amber); }
.green-text { color: var(--green); }
.pad { padding: 10px 14px; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; gap: 12px; }
.row.gap { gap: 10px; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--accent); padding: 0; font-size: 12.5px; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.gray { background: var(--gray-soft); color: var(--gray); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 500; }

/* ---------- Layout ---------- */
.shell { padding: 28px 16px 64px; }
.page { max-width: 1160px; margin: 0 auto; }
.page > * + * { margin-top: 18px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head p { margin-top: 4px; }
.section-title { font: 600 20px/1.3 var(--serif); margin-top: 28px !important; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs .sep { margin: 0 8px; color: #b3bac5; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card > h2 { margin-bottom: 10px; }
.card > h3 { margin-bottom: 10px; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1160px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 28px; }
.brand:hover { text-decoration: none; }
.brand { display: flex; align-items: center; }
.logo { display: block; height: 16px; width: auto; }
.logo.light { height: 26px; align-self: flex-start; margin-bottom: 8px; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pop-wrap { position: relative; }
.backdrop { position: fixed; inset: 0; z-index: 25; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d13a3a; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 8px; border-radius: 8px; text-align: left; }
.user-chip:hover { background: var(--surface-2); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta small { color: var(--muted); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12.5px; display: grid; place-items: center; flex: none; }
.popover { position: absolute; right: 0; top: calc(100% + 6px); width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(16, 24, 40, .14); z-index: 30; overflow: hidden; }
.popover.menu { width: 220px; }
.popover.menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; }
.popover.menu button:hover { background: var(--surface-2); }
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.note { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; }
.note:hover { background: var(--surface-2); }
.note.unread { background: var(--accent-soft); }
.note small { color: var(--muted); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-brand { background: linear-gradient(160deg, #0b1f3a, #1d3a66); color: #e6edf7; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login-brand h1 { color: #fff; font-size: 38px; max-width: 14ch; }
.login-brand p { max-width: 46ch; color: #c9d6ea; font-size: 15px; }
.value-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; max-width: 46ch; }
.value-list li { padding-left: 18px; position: relative; color: #c9d6ea; }
.value-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }
.value-list strong { color: #fff; }
.login-panel { padding: 56px; max-width: 560px; width: 100%; align-self: center; }
.login-panel h2 { font: 600 24px/1.25 var(--serif); }
.login-panel > p { margin: 6px 0 18px; }
.section-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; }
.user-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 8px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.user-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.user-btn-meta { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.user-btn-meta small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); font-size: 20px; }
.claim > * + * { margin-top: 14px; }

/* ---------- Stats & deal cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-value { font: 600 26px/1.1 var(--serif); }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat.amber .stat-value { color: var(--amber); }
.stat.green .stat-value { color: var(--green); }
.deal-list { display: grid; gap: 12px; }
.deal-card { display: flex; justify-content: space-between; gap: 24px; width: 100%; text-align: left; transition: border-color .15s, box-shadow .15s; }
.deal-card:hover { border-color: #b9c5d8; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.deal-card.attention { border-left: 4px solid var(--amber); }
.deal-card h2 { font: 600 19px/1.3 var(--serif); }
.deal-card-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.deal-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.progress { display: flex; width: 220px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.progress .seg.green { background: var(--green); }
.progress .seg.amber { background: #e3a13a; }
.progress .seg.blue { background: #8fb0e3; }
.confidential { margin-top: 6px; font-size: 13px; color: var(--muted); }
.confidential.revealed { color: var(--green); }

/* ---------- Forms ---------- */
.form-card > * + * { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 500; font-size: 13px; }
.field input, .field textarea, .doc-edit {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .doc-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }
.file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-chip { padding: 4px 10px; border-radius: 6px; background: var(--surface-2); font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-preview { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow: auto; }
.contact-preview li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.contact-preview li:last-child { border-bottom: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 46px; position: relative; background: var(--surface-2); border-radius: 8px; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.redline-result { border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.change-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.change-list .redline { margin-top: 6px; padding: 10px 12px; font-size: 13.5px; }
.change-list .kind { width: auto; padding: 3px 8px; }
.change-list .row { flex-wrap: wrap; row-gap: 4px; }

/* ---------- Tables ---------- */
.table-card { padding: 0; }
.table-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 20px; border-bottom: 1px solid var(--border); background: #fafbfc; white-space: nowrap; }
td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8fafd; }

/* ---------- Materials ---------- */
.material { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.material:first-of-type { border-top: 0; }
.material-meta { flex: 1; min-width: 0; }
.file-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .04em; flex: none; }
.material.locked .file-icon { background: var(--gray-soft); color: var(--gray); }

/* ---------- Documents & redlines ---------- */
.doc { white-space: pre-wrap; font: 15px/1.7 var(--serif); padding: 18px 20px; background: #fcfcfd; border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.doc-scroll { max-height: 420px; overflow: auto; margin-top: 12px; font-size: 14px; }
.redline .ins { background: var(--ins-bg); color: var(--ins); text-decoration: underline; text-decoration-color: rgba(19, 91, 55, .45); border-radius: 2px; }
.redline .del { background: var(--del-bg); color: var(--del); text-decoration: line-through; border-radius: 2px; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; }
.legend .ins { color: var(--ins); background: var(--ins-bg); padding: 0 6px; border-radius: 3px; text-decoration: underline; }
.legend .del { color: var(--del); background: var(--del-bg); padding: 0 6px; border-radius: 3px; text-decoration: line-through; }
.doc-edit { min-height: 360px; font: 14px/1.65 var(--serif); resize: vertical; }
.doc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.collapsible summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary::after { content: '▸'; color: var(--muted); transition: transform .15s; }
.collapsible[open] summary::after { transform: rotate(90deg); }

/* ---------- Negotiation ---------- */
.negotiation { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.neg-main > * + * { margin-top: 16px; }
.neg-side > * + * { margin-top: 16px; }
.status-bar { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-left: 4px solid var(--blue); }
.status-bar.amber { border-left-color: #e3a13a; background: #fffaf1; }
.status-bar.green { border-left-color: var(--green); background: #f5fbf7; }
.status-bar.gray { border-left-color: #b3bac5; }
.status-text { margin-top: 8px; max-width: 62ch; }
.note-quote { margin-top: 8px; font-style: italic; }
.summary { border-color: #d6e0f0; background: linear-gradient(180deg, #f7f9fd, #fff 60%); }
.summary-head { display: flex; gap: 10px; align-items: center; }
.ai-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.summary-headline { margin-top: 12px; font-weight: 500; }
.summary-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.summary-list li { display: flex; gap: 10px; align-items: flex-start; }
.summary-list .detail { color: var(--muted); font-size: 13px; }
.kind { flex: none; width: 70px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 0; border-radius: 4px; margin-top: 1px; }
.kind.modified { background: var(--blue-soft); color: var(--blue); }
.kind.added { background: var(--green-soft); color: var(--green); }
.kind.removed { background: var(--del-bg); color: var(--del); }
.kind.rider { background: var(--gray-soft); color: var(--gray); }
.standards-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed #c9a45c; background: #fdfaf2; border-radius: 8px; }
.section-change { margin-top: 16px; }
.section-change .redline { margin-top: 8px; font-size: 14px; padding: 14px 16px; }
.section-change .kind { width: auto; padding: 3px 8px; }
.extras-head { margin-top: 20px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.editor > * + * { margin-top: 14px; }
.editor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-cols .redline { min-height: 360px; max-height: 560px; overflow: auto; font-size: 14px; }
.col-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.versions button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; background: none; }
.versions button:hover { background: var(--surface-2); }
.versions button.on { background: var(--accent-soft); border-color: #cfdcf0; }
.versions small, .executed-row small { display: block; color: var(--muted); font-size: 12px; }
.executed-row { display: flex; gap: 10px; padding: 8px 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; }
.dot.bank { background: var(--accent); }
.dot.investor { background: #e3a13a; }
.dot.executed { background: var(--green); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }

/* ---------- Lifecycle, billing, team, settings ---------- */
.right { text-align: right; }
.btn.danger { background: var(--del); border-color: var(--del); color: #fff; }
.btn.danger:hover { background: #861f1f; }
.btn.block { width: 100%; }
.menu-head { display: flex; flex-direction: column; padding: 12px 14px; border-bottom: 1px solid var(--border); line-height: 1.3; }
.menu-head small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.deal-card.draft { border-left: 4px solid #e3a13a; }
.deal-card.archived { opacity: .72; background: #fafbfc; }
.launch-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.checklist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before { content: '○'; position: absolute; left: 4px; color: var(--muted); }
.checklist li.ok::before { content: '✓'; color: var(--green); font-weight: 700; }
.checklist.plain li::before { content: ''; width: 7px; height: 7px; top: 8px; left: 6px; background: var(--gold); transform: rotate(45deg); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.archive-panel { border-left: 4px solid var(--del); }
.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.checkout .line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.checkout .line:first-of-type { border-top: 0; }
.checkout .line small { display: block; color: var(--muted); font-size: 12.5px; }
.checkout .line.total { font-size: 16px; border-top: 2px solid var(--text); }
.pay-box { margin-top: 14px; display: grid; gap: 8px; }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bcard { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 176px; padding: 18px 20px 16px; background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 2px 8px rgba(11, 31, 58, .06); }
.bcard-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bcard-name { font: 600 18px/1.25 var(--serif); color: var(--accent); }
.bcard-title { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bcard-mark { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }
.bcard-firm { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.bcard-city { color: var(--muted); font-size: 13px; }
.bcard-lines { display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.bcard-lines dt { color: var(--muted); }
.bcard-lines dd { margin: 0; overflow-wrap: anywhere; }
.bcard-lines .wide { grid-column: 1 / -1; font-weight: 500; }
.profile-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.profile-grid .bcard { margin-top: 4px; }
.firm-picker { width: 100%; margin-top: 10px; }
.firm-picker .chips { justify-content: flex-start; margin-top: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-align: left; line-height: 1.2; }
.person-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.person-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.person-chip strong { display: block; font-size: 13px; }
.person-chip small { display: block; color: var(--muted); font-size: 11.5px; }
.person-chip .plus { color: var(--accent); font-weight: 700; margin-left: 2px; }
/* Investor deal page: what the bank shared vs. the investor's own internal items */
.zone { padding: 16px; border-radius: 14px; border: 1px solid; }
.zone > * + * { margin-top: 14px; }
.zone.deal { background: #edf1f7; border-color: #d6dfec; }
.zone.internal { background: #faf5e8; border-color: #eadbb4; }
.zone-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.zone.internal .zone-label { color: #7a5c17; }
.zone-sub { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.zone-mark { width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); flex: none; }
.zone.internal .zone-mark { background: var(--gold); }
.pill.gold { background: #f6ecd3; color: #7a5c17; height: 20px; font-size: 11px; vertical-align: middle; }
.pill.red { background: var(--del-bg); color: var(--del); }
.red-text { color: var(--del) !important; }
.status-bar.red { border-left-color: var(--del); background: #fdf3f3; }
.form-error { color: var(--del); font-size: 13px; }
.code-input { font-size: 22px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.demo-note { padding: 10px 12px; background: var(--amber-soft); color: var(--amber); border-radius: 8px; font-size: 13px; }
.demo-accounts { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.demo-accounts .chips { justify-content: flex-start; margin-bottom: 8px; }
.person-chip.dim { opacity: .65; }
.person-chip.frequent { border-color: #e2c98f; background: #fdf8ec; }
.person-chip.frequent small { color: #7a5c17; font-weight: 600; }
.picker-search { border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 13px; min-width: 200px; }
.facts.inline { grid-template-columns: repeat(4, auto 1fr); align-items: baseline; }
.facts.inline dd { text-align: left; font-weight: 500; }
@media (max-width: 900px) { .facts.inline { grid-template-columns: auto 1fr; } .facts.inline dd { text-align: right; } }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 20px 12px; }
.table-tools .chips { justify-content: flex-start; }
.filter-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.filter-chip span { margin-left: 4px; font-weight: 700; color: var(--text); }
.filter-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-chip.on span { color: #fff; }
.people { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.people .user-btn-meta small { white-space: normal; }
.add-colleague { margin-top: 12px; padding: 12px; border: 1px dashed var(--border); border-radius: 8px; background: #fafbfc; }
.add-colleague > * + * { margin-top: 10px; }
.member-card { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; }
.member-card > * + * { margin-top: 10px; }
.member-card .field input:disabled { background: var(--surface-2); color: var(--muted); }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team-person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; text-align: left; background: none; border: 1px solid var(--border); border-radius: 8px; }
.team-person:hover, .team-person.on { border-color: #cfdcf0; background: var(--accent-soft); }
.facts.contact { padding: 10px 12px 4px 56px; }
.facts.contact dd { text-align: left; }
.team-wrap > * + * { margin-top: 10px; }
.team-editor { display: grid; gap: 8px; justify-items: start; }
.team-row { display: grid; grid-template-columns: 1.1fr 1fr 1.4fr 1fr auto; gap: 8px; align-items: center; width: 100%; }
.team-row input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.team-row input:disabled { background: var(--surface-2); color: var(--muted); }
.team-row .owner { padding: 0 10px; }
.faq { border-top: 1px solid var(--border); padding: 12px 0; }
.faq:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin-top: 8px; color: var(--muted); }

/* ---------- Outbox & toast ---------- */
.outbox { list-style: none; margin: 0; padding: 0; }
.outbox li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.outbox li:last-child { border-bottom: 0; }
.outbox p { margin-top: 6px; }
.outbox .email-body { white-space: pre-wrap; }
.outbox .file-row { margin-top: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #15202e; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); z-index: 50; max-width: calc(100vw - 32px); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .negotiation { grid-template-columns: 1fr; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand, .login-panel { padding: 36px 20px; }
  .login-brand h1 { font-size: 30px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .editor-cols, .checkout, .profile-grid { grid-template-columns: 1fr; }
  .team-row { grid-template-columns: 1fr 1fr; }
  .deal-card { flex-direction: column; gap: 12px; }
  .deal-card-side { align-items: flex-start; }
  .chips { justify-content: flex-start; }
  .progress { width: 100%; }
  .page-head { flex-direction: column; }
  .status-bar { flex-direction: column; align-items: flex-start; }
  .nav { display: none; }
  .user-meta { display: none; }
  .popover { width: min(340px, calc(100vw - 32px)); }
}

/* Pop-up dialogs and the document reader */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(11, 31, 58, .45); z-index: 50; display: grid; place-items: center; padding: 24px 16px; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(16, 24, 40, .3); width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); height: calc(100vh - 48px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 20px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.doc-viewer { position: relative; flex: 1; min-height: 360px; background: var(--surface-2); border-radius: 8px; overflow: hidden; display: flex; }
.doc-viewer-scroll { flex: 1; overflow: auto; }
.doc-frame { width: 100%; height: 100%; min-height: 70vh; border: 0; display: block; }
.doc-image { display: block; max-width: 100%; margin: 0 auto; }
.paper { background: #fff; max-width: 720px; margin: 24px auto; padding: 48px 56px; box-shadow: 0 2px 10px rgba(16, 24, 40, .12); font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; line-height: 1.6; }
.paper h1 { margin: 6px 0; font-size: 30px; color: var(--accent); }
.paper h3 { margin: 24px 0 6px; color: var(--accent); font-size: 16px; }
.paper-cover { border-bottom: 3px solid var(--gold); padding-bottom: 20px; margin-bottom: 8px; }
.paper-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--gold); font-weight: 700; font-family: Inter, sans-serif; }
.paper-company { font-size: 18px; font-weight: 600; }
.paper-table { border-collapse: collapse; width: 100%; max-width: 380px; }
.paper-table th, .paper-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.paper-table th { color: var(--muted); font-weight: 500; width: 40%; }
.paper-contacts { padding-left: 18px; }
.paper .demo-note { margin-top: 28px; font-family: Inter, sans-serif; }
.watermark { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: flex; flex-direction: column; justify-content: space-around; align-items: center; transform: rotate(-24deg) scale(1.3); }
.watermark span { color: rgba(160, 40, 40, .12); font-weight: 700; font-size: 18px; white-space: nowrap; }
@media (max-width: 700px) { .paper { padding: 28px 22px; margin: 12px; } .modal-head { flex-direction: column; } }

.btn.danger { background: var(--del); border-color: var(--del); color: #fff; }
.btn.danger:hover { background: #861f1f; }
.btn.danger-ghost { color: var(--del); border-color: #ecc4c4; }
.btn.danger-ghost:hover { background: var(--del-bg); }
.chips.start { justify-content: flex-start; margin-top: 6px; }
.signature-preview { font-family: 'Snell Roundhand', 'Brush Script MT', cursive; font-size: 30px; color: var(--accent); border-bottom: 1px solid var(--text); padding: 2px 4px; max-width: 360px; }
.sub-head { margin: 18px 0 8px; font-size: 14px; }
.file-icon.link { background: #f6ecd3; color: #7a5c17; }
.reminder-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.reminder-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.reminder-row .chips { justify-content: flex-end; align-items: center; }
.grid-2.top { align-items: start; }
.history-toggle > summary { cursor: pointer; padding: 12px 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); color: var(--accent); font-weight: 600; font-size: 14px; }
.history-toggle[open] > summary { margin-bottom: 16px; }
.executed-card .facts { margin: 12px 0; }
.executed-card .facts dd { text-align: left; }
.pass-reason { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { width: auto; margin-top: 3px; }

/* New deal: start from the teaser */
.teaser-start { display: flex; align-items: center; gap: 16px; border: 1px solid #e7d7ad; background: linear-gradient(180deg, #fffdf7, #fbf6e9); }
.teaser-start h2 { margin: 0 0 4px; }
.teaser-start p { margin: 0; }
.teaser-start-main { flex: 1; }
.teaser-start-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.ai-tag { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #f6ecd3; color: #7a5c17; font-size: 11px; font-weight: 600; vertical-align: middle; }
@media (max-width: 700px) { .teaser-start { flex-direction: column; align-items: flex-start; } }

/* ---------- Deal page tabs ---------- */
.deal-tabs { display: flex; gap: 4px; margin-top: 24px !important; overflow-x: auto; padding: 0 2px; }
.deal-tab { border: 1px solid var(--border); border-bottom: 0; background: #e4e8ee; color: var(--muted); font: 500 14px var(--sans); padding: 10px 18px; border-radius: 10px 10px 0 0; white-space: nowrap; cursor: pointer; position: relative; }
.deal-tab:hover { background: #edf0f4; color: var(--text); }
.deal-tab.on { background: var(--surface); color: var(--text); font-weight: 600; z-index: 1; margin-bottom: -1px; padding-bottom: 11px; box-shadow: inset 0 3px 0 var(--gold); }
.tab-count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: rgba(11, 31, 58, .08); font-size: 12px; font-weight: 600; }
.deal-tab.on .tab-count { background: var(--accent-soft); color: var(--accent); }
.page > .tab-panel { margin-top: 0; }
.tab-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tab-panel > * + * { margin-top: 16px; }
.tab-panel .card { box-shadow: none; }
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.funnel-step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--border); background: var(--bg); border-radius: 8px; padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; color: var(--muted); font-size: 12.5px; }
.funnel-step strong { font: 600 22px/1.1 var(--sans); color: var(--text); }
.funnel-step:hover { border-color: var(--accent); }
.funnel-step.on { background: var(--accent); border-color: var(--accent); color: #dfe6f1; }
.funnel-step.on strong { color: #fff; }
@media (max-width: 720px) { .funnel { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } .tab-panel { padding: 14px; } .deal-tab { padding: 9px 12px; } }
@media (max-width: 720px) { .tab-panel .table-head { flex-wrap: wrap; gap: 8px; } .tab-panel .table-card { margin-left: -4px; margin-right: -4px; } }

/* ---------- Investor next step ---------- */
.next-step-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.next-step.amber .next-step-label { color: var(--amber); }
.next-step.green .next-step-label { color: var(--green); }
.next-step-title { display: block; font: 600 19px/1.3 var(--serif); margin: 2px 0 4px; }
.status-bar.blue { background: #f6f9fe; }

/* ---------- Attention by deal / batches ---------- */
.attn-rows { display: flex; flex-direction: column; margin-top: 10px; }
.attn-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; padding: 10px 0; border-top: 1px solid var(--border); }
.attn-row:first-child { border-top: 0; }
.attn-deal { display: flex; flex-direction: column; justify-content: center; gap: 2px; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.attn-deal strong { font: 600 16px var(--serif); }
.attn-count { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--surface); font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.attn-count strong { font: 600 22px/1 var(--sans); }
.attn-count span { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.attn-count.amber { background: var(--amber-soft); border-color: #f0d49c; } .attn-count.amber strong { color: var(--amber); }
.attn-count.blue { background: var(--blue-soft); border-color: #c9d7f1; } .attn-count.blue strong { color: var(--blue); }
.attn-count.red { background: var(--del-bg); border-color: #f1c3c3; } .attn-count.red strong { color: var(--del); }
.attn-count.zero { cursor: default; opacity: .6; } .attn-count.zero strong { color: var(--muted); }
.attn-count:not(.zero):hover { border-color: var(--accent); }
tr.held td { color: var(--muted); }
@media (max-width: 720px) { .attn-row { grid-template-columns: 1fr; } }
.outside-fields { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.outside-fields .check { align-self: end; padding-bottom: 10px; }
.bcard-note { margin-top: 6px; }
.attn-rows.two .attn-row { grid-template-columns: minmax(160px, 1.3fr) repeat(2, minmax(0, 1fr)); }

/* ---------- Payment method and launch ---------- */
.payment-method.missing { border-color: #e3c27f; background: #fffcf4; }
.card-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; border-radius: 4px; background: var(--accent); color: #fff; }
.card-picker { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.card-picker small { font-weight: 400; }
.launch-hint { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px !important; }
.checkout-lines .line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.checkout-lines .line:first-child { border-top: 0; }
.checkout-lines .line small { display: block; color: var(--muted); font-size: 12.5px; }
.checkout-lines .line.total { font-size: 16px; border-top: 2px solid var(--text); }
.charge-failed { border-left-color: #c62828; background: #fdecec; }
.charge-failed strong { color: #b71c1c; font-size: 16px; }
.red-text.strong { font-weight: 600; margin-top: 8px; }
.btn.primary:disabled { opacity: 1; background: #c3c9d3; border-color: #c3c9d3; color: #f4f6f9; cursor: not-allowed; }
.attn-declined { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; margin-top: 10px; padding: 10px 14px; border: 1px solid #ef9a9a; border-left: 4px solid #c62828; border-radius: 0 8px 8px 0; background: #fdecec; font: inherit; color: #7f1d1d; cursor: pointer; }
.attn-declined strong { color: #b71c1c; font-weight: 700; font-size: 15px; }
.attn-declined span { font-size: 13px; }
.funnel-step.not-sent-step:not(.on) { border-style: dashed; }
.bcard-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.bcard-tags .red-text { flex-basis: 100%; }
.bcard-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: -2px; }

/* ---------- Investor home groups ---------- */
.inv-group { margin-top: 26px !important; }
.inv-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-group h2 { font: 600 20px/1.3 var(--serif); display: inline-flex; align-items: center; gap: 8px; }
.inv-group.closed summary { cursor: pointer; list-style: none; margin-bottom: 10px; }
.inv-group.closed summary::before { content: '▸'; color: var(--muted); margin-right: 8px; }
.inv-group.closed[open] summary::before { content: '▾'; }
.inv-group.closed summary h2 { color: var(--muted); }
.inv-empty { padding: 4px 2px; }
.inv-card.turn { border-left: 4px solid var(--amber); }
.inv-card.closed { opacity: .72; background: #fafbfc; }
.next-label { font-size: 14.5px; text-align: right; }
.next-label.amber { color: var(--amber); }
.next-label.blue { color: var(--blue); }
.next-label.green { color: var(--green); }
.next-label.gray { color: var(--muted); }
.inv-card .deal-card-side { align-items: flex-end; text-align: right; max-width: 46%; }
@media (max-width: 720px) { .inv-card .deal-card-side { align-items: flex-start; text-align: left; max-width: none; } .next-label { text-align: left; } }

/* ---------- Execute NDA dialog ---------- */
.sign-step { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.sign-num { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sign-docs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sign-docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.sign-docs li.on { border-color: var(--green); background: #f5fbf7; }
.sign-doc { display: flex; align-items: flex-start; gap: 10px; flex: 1; cursor: pointer; }
.sign-doc input { margin-top: 3px; width: 17px; height: 17px; }
.sign-doc span { display: flex; flex-direction: column; }
.sign-preview { flex-basis: 100%; max-height: 220px; font-size: 13px; }
.hint.right { text-align: right; }

/* ---------- Clause-by-clause negotiation ---------- */
.clauses { display: flex; flex-direction: column; gap: 12px; }
.clause { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.clause.open { border-left: 4px solid #e3a13a; border-radius: 0 var(--radius) var(--radius) 0; }
.clause.open.answered { border-left-color: var(--blue); }
.clause.agreed { background: #fafbfc; box-shadow: none; }
.clause-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.clause-head strong { font: 600 15px var(--serif); }
.clause .doc, .clause .redline { font-size: 14px; max-height: none; padding: 0; border: 0; background: none; }
.clause-note { margin-top: 8px; font-size: 13px; color: var(--muted); font-style: italic; }
.clause-note.mine { color: var(--blue); }
.clause-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.clause-context summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.clause-context .doc { margin-top: 8px; font-size: 13px; color: var(--muted); }
.clause-edit textarea { width: 100%; font: 14px/1.55 var(--serif); padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.clause-edit .redline { margin: 4px 0 10px; padding: 8px 10px !important; background: var(--surface-2) !important; border-radius: 6px; }
.btn.accept { border-color: var(--green); color: var(--green); }
.btn.accept:hover { background: var(--green-soft); }
.add-change { margin-top: 4px !important; }
.respond-bar .field { margin-bottom: 10px; }
.history .rounds { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history .rounds summary { cursor: pointer; font-size: 13.5px; }
.history .rounds .summary { margin-top: 8px; box-shadow: none; }
.history .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Party colors: the bank's edits are red, the investor's green ---------- */
:root { --bank-ink: #b42318; --bank-bg: #fde8e7; --inv-ink: #13703f; --inv-bg: #dff3e6; }
.redline.party .ins, .redline.party .del { border-radius: 2px; padding: 0 1px; }
.redline.party .ins { text-decoration: underline; text-underline-offset: 2px; }
.redline.party .del { text-decoration: line-through; background: none; }
.redline.party .ins.bank { color: var(--bank-ink); background: var(--bank-bg); text-decoration-color: var(--bank-ink); }
.redline.party .del.bank { color: var(--bank-ink); text-decoration-color: var(--bank-ink); }
.redline.party .ins.investor { color: var(--inv-ink); background: var(--inv-bg); text-decoration-color: var(--inv-ink); }
.redline.party .del.investor { color: var(--inv-ink); text-decoration-color: var(--inv-ink); }
.redline.party .old { opacity: .55; }
.party-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 12.5px; }
.party-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch.bank { background: var(--bank-ink); }
.swatch.investor { background: var(--inv-ink); }
/* The Master NDA beside the negotiation: a standard height with only a few edits, growing to end where the edits end.
   The text is absolutely positioned so it scrolls inside the panel and never makes the page taller. */
.negotiation { align-items: stretch; }
.neg-main, .neg-side { align-self: start; }
.neg-side { align-self: stretch; display: flex; flex-direction: column; }
.nda-panel { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 480px; }
.nda-fill { position: relative; flex: 1; min-height: 420px; }
.nda-fill .doc { position: absolute; inset: 0; overflow: auto; font-size: 14px; margin: 0; }
@media (max-width: 980px) { .nda-panel { min-height: 0; } .nda-fill { flex: none; height: 520px; } }

/* ---------- Selling | Investing switch ---------- */
.view-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; margin-left: 14px; flex: none; }
.view-switch button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.view-switch button:hover { color: var(--text); }
.view-switch button.on { background: var(--accent); color: #fff; }
.view-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e3a13a; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.view-pick { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px 4px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.view-pick legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.view-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.view-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 720px) { .view-switch { margin-left: 8px; } .view-switch button { padding: 4px 9px; font-size: 12px; } }

/* ---------- Invitation email editor ---------- */
.invite-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; margin-top: 12px; align-items: start; }
.invite-cols textarea { width: 100%; font: inherit; }
.email-preview { display: flex; flex-direction: column; gap: 8px; }
.mail { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.mail-head { padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.mail-head .muted { display: inline-block; width: 64px; }
.mail-body { padding: 14px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; max-height: 460px; overflow: auto; }
.segmented.small button { font-size: 12px; padding: 3px 9px; }
@media (max-width: 900px) { .invite-cols { grid-template-columns: 1fr; } }
.sign-intro { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }

/* ---------- Client fallbacks and suggested answers ---------- */
.fallbacks { display: flex; flex-direction: column; gap: 10px; }
.fallback-row { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fallback-kind .check { margin: 0; }
.inline-num { display: flex; align-items: center; gap: 8px; }
.inline-num input { width: 90px; }
.limit-tag { margin-top: 8px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 6px; display: inline-block; }
.limit-tag.within { background: var(--green-soft); color: var(--green); }
.limit-tag.outside { background: var(--amber-soft); color: var(--amber); }
.limit-tag .muted { font-weight: 400; }
.suggest-tag { margin-top: 8px; font-size: 12.5px; color: #5b3fb0; background: #f1ecfd; padding: 5px 10px; border-radius: 6px; display: inline-block; }
.suggest-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.suggest-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; }
.pill.purple { background: #f1ecfd; color: #5b3fb0; }
.stat.clickable { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s; }
.stat.clickable:hover { border-color: #b9c5d8; }
.stat.clickable.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.stat.red .stat-value { color: var(--del); }
.stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.filter-note { margin-top: 8px !important; }
