/* Deal Term Checker — editorial research theme
   Mostly white, deep green, system serif display + system sans,
   sharp corners, hairline rules, generous whitespace. No shadowy app cards. */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-2: #ffffff;
  --ivory: #f5f6f4;            /* faint cool fill, not beige */
  --line: #ececeb;             /* neutral hairline */
  --line-strong: #d7d8d5;
  --ink: #181a17;              /* near-black, faintly green-neutral */
  --ink-soft: #51544e;
  --ink-faint: #8f918b;

  --green-deep: #14352a;       /* Valextra bottle green */
  --green: #1f4f3f;
  --green-tint: #eef3f0;       /* cool, barely-there green wash */

  /* accent aliases (consumed by app.js) */
  --brass: #1f4f3f;
  --brass-deep: #14352a;
  --brass-tint: #eef3f0;

  /* semantic band colours — muted, cool register on white */
  --founder: #1f4f3f;
  --founder-tint: #eef3f0;
  --balanced: #7c7330;
  --balanced-tint: #f4f2e7;
  --protective: #9a6438;
  --protective-tint: #f5ece3;
  --heavy: #8a3b30;
  --heavy-tint: #f5e6e2;

  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

/* privacy disclaimer on the upload panel */
.privacy-note { margin: 18px 0 0; padding: 14px 16px; background: var(--green-tint); border-radius: var(--radius); color: var(--ink-soft); }
.privacy-note strong { color: var(--green-deep); }
.privacy-head { margin: 0 0 5px; font-size: 13px; font-weight: 600; color: var(--green-deep); letter-spacing: 0.01em; }
.privacy-body { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-soft); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: 0; }
a { color: var(--green-deep); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
a:hover { border-color: var(--green); }

/* micro-label helper look used widely */
.eyebrow, .exp-label, .metric-card .label, .group-tag, .sev-chip, .confidence-chip,
.spectrum-tier, .tiny-tag, .src-type, .insight-card h4, .meter-ticks, .tab, .comp-name {
  font-family: var(--sans);
}

.app-shell { max-width: 1180px; margin: 0 auto; padding: 0 40px 0; }
html, body { overflow-x: hidden; }  /* contain the full-bleed footer band */

/* ---------- Header ---------- */
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 52px 0 26px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 44px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 10px;
  font-weight: 500;
  color: var(--green);
  margin: 0 0 12px;
}
.topbar h1 { font-size: 32px; margin: 0; line-height: 0.98; font-weight: 500; letter-spacing: -0.01em; }
.topbar h1 .mark-italic { font-style: italic; font-weight: 400; }
.brand-link { color: inherit; border: none; display: inline-block; }
.brand-link:hover { border: none; }
.topbar-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  max-width: 260px;
}
.topbar-meta strong { font-family: var(--serif); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 500; }
.topbar-about { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-faint); border: none; }
.topbar-about:hover { color: var(--green); }

/* ---------- Layout ---------- */
.workspace { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; gap: 40px; } }

.input-panel { position: sticky; top: 28px; }
@media (max-width: 980px) { .input-panel { position: static; } }

.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.panel-heading h2 { font-size: 26px; margin: 0 0 4px; }
.panel-heading p { margin: 0; font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }

.icon-button {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.icon-button:hover { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }

.drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--paper-2);
  transition: background 0.22s ease, border-color 0.22s ease;
  margin-bottom: 14px;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--green); background: var(--green-tint); }
.drop-zone input[type=file] { display: none; }
.drop-title { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.drop-subtitle { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.drop-prompt { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-actions { font-size: 12.5px; color: var(--ink-faint); }
.upload-link { font: inherit; color: var(--green-deep); background: none; border: none;
  border-bottom: 1px solid var(--line-strong); padding: 0 1px 1px; cursor: pointer; }
.upload-link:hover { color: var(--green); border-color: var(--green); }
/* click the card to switch to a paste box; reuses the card's border */
.drop-zone.expanded, .upload-section .drop-zone.expanded { display: block; padding: 0; cursor: text; text-align: left; background: var(--paper); border-color: var(--green); }
.drop-zone.expanded textarea { display: block; box-sizing: border-box; width: 100%; border: none; border-radius: var(--radius);
  margin: 0; min-height: 132px; padding: 14px 16px; text-align: left; background: transparent; }
.drop-zone.expanded textarea:focus { border: none; outline: none; }
.drop-zone.expanded textarea { animation: dz-fade 0.26s ease; }
@keyframes dz-fade { from { opacity: 0; } to { opacity: 1; } }

textarea {
  width: 100%;
  min-height: 176px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 15px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  margin-bottom: 18px;
}
textarea:focus { outline: none; border-color: var(--green); }

/* combined input: paste/type and upload-a-file in one bordered box */
.input-box { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper);
  transition: border-color 0.18s ease, background 0.18s ease; margin-bottom: 16px; overflow: hidden; }
.input-box:focus-within { border-color: var(--green); }
.input-box.dragover { border-color: var(--green); background: var(--green-tint); }
.input-box textarea { border: none; border-radius: 0; margin: 0; min-height: 150px; background: transparent; }
.input-box textarea:focus { border: none; }
.input-box-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--line); background: var(--paper-2); }
.upload-trigger { flex: none; font-family: var(--sans); font-size: 13.5px; color: var(--green-deep);
  background: var(--green-tint); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 16px; cursor: pointer; transition: all .12s ease; }
