:root {
  /* GlanceFive brand - navy + gold, matching the client-facing proposal deck */
  --brand: #03347F;
  --brand-dark: #022560;
  --brand-tint: #eef1f8;
  --accent: #F9BF21;
  --accent-dark: #E0A800;
  --dark: #0B1120;
  --good: #22c55e;
  --bad: #dc2626;
  --warn: #eda100;
  --surface: #ffffff;
  --page: #f6f7f9;
  --ink: #16181d;
  --ink-2: #565b66;
  --ink-3: #8a8f99;
  --line: #e4e6ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,20,30,0.04), 0 6px 20px rgba(20,20,30,0.06);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.app { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }

/* ---------- Access gate (private deployment only) ---------- */
.pw-gate {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dark) 0%, var(--brand-dark) 50%, var(--dark) 100%); padding: 20px;
}
.pw-gate.unlocked { display: none; }
.pw-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 16px;
  padding: 40px 32px; max-width: 320px; width: 100%; text-align: center;
}
.pw-logo { font-size: 26px; font-weight: 900; color: #fff; letter-spacing: -.5px; margin-bottom: 6px; }
.pw-logo span { color: var(--accent); }
.pw-tagline { font-size: 12px; color: #b9c1d4; margin-bottom: 26px; }
.pw-card input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 14px; margin-bottom: 12px; text-align: center; font-family: inherit;
}
.pw-card input::placeholder { color: #8891a8; }
.pw-card input:focus { outline: none; border-color: var(--accent); }
.pw-card .btn { width: 100%; }
.pw-error { color: #ff9b9b; font-size: 12.5px; margin: 10px 0 0; }
@media print { .pw-gate { display: none !important; } }

/* ---------- Header (sticky - page scrolls underneath) ---------- */
.header-sticky {
  position: sticky; top: 0; z-index: 20; background: var(--page);
  padding: 20px 0 10px; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0;
}
.brand { display: flex; align-items: center; font-weight: 800; font-size: 20px; letter-spacing: -.3px; color: var(--dark); }
.brand .brand-accent { color: var(--brand); }
.client-tag { font-size: 13px; color: var(--ink-3); }

/* ---------- Cover page ---------- */
.cover-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--brand-dark) 50%, var(--dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 50px 30px 40px;
  text-align: center; position: relative; overflow: hidden;
}
.cover-logo { font-size: 32px; font-weight: 900; letter-spacing: -1px; margin-bottom: 6px; }
.cover-logo span { color: var(--accent); }
.cover-tagline { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 34px; }
.cover-divider { width: 70px; height: 3px; background: var(--accent); margin: 0 auto 28px; border-radius: 10px; }
.cover-title { font-size: 27px; font-weight: 800; line-height: 1.25; margin-bottom: 8px; }
.cover-subtitle { font-size: 14.5px; color: #b9c1d4; margin-bottom: 32px; }
.cover-client-box {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 22px 26px; max-width: 460px; margin: 0 auto; text-align: left;
}
.cover-client-label { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
/* Scoped to .cover-hero: a bare .cover-input class loses to the global
   input[type="text"] rule below (element+attribute beats a single class),
   which was silently overriding these with big padding/white bg/dark text. */
.cover-hero input.cover-input {
  display: block; width: 100%; background: transparent; border: none;
  border-bottom: 1px dashed rgba(255,255,255,0.3); color: #fff; font-family: inherit;
  padding: 2px 0 4px; margin-bottom: 6px; border-radius: 0; font-size: 13px;
}
.cover-hero input.cover-input::placeholder { color: #6b7690; font-weight: 400; }
.cover-hero input.cover-input:focus { outline: none; border-bottom-color: var(--accent); border-bottom-style: solid; }
.cover-hero input.cover-input-name { font-size: 17px; font-weight: 700; }
.cover-hero input.cover-input-sub { font-size: 12.5px; color: #b9c1d4; }
.cover-meta { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1); }
.cover-meta-item { text-align: left; flex: 1; min-width: 0; }
.cover-meta-item .label { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: #8891a8; font-weight: 700; }
.cover-meta-item .value { font-size: 12px; font-weight: 600; margin-top: 3px; color: #fff; }
.cover-hero input.cover-valid-input {
  margin-top: 3px; font-size: 12px; font-weight: 600; background: transparent; border: none;
  border-bottom: 1px dashed rgba(255,255,255,0.3); color: #fff; width: 100%; padding: 0 0 2px;
  font-family: inherit; border-radius: 0;
}
.cover-hero input.cover-valid-input::placeholder { color: #6b7690; font-weight: 400; }
.cover-hero input.cover-valid-input:focus { outline: none; border-bottom-color: var(--accent); border-bottom-style: solid; }
.cover-footer { margin-top: 30px; font-size: 11px; color: #9aa3ba; line-height: 1.7; }
.cover-confidential { opacity: .65; }
@media (max-width: 560px) { .cover-meta { flex-direction: column; gap: 12px; } }

/* ---------- Screens / cards ---------- */
/* Continuous scroll: every screen is always visible, stacked top to bottom. */
.screen { display: block; scroll-margin-top: 130px; margin-top: 28px; }
.screen:first-of-type { margin-top: 8px; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 16px; border: 1px solid var(--line);
}
h1.screen-title { font-size: 22px; margin: 0 0 4px; }
.screen-sub { color: var(--ink-2); font-size: 14px; margin: 0 0 20px; }

label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
}
textarea { resize: vertical; min-height: 60px; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }


/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--ink-3); font-weight: 600; font-size: 11px; text-transform: uppercase; }
table.data td { font-variant-numeric: tabular-nums; }
table.data tr.highlight td { font-weight: 700; color: var(--brand-dark); background: var(--brand-tint); }
table.breakdown-table td.neg { color: var(--bad); }
table.breakdown-table td:nth-child(2) { text-align: left; }
table.breakdown-table th, table.breakdown-table td { padding: 8px 8px; }

/* ---------- Marketplace Comparison (transposed) ---------- */
.table-scroll { overflow-x: auto; }
table.comparison-table { min-width: 640px; }
table.comparison-table td:first-child { white-space: nowrap; font-weight: 500; }
table.comparison-table td.neg { color: var(--bad); }
table.comparison-table th.highlight { color: var(--brand-dark); background: var(--brand-tint); }
table.comparison-table td.highlight { background: #f5f6fa; }
table.comparison-table tr.highlight td.highlight { background: #dfe6f5; }
.mp-sub { font-weight: 400; text-transform: none; opacity: .75; }
.mp-pct { font-size: 10.5px; color: var(--ink-3); font-weight: 400; }
table.comparison-table tr.highlight .mp-pct { color: inherit; opacity: .75; }

/* ---------- Filter bar (Unit Economics) ---------- */
.filter-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 18px; align-items: start; }
.filter-bar .field { margin-bottom: 0; }
@media (max-width: 900px) { .filter-bar { grid-template-columns: 1fr 1fr; } }

table.breakdown-table td.neg .amt-sign { font-weight: 700; margin-right: 1px; }

/* ---------- Growth Plan ---------- */
.growth-roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.growth-roadmap .rm-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fafbfc; }
.growth-roadmap .rm-tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--brand);
  padding: 2px 9px; border-radius: 999px; margin-bottom: 8px;
}
.growth-roadmap h5 { margin: 0 0 6px; font-size: 13.5px; }
.growth-roadmap p { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 700px) { .growth-roadmap { grid-template-columns: 1fr; } }

.growth-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.growth-stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.growth-stat .gs-icon {
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 14px; margin-bottom: 8px;
}
.growth-stat .gs-label { font-size: 10.5px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.growth-stat .gs-value { font-size: 19px; font-weight: 700; margin-top: 3px; }
.growth-stat .gs-delta { font-size: 11px; color: var(--good); margin-top: 4px; }
@media (max-width: 700px) { .growth-stats { grid-template-columns: 1fr 1fr; } }

.growth-chart-wrap { position: relative; height: 220px; margin: 14px 0 30px; }
.growth-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.growth-points { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.growth-points .pt { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.growth-points .pt .val { font-size: 10px; font-weight: 700; color: #5b3fa0; margin-bottom: 3px; white-space: nowrap; }
.growth-points .pt .dot { width: 7px; height: 7px; border-radius: 50%; background: #7c4dd6; box-shadow: 0 0 0 2px #fff; }
.growth-bars { display: flex; align-items: flex-end; gap: 10px; height: 100%; position: relative; z-index: 1; }
.growth-bars .month-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.growth-bars .bar-pair { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 100%; justify-content: center; }
.growth-bars .bar { width: 32%; border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.growth-bars .bar-revenue { background: #03347F; }
.growth-bars .bar-contribution { background: #22c55e; }
.growth-bars .bar-value {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--ink-3); white-space: nowrap;
}
.growth-bars .bar-value-good { color: #1a9c69; }
.growth-bars .month-label { font-size: 11px; color: var(--ink-2); margin-top: 8px; }
.growth-legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-2); margin: -18px 0 18px; }
.growth-legend span { display: inline-flex; align-items: center; gap: 5px; }
.growth-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- Service Coverage (accordion) ---------- */
.coverage-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.coverage-item summary {
  cursor: pointer; list-style: none; padding: 12px 14px; display: flex; align-items: center;
  gap: 10px; font-weight: 600; font-size: 13.5px; background: #fafbfc;
}
.coverage-item summary::-webkit-details-marker { display: none; }
.coverage-item summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); font-size: 11px; transition: transform .15s; }
.coverage-item[open] summary::after { transform: rotate(180deg); }
.coverage-item[open] summary { border-bottom: 1px solid var(--line); }
.cov-icon { font-size: 15px; }
.cov-name { flex: 1; }
.cov-count {
  font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: #eef1f6;
  padding: 2px 8px; border-radius: 999px;
}
.cov-list {
  list-style: none; margin: 0; padding: 10px 14px 12px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px;
}
.cov-list.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
/* A trailing odd item in the 2-column layout would otherwise sit alone in a
   half-empty row - span it full-width instead so it reads as intentional.
   (Never fires on .cols-3: that column count is only chosen when the list
   divides evenly or leaves >=2 in the last row, so there's no orphan there.) */
.cov-list:not(.cols-3) li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.cov-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.cov-check { color: var(--good); font-weight: 700; flex: 0 0 auto; }
@media (max-width: 640px) { .cov-list, .cov-list.cols-3 { grid-template-columns: 1fr; } }
.cov-limits { padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.cov-limits h5 { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; margin: 12px 0 8px; }
.cov-tnc { margin: 6px 0 0; font-size: 11px; color: var(--ink-3); font-style: italic; }

/* ---------- Service limits/pricing card list (Cataloging, Brand Enhancement) ---------- */
.svc-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.svc-header, .svc-row { display: grid; grid-template-columns: 1fr 190px 170px; align-items: center; gap: 12px; }
.svc-header {
  background: var(--brand-tint); padding: 9px 16px; font-size: 10.5px; font-weight: 700;
  color: var(--brand-dark); text-transform: uppercase; letter-spacing: .03em;
}
.svc-header span:not(:first-child), .svc-pill { justify-self: center; }
.svc-row { padding: 12px 16px; border-top: 1px solid var(--line); }
.svc-left { display: flex; gap: 12px; align-items: flex-start; }
.svc-icon {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.svc-text h5 { margin: 0 0 2px; font-size: 13px; color: var(--ink); }
.svc-text p { margin: 0; font-size: 11px; color: var(--ink-2); line-height: 1.4; }
.svc-pill {
  display: inline-flex; align-items: center; gap: 6px; background: #e6f4ea; color: #1a7a3f;
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
/* Plain "always included" features (no pricing) - just a name and a tick,
   reusing the same 3-column row grid so everything still lines up. */
.svc-row-simple { padding-top: 10px; padding-bottom: 10px; }
.svc-simple-name { font-size: 12.5px; color: var(--ink-2); }
.svc-tick {
  justify-self: center; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: #e6f4ea; color: #1a7a3f;
  font-weight: 700; font-size: 13px;
}
/* No icon square, tighter padding, smaller pill - for included-but-uncapped
   services that don't need a colourful icon or a priced "after limit". */
.svc-row-compact { padding-top: 9px; padding-bottom: 9px; }
.svc-row-compact .svc-text h5 { font-size: 12.5px; }
.svc-row-compact .svc-text p { font-size: 10.5px; }
.svc-row-compact .svc-pill { padding: 4px 12px; font-size: 11px; justify-self: center; }
.svc-dash { justify-self: center; color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 700px) {
  .svc-header { display: none; }
  .svc-header, .svc-row { grid-template-columns: 1fr; }
  .svc-row { gap: 10px; }
  .svc-pill, .svc-tick, .svc-dash { justify-self: start; }
}
.cov-excluded-wrap { padding: 10px 14px 12px; }
.cov-excluded-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.cov-excluded-list li { font-size: 12.5px; color: var(--ink-2); position: relative; padding-left: 16px; }
.cov-excluded-list li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 700; font-size: 10px; top: 2px; }
.cov-excluded-wrap .note { margin: 10px 0 0; }
@media (max-width: 560px) { .cov-excluded-list { grid-template-columns: 1fr; } }

/* ---------- Pricing Plans ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; }
.pricing-badge { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.pricing-price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
.pp-currency { font-size: 20px; font-weight: 700; color: var(--ink); }
/* Scoped: a bare class loses to the global input[type="number"] rule. */
.pricing-card input.pricing-price-input {
  font-size: 26px; font-weight: 800; border: none; border-bottom: 2px dashed var(--line);
  width: 130px; padding: 0 2px 2px; background: transparent; color: var(--ink); font-family: inherit;
  border-radius: 0;
}
.pricing-card input.pricing-price-input:focus { outline: none; border-bottom-color: var(--brand); border-bottom-style: solid; }
.pp-period { font-size: 13px; color: var(--ink-3); }
.pricing-tagline { font-size: 12px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.45; }
.pricing-features { list-style: none; margin: 0 0 14px; padding: 0; flex: 1; }
.pricing-features li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); padding: 3px 0; }
.pricing-features li .chk { color: var(--good); font-weight: 700; flex: 0 0 auto; }
.pricing-add-btn { align-self: flex-start; font-size: 12.5px; padding: 8px 14px; }

/* ---------- Performance-Based Differential ---------- */
.perf-diff-card { border: 1px solid #e0cdf5; background: #faf6ff; border-radius: 14px; padding: 18px; margin-top: 18px; }
.pd-title { margin: 0; font-size: 15px; color: #5b3fa0; }
.pd-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin: 0 0 14px; }
.pd-desc strong { color: #5b3fa0; }
.pd-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 560px) { .pd-examples { grid-template-columns: 1fr; } }
.pd-example { background: #fff; border: 1px solid #e0cdf5; border-radius: 10px; padding: 12px 14px; }
.pd-example h5 { margin: 0 0 8px; font-size: 12.5px; color: #5b3fa0; }
.pd-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); padding: 3px 0; }
.pd-row span:first-child { white-space: nowrap; flex: 0 0 auto; }
.pd-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pd-row.pd-total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 6px; font-weight: 700; color: #5b3fa0; }
.pd-footnote { font-size: 11px; color: var(--ink-3); margin: 0; line-height: 1.5; }

/* ---------- Payment Terms / T&C / Acceptance ---------- */
.policy-list { list-style: none; margin: 8px 0 18px; padding: 0; }
.policy-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding: 4px 0 4px 16px; position: relative; }
.policy-list li::before { content: "•"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.policy-list li strong { color: var(--ink); }
.tnc-list { list-style: none; margin: 8px 0 0; padding: 0; columns: 2; column-gap: 20px; }
.tnc-list li { font-size: 12px; color: var(--ink-2); line-height: 1.5; padding: 0 0 12px; break-inside: avoid; }
.tnc-list li strong { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
@media (max-width: 700px) { .tnc-list { columns: 1; } }

.sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 560px) { .sign-grid { grid-template-columns: 1fr; } }
.sign-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sign-block h5 { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.sign-name { margin: 0 0 4px; font-weight: 700; font-size: 14px; }
.sign-detail { margin: 0 0 4px; font-size: 12px; color: var(--ink-2); }
.sign-line { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); }

/* ---------- Closing brand footer (Acceptance screen) ---------- */
.brand-footer { background: var(--dark); border-radius: 12px; padding: 24px; text-align: center; margin-top: 24px; color: #fff; }
.brand-footer .bf-logo { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.brand-footer .bf-logo span { color: var(--accent); }
.brand-footer .bf-tagline { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #9aa3ba; margin-bottom: 10px; }
.brand-footer .bf-contact { font-size: 12px; color: #b9c1d4; }
.brand-footer .bf-link { color: var(--accent); }
.brand-footer .bf-location { font-size: 10px; color: #6b7690; margin-top: 8px; }
#engagement-summary-table td:last-child { text-align: left; font-weight: 600; }
/* Scoped: a bare class loses to the global input[type="text"] rule. */
#engagement-summary-table input.es-input {
  width: 100%; border: none; border-bottom: 1px dashed var(--line); background: transparent;
  font-family: inherit; font-size: inherit; font-weight: 600; color: var(--ink); padding: 2px 0;
  border-radius: 0;
}
#engagement-summary-table input.es-input:focus { outline: none; border-bottom-color: var(--brand); border-bottom-style: solid; }

/* ---------- Source pills (rate-card breakdown) ---------- */
.src-pill { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.src-seller-input { background: #e6f4ea; color: #1a7a3f; }
.src-rate-card { background: var(--brand-tint); color: var(--brand-dark); }
.src-calculated { background: #f1ecfb; color: #6b4fbb; }
.src-estimated { background: #fff4de; color: #8a5a00; }
.src-official { background: #e6f4ea; color: #1a7a3f; }
.src-seller-override { background: #fff0e0; color: #b5570a; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 10px;
  border: none; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--brand); color: #fff;
}
.btn.secondary { background: #eef1f6; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.fab-pdf {
  position: fixed; bottom: 22px; right: 22px; z-index: 20;
  box-shadow: 0 6px 18px rgba(3,52,127,0.35);
}

.steps6 { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.steps6 .s { flex: 1 1 90px; text-align: center; padding: 14px 6px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; font-size: 13px; }

/* ---------- Costing ---------- */
.costing-row { display: grid; grid-template-columns: 2fr 1fr 70px 90px 70px 70px 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.costing-row input, .costing-row select { padding: 7px 8px; font-size: 12.5px; }
.costing-head { font-size: 10px; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.rm-btn { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 16px; }

.note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------- Who We Are ---------- */
.eyebrow-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-tint); padding: 5px 14px; border-radius: 20px;
}
.about-text { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.feature-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px;
}
.feature-icon {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; display: flex;
  align-items: center; justify-content: center; font-size: 14px;
}
.feature-label { font-size: 12px; font-weight: 700; line-height: 1.35; }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }

.capability-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.capability-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.capability-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 9px; font-size: 15px; margin-bottom: 8px;
}
.capability-card h4 { margin: 0 0 6px; font-size: 14px; }
.capability-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 640px) { .capability-grid { grid-template-columns: 1fr; } }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-pill { background: var(--dark); border-radius: 12px; padding: 14px 8px; text-align: center; }
.stat-pill .v { font-size: 18px; font-weight: 700; }
.stat-pill .l { color: #c3c2b7; font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-top: 2px; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Onboarding documents checklist ---------- */
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 22px; }
.doc-item { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc; }
.doc-icon { font-size: 20px; flex: 0 0 24px; }
.doc-item h5 { margin: 0 0 3px; font-size: 13px; color: var(--ink); }
.doc-item p { margin: 0; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.doc-subhead { font-size: 13px; font-weight: 700; color: var(--ink); margin: 4px 0 4px; }
@media (max-width: 640px) { .doc-grid { grid-template-columns: 1fr; } }

/* ---------- Chapter 1 story (ported from Glancefive SPN app) ---------- */
.story { min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 36px 10px; }
.story-scene { display: none; width: 100%; flex-direction: column; align-items: center; gap: 32px; }
.story-scene.active { display: flex; animation: storyFade .35s ease; }
@keyframes storyFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.story-chain { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.story-node {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 108px;
  border: 1px solid var(--line); background: #fafbfc; border-radius: 14px; padding: 18px 8px;
  text-align: center; box-shadow: 0 1px 2px rgba(20,20,30,0.04);
}
.story-node.wide { width: 168px; padding: 24px 14px; }
.story-node.highlight { border: 2px solid var(--brand); background: var(--brand-tint); }
.story-icon { font-size: 36px; }
.story-node.wide .story-icon { font-size: 44px; }
.story-label { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.story-arrow { color: var(--ink-3); font-size: 20px; }
.story-caption { text-align: center; font-size: 19px; font-weight: 600; color: var(--ink); margin: 0; }

.story-bridge-row { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; max-width: 560px; }
.story-track { position: relative; flex: 1; height: 3px; background: var(--line); }
.story-travel { position: absolute; top: -19px; left: 2%; font-size: 30px; transition: left 1.1s ease-in-out; }
.story-travel.run { left: 92%; }

.story-progress { width: 100%; max-width: 620px; }
.story-progress-track { position: relative; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 34px; }
.story-progress-fill { position: absolute; left: 0; top: 0; height: 6px; border-radius: 3px; background: var(--brand); width: 0%; transition: width .4s ease-in-out; }
.story-progress-marker {
  position: absolute; top: -16px; left: -19px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 3px 10px rgba(3,52,127,0.4); transition: left .4s ease-in-out;
}
.story-progress-stages { display: flex; justify-content: space-between; gap: 4px; }
.story-progress-stages .stage { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; text-align: center; opacity: .35; transition: opacity .3s; }
.story-progress-stages .stage.reached { opacity: 1; }
.story-progress-stages .stage .icon { font-size: 26px; }
.story-progress-stages .stage .label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.story-customers { display: flex; gap: 20px; height: 50px; justify-content: center; }
.story-customers span { font-size: 34px; opacity: 0; transform: translateY(6px); transition: all .3s ease; }
.story-customers.show span { opacity: 1; transform: none; }
.story-customers.show span:nth-child(2) { transition-delay: .15s; }
.story-customers.show span:nth-child(3) { transition-delay: .3s; }

.story-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 560px; }
.story-chip {
  border: 1px solid var(--line); background: #fafbfc; border-radius: 999px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}

.story-meet { display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 56px; }
.story-meet-handshake { font-size: 42px; }

.story-stepper { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.story-stepper .btn.ghost { font-size: 15px; font-weight: 700; }
.story-dots { display: flex; align-items: center; gap: 7px; }
.story-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: all .2s; }
.story-dots .dot.active { width: 24px; background: var(--brand); }
.btn.ghost:disabled { opacity: 0; cursor: default; }
@media (max-width: 560px) {
  .story-progress-stages .stage { width: 42px; }
  .story-progress-stages .stage .icon { font-size: 20px; }
  .story-progress-stages .stage .label { font-size: 9.5px; }
}

/* .print-value only ever exists between beforeprint/afterprint (see
   wireInputs) - hide it the rest of the time so it can never flash on screen. */
.print-value { display: none; }

@media print {
  .fab-pdf, .header-sticky, .story-stepper, .no-print { display: none !important; }
  .story-scene { display: flex !important; }
  .story { flex-direction: column; gap: 30px; }
  .app { padding-top: 20px; max-width: none; }
  /* A whole .card being forced to avoid splitting meant a card that didn't
     fully fit in the remaining space on a page got pushed entirely to the
     next one, leaving large blank gaps - that's what was causing so many
     half-empty pages. Cards now flow and split across pages when needed;
     only small atomic pieces below are protected from splitting mid-way. */
  .card { box-shadow: none; border-color: #ddd; }
  /* Without an explicit height, the cover box only grows to fit its own
     content (~55-60% of a page), leaving a big blank gap below it since it's
     already forced onto its own page. Stretch it to fill the sheet and
     vertically center its content within that, like a real cover page. */
  .cover-hero {
    break-inside: avoid; break-after: page; page-break-after: always;
    /* 100vh overflowed the printable area once the page's own margins and
       .app's padding-top were accounted for, spilling its rounded bottom
       edge onto an otherwise-blank second page. 225mm leaves a safe margin
       under a 297mm A4 sheet for default browser print margins. */
    min-height: 225mm; display: flex; flex-direction: column; justify-content: center;
  }
  .pdf-excluded { display: none !important; }
  body { background: #fff; }

  /* A horizontal-scroll container is useless on a static printed page -
     there's nothing to scroll, so whatever didn't fit the visible width
     (the Month 6 column, the rightmost marketplace columns) just gets cut
     off. Let these tables shrink to fit the page width instead. */
  .table-scroll { overflow-x: visible; }
  table.comparison-table { min-width: 0; width: 100%; font-size: 10.5px; }
  table.comparison-table th, table.comparison-table td { padding: 6px 4px; }
  table.comparison-table td:first-child { white-space: normal; }

  table.breakdown-table { font-size: 10.5px; }
  table.breakdown-table th, table.breakdown-table td { padding: 5px 4px; }

  /* Protect only small, atomic chunks from being split mid-way across a page
     break - everything else is free to flow, which is what actually fills
     pages instead of leaving them half blank. */
  tr, .doc-item, .about-card, .capability-card, .pricing-card, .rm-card,
  .growth-stat, .stat-pill, .coverage-item, .terms-box, .highlight-box, .perf-diff-card,
  .sign-block, .costing-row, .svc-row, .pd-example, .future-card, .justify-card,
  .brand-footer, #coverage-excluded, .field, .filter-bar, .growth-chart-wrap {
    break-inside: avoid;
  }
  h1.screen-title, .screen-sub, .doc-subhead { break-after: avoid; }

  /* Editable fields print as plain text (see the beforeprint swap) instead of
     boxy form controls - fixes clipped/truncated values, stray input borders
     and empty fields showing their placeholder as if it were real content. */
  .print-hide-for-swap { display: none !important; }
  .print-value { display: inline; border: none; background: transparent; padding: 0; margin: 0; color: inherit; font: inherit; text-align: inherit; }

  /* Action-only controls (delete row, add row, "add to costing") have no
     place in a document the client reads - hide them. */
  .rm-btn, .pricing-add-btn, #btnAddService, #btnAddDifferentialToCosting { display: none !important; }
  /* Reclaim the now-hidden "remove row" column's width for the service name. */
  .costing-row { grid-template-columns: 2.6fr 1fr 55px 85px 55px 55px 0 !important; }
  .costing-row .print-value { font-size: 12.5px; }

  /* These sizes/weights/colors were set directly on the input (not a parent),
     so the sibling .print-value span wouldn't inherit them without this. */
  input.pricing-price-input + .print-value { font-size: 26px; font-weight: 800; color: var(--ink); }
  /* These fields are meant to stack as separate lines (Name / Company /
     Email, each on its own row) - the generic .print-value rule above forces
     display:inline, which was squashing them all onto one run-on line. */
  input.cover-input-name + .print-value { display: block; font-size: 17px; font-weight: 700; }
  input.cover-input-sub + .print-value { display: block; font-size: 12.5px; color: #b9c1d4; }
  input.cover-valid-input + .print-value { display: block; font-size: 12px; font-weight: 600; }
  /* #coverClientPhone and #coverTeamPhones have an inline margin-bottom:16px
     to separate "Prepared For" from "Prepared By" (and that block from the
     Date/Valid Until row) - but that margin lives on the now-hidden <input>,
     so it never carried over to the .print-value span replacing it, and the
     gap silently collapsed in print. Restore it directly on the span. */
  #coverClientPhone + .print-value, #coverTeamPhones + .print-value { margin-bottom: 16px; }
}

/* ---------- PDF export section picker ---------- */
.pdf-section-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
@media (max-width: 560px) { .pdf-section-list { grid-template-columns: 1fr; } }
.pdf-section-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 4px;
  border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: pointer;
}
.pdf-section-item input { width: auto; accent-color: var(--brand); cursor: pointer; }
.pdf-section-item.excluded { color: var(--ink-3); }
.pdf-section-item.excluded .pdf-section-label { text-decoration: line-through; }
