/* ============================================================
   PeachBiz EBITDA Growth Projection Tool — Front-End CSS
   ============================================================ */

:root {
  --pbg-brand:      #2C5F8A;
  --pbg-brand-dark: #1a4a70;
  --pbg-pro:        #7C3AED;
  --pbg-pro-light:  #EDE9FE;
  --pbg-green:      #059669;
  --pbg-surface:    #FFFFFF;
  --pbg-bg:         #F8F9FA;
  --pbg-border:     #E2E8F0;
  --pbg-text:       #1A202C;
  --pbg-muted:      #64748B;
  --pbg-radius:     12px;
  --pbg-shadow:     0 2px 12px rgba(0,0,0,.08);
}

.pbgrowth-wrap * { box-sizing: border-box; }

.pbgrowth-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--pbg-text);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Pro badge */
.pbgrowth-pro-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #d4edda; color: #155724;
  font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 16px;
}

/* Steps */
.pbgrowth-step { animation: pbg-fade .25s ease; }
@keyframes pbg-fade { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Headings */
.pbgrowth-tool-title    { font-size: clamp(22px,4vw,30px); font-weight: 800; margin: 0 0 8px; }
.pbgrowth-tool-subtitle { font-size: 16px; color: var(--pbg-muted); margin: 0 0 28px; }
.pbgrowth-section-heading { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.pbgrowth-hint { font-size: 13px; color: var(--pbg-muted); margin: -8px 0 16px; }

/* Cards */
.pbgrowth-card {
  background: var(--pbg-surface);
  border: 1px solid var(--pbg-border);
  border-radius: var(--pbg-radius);
  padding: 24px; margin-bottom: 20px;
  box-shadow: var(--pbg-shadow);
}

/* Fields */
.pbgrowth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .pbgrowth-field-row { grid-template-columns: 1fr; } }

.pbgrowth-field { display: flex; flex-direction: column; gap: 6px; }
.pbgrowth-field label { font-size: 14px; font-weight: 600; }

.pbgrowth-input-prefix,
.pbgrowth-input-suffix {
  display: flex; align-items: center;
  border: 1.5px solid var(--pbg-border);
  border-radius: 8px; overflow: hidden;
  background: #fff;
  transition: border-color .2s;
}
.pbgrowth-input-prefix:focus-within,
.pbgrowth-input-suffix:focus-within { border-color: var(--pbg-brand); }

.pbgrowth-input-prefix span,
.pbgrowth-input-suffix span {
  background: var(--pbg-bg); padding: 0 12px;
  font-size: 14px; font-weight: 600; color: var(--pbg-muted);
  border-right: 1px solid var(--pbg-border);
  align-self: stretch; display: flex; align-items: center;
}
.pbgrowth-input-suffix span { border-right: none; border-left: 1px solid var(--pbg-border); }

.pbgrowth-input-prefix input,
.pbgrowth-input-suffix input,
.pbgrowth-input { width: 100%; padding: 10px 14px; font-size: 15px; border: none; outline: none; background: transparent; }
.pbgrowth-input { border: 1.5px solid var(--pbg-border); border-radius: 8px; }
.pbgrowth-input:focus { border-color: var(--pbg-brand); outline: none; }

/* Preset buttons */
.pbgrowth-preset-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pbgrowth-preset {
  flex: 1; min-width: 100px; padding: 12px 10px;
  background: var(--pbg-bg); border: 1.5px solid var(--pbg-border);
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
  line-height: 1.4; text-align: center; transition: all .18s;
}
.pbgrowth-preset span { display: block; font-size: 12px; font-weight: 400; color: var(--pbg-muted); margin-top: 2px; }
.pbgrowth-preset:hover { border-color: var(--pbg-brand); background: #EAF2FB; }
.pbgrowth-preset-active { border-color: var(--pbg-brand); background: #EAF2FB; color: var(--pbg-brand); }

/* Pro tag */
.pbgrowth-pro-tag {
  display: inline-block; background: var(--pbg-pro-light); color: var(--pbg-pro);
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  vertical-align: middle; margin-left: 4px;
}

/* Scenario grid */
.pbgrowth-scenario-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .pbgrowth-scenario-grid { grid-template-columns: 1fr; } }

.pbgrowth-scenario-col { padding: 16px; background: var(--pbg-bg); border-radius: 8px; }
.pbgrowth-scenario-label { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.pbgrowth-scenario-conservative .pbgrowth-scenario-label { color: #047857; }
.pbgrowth-scenario-base         .pbgrowth-scenario-label { color: var(--pbg-brand); }
.pbgrowth-scenario-aggressive   .pbgrowth-scenario-label { color: #DC2626; }

/* Sensitivity */
.pbgrowth-sensitivity-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.pbgrowth-sensitivity-input { max-width: 120px; }
.pbgrowth-sensitivity-result { font-weight: 700; font-size: 16px; color: var(--pbg-green); }

/* Primary button */
.pbgrowth-btn-primary {
  width: 100%; padding: 16px 24px;
  background: var(--pbg-brand); color: #fff;
  font-size: 16px; font-weight: 700;
  border: none; border-radius: 8px; cursor: pointer;
  transition: background .2s;
}
.pbgrowth-btn-primary:hover { background: var(--pbg-brand-dark); }
.pbgrowth-btn-ghost {
  background: none; border: 1.5px solid var(--pbg-border); color: var(--pbg-muted);
  padding: 10px 18px; border-radius: 8px; cursor: pointer; font-size: 14px;
  transition: border-color .2s;
}
.pbgrowth-btn-ghost:hover { border-color: var(--pbg-brand); color: var(--pbg-brand); }

.pbgrowth-disclaimer { font-size: 12px; color: var(--pbg-muted); text-align: center; margin-top: 12px; }

/* Capture */
.pbgrowth-capture-card { text-align: center; }
.pbgrowth-capture-icon { font-size: 48px; margin-bottom: 12px; }
.pbgrowth-capture-heading { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.pbgrowth-capture-sub { font-size: 15px; color: var(--pbg-muted); margin: 0 0 20px; }

.pbgrowth-preview-teaser { max-width: 380px; margin: 0 auto 24px; }
.pbgrowth-preview-row {
  display: flex; justify-content: space-between;
  padding: 10px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  background: var(--pbg-bg); margin-bottom: 6px;
}
.pbgrowth-blurred { filter: blur(5px); user-select: none; color: var(--pbg-muted); }

.pbgrowth-capture-form { display: flex; flex-direction: column; gap: 10px; max-width: 400px; margin: 0 auto; }
.pbgrowth-cap-privacy { font-size: 12px; color: var(--pbg-muted); margin: 0; }
.pbgrowth-capture-msg { padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; margin-top: 12px; }
.pbgrowth-capture-msg.success { background: #d4edda; color: #155724; }
.pbgrowth-capture-msg.error   { background: #f8d7da; color: #721c24; }

/* Results header */
.pbgrowth-results-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 12px; }
.pbgrowth-results-title { font-size: clamp(20px,3.5vw,26px); font-weight: 800; margin: 0 0 4px; }
.pbgrowth-results-sub { font-size: 14px; color: var(--pbg-muted); margin: 0; }

/* Metric cards */
.pbgrowth-metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 700px) { .pbgrowth-metric-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .pbgrowth-metric-grid { grid-template-columns: 1fr; } }

.pbgrowth-metric-card {
  background: var(--pbg-surface); border: 1px solid var(--pbg-border);
  border-radius: var(--pbg-radius); padding: 18px 16px;
  text-align: center; box-shadow: var(--pbg-shadow);
}
.pbgrowth-metric-primary { border-top: 4px solid var(--pbg-brand); }
.pbgrowth-metric-accent  { border-top: 4px solid var(--pbg-green); }

.pbgrowth-metric-label { font-size: 12px; font-weight: 600; color: var(--pbg-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pbgrowth-metric-val   { font-size: clamp(18px,2.5vw,24px); font-weight: 800; }
.pbgrowth-metric-sub   { font-size: 12px; color: var(--pbg-green); font-weight: 600; margin-top: 4px; }

/* Chart */
.pbgrowth-chart-card { }
.pbgrowth-chart-wrap { position: relative; height: 300px; }

/* Table */
.pbgrowth-table-wrap { overflow-x: auto; }
.pbgrowth-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pbgrowth-table th { text-align: right; padding: 10px 12px; background: var(--pbg-bg); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--pbg-muted); border-bottom: 2px solid var(--pbg-border); }
.pbgrowth-table th:first-child,
.pbgrowth-table td:first-child { text-align: left; }
.pbgrowth-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--pbg-border); }
.pbgrowth-table tr:last-child td { border-bottom: none; }
.pbgrowth-table tr:hover td { background: var(--pbg-bg); }
.pbgrowth-table tr.pbg-row-highlight td { background: #EAF2FB; font-weight: 700; }

.pbgrowth-col-conservative { color: #047857; }
.pbgrowth-col-base         { color: var(--pbg-brand); }
.pbgrowth-col-aggressive   { color: #DC2626; }

/* Sensitivity summary */
.pbgrowth-sensitivity-summary {
  background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: 8px; padding: 16px 20px;
  font-size: 15px; line-height: 1.6;
}

/* Export row */
.pbgrowth-export-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.pbgrowth-btn-export {
  padding: 11px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--pbg-brand); color: #fff; border: none; transition: background .2s;
}
.pbgrowth-btn-export:hover { background: var(--pbg-brand-dark); }
.pbgrowth-btn-secondary { background: var(--pbg-bg); color: var(--pbg-text); border: 1.5px solid var(--pbg-border); }
.pbgrowth-btn-secondary:hover { background: #fff; }

/* Share row (free) */
.pbgrowth-share-row { margin-bottom: 20px; }



/* CTA bridge */
.pbgrowth-cta-bridge {
  background: linear-gradient(135deg, #1A202C 0%, #2D3748 100%);
  border-radius: var(--pbg-radius); padding: 28px;
  color: #fff; margin-top: 20px;
}
.pbgrowth-cta-content { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.pbgrowth-cta-icon { font-size: 32px; flex-shrink: 0; }
.pbgrowth-cta-content strong { font-size: 17px; font-weight: 700; display: block; margin-bottom: 6px; }
.pbgrowth-cta-content p { font-size: 14px; color: #CBD5E0; margin: 0; line-height: 1.5; }
.pbgrowth-btn-cta {
  display: block; text-align: center;
  background: var(--pbg-brand); color: #fff;
  padding: 14px 24px; border-radius: 8px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: background .2s;
}
.pbgrowth-btn-cta:hover { background: var(--pbg-brand-dark); color: #fff; text-decoration: none; }

/* Tooltip */
.pbgrowth-tooltip-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; background: var(--pbg-muted); color: #fff;
  border-radius: 50%; font-size: 10px; font-weight: 700;
  cursor: pointer; margin-left: 4px; vertical-align: middle;
}
.pbgrowth-tooltip {
  position: fixed; z-index: 9999;
  background: #1A202C; color: #fff;
  font-size: 13px; line-height: 1.5;
  max-width: 260px; padding: 10px 14px;
  border-radius: 8px; pointer-events: none;
  display: none; box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

/* ── Phase 1.2 — Industry selector ──────────────────────────────────── */
.pbgrowth-select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--pbg-border); border-radius: 8px;
  font-size: 15px; font-family: inherit;
  background: #fff; color: var(--pbg-text);
  cursor: pointer; transition: border-color .2s;
  appearance: auto;
}
.pbgrowth-select:focus { border-color: var(--pbg-brand); outline: none; }

/* ── Phase 1.4 — Feasibility indicator ──────────────────────────────── */
.pbgrowth-feasibility {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--pbg-bg); border: 1px solid var(--pbg-border);
  margin: 12px 0 0; font-size: 13px;
}
.pbgrowth-feas-chip {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; border: 1px solid transparent;
  font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.pbgrowth-feas-note { color: var(--pbg-muted); line-height: 1.5; }

/* ── Phase 1.2 — Benchmark card ─────────────────────────────────────── */
.pbgrowth-benchmark-card { }
.pbgrowth-benchmark-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 500px) { .pbgrowth-benchmark-row { grid-template-columns: 1fr; } }

.pbgrowth-benchmark-item {
  background: var(--pbg-bg); border-radius: 8px; padding: 14px 16px;
  text-align: center;
}
.pbgrowth-benchmark-item.pbgrowth-benchmark-yours {
  background: #EAF2FB; border: 1.5px solid var(--pbg-brand);
}
.pbgrowth-benchmark-label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  color: var(--pbg-muted); margin-bottom: 6px;
}
.pbgrowth-benchmark-val {
  display: block; font-size: 20px; font-weight: 800; color: var(--pbg-text);
}
.pbgrowth-benchmark-status {
  display: block; font-size: 14px; font-weight: 700; margin-top: 4px;
}
.pbgrowth-bm-below { color: #D97706; }
.pbgrowth-bm-on    { color: #059669; }
.pbgrowth-bm-above { color: #2563EB; }
.pbgrowth-benchmark-note {
  font-size: 13px; color: var(--pbg-muted); line-height: 1.6;
  padding-top: 12px; border-top: 1px solid var(--pbg-border); margin: 0;
}

/* ── Phase 1.3 — Suite footer ────────────────────────────────────────── */
.pbgrowth-suite-footer {
  border-top: 1px solid var(--pbg-border);
  padding: 20px 0 0; margin: 8px 0 20px;
}
.pbgrowth-suite-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--pbg-muted); margin: 0 0 10px;
}
.pbgrowth-suite-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pbgrowth-suite-link {
  font-size: 13px; font-weight: 600;
  color: var(--pbg-brand); text-decoration: none;
  padding: 5px 12px; border: 1.5px solid var(--pbg-brand);
  border-radius: 20px; transition: all .18s;
}
.pbgrowth-suite-link:hover { background: var(--pbg-brand); color: #fff; text-decoration: none; }

/* ── Phase 2.1 — Plain-English summary card ─────────────────────────── */
.pbgrowth-summary-card {
  background: linear-gradient(135deg, #fff8f5 0%, #ffffff 100%);
  border-left: 4px solid var(--pbg-brand);
}
.pbgrowth-results-summary {
  font-size: 15px; line-height: 1.7; color: var(--pbg-text);
  margin: 0;
}
.pbgrowth-results-summary strong { color: var(--pbg-brand); }

/* ── Phase 2.2 — Cross-tool CTAs ────────────────────────────────────── */
.pbgrowth-cross-ctas {
  margin-bottom: 20px;
}
.pbgrowth-cross-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--pbg-muted); margin: 0 0 10px;
}
.pbgrowth-cross-links {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.pbgrowth-cross-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--pbg-surface); border: 1.5px solid var(--pbg-border);
  border-radius: 8px; padding: 12px 18px;
  font-size: 14px; font-weight: 600; color: var(--pbg-text);
  text-decoration: none; transition: all .18s; flex: 1; min-width: 220px;
}
.pbgrowth-cross-link:hover {
  border-color: var(--pbg-brand); color: var(--pbg-brand);
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,83,31,.12);
}
.pbgrowth-cross-icon { font-size: 18px; flex-shrink: 0; }

/* ── Phase 3.1 — Implied Valuation Bridge ───────────────────────────── */
.pbgrowth-valuation-bridge {
  background: linear-gradient(135deg, #1A202C 0%, #2D3748 100%);
  color: #fff;
  border: none;
}
.pbgrowth-bridge-header { margin-bottom: 20px; }
.pbgrowth-bridge-header .pbgrowth-section-heading { color: #fff; }
.pbgrowth-bridge-sub { font-size: 13px; color: #94A3B8; margin: 0; }

.pbgrowth-bridge-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 560px) { .pbgrowth-bridge-grid { grid-template-columns: 1fr; } }

.pbgrowth-bridge-col {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 18px 16px; text-align: center;
}
.pbgrowth-bridge-year {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #94A3B8; margin-bottom: 6px;
}
.pbgrowth-bridge-ebitda {
  font-size: 14px; font-weight: 600; color: #CBD5E0; margin-bottom: 4px;
}
.pbgrowth-bridge-mult {
  font-size: 11px; color: #64748B; margin-bottom: 10px;
}
.pbgrowth-bridge-range {
  font-size: 20px; font-weight: 800; color: #fff;
  line-height: 1.2;
}
.pbgrowth-bridge-disclaimer {
  font-size: 12px; color: #64748B; line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px;
}
.pbgrowth-bridge-disclaimer strong { color: #94A3B8; }
.pbgrowth-bridge-disclaimer a { color: var(--pbg-brand); text-decoration: none; }
.pbgrowth-bridge-disclaimer a:hover { text-decoration: underline; }

/* ── Phase 3.2 — Milestones ─────────────────────────────────────────── */
.pbgrowth-milestones-card { }
.pbgrowth-milestones-list { display: flex; flex-direction: column; gap: 10px; }
.pbgrowth-milestone-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; background: var(--pbg-bg);
  border-radius: 8px; border-left: 3px solid var(--pbg-brand);
}
.pbgrowth-milestone-icon {
  font-size: 22px; flex-shrink: 0; line-height: 1;
  min-width: 28px; text-align: center;
}
.pbgrowth-milestone-body { flex: 1; }
.pbgrowth-milestone-label {
  display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px;
}
.pbgrowth-milestone-note {
  font-size: 13px; color: var(--pbg-muted); margin: 0; line-height: 1.5;
}
.pbgrowth-milestone-note strong { color: var(--pbg-text); }
.pbgrowth-milestone-year {
  font-size: 12px; font-weight: 700; color: var(--pbg-brand);
  background: #EAF2FB; border: 1px solid var(--pbg-brand);
  border-radius: 20px; padding: 3px 10px;
  white-space: nowrap; flex-shrink: 0; align-self: center;
}

/* ── Phase 4.1 — Save & Compare ─────────────────────────────────────── */
.pbgrowth-btn-save-proj {
  background: #1A202C !important;
}
.pbgrowth-btn-save-proj:hover { background: #2D3748 !important; }

.pbgrowth-btn-sm { padding: 8px 14px !important; font-size: 13px !important; }
.pbgrowth-btn-danger-ghost { color: #DC2626 !important; border-color: #FCA5A5 !important; }
.pbgrowth-btn-danger-ghost:hover { border-color: #DC2626 !important; background: #FEF2F2 !important; }

.pbgrowth-saved-banner {
  background: #EFF6FF; border: 1.5px solid #BFDBFE;
  border-radius: var(--pbg-radius); padding: 16px 20px;
  margin-bottom: 16px; display: flex;
  align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.pbgrowth-saved-banner-body {
  display: flex; align-items: flex-start; gap: 12px; flex: 1;
}
.pbgrowth-saved-banner-icon { font-size: 22px; flex-shrink: 0; }
.pbgrowth-saved-banner-body strong { font-size: 14px; display: block; margin-bottom: 3px; }
.pbgrowth-saved-summary {
  font-size: 13px; color: var(--pbg-muted); margin: 0; line-height: 1.5;
}
.pbgrowth-saved-banner-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex-shrink: 0;
}

.pbgrowth-col-saved   { color: #2563EB; font-weight: 600; }
.pbgrowth-col-current { color: var(--pbg-brand); font-weight: 600; }
.pbgrowth-diff-up   { color: #059669; font-weight: 700; }
.pbgrowth-diff-down { color: #DC2626; font-weight: 700; }

.pbgrowth-actuals-row {
  display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px;
}
.pbgrowth-actuals-row .pbgrowth-field { flex: 1; min-width: 200px; }
.pbgrowth-actuals-result { }
.pbgrowth-actuals-summary {
  background: var(--pbg-bg); border-left: 4px solid;
  border-radius: 8px; padding: 14px 18px;
  font-size: 14px; line-height: 1.7; color: var(--pbg-text);
}
.pbgrowth-actuals-summary p { margin: 0 0 8px; }
.pbgrowth-actuals-summary p:last-child { margin-bottom: 0; }



/* ══ Free-Tier PeachBiz Branding Footer ════════════════════════════════════
 * Shown on free tier only. Hidden automatically when Pro is active.
 * Pro users: set pbgrowth_remove_branding option to true.
 * ════════════════════════════════════════════════════════════════════════ */
.pbgrowth-free-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #EAF2FB 0%, #F0F6FC 100%);
  border: 1px solid #C7DDEF;
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s;
}
.pbgrowth-free-brand:hover {
  background: linear-gradient(135deg, #DBEAFE 0%, #E8F3FC 100%);
  border-color: #93C5FD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44,95,138,.12);
}
.pbgrowth-free-brand-logo {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.pbgrowth-free-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.pbgrowth-free-brand-powered {
  font-size: 10px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}
.pbgrowth-free-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #2C5F8A;
  line-height: 1.2;
}
.pbgrowth-free-brand-arrow {
  margin-left: auto;
  font-size: 18px;
  color: #2C5F8A;
  opacity: .6;
  flex-shrink: 0;
}

/* ══ Phase 5.2 — Social Share Buttons ════════════════════════════════════════
 * Appears in results section after projection is calculated.
 * ═══════════════════════════════════════════════════════════════════════════ */
.pbgrowth-social-share {
  margin-bottom: 20px;
}

.pbgrowth-social-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pbg-muted);
  margin: 0 0 10px;
}

.pbgrowth-social-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pbgrowth-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: 1.5px solid var(--pbg-border);
  background: var(--pbg-surface);
  color: var(--pbg-text);
  transition: all .18s;
  line-height: 1;
}

.pbgrowth-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.pbgrowth-social-linkedin {
  border-color: #0A66C2;
  color: #0A66C2 !important;
}
.pbgrowth-social-linkedin:hover {
  background: #0A66C2;
  color: #fff !important;
}

.pbgrowth-social-twitter {
  border-color: #1A1A1A;
  color: #1A1A1A !important;
}
.pbgrowth-social-twitter:hover {
  background: #1A1A1A;
  color: #fff !important;
}

.pbgrowth-social-copy {
  border-color: var(--pbg-border);
  color: var(--pbg-muted) !important;
}
.pbgrowth-social-copy:hover {
  border-color: var(--pbg-brand);
  color: var(--pbg-brand) !important;
  background: #EAF2FB;
}

@media (max-width: 480px) {
  .pbgrowth-social-btns { flex-direction: column; }
  .pbgrowth-social-btn  { justify-content: center; }
}

/* ══ Phase 6 — Pro Feature Expansion Styles ══════════════════════════════════ */

/* ── 6.5 Target exit date ──────────────────────────────────────────────────── */
.pbgrowth-exit-required { margin-top: 12px; }
.pbgrowth-exit-req-inner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: 8px; font-size: 13px;
}
.pbgrowth-exit-req-ok   { background: #ECFDF5; border: 1px solid #A7F3D0; }
.pbgrowth-exit-req-hard { background: #FEF3E2; border: 1px solid #FDE68A; }
.pbgrowth-exit-req-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.pbgrowth-exit-req-inner strong { display: block; margin-bottom: 4px; color: var(--pbg-text); }
.pbgrowth-exit-req-inner p { margin: 0 0 4px; color: var(--pbg-muted); line-height: 1.5; }
.pbgrowth-exit-req-warn { color: #B45309 !important; font-weight: 600; }

/* ── 6.2 Save projection modal ─────────────────────────────────────────────── */
.pbgrowth-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pbgrowth-modal-inner {
  background: var(--pbg-surface); border-radius: 12px;
  padding: 28px; max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.pbgrowth-modal-title {
  font-size: 18px; font-weight: 800; color: var(--pbg-text); margin: 0 0 6px;
}
.pbgrowth-modal-sub {
  font-size: 13px; color: var(--pbg-muted); margin: 0 0 18px; line-height: 1.5;
}
.pbgrowth-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.pbgrowth-save-result {
  margin-top: 14px; padding: 12px 14px; border-radius: 7px;
  font-size: 13px; line-height: 1.6;
}
.pbgrowth-save-result a { color: var(--pbg-brand); }
.pbgrowth-save-ok    { background: #ECFDF5; color: #15803D; border: 1px solid #BBF7D0; }
.pbgrowth-save-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* ── 6.2 Projection history ────────────────────────────────────────────────── */
.pbgrowth-history-list { display: flex; flex-direction: column; gap: 0; }
.pbgrowth-history-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--pbg-border);
}
.pbgrowth-history-row:last-child { border-bottom: none; }
.pbgrowth-history-meta { flex: 1; min-width: 160px; }
.pbgrowth-history-meta strong { display: block; font-size: 13px; color: var(--pbg-text); }
.pbgrowth-history-date { font-size: 12px; color: var(--pbg-muted); }
.pbgrowth-history-actual {
  display: inline-block; background: #ECFDF5; color: #15803D;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  border: 1px solid #BBF7D0; margin-top: 3px;
}
.pbgrowth-history-vals { display: flex; gap: 14px; font-size: 13px; color: var(--pbg-muted); flex-wrap: wrap; }
.pbgrowth-history-vals strong { color: var(--pbg-text); }
.pbgrowth-history-rate { color: var(--pbg-brand); font-weight: 600; }
.pbgrowth-history-share { font-size: 12px; color: var(--pbg-brand); text-decoration: none; font-weight: 600; }
.pbgrowth-history-share:hover { text-decoration: underline; }

/* ══ Phase 8 — Revenue Input Mode ════════════════════════════════════════════ */

/* ── 8.1 EBITDA field + calculator toggle ──────────────────────────────────── */
.pbgrowth-calc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.pbgrowth-mode-toggle {
  background: none;
  border: 1px solid var(--pbg-brand);
  color: var(--pbg-brand);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.pbgrowth-mode-toggle:hover {
  background: var(--pbg-brand);
  color: #fff;
}

/* ── 8.1 Line-item builder card ─────────────────────────────────────────────── */
.pbgrowth-lineitem-card {
  background: linear-gradient( 135deg, #EAF2FB 0%, #F0F6FC 100% );
  border: 1px solid #C7DDEF;
  border-radius: var(--pbg-radius);
  padding: 0;
  margin-top: 12px;
  overflow: hidden;
}

.pbgrowth-lineitem-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(44,95,138,.06);
  border-bottom: 1px solid #C7DDEF;
}
.pbgrowth-lineitem-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.pbgrowth-lineitem-header strong { display: block; font-size: 14px; color: var(--pbg-text); margin-bottom: 2px; }
.pbgrowth-lineitem-header p { margin: 0; font-size: 12px; color: var(--pbg-muted); }

.pbgrowth-lineitem-grid {
  padding: 12px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pbgrowth-lineitem-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(44,95,138,.1);
  flex-wrap: wrap;
}
.pbgrowth-lineitem-row:last-child { border-bottom: none; }
.pbgrowth-lineitem-row--addback { opacity: .85; }

.pbgrowth-li-label {
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pbg-text);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.pbgrowth-li-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pbgrowth-li-dot--revenue { background: #2C5F8A; }
.pbgrowth-li-dot--cogs    { background: #E74C3C; }
.pbgrowth-li-dot--opex    { background: #F4A623; }
.pbgrowth-li-dot--addback { background: #27AE60; }

/* Compact input for line-item rows */
.pbgrowth-input-prefix--sm {
  width: 180px;
  flex-shrink: 0;
}
.pbgrowth-input-prefix--sm input {
  padding: 7px 10px !important;
  font-size: 13px !important;
}

/* ── 8.1 Line-item result block ─────────────────────────────────────────────── */
.pbgrowth-li-result {
  margin: 12px 20px 16px;
  background: #fff;
  border: 1px solid #C7DDEF;
  border-radius: 8px;
  padding: 14px 18px;
}
.pbgrowth-li-formula-hint {
  font-size: 13px;
  color: var(--pbg-muted);
  margin: 0;
  text-align: center;
  padding: 6px 0;
}
.pbgrowth-li-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--pbg-border);
  font-size: 14px;
}
.pbgrowth-li-result-row:last-of-type { border-bottom: none; }
.pbgrowth-li-result-row span { color: var(--pbg-muted); }
.pbgrowth-li-result-row strong { font-size: 18px; font-weight: 800; }
.pbgrowth-li-result-row--margin strong { font-size: 15px; }

.pbgrowth-btn-use-ebitda {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--pbg-brand);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.pbgrowth-btn-use-ebitda:hover {
  background: var(--pbg-brand-dark);
  transform: translateY(-1px);
}

/* ── 8.2 Margin trend card ──────────────────────────────────────────────────── */
.pbgrowth-margin-trend-card { }
.pbgrowth-section-badge {
  display: inline-block;
  background: #EAF2FB;
  color: var(--pbg-brand);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #C7DDEF;
  vertical-align: middle;
  margin-left: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.pbgrowth-margin-table th:nth-child(4),
.pbgrowth-margin-table td:nth-child(4) { font-weight: 700; }

/* ── 8.3 Margin impact hint ─────────────────────────────────────────────────── */
.pbgrowth-margin-impact-hint {
  background: #FEF3E2;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400E;
  line-height: 1.6;
  margin-bottom: 16px;
}
.pbgrowth-margin-impact-hint strong { color: #1A202C; }

@media (max-width: 600px) {
  .pbgrowth-calc-toggle-row { flex-direction: column; align-items: flex-start; }
  .pbgrowth-lineitem-row    { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pbgrowth-input-prefix--sm { width: 100%; }
}

/* ── Cross-tool CTAs ─────────────────────────────────────────────────────── */
.pbgrowth-cross-ctas {
  margin-bottom: 20px;
}
.pbgrowth-cross-ctas-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--pbg-muted);
  margin: 0 0 10px;
}
.pbgrowth-cross-ctas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pbgrowth-cross-cta-btn {
  display: inline-block;
  padding: 9px 16px;
  background: var(--pbg-surface);
  border: 1.5px solid var(--pbg-border);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pbg-brand);
  text-decoration: none;
  transition: all .15s;
}
.pbgrowth-cross-cta-btn:hover {
  background: var(--pbg-brand);
  color: #fff;
  border-color: var(--pbg-brand);
  transform: translateY(-1px);
}

/* ── Dynamic capture form fields ─────────────────────────────────────────── */
.pbg-capture-field-wrap {
  width: 100%;
  margin-bottom: 10px;
}
.pbg-capture-field-wrap input {
  width: 100%;
  box-sizing: border-box;
}
/* Phone field gets a slightly monospaced feel */
.pbg-capture-field-wrap input[type="tel"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", monospace;
  letter-spacing: .04em;
}

/* ── Newsletter opt-in checkbox in capture form ─────────────────────────── */
.pbg-capture-field-wrap--checkbox {
  margin: 6px 0 14px;
}

.pbg-capture-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  background: #F0F7FF;
  border: 1.5px solid #BFDBFE;
  border-radius: 8px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
}
.pbg-capture-checkbox-label:hover {
  border-color: var(--pbg-brand);
  background: #EAF2FB;
  box-shadow: 0 0 0 3px rgba(44,95,138,.08);
}

/* Hide native checkbox — we use our custom visual */
.pbg-capture-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom checkmark box */
.pbg-checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #93C5FD;
  border-radius: 5px;
  background: #fff;
  margin-top: 1px;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* When the real checkbox is checked, style the custom box */
.pbg-capture-checkbox:checked ~ .pbg-checkbox-custom {
  background: var(--pbg-brand, #2C5F8A);
  border-color: var(--pbg-brand, #2C5F8A);
}
.pbg-capture-checkbox:checked ~ .pbg-checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.pbg-capture-checkbox-label:hover .pbg-checkbox-custom {
  border-color: var(--pbg-brand, #2C5F8A);
}

/* Text column */
.pbg-checkbox-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pbg-checkbox-label-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--pbg-text, #1E2838);
  line-height: 1.4;
}
.pbg-checkbox-disclaimer {
  font-size: 11px;
  color: var(--pbg-muted, #64748B);
  line-height: 1.55;
  font-weight: 400;
}

/* ── Phone autofill detection keyframe ──────────────────────────────────── */
/* Some browsers (Chrome) animate autofilled fields — we use this to detect  */
/* autofill and reformat the phone number immediately when it fires.          */
@keyframes pbgOnAutoFill {
  from { background-color: transparent; }
  to   { background-color: transparent; }
}
input[type="tel"]:-webkit-autofill {
  animation-name: pbgOnAutoFill;
  animation-duration: 1ms;
}