.upload-trigger:hover { background: var(--green); color: #fff; border-color: var(--green); }
.input-box-hint { font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
button {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: var(--radius);
  padding: 12px 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
}
button:hover:not(:disabled) { background: var(--ink); color: #fff; }
button.primary { background: var(--green-deep); color: #fff; border-color: var(--green-deep); padding: 12px 30px; }
button.primary:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.notice {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.notice strong { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; }

/* ---------- Results panel ---------- */
.results-panel { min-height: 460px; }

.empty-state { border-top: 1px solid var(--line); padding: 70px 0 0; text-align: left; max-width: 520px; }
.empty-state h2 { font-size: 34px; line-height: 1.15; margin: 26px 0 14px; font-weight: 500; }
.empty-state p { color: var(--ink-faint); font-size: 14px; }
.empty-visual { display: flex; justify-content: flex-start; opacity: 0.95; }

.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 100px 0; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px;
}
.loader { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); border-top-color: var(--green); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---------- Score hero ---------- */
.summary-grid { display: block; margin-bottom: 16px; }
.score-panel { padding: 6px 0 16px; }
.context-line { margin: 0 0 20px; }
.assessment-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-faint); margin: 0 0 10px; }
.score-band { display: inline-block; font-family: var(--serif); font-size: 38px; line-height: 1.0; font-weight: 500; letter-spacing: -0.01em; }
.confidence-chip {
  display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 500; padding: 4px 10px; border: 1px solid var(--line-strong);
  color: var(--ink-faint); margin-left: 10px; vertical-align: middle; border-radius: var(--radius);
}
.market-read { font-size: 13.5px; color: var(--ink-soft); margin: 12px 0 22px; }
.coverage-warning { font-size: 13px; line-height: 1.55; color: #8a5a1c; background: #fdf6ec; border: 1px solid #e9d5b3; border-radius: var(--radius); padding: 12px 14px; margin: 12px 0 18px; }
.coverage-warning.hidden { display: none; }
.doc-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: #8a5a1c; background: #fdf6ec; border: 1px solid #e9d5b3; border-radius: var(--radius); padding: 11px 14px; margin: 12px 0 18px; }
.doc-note::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; background: no-repeat center / contain; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a5a1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.5 1.8 18.5a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.5a2 2 0 0 0-3.4 0Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13.5'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.doc-note.hidden { display: none; }

.meter { height: 4px; background: var(--ivory); position: relative; overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.meter-ticks { display: flex; justify-content: space-between; margin-top: 11px; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-faint); }

/* cross-rights interaction callout (control vs cash-flow hollowing) */
.rights-balance { margin: 0 0 8px; }
.rb-card { border-left: 3px solid var(--protective); background: var(--protective-tint); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.rb-eyebrow { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--protective); margin-bottom: 8px; }
.rb-item + .rb-item { margin-top: 16px; padding-top: 16px; border-top: 1px dashed rgba(154, 100, 56, 0.35); }
.rb-headline { font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--ink); margin: 0 0 8px; }
.rb-detail { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin: 0; }

.executive-brief { border-top: 1px solid var(--ink); padding: 24px 0 26px; margin-bottom: 32px; }
.brief-head h2 { font-size: 26px; line-height: 1.22; margin: 0; }
.brief-takeaways {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  display: grid;
  gap: 9px;
}
.brief-takeaways li { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); padding-left: 16px; border-left: 2px solid var(--green-tint); }
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-card { padding: 20px 28px 2px 0; }
.brief-card + .brief-card { padding-left: 28px; border-left: 1px solid var(--line); }
@media (max-width: 760px) { .brief-card + .brief-card { padding-left: 0; border-left: none; border-top: 1px solid var(--line); } }
.brief-term, .brief-check { padding: 13px 0; border-top: 1px solid var(--line); }
.brief-term:first-of-type, .brief-check:first-of-type { border-top: none; }
.brief-term strong, .brief-check strong { font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--ink); }
.brief-term span { display: block; margin-top: 3px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.brief-term p, .brief-check p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.brief-action { color: var(--green-deep) !important; }
.brief-watch { color: var(--protective) !important; }
.brief-empty { margin: 10px 0; font-family: var(--serif); font-style: italic; color: var(--ink-faint); }
.brief-confidence { margin: 22px 0 0; max-width: 860px; font-size: 11.5px; line-height: 1.6; color: var(--ink-faint); }

.metrics { display: grid; grid-template-columns: 1fr 1fr; align-content: start; padding-left: 34px; }
@media (max-width: 620px) { .metrics { padding-left: 0; padding-top: 20px; } }
.metric-card { padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
.metric-card:nth-child(odd) { padding-left: 0; }
.metric-card:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
.metric-card .label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.metric-card .value { font-family: var(--serif); font-size: 27px; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.metric-card .sub { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- LLM banner ---------- */
.llm-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--green-tint);
  border-left: 2px solid var(--green-deep);
  padding: 13px 18px;
  margin-bottom: 30px;
  font-size: 12.5px;
  color: var(--green-deep);
}
.llm-banner .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; margin-top: 6px; }
.llm-banner strong { color: var(--ink); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 34px; }
.tab {
  border: none; background: none; border-radius: 0;
  padding: 14px 0; margin-right: 34px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
}
.tab:hover { background: none; color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 22px; }
.section-heading h2 { font-size: 24px; margin: 0; }
.section-heading span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }

/* ---------- Component bars ---------- */
.component-bars { display: grid; gap: 16px; margin-bottom: 44px; }
.comp-row { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 18px; }
.comp-name { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); }
.comp-track { height: 3px; background: var(--ivory); overflow: hidden; }
.comp-fill { height: 100%; }
.comp-score { font-family: var(--serif); font-size: 17px; text-align: right; color: var(--ink); }

