/* AIAssistRead — warm "paper & library" skin, in the spirit of The Active Reader.
   Warm parchment surfaces, brown ink, gold accents, Georgia serif throughout.
   Semantic rules preserved:
     * guaranteed figures are olive/green & solid
     * not-guaranteed / illustrated figures are amber & dashed
     * "outside this document" context is a gold left-rule callout
     * "ask the seller" takeaways are a green left-rule callout
*/
:root {
  --bg: #f5f0e8;
  --surface: #e8dfd3;
  --surface2: #ddd0bf;
  --border: #c9b89a;
  --text: #3d2b1f;
  --text-dim: #8a7560;
  --accent: #8b6914;
  --accent-light: #b8924a;
  --accent-dark: #6b4f0e;

  /* guarantee semantics */
  --guar: #4f6d2e;          /* guaranteed — olive/green */
  --guar-bg: rgba(90, 125, 58, 0.16);
  --nguar: #8a6a0c;         /* not guaranteed — amber */
  --nguar-bg: rgba(201, 162, 39, 0.16);
  --unk: #7a6a5a;
  --unk-bg: rgba(138, 117, 96, 0.14);

  --ask-line: #4f6d2e;      /* question to take back */
  --ask-bg: #eef2e2;
  --ext-line: var(--accent); /* outside-context callout */
  --ext-bg: var(--surface2);

  --warn-soft: #fdeee2;
  --warn-line: #a0522d;
  --danger-soft: #fde8e0;
  --danger: #8c3b1e;

  --radius: 10px;
  --shadow: 0 2px 8px rgba(61, 43, 31, 0.08);
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15.5px;
}
#app, body { min-height: 100vh; }
.main { max-width: 1000px; margin: 0 auto; padding: 22px 24px 40px; }
.foot {
  max-width: 1000px; margin: 0 auto; padding: 18px 24px 36px;
  color: var(--text-dim); font-size: 13px; font-style: italic;
  border-top: 1px solid var(--border);
}
h1 { font-size: 23px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
a { color: var(--accent); }
b, strong { color: var(--text); }

/* ---------- header (activeread style) ---------- */
.topbar {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 16px 24px 12px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar h1.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0;
}
.topbar .brand-tag { color: var(--text-dim); font-size: 15px; font-style: italic; flex: 1 1 auto; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.status-pill {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-dim);
  white-space: nowrap;
}
.status-pill.doc { color: var(--accent-dark); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.status-pill.doc[hidden] { display: none; }

/* ---------- tabs (activeread style) ---------- */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px 0;
  border-bottom: 2px solid var(--border);
}
.step {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
  font-family: var(--serif);
  font-weight: 500;
  white-space: nowrap;
}
.step:hover:not(:disabled) { color: var(--accent); }
.step.active {
  background: var(--surface);
  border-color: var(--border);
  border-bottom: 2px solid var(--surface);
  color: var(--accent-dark);
  margin-bottom: -2px;
  font-weight: 700;
}
.step:disabled { opacity: 0.45; cursor: not-allowed; }
#stepper[hidden] { display: none; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { color: var(--accent-dark); margin-bottom: 10px; }
.card.class-hero { border-left: 5px solid var(--accent); }
.muted { color: var(--text-dim); }
.small { font-size: 13px; }
.tag {
  font-family: var(--serif);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}
.empty { color: var(--text-dim); font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--serif);
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.secondary:hover { background: var(--border); }
.btn.light {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.light:hover { background: var(--border); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.center { text-align: center; }
.spacer { height: 12px; }

/* ---------- upload dropzone ---------- */
.drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 38px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.drag { border-color: var(--accent); background: rgba(184, 146, 74, 0.08); }
.drop .big { font-size: 34px; margin-bottom: 6px; }
.drop p { color: var(--text-dim); font-size: 15px; margin: 4px 0; }
.progress { margin-top: 12px; }

/* ---------- citations / guarantee chips / callouts ---------- */
.cite {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 7px;
  margin-left: 6px;
  white-space: nowrap;
}
.gchip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 1px 8px;
  white-space: nowrap;
  vertical-align: middle;
}
.gchip.guaranteed { background: var(--guar-bg); color: var(--guar); border: 1px solid rgba(90, 125, 58, 0.4); }
.gchip.nonguaranteed { background: var(--nguar-bg); color: var(--nguar); border: 1px dashed rgba(160, 126, 20, 0.55); }
.gchip.unknown { background: var(--unk-bg); color: var(--unk); border: 1px solid var(--border); }

/* outside-this-document callout (gold left rule) */
.external {
  background: var(--ext-bg);
  border-left: 4px solid var(--ext-line);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.external .ext-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
.external p { margin: 4px 0; }

/* question-to-ask callout (green left rule) */
.askbox {
  background: var(--ask-bg);
  border-left: 4px solid var(--ask-line);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
}
.askbox .ask-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ask-line);
  margin-bottom: 4px;
}
.askbox p { margin: 0; }

/* ---------- tables (paper) ---------- */
.tablewrap { overflow-x: auto; margin: 10px 0; }
table.grid { border-collapse: collapse; font-size: 13.5px; width: 100%; background: var(--bg); }
table.grid th, table.grid td { border: 1px solid var(--border); padding: 6px 10px; text-align: right; }
table.grid th { background: var(--surface2); font-weight: 700; text-align: center; color: var(--text); }
table.grid td.lbl, table.grid th.lbl { text-align: left; }
table.grid tr.rowdata { background: var(--bg); }
table.grid tr.rowdata:nth-child(even) { background: #f0e9dc; }
table.grid tr.rowheader td { font-weight: 700; background: var(--surface2); text-align: center; }
table.grid tr.rowtotal td { font-weight: 700; background: #efe6d2; }
table.grid .num-guaranteed { color: var(--guar); font-weight: 700; }
table.grid .num-nonguaranteed { color: var(--nguar); font-style: italic; }
table.grid .num-unknown { color: var(--text); }
td .gchip, th .gchip { margin-left: 4px; }

/* ---------- signals / lists ---------- */
.signals li { margin-bottom: 8px; }
ul.clean { padding-left: 22px; }
ul.clean li { margin-bottom: 6px; }

/* ---------- wizard ---------- */
.wizard-progress { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.wizard-progress > div { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.25s; }
.q-prompt { font-size: 20px; font-weight: 700; color: var(--text); margin: 8px 0 6px; }
.q-helper { color: var(--text-dim); font-style: italic; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: block;
  text-align: left;
  width: 100%;
  font-family: var(--serif);
  font-size: 15px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.15s;
}
.opt:hover { border-color: var(--accent); background: rgba(184, 146, 74, 0.08); }
.opt.selected {
  border-color: var(--accent);
  background: rgba(184, 146, 74, 0.16);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.vocab {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--surface2);
  border-left: 4px solid var(--accent-dark);
  font-size: 14px;
}

/* ---------- gaps ---------- */
.gap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--bg); }
.gap-table th, .gap-table td { border: 1px solid var(--border); padding: 11px 13px; vertical-align: top; text-align: left; }
.gap-table th { background: var(--surface2); color: var(--accent-dark); font-weight: 700; }
tr.gap-mismatch td { background: #fbf3dc; }
tr.gap-mismatch td:first-child { border-left: 4px solid #c9a227; }
.gap-label { font-weight: 700; }

/* ---------- risks ---------- */
.risk {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 12px 0;
  background: var(--surface);
}
.risk h3 { color: var(--accent-dark); margin: 2px 0 6px; }
.risk .what { color: var(--text); }
.risk .evidence {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

/* ---------- metrics ---------- */
.metric {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px 0;
  background: var(--bg);
}
.metric .big { font-size: 20px; font-weight: 800; color: var(--accent-dark); }

/* ---------- accordion (plain words) ---------- */
.acc-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.acc-head {
  width: 100%;
  text-align: left;
  font-family: var(--serif);
  background: none;
  border: none;
  padding: 13px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.acc-head b { font-size: 16px; color: var(--text); }
.acc-body { padding: 4px 20px 16px; border-top: 1px dashed var(--border); }

/* ---------- legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.legend .li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-dim); }

/* ---------- warn / errors ---------- */
.warn-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #e2b7a4;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 14px;
}
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #f5f0e8;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 60;
  box-shadow: 0 6px 20px rgba(61, 43, 31, 0.3);
  max-width: 80vw;
}
.toast.error { background: var(--danger); }

/* ---------- chat (ask ai) ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 86%; padding: 11px 16px; border-radius: 12px; font-size: 14.5px; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.bubble .cite { background: rgba(245, 240, 232, 0.6); }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input {
  flex: 1;
  font-family: var(--serif);
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-btn {
  font-family: var(--serif);
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  color: var(--text-dim);
}
.chip-btn:hover { color: var(--accent); border-color: var(--accent); }

/* pdf-info style strip */
.pdf-strip {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
}
.pdf-strip .label { color: var(--text-dim); }
.pdf-strip .val { color: var(--text); font-weight: 700; }

/* loading */
.loading-dots::after { content: "…"; }

@media (max-width: 700px) {
  .topbar .brand-tag { display: none; }
  .topbar { padding: 12px 16px; }
  .main { padding: 16px; }
  .tabs { padding: 10px 12px 0; }
}

/* ---------- user guide (menu button + modal) ---------- */
.menu-btn {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--accent-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.menu-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.guide-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-left: 5px solid var(--accent);
  padding: 16px 20px;
}
.guide-cta .big { font-size: 28px; }
.guide-cta-text { flex: 1 1 260px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 31, 0.5);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 14px;
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 880px;
  width: 100%;
  margin: auto 0;
  box-shadow: 0 18px 60px rgba(61, 43, 31, 0.4);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px 14px 0 0;
}
.modal-head h2 { color: var(--accent-dark); margin: 0; font-size: 20px; }
.modal-x {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-dim);
}
.modal-x:hover { color: var(--danger); }
.modal-body { padding: 6px 26px 18px; overflow-y: auto; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.modal-foot .small { flex: 1 1 auto; }

/* guide typography */
.guide { font-size: 15px; }
.guide h3 {
  color: var(--accent-dark);
  font-size: 17px;
  margin: 22px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.guide h4 { color: var(--accent-dark); margin: 14px 0 4px; font-size: 15px; }
.guide p { margin: 8px 0; }
.guide ul { padding-left: 22px; margin: 8px 0; }
.guide li { margin: 5px 0; }
.guide .gsub { color: var(--text-dim); }
.guide .step-row {
  display: flex;
  gap: 14px;
  margin: 12px 0;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}
.guide .step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-top: 2px;
}
.guide .step-body { flex: 1 1 auto; }
.guide .step-body b.step-name { color: var(--accent-dark); }
.guide-legend { margin: 10px 0; }
.guide-legend .li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
}
.guide-legend .li .g {
  flex: 1;
  font-size: 14px;
  color: var(--text-dim);
}
.guide .note {
  background: var(--ext-bg);
  border-left: 4px solid var(--ext-line);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 13.5px;
}

/* ---------- My needs / brief (You side) ---------- */
.brief-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-left: 5px solid var(--accent-dark);
  padding: 16px 20px;
}
.brief-cta .big { font-size: 28px; }
.briefnum {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-dark);
}
.brief-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 2px;
}
.rchip {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 1px 8px;
  white-space: nowrap;
  vertical-align: middle;
}
.rchip.aligns { background: var(--guar-bg); color: var(--guar); border: 1px solid rgba(90, 125, 58, 0.4); }
.rchip.mismatch { background: var(--nguar-bg); color: var(--nguar); border: 1px dashed rgba(160, 126, 20, 0.55); }
.rchip.not_disclosed { background: var(--unk-bg); color: var(--unk); border: 1px solid var(--border); }
.rchip.note { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.bcompare { border-collapse: collapse; width: 100%; }
.bcompare th, .bcompare td { border: 1px solid var(--border); padding: 10px 12px; vertical-align: top; text-align: left; font-size: 13.5px; }
.bcompare th { background: var(--surface2); color: var(--accent-dark); font-weight: 700; }
.bcompare td.us { width: 24%; }
.bcompare td.of { width: 34%; }
.bcompare td.st { width: 13%; }
.bcompare tr.mismatch td { background: #fbf3dc; }

/* ---------- Start Here Hub & Dual Input Grid ---------- */
.start-hero {
  border-left: 5px solid var(--accent-dark);
  padding: 24px;
  margin-bottom: 20px;
}
.start-hero h1 {
  font-size: 24px;
  margin: 8px 0 6px;
  color: var(--accent-dark);
}
.start-hero .lead-text {
  font-size: 15.5px;
  color: var(--text-dim);
}

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 800px) {
  .start-grid {
    grid-template-columns: 1fr;
  }
}

.start-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  border: 1.5px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.start-card:hover {
  box-shadow: 0 4px 14px rgba(61, 43, 31, 0.12);
}

.option-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.option-badge {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--accent-dark);
}
.option-desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.5;
}