/* ---------- Insight cards (red flags / strengths) ---------- */
.insight-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 50px; border-top: 1px solid var(--line); }
@media (max-width: 620px) { .insight-row { grid-template-columns: 1fr; } }
.insight-card { padding: 22px 28px 22px 0; }
.insight-card + .insight-card { padding-left: 28px; border-left: 1px solid var(--line); }
@media (max-width: 620px) { .insight-card + .insight-card { padding-left: 0; border-left: none; border-top: 1px solid var(--line); } }
.insight-card h4 { margin: 0 0 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; }
.insight-card.flags h4 { color: var(--heavy); }
.insight-card.strengths h4 { color: var(--green); }
.insight-item { font-size: 12.5px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.insight-item:first-of-type { border-top: none; }
.insight-item strong { color: var(--ink); }
.insight-empty { font-size: 12px; color: var(--ink-faint); font-style: italic; font-family: var(--serif); }

/* ---------- Finding dossier rows ---------- */
.finding-list { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.finding { border-bottom: 1px solid var(--line); background: var(--paper); transition: background 0.18s ease; }
.finding.open { background: var(--paper-2); }
.finding-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 22px 4px; cursor: pointer; }
.finding-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.finding-title h3 { font-size: 23px; margin: 0; font-weight: 500; }
.group-tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.finding-variant { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 6px; }
.finding-right { display: flex; align-items: center; gap: 18px; }
.sev-chip { font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500; padding: 4px 0; }
.impact-num { font-family: var(--serif); font-size: 22px; min-width: 38px; text-align: right; }
.chevron { color: var(--ink-faint); transition: transform 0.25s ease; font-size: 11px; }
.finding.open .chevron { transform: rotate(180deg); }

.finding-body { padding: 0 4px 30px; display: none; max-width: 760px; }
.finding.open .finding-body { display: block; }

.deviation-line {
  display: inline-block; font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 5px 0; margin-bottom: 18px; border-bottom: 1px solid currentColor;
}

.exp-block { margin: 20px 0; }
.exp-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--green); font-weight: 500; margin-bottom: 7px; }
.exp-text { font-size: 15.5px; color: var(--ink-soft); line-height: 1.7; }
.exp-text.lead { font-size: 22px; color: var(--ink); font-family: var(--serif); line-height: 1.42; font-weight: 400; }

.viewsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 22px 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .viewsplit { grid-template-columns: 1fr; } }
.view-card { padding: 16px 22px 16px 0; }
.view-card + .view-card { padding-left: 22px; border-left: 1px solid var(--line); }
.view-card .exp-text { font-size: 12.5px; }

.spectrum { display: grid; gap: 0; margin: 14px 0; }
.spectrum-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline; font-size: 12.5px; padding: 9px 0; border-top: 1px solid var(--line); }
.spectrum-row:first-child { border-top: none; }
.spectrum-tier { font-weight: 500; font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; }
.spectrum-desc { color: var(--ink-soft); }

.llm-explanation {
  border-left: 2px solid var(--green-deep);
  background: var(--green-tint);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.llm-explanation .exp-label { color: var(--green-deep); }

.evidence {
  border-left: 2px solid var(--line-strong);
  padding: 4px 0 4px 16px;
  font-size: 14px; line-height: 1.6; color: var(--ink-soft);
  font-family: var(--serif); font-style: italic; font-size: 16px;
  margin: 16px 0;
}

.stat-list { display: grid; gap: 0; margin: 10px 0; }
.stat-item { font-size: 12.5px; color: var(--ink-soft); padding: 9px 0; border-top: 1px solid var(--line); }
.stat-item:first-child { border-top: none; }
.stat-item .src { color: var(--ink-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-top: 3px; }

.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 22px 0 4px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .meta-grid { grid-template-columns: 1fr; } }
.meta-pill { padding: 14px 18px 14px 0; }
.meta-pill + .meta-pill { padding-left: 18px; border-left: 1px solid var(--line); }
@media (max-width: 560px) { .meta-pill + .meta-pill { padding-left: 0; border-left: none; border-top: 1px solid var(--line); } }
.meta-pill .exp-label { color: var(--ink-faint); }
.meta-pill .meta-val { font-size: 13px; color: var(--ink); margin-top: 5px; }

.watch-out, .negotiation-line, .justified-line { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin-top: 14px; padding: 0 0 0 16px; border-left: 2px solid var(--line-strong); }
.justified-line { border-left-color: var(--green); }
.negotiation-line { border-left-color: var(--green); }
.watch-out strong, .negotiation-line strong, .justified-line strong { display: block; color: var(--ink); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10.5px; margin-bottom: 3px; }

/* ---------- Missing watchlist ---------- */
.missing-list { margin-top: 40px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.missing-card { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-soft); }
.missing-card strong { color: var(--ink); }

/* ---------- Benchmarks / research lists ---------- */
.benchmark-list, .research-list { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.bench-card, .research-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.bench-card h4, .research-card h4 { margin: 0 0 6px; font-size: 22px; font-weight: 500; }
.bench-card .bench-stat { font-size: 12.5px; color: var(--ink-soft); margin: 3px 0; }
.research-card .tag-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 11px; }
.tiny-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.research-card .src-type { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--green); font-weight: 500; }
.own-badge { color: var(--green-deep); }

.footnote { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-faint); line-height: 1.7; }

/* ============================================================
   Upload + clause-by-clause reading layout
   ============================================================ */
.upload-section { max-width: 720px; margin: 0 auto 8px; }
.upload-section .drop-zone { padding: 46px 18px; margin-bottom: 16px; }
.upload-section .drop-title { font-size: 24px; }
.upload-section textarea { min-height: 130px; }
.upload-section .actions { margin-bottom: 0; }

/* questionnaire */
.questionnaire { max-width: 720px; margin: 0 auto; }
.questionnaire h2 { font-size: 30px; margin: 0 0 6px; }
.q-sub { font-size: 13px; color: var(--ink-faint); margin: 0 0 28px; }
.q-group { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .q-group { grid-template-columns: 1fr; gap: 8px; } }
.q-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); padding-top: 8px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip {
  font-family: var(--sans); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all 0.15s ease;
}
.q-chip:hover { border-color: var(--green); color: var(--ink); background: var(--paper); }
.q-chip.sel { background: var(--green-deep); color: #fff; border-color: var(--green-deep); }
.questionnaire .actions { margin-top: 28px; }

/* ---- one-question-per-page wizard ---- */
.questionnaire { min-height: 360px; }
.wiz-head { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 40px; }
.wiz-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-faint); }
.wiz-progress { width: 100%; max-width: 420px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.wiz-bar { display: block; height: 100%; width: 20%; background: var(--green-deep); transition: width 0.35s ease; }
.wiz-count { font-size: 11px; letter-spacing: 0.12em; color: var(--ink-faint); }

.wiz-steps { position: relative; }
.q-step { display: none; text-align: center; }
.q-step.active { display: block; animation: qfade 0.34s ease; }
@keyframes qfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-question { font-family: var(--serif); font-size: 32px; font-weight: 500; margin: 0 0 10px; line-height: 1.15; }
.q-help { font-size: 13px; color: var(--ink-faint); margin: 0 auto 30px; max-width: 480px; }
.q-step .q-chips { justify-content: center; gap: 10px; }
.q-step .q-chip { padding: 12px 20px; font-size: 14px; }
.q-chip.q-dk { color: var(--ink-faint); border-style: dashed; }
.q-chip.q-dk:hover { color: var(--ink); border-color: var(--ink-faint); }

.wiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; }
.wiz-back, .wiz-cancel { background: none; border: none; color: var(--ink-soft); font-size: 12px; letter-spacing: 0.04em; padding: 6px 4px; cursor: pointer; }
.wiz-back:disabled { color: var(--line-strong); cursor: default; }
.wiz-back:hover:not(:disabled), .wiz-cancel:hover { color: var(--green); }
.wiz-skip { background: none; border: none; color: var(--green); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 6px 4px; cursor: pointer; }
.wiz-skip:hover { color: var(--green-deep); }

/* engine badge (smart AI vs offline) */
.engine-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 20px; }
.engine-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: none; }
.engine-badge.on { color: var(--green-deep); }
.engine-badge.on .dot { background: var(--green); }

/* context line in results */
.context-line { margin-bottom: 26px; }
.context-chip { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--green-deep); background: var(--green-tint); padding: 6px 14px; border-radius: 999px; }
.context-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.context-notes li { font-size: 13.5px; color: var(--ink-soft); padding-left: 16px; border-left: 2px solid var(--green-tint); line-height: 1.55; }

.empty-hint { max-width: 720px; margin: 0 auto 24px; text-align: center; }
.empty-hint p { font-family: var(--serif); font-size: 24px; line-height: 1.35; color: var(--ink-soft); font-style: italic; }
.empty-hint .cred-line { font-family: var(--sans); font-size: 12px; font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 12px; }

#results { margin-top: 8px; }

/* reading column headers */
.reading-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin: 8px 0 0; border-bottom: 1px solid var(--ink);
}
.reading-head span {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--ink-faint); padding: 0 0 12px;
}
.reading-head span:last-child { padding-left: 34px; }
@media (max-width: 760px) { .reading-head { display: none; } }

.reading { display: grid; }
.reading-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-bottom: 1px dashed var(--line-strong);
  align-items: start;
}
/* matter (per-item) rows sit tighter under their parent clause */
.reading-row.matter-row { border-bottom: 1px dashed var(--line); }
@media (max-width: 760px) { .reading-row { grid-template-columns: 1fr; } }