.sample-box, .recent-docs-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 14px 0;
}
.sample-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sample-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.sample-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.sizing-pillars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.pillar-item {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 8px 12px;
}
.pillar-item b {
  font-size: 13.5px;
  color: var(--text);
}

.feature-checklist {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 16px;
}
.feature-checklist li {
  margin: 4px 0;
}

.badge-success {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--guar-bg);
  color: var(--guar);
  border: 1px solid rgba(90, 125, 58, 0.4);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.brief-active-box {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.brief-mini-summary {
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Proposal Dossier & Sub-nav ---------- */
.proposal-header {
  border-bottom: 2px solid var(--border);
  padding: 18px 22px 14px;
  margin-bottom: 20px;
}
.proposal-subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sub-step {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.sub-step:hover {
  background: var(--bg);
  color: var(--text);
}
.sub-step.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.gap-undisclosed td {
  background: #fdf5ea;
}

/* ---------- Lay-Person Friendly Numbers View ---------- */
.numbers-hero {
  border-left: 5px solid var(--accent-dark);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.numbers-hero h2 {
  margin: 4px 0 6px;
  color: var(--accent-dark);
}

.legend-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 14px 0 0;
  font-size: 13px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.snapshot-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(61, 43, 31, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.snapshot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 43, 31, 0.1);
}
.snapshot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.snapshot-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.snapshot-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-dark);
  margin: 4px 0 6px;
  line-height: 1.2;
}
.snapshot-sub {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  margin-top: auto;
}

/* Timeline & Milestones */
.milestone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 12px 0;
  background: var(--bg);
}
.milestone-table th, .milestone-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: right;
}
.milestone-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
  text-align: center;
}
.milestone-table td.lbl, .milestone-table th.lbl {
  text-align: left;
}
.milestone-early {
  background: rgba(235, 140, 52, 0.06);
}
.loss-tag {
  color: #c0392b;
  font-weight: 600;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}
.gain-tag {
  color: #27ae60;
  font-weight: 600;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

.surrender-alert {
  background: #fdf5ea;
  border-left: 4px solid #e67e22;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
}
.surrender-alert h4 {
  margin: 0 0 4px;
  color: #d35400;
  font-size: 15px;
}
.surrender-alert p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Filter pills */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0 12px;
}
.filter-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--accent);
}
.filter-btn.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 12px 0;
}
.friendly-figure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.friendly-figure-card .fig-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.friendly-figure-card .fig-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.friendly-figure-card .fig-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-dark);
  margin: 4px 0 6px;
}
.friendly-figure-card .fig-meaning {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: auto;
}

.table-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.15s;
}
.table-toggle-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}