.clause-col { padding: 26px 40px 26px 0; }
@media (max-width: 760px) { .clause-col { padding-right: 0; padding-bottom: 8px; } }
.clause-text { font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.reading-row.has-term .clause-text { color: var(--ink); }
.clause-orphan, .clause-text.clause-orphan { font-style: italic; color: var(--ink-faint); font-family: var(--serif); }

.assess-col { padding: 26px 0 26px 34px; }
@media (max-width: 760px) { .assess-col { padding-left: 0; padding-top: 4px; } }
.assess-none { min-height: 1px; }

/* assessment block (collapsed headline + expandable detail) */
.assess { }
.assess + .assess { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.assess-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; cursor: pointer; }
.assess-head:hover .assess-term { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.assess-titles { display: flex; flex-direction: column; gap: 4px; }
.assess-term { font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.15; color: var(--ink); }
.assess-variant { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }
.assess-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.assess-meta .impact-num { font-family: var(--serif); font-size: 22px; }
.assess-meta .sev-word { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500; }
.assess-meta .chevron { font-size: 23px; line-height: 1; color: var(--green); transition: transform 0.25s ease; }

.deviation-line {
  display: inline-block; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 8px 0 0; margin: 0; border: none;
}
.assess-lead { font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 8px; }

/* collapsed by default; reveal on click (data-open toggled in JS) */
.assess-detail { display: none; margin-top: 8px; }
.assess[data-open="1"] .assess-detail { display: block; }
.assess[data-open="1"] .assess-meta .chevron { transform: rotate(180deg); }
.assess-head .chevron::after { content: ""; }

.clause-h { font-family: var(--serif); font-size: 15px; color: var(--ink); display: block; }
.clause-body { margin-top: 8px; }

/* thematic section header inside the reading */
.reading-section { grid-column: 1 / -1; padding: 30px 0 10px; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.reading-section span { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.reading-section:first-child { padding-top: 6px; }

/* per-matter rows (one approval right per row) */
.matter-row { background: var(--paper-2); }
.matter-row .clause-col { padding: 12px 34px 12px 0; display: flex; align-items: baseline; gap: 10px; }
@media (max-width: 760px) { .matter-row .clause-col { padding-right: 0; } }
.matter-row .assess-col { padding: 12px 0 12px 34px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .matter-row .assess-col { padding-left: 0; } }
.matter-label { font-size: 13px; color: var(--ink-soft); }
.matter-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; align-self: center; }
.matter-dot.i { background: var(--heavy); }
.matter-dot.s { background: var(--green); }
.matter-dot.f { background: var(--founder); }
.matter-dot.n { background: var(--line-strong); }
.matter-note { font-size: 11.5px; color: var(--ink-faint); }
.rm-mtag.f { color: var(--founder); }
.rm-mtag.n { color: var(--ink-faint); }

/* stacked rationale block for unusual provisions */
.mit-row .clause-col { padding: 0; }
.mit-row .assess-col { padding: 0 0 14px 34px; }
@media (max-width: 760px) { .mit-row .assess-col { padding-left: 0; } }
.mit-block { background: var(--green-tint); border-radius: var(--radius); padding: 12px 14px; }
.mit-part { margin: 0 0 7px; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.mit-part:last-child { margin-bottom: 0; }
.mit-label { display: inline; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--green-deep); font-weight: 600; }

/* per-approval-right classification list (LLM clause reading) */
.rm-matter-list { display: grid; gap: 0; margin-top: 6px; }
.rm-matter { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.rm-matter:first-child { border-top: none; }
.rm-mlabel { font-size: 13.5px; color: var(--ink-soft); }
.rm-dot { width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.rm-dot.i { background: var(--heavy); }
.rm-dot.s { background: var(--green); }
.rm-mtag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }
.rm-mtag.i { color: var(--heavy); }
.rm-mtag.s { color: var(--green); }

.rm-group { display: flex; gap: 12px; align-items: baseline; margin: 8px 0; flex-wrap: wrap; }
.rm-tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; padding: 4px 9px; border-radius: var(--radius); flex: none; }
.rm-tag.rm-intrusive { color: var(--heavy); background: var(--heavy-tint); }
.rm-tag.rm-standard { color: var(--green); background: var(--green-tint); }
.rm-items { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.rm-items span { white-space: nowrap; }
.rm-items span:not(:last-child)::after { content: "·"; color: var(--line-strong); margin-left: 14px; }

.assess-detail .exp-block { margin: 16px 0; }
.assess-detail .viewsplit { margin: 16px 0; }
.assess-detail .meta-grid { grid-template-columns: 1fr 1fr; }
.assess-detail .evidence { font-size: 15px; }

/* ---------- governance layer (in term-sheet results) ---------- */
.gov-layer { border-top: 1px solid var(--ink); padding-top: 24px; margin-bottom: 44px; }
.gov-layer-head { margin-bottom: 20px; }
.gov-posture { font-size: 24px; }
.gov-highlights { margin-bottom: 24px; }
.gov-highlights ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 9px; }
.gov-highlights li { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); padding-left: 16px; border-left: 2px solid var(--protective); }
.gov-bench { margin-bottom: 24px; }
.gov-comps { margin-bottom: 12px; }
.gov-comp { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(120px, auto); gap: 12px; align-items: baseline; }
@media (max-width: 760px) {
  .gov-comp { grid-template-columns: 22px minmax(0, 1fr); }
  .gov-comp .comp-sim { grid-column: 2; text-align: left; }
}
.comp-rank { font-family: var(--serif); font-size: 16px; color: var(--green); }
#governanceLayer .gov-row { display: grid; grid-template-columns: 1fr 150px 92px; align-items: center; gap: 14px; margin: 10px 0; }
#governanceLayer .gov-label { font-size: 13.5px; color: var(--ink-soft); }
.gov-unusual { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--protective); background: var(--protective-tint); padding: 2px 7px; border-radius: var(--radius); margin-left: 6px; }
#governanceLayer .gov-track { height: 3px; background: var(--ivory); overflow: hidden; }
#governanceLayer .gov-fill { height: 100%; background: var(--line-strong); }
#governanceLayer .gov-rate { font-family: var(--sans); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; text-align: right; color: var(--ink-faint); }

/* ============================================================
   Companies explorer
   ============================================================ */
.company-search { max-width: 720px; margin: 0 auto 30px; }
.company-search input {
  width: 100%; border: none; border-bottom: 1px solid var(--ink); background: transparent;
  font-family: var(--serif); font-size: 26px; padding: 8px 0; color: var(--ink);
}
.company-search input:focus { outline: none; border-bottom-color: var(--green); }
.company-search input::placeholder { color: var(--ink-faint); font-style: italic; }
.company-search-note { font-size: 11.5px; color: var(--ink-faint); margin: 12px 0 0; }

/* facet filter bar styling lives in the mobile-first block at the end of this file */

/* result-row governance tag + deal-record marker */
.row-gov { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.row-gov.muted { color: var(--ink-faint); font-style: italic; text-transform: none; letter-spacing: 0; }
.profile-tag { display: inline-block; font-size: 10px; letter-spacing: 0.06em; color: var(--ink-soft);
  background: var(--green-tint); border-radius: var(--radius); padding: 4px 10px; margin-right: 8px; }
.psl-note { color: var(--ink-faint); font-weight: 400; letter-spacing: 0.06em; text-transform: none; }
.gov-missing { font-style: italic; }

/* deal timeline */
.deal-timeline { display: grid; gap: 0; margin-top: 4px; }
.dl-row { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: none; }
.dl-year { font-family: var(--serif); font-size: 16px; color: var(--green-deep); }
.dl-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.dl-inv { font-size: 13.5px; color: var(--ink); }
.dl-itype { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); }
.dl-type { font-size: 11.5px; color: var(--ink-faint); }

.company-layout { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .company-layout { grid-template-columns: 1fr; } }

.company-results { border-top: 1px solid var(--ink); }
.company-results-head { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); padding: 12px 0; }
.company-loading, .company-empty { font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: 15px; padding: 16px 0; }
/* single centered prompt when nothing is selected yet */
.company-empty-lead { font-style: normal; color: var(--ink-soft); font-size: 16.5px; line-height: 1.65;
  text-align: center; max-width: 540px; margin: 80px auto; padding: 0 16px; }
.company-results:empty { border-top: none; }
/* when nothing is searched yet, collapse to a single centered column */
.company-layout.idle { display: block; }
.company-layout.idle .company-results { display: none; }
.company-row { padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding-left 0.15s ease; }
.company-row:hover { padding-left: 8px; }
.company-row.sel { padding-left: 8px; border-left: 2px solid var(--green-deep); }
.company-row-name { font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.15; }
.company-row-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-top: 4px; }

.company-profile { min-height: 300px; }
.profile-head { border-bottom: 1px solid var(--ink); padding-bottom: 18px; margin-bottom: 22px; }
.profile-head h2 { font-size: 32px; margin: 0; line-height: 1.05; }
.profile-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin: 8px 0 12px; }
.profile-posture { display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; padding: 5px 12px; border: 1px solid; border-radius: var(--radius); }

.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .profile-stats { grid-template-columns: 1fr 1fr; } }
.profile-stats > div { padding: 0 16px 18px 0; display: flex; flex-direction: column; gap: 4px; }
.profile-stats > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.ps-num { font-family: var(--serif); font-size: 30px; color: var(--ink); line-height: 1; }
.ps-lab { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }

.profile-section-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--green); font-weight: 500; margin: 28px 0 6px; }
.gov-legend { font-size: 11px; color: var(--ink-faint); margin-bottom: 16px; }
.gov-bars { display: grid; gap: 12px; }
.gov-row { display: grid; grid-template-columns: 16px 1fr 100px 96px; align-items: center; gap: 12px; }
@media (max-width: 560px) { .gov-row { grid-template-columns: 16px 1fr 60px 84px; } }
.gov-mark { font-size: 11px; text-align: center; }
.gov-label { font-size: 12.5px; color: var(--ink-soft); }
.gov-track { height: 3px; background: var(--ivory); overflow: hidden; }
.gov-fill { height: 100%; background: var(--line-strong); }
.gov-rate { font-family: var(--sans); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; text-align: right; color: var(--ink-faint); }

.comp-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.comp-item { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding-left 0.15s ease; flex-wrap: wrap; }
.comp-item:hover { padding-left: 8px; }
.comp-iname { font-family: var(--serif); font-size: 16px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.comp-sim { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); flex: 0 1 auto; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 760px) { .comp-sim { flex-basis: 100%; text-align: left; } }

.company-note { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-faint); line-height: 1.6; }

/* ---------- footer + about page ---------- */
.site-footer { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; margin-top: 80px; padding: 46px 24px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; background: #dfe6e1; text-align: center; }
/* full-bleed light band: extend the background to the viewport edges */
.site-footer::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50vw); background: #dfe6e1; }
.site-footer > * { position: relative; z-index: 1; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.site-footer a, .site-footer button {
  border: none; background: none; padding: 0; margin: 0; border-radius: 0;
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--green); font-family: var(--sans); cursor: pointer;
}
.site-footer a:hover, .site-footer button:hover, .site-footer button.active { color: var(--green-deep); background: none; }
@media (max-width: 680px) { .site-footer { align-items: center; } .footer-nav { justify-content: center; } }

/* about/legal pages share the homepage header width (1180px); only the body text column is narrowed + centered, so the top line is consistent across all pages */
.about-shell { max-width: 1180px; }
.about-body { max-width: 680px; margin-left: auto; margin-right: auto; }
.about-author { display: flex; gap: 22px; align-items: flex-start; border-left: 2px solid var(--green); padding: 4px 0 4px 20px; margin: 0 0 36px; }
.about-author .author-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line-strong); }
.about-author .author-text { flex: 1; }
.about-author h2 { font-size: 13px !important; text-transform: uppercase; letter-spacing: 0.16em; color: var(--green); margin: 0 0 8px !important; font-family: var(--sans); font-weight: 500; }
.about-author p { font-size: 16px !important; line-height: 1.7; color: var(--ink-soft); margin: 0 !important; }
.linkedin-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; color: var(--ink); border: none; font-family: var(--sans); }
.linkedin-link:hover { color: #0A66C2; }
.linkedin-link .linkedin-icon { flex: none; }
@media (max-width: 560px) { .about-author { flex-direction: column; align-items: center; text-align: center; border-left: none; padding-left: 0; } }
.about-lead { font-family: var(--serif); font-size: 24px; line-height: 1.4; color: var(--ink); margin: 0 0 36px; }
.about-body h2 { font-size: 24px; margin: 36px 0 12px; }
.about-body h3 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); font-weight: 600; margin: 24px 0 8px; }
.about-body p { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 16px; }
.about-body ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.about-body li { font-size: 16px; line-height: 1.7; color: var(--ink-soft); padding: 12px 0 12px 18px; border-left: 2px solid var(--green-tint); margin-bottom: 10px; }
.about-body strong { color: var(--ink); font-weight: 500; }
.about-foot { margin-top: 36px; font-size: 15.5px !important; color: var(--ink-soft) !important; }
.about-foot a { font-size: inherit; }

/* ==========================================================================
   MOBILE-FIRST READABILITY PASS
   Designed for a VC reading on a phone (train / airport). Content text is
   sized for comfortable reading; only stylistic eyebrow labels stay small.
   ========================================================================== */

/* --- the contract reading + assessment (the core content) --- */
.clause-text, .clause-body { font-size: 16px !important; line-height: 1.6; }
.clause-h { font-size: 16.5px !important; }
.exp-text, .assess-detail, .assess-detail p { font-size: 15.5px !important; line-height: 1.6; }
.assess-term { font-size: 16px !important; }
.assess-variant { font-size: 13px !important; }
.sev-word { font-size: 14px !important; }
.matter-label { font-size: 15px !important; }
.matter-note { font-size: 13px !important; }
.rm-mtag { font-size: 11.5px !important; }
.mit-part { font-size: 14.5px !important; line-height: 1.6; }
.mit-label { font-size: 11.5px !important; }

/* --- overall assessment header --- */
.score-band { font-size: 21px !important; }
.market-read { font-size: 16px !important; line-height: 1.55; }
.reading-head span { font-size: 11px !important; }

/* --- company explorer text --- */
.company-row-name { font-size: 18px !important; }
.company-row-meta { font-size: 13px !important; text-transform: none; letter-spacing: 0; }
.company-results-head { font-size: 11px !important; }
.row-gov { font-size: 11.5px !important; }
.dl-year { font-size: 17px !important; }
.dl-inv { font-size: 15px !important; }
.dl-itype { font-size: 10.5px !important; }
.dl-type { font-size: 13px !important; }
.profile-tag { font-size: 11.5px !important; }
.gov-label { font-size: 14.5px; }
.privacy-body { font-size: 13px !important; line-height: 1.6; }
.privacy-head { font-size: 14.5px !important; }
.company-search-note { font-size: 13px !important; }

/* ==========================================================================
   MINIMAL, EQUAL-SIZE FILTER BAR (search + dropdowns all identical)
   ========================================================================== */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.filter-bar input#companyQuery,
.filter-select {
  width: 100%;
  height: 46px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  -webkit-appearance: none;
  appearance: none;
}
.filter-bar input#companyQuery { font-style: normal; }
.filter-bar input#companyQuery::placeholder { color: var(--ink-faint); font-style: normal; }
.filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238f918b' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}
.filter-bar input#companyQuery:focus, .filter-select:focus { outline: none; border-color: var(--green); }
.filter-extra { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.filter-toggle { font-size: 14px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.filter-toggle input { width: 16px; height: 16px; }
.filter-reset { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); background: none; border: none; cursor: pointer; padding: 6px 2px; }
.filter-reset:hover { color: var(--green); }

/* ==========================================================================
   ABOUT STEFAN PAGE
   ========================================================================== */
.topbar-centered { justify-content: center; text-align: center; border-bottom: 1px solid var(--ink); }
.about-centered { margin-left: auto; margin-right: auto; }
.stefan-hero { text-align: center; margin: 8px 0 30px; }
.author-photo.lg { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; border: 1px solid var(--line-strong); margin-bottom: 18px; }
.stefan-name { font-family: var(--serif); font-size: 30px !important; margin: 0 0 6px !important; }
.stefan-sub { font-size: 13px !important; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin: 0 !important; }
.stefan-punch { font-family: var(--serif); font-size: 19px !important; line-height: 1.6; color: var(--ink) !important; border-left: 3px solid var(--green); padding-left: 18px; }
.contact-cta { margin: 40px 0 8px; padding-top: 30px; border-top: 1px solid var(--line); text-align: center; }
.contact-cta-text { font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink); margin: 0 auto 18px; max-width: 460px; }
.contact-cta .connect-icons { justify-content: center; }
.connect { margin: 30px 0 8px; }
.connect-icons { display: flex; align-items: center; gap: 16px; }
.connect-email { font-size: 15px; color: var(--ink-soft); border: none; }
.connect-email:hover { color: var(--green); }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  color: #6b6f6a; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.icon-link:hover { color: var(--green); border-color: var(--green); }
/* mail button with the address inside it (one button, not two) */
.icon-link.mail-link { width: auto; gap: 10px; padding: 0 18px; }
.icon-link.mail-link .mail-text { font-size: 15px; color: var(--ink-soft); }
/* the envelope glyph sits smaller inside its viewBox than the LinkedIn mark, so
   enlarge it slightly to read as the same visual size */
.icon-link.mail-link svg { width: 28px; height: 28px; }
.footer-icon[aria-label^="Email"] svg { width: 21px; height: 21px; }
.icon-link.mail-link:hover .mail-text { color: var(--green); }
/* small contact icons in the footer (linkedin + mail, no address) */
.footer-icon { display: inline-flex; align-items: center; justify-content: center; }
.footer-icon svg { width: 18px; height: 18px; }

/* about page top bar (brand home link + back) */
.about-topbar { justify-content: space-between; align-items: center; }
.brand-mini { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 0; color: var(--ink); }
.brand-link { border: none; }
.topbar-back { font-size: 15px; color: var(--ink-faint); border: none; }
.topbar-back:hover { color: var(--green); }
.about-title { text-align: center; margin: 30px 0 26px; }
.about-title .eyebrow { margin-bottom: 10px; }
.about-title h1 { font-size: 34px; margin: 0; }
@media (max-width: 560px) { .about-title h1 { font-size: 26px; } }

/* ==========================================================================
   SMALL-SCREEN STACKING
   ========================================================================== */
@media (max-width: 640px) {
  .filter-bar { grid-template-columns: 1fr; }
  .about-body h2 { font-size: 22px; }
  .stefan-name { font-size: 26px !important; }
  .profile-head h2 { font-size: 26px; }
}

/* ==========================================================================
   UNIFIED LABEL TAG + LABEL LEGEND + EXPANDABLE INTRUSIVE ITEMS
   ========================================================================== */
.u-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; white-space: nowrap; }

/* operational (resource-use) vs surplus (value) tag on approval-rights items */
.tag-pair { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kind-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.kind-tag.op { color: var(--protective); background: var(--protective-tint); }
.kind-tag.su { color: var(--green); background: var(--green-tint); }
.kind-tag { margin-right: 8px; }

/* coded articles of association (per-company, by filing) */
.cc-doc { margin: 8px 0 22px; }
.cc-doc-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); margin-bottom: 4px; }
.cc-date { font-family: var(--serif); font-size: 17px; color: var(--green-deep); }
.cc-meta { font-size: 12px; color: var(--ink-faint); }
.cc-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.cc-head { font-size: 14.5px; color: var(--ink); }
.cc-ex { margin: 5px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cc-flag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.cc-flag.veto { color: var(--heavy); background: var(--heavy-tint); }
.cc-flag.ns { color: var(--ink-soft); background: var(--ivory); }
@media (max-width: 560px) { .cc-row { grid-template-columns: 1fr; } .cc-tags { justify-content: flex-start; } }

.reading-head-assess, .reading-head-contract { display: inline-flex; align-items: center; gap: 8px; }
.legend-toggle {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-faint); font-family: var(--serif); font-style: italic;
  font-size: 11px; line-height: 1; cursor: pointer; flex: none; padding: 0;
}
.legend-toggle:hover { color: var(--green); border-color: var(--green); }
.legend-panel { margin: 4px 0 18px; padding: 16px 18px; background: var(--green-tint); border-radius: var(--radius); }
.legend-row { display: grid; grid-template-columns: 16px 150px 1fr; gap: 10px; align-items: baseline; padding: 5px 0; }
.legend-row.legend-head { grid-template-columns: 1fr; padding-bottom: 8px; }
.legend-head .legend-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--green); font-weight: 600; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.legend-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.legend-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 560px) { .legend-row { grid-template-columns: 14px 1fr; } .legend-desc { grid-column: 1 / -1; } }

/* per-item dot colours mapped to the unified buckets */
.matter-dot.f { background: var(--founder); }
.matter-dot.s { background: var(--ink-faint); }
.matter-dot.p { background: var(--protective); }
.matter-dot.i { background: var(--heavy); }

/* an intrusive reserved matter is itself an expandable menu */
.matter-assess .assess-head { gap: 10px; }
.matter-assess .assess-detail { display: none; margin-top: 10px; }
.matter-assess[data-open="1"] .assess-detail { display: block; }
.matter-assess .chevron { font-size: 20px; line-height: 1; color: var(--green); transition: transform 0.25s ease; }
.matter-assess[data-open="1"] .chevron { transform: rotate(180deg); }
.mit-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }

/* ==========================================================================
   FOOTER: consistent gap from the body, line sits just above the menu
   ========================================================================== */
/* footer band styling consolidated above */

/* keep the questionnaire a stable height so the footer doesn't jump between
   questions of different length */
.questionnaire:not(.hidden) { min-height: 60vh; display: flex; flex-direction: column; }
.questionnaire .wiz-steps { flex: 1; }

/* disclaimer gate shown before the analysis */
.disclaimer-gate:not(.hidden) { min-height: 52vh; display: flex; flex-direction: column; justify-content: center;
  max-width: 640px; margin: 0 auto; text-align: center; }
.disclaimer-title { font-family: var(--serif); font-size: 28px; line-height: 1.2; margin: 8px 0 16px; }
.disclaimer-body { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 auto 28px; max-width: 560px; }
.disclaimer-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* results top bar: lightweight disclaimer + export actions */
.results-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.results-disclaimer { margin: 0; font-size: 12px; color: var(--ink-faint); }
.results-actions { display: flex; gap: 8px; }
.results-actions button { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--green-deep); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 12px; cursor: pointer; }
.results-actions button:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
@media print { .results-topbar, .topbar, .site-footer, .legend-toggle { display: none !important; } .assess-detail { display: block !important; } }

/* blunt one-line verdict */
.bottom-line { font-family: var(--serif); font-size: 17px; line-height: 1.5; color: var(--ink); margin: 4px 0 18px; }

/* subtle 'load an example' dropdown on the upload screen */
.examples-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 30px 0; }
.examples-label { font-size: 14px; color: var(--ink-soft); }
/* prominent example block at the top of the start page so first-time visitors
   immediately see they can try a sample without their own term sheet */
.examples-row.examples-top { margin: 6px 0 18px; gap: 14px; }
.examples-row.examples-top .examples-label { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.examples-row.examples-top .example-btn { font-size: 15px; padding: 10px 20px; }
.examples-divider { display: flex; align-items: center; text-align: center; gap: 14px;
  color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; margin: 0 0 20px; }
.examples-divider::before, .examples-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.example-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.example-btn { font-family: var(--sans); font-size: 14px; color: var(--green-deep); background: var(--green-tint);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: all .12s ease; }
.example-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.example-select { font-family: var(--sans); font-size: 14px; color: var(--ink-soft);
  background: transparent; border: none; border-bottom: 1px dotted var(--line-strong);
  padding: 3px 18px 3px 2px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath fill='%238f918b' d='M0 0l4.5 6 4.5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; }
.example-select:focus { outline: none; border-bottom-color: var(--green); }

/* ownership / dilution math */
.dilution { border-top: 1px solid var(--line); padding: 26px 0 0; margin-bottom: 32px; }
.dil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 8px 0 4px; }
.dil-cell { padding: 4px 16px 16px 0; display: flex; flex-direction: column; gap: 4px; }
.dil-cell + .dil-cell { padding-left: 18px; border-left: 1px solid var(--line); }
.dil-num { font-family: var(--serif); font-size: 24px; color: var(--ink); line-height: 1; }
.dil-lab { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.dil-note { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
@media (max-width: 560px) { .dil-cell + .dil-cell { border-left: none; padding-left: 0; } }

.reading-mode-note { font-size: 12px; color: var(--ink-faint); margin: 0 0 14px; font-style: italic; }

/* exit waterfall */
.exit-waterfall { border-top: 1px solid var(--line); padding: 26px 0 0; margin-bottom: 32px; }
.wf-headline { font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink); margin: 6px 0 14px; }
.wf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wf-table th { text-align: left; font-family: var(--sans); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); padding: 0 10px 8px 0; }
.wf-table td { padding: 9px 10px 9px 0; border-top: 1px dashed var(--line); vertical-align: middle; }
.wf-exit { font-family: var(--serif); font-size: 15px; color: var(--ink); white-space: nowrap; }
.wf-bar { width: 40%; }
.wf-bar-fill { display: block; height: 9px; border-radius: 5px; background: var(--protective); min-width: 2px; }
.wf-amt { white-space: nowrap; color: var(--ink); }
.wf-common { color: var(--green); }
.wf-pct { color: var(--ink-faint); font-size: 12px; margin-left: 3px; }
@media (max-width: 560px) { .wf-bar { display: none; } }

/* ==========================================================================
   RESULTS HEADER: confidence tooltip + clean detail boxes + jump chips
   ========================================================================== */
.score-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.confidence-chip { cursor: help; margin-left: 0; }
.confidence-pop {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  max-width: 420px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--ink-soft);
  box-shadow: 0 6px 24px rgba(20,53,42,0.10); text-transform: none; letter-spacing: 0;
}
.confidence-chip:hover + .confidence-pop, .confidence-chip:focus + .confidence-pop { display: block; }

/* clean labelled detail box, consistent with the green rationale box */
.detail-box { background: var(--ivory); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.exp-text { font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0 0 10px; }

/* executive-brief jump chips */
.brief-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.brief-jump-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); margin-right: 4px; }
.jump-chip {
  font-family: var(--sans); font-size: 13px; color: var(--green-deep); background: var(--green-tint);
  border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.jump-chip:hover { background: var(--green-deep); color: #fff; }

/* last item before a section header (or last overall) drops its dashed line */
.reading-row:has(+ .reading-section) { border-bottom: none; }
.reading-row:last-child { border-bottom: none; }

/* governance presented as plain data-point rows */
.gov-section span { font-family: var(--serif); }

/* expandable deal rows in the company funding timeline */
.dl-item { border-top: 1px solid var(--line); }
.dl-item:first-child { border-top: none; }
.dl-row { display: grid; grid-template-columns: 56px 1fr 22px; gap: 14px; align-items: baseline; padding: 11px 0; cursor: pointer; }
.dl-chev { font-size: 18px; color: var(--green); transition: transform 0.25s ease; justify-self: end; }
.dl-item[data-open="1"] .dl-chev { transform: rotate(180deg); }
.dl-detail { display: none; padding: 4px 0 14px 70px; }
.dl-item[data-open="1"] .dl-detail { display: block; }
.dl-d { margin: 0 0 5px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.dl-dl { display: inline-block; min-width: 120px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); }
@media (max-width: 560px) { .dl-detail { padding-left: 0; } .dl-dl { display: block; min-width: 0; } }
