/* =============================================================
   Dirt Sites — Free Proposal Builder
   ============================================================= */

/* ---------- Landing ---------- */
.pb-eyebrow {
  display: inline-block;
  font-family: var(--font-headline);
  letter-spacing: 2px;
  font-size: 14px;
  color: var(--yellow-accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.pb-hero {
  padding: 150px 0 80px;
  background: radial-gradient(1100px 520px at 80% -200px, rgba(242,197,0,0.10), transparent 60%), var(--bg-almost-black);
  text-align: left;
}
.pb-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 48px;
  align-items: center;
}
.pb-hero-copy { max-width: 640px; }
.pb-hero-h1 {
  font-family: var(--font-headline);
  font-size: clamp(46px, 6vw, 76px);
  line-height: 0.95;
  color: var(--text-light-primary);
  letter-spacing: 1px;
  margin: 0 0 22px;
}
.pb-hero-lead, .pb-hero-sub {
  max-width: 600px;
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-light-secondary);
}
.pb-hero-note {
  font-weight: 700;
  color: var(--text-light-primary);
  margin: 6px 0 26px;
}
.pb-hero-cta { margin: 28px 0; }
.pb-hero-support {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* Hero proposal preview */
.pb-hero-visual {
  display: flex;
  justify-content: center;
}
.pb-hero-doc {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 5px;
  padding: 34px 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.05);
  width: 100%;
  max-width: 440px;
  transform: rotate(-1deg);
  font-family: 'Instrument Sans', Arial, sans-serif;
}
.pb-hero-doc .pb-doc {
  font-size: 11px;
  line-height: 1.5;
}
.pb-hero-doc .pb-doc-header {
  border-bottom: 3px solid var(--yellow-accent);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.pb-hero-doc .pb-doc-company {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pb-hero-doc-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #B8860B;
  font-weight: 700;
  margin-bottom: 4px;
}
.pb-hero-doc .pb-doc-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  margin: 0;
}
.pb-hero-doc .pb-doc-parties {
  display: flex;
  gap: 28px;
  margin-bottom: 16px;
}
.pb-hero-doc .pb-doc-party-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  font-weight: 700;
}
.pb-hero-doc .pb-doc-party { font-size: 11px; }
.pb-hero-doc .pb-doc-section { margin-bottom: 15px; }
.pb-hero-doc .pb-doc-h2 {
  font-size: 11px;
  font-weight: 800;
  color: var(--yellow-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 3px;
  margin: 0 0 7px;
}
.pb-hero-doc .pb-doc-p { font-size: 11px; margin: 0 0 6px; }
.pb-hero-doc .pb-doc-ul { margin: 0; padding-left: 16px; }
.pb-hero-doc .pb-doc-ul li { font-size: 11px; margin-bottom: 4px; }
.pb-doc-invest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--yellow-accent);
  padding-top: 8px;
  font-weight: 800;
  font-size: 13px;
}

.pb-h2 {
  font-family: var(--font-headline);
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 1px;
  color: var(--text-light-primary);
  margin: 0 0 16px;
  line-height: 1.05;
}
.pb-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-light-secondary);
  max-width: 720px;
}

.pb-how, .pb-benefits, .pb-sample, .pb-optional, .pb-privacy, .pb-final-cta {
  padding: 80px 0;
}
.pb-how { background: var(--bg-black-panel); }
.pb-benefits { background: var(--bg-almost-black); }
.pb-sample { background: var(--bg-almost-black); }
.pb-optional { background: var(--bg-black-panel); }
.pb-privacy { background: var(--bg-almost-black); }
.pb-final-cta { background: radial-gradient(1000px 500px at 50% 100%, rgba(242,197,0,0.08), transparent 60%), var(--bg-black-panel); text-align: center; }

.pb-narrow { max-width: 800px; margin: 0 auto; }

.pb-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
  align-items: stretch;
}
.pb-step {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: left;
}
.pb-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--yellow-accent);
  color: var(--bg-almost-black);
  font-family: var(--font-headline);
  font-size: 20px;
  flex: 0 0 auto;
  margin-bottom: 16px;
}
.pb-step-title {
  font-family: var(--font-headline);
  font-size: 23px;
  letter-spacing: 0.5px;
  color: var(--text-light-primary);
  margin: 0 0 12px;
}
.pb-step p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-light-secondary);
  margin: 0 0 12px;
}
.pb-step p:last-child { margin-bottom: 0; }
.pb-step-note { font-size: 15px; color: var(--text-muted); margin-top: auto; }

.pb-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  align-items: stretch;
}
.pb-benefit {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.pb-benefit-title {
  font-family: var(--font-headline);
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--yellow-accent);
  margin: 0 0 12px;
  line-height: 1.12;
}
.pb-benefit p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-light-secondary);
  margin: 0;
}

.pb-optional-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.pb-optional-copy .pb-h2 { text-align: left; }
.pb-optional-copy .pb-lead { margin: 0 0 14px; }
.pb-optional-copy .pb-lead:last-child { margin-bottom: 0; }
.pb-privacy .pb-h2 { text-align: center; }
.pb-privacy .pb-lead { margin: 0 auto 14px; text-align: center; }
.pb-privacy .pb-lead:last-child { margin-bottom: 0; }

/* Mini questionnaire demonstration */
.pb-optional-visual { display: flex; justify-content: center; }
.pb-qdemo {
  width: 100%;
  max-width: 460px;
  background: var(--bg-almost-black);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.pb-qdemo-head {
  font-family: var(--font-headline);
  font-size: 21px;
  letter-spacing: 0.5px;
  color: var(--text-light-primary);
  margin-bottom: 16px;
}
.pb-qdemo-field { margin-bottom: 16px; }
.pb-qdemo-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 16px;
  letter-spacing: 0.4px;
  color: var(--text-light-primary);
  margin-bottom: 6px;
}
.pb-qdemo-value {
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-light-secondary);
}
.pb-qdemo-select { color: var(--text-light-primary); }
.pb-qdemo-details {
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-sm);
  background: var(--bg-black-card);
  margin-bottom: 14px;
}
.pb-qdemo-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-family: var(--font-headline);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--yellow-accent);
  text-transform: uppercase;
}
.pb-qdemo-details summary::-webkit-details-marker { display: none; }
.pb-qdemo-details summary::before {
  content: '\f0fe';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
  color: var(--yellow-accent);
}
.pb-qdemo-details[open] summary::before { content: '\f146'; }
.pb-qdemo-detail-items { padding: 0 14px 12px; }
.pb-qdemo-detail-items div {
  padding: 9px 0;
  border-top: 1px solid var(--steel-border);
  font-size: 14px;
  color: var(--text-light-secondary);
}
.pb-qdemo-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.pb-final-cta .pb-h2, .pb-final-cta .pb-lead { margin-left: auto; margin-right: auto; }
.pb-final-cta .pb-hero-cta { margin: 34px 0 10px; }
.pb-attribution { font-size: 15px; color: var(--text-muted); margin-top: 28px; }
.pb-attribution a { color: var(--yellow-accent); text-decoration: none; }
.pb-attribution a:hover { text-decoration: underline; }

/* ---------- Sample proposal section ---------- */
.pb-sample-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}
.pb-sample-copy .pb-lead { margin: 0 0 14px; }
.pb-sample-copy .pb-lead:last-of-type { margin-bottom: 0; }
.pb-sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}
.pb-sample-label {
  font-family: var(--font-headline);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--yellow-accent);
  text-transform: uppercase;
}
.pb-sample-visual { display: flex; justify-content: center; }
.pb-sample-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
}
.pb-sample-page {
  max-height: 620px;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  padding: 48px 44px;
  font-size: 12px;
}
.pb-sample-frame-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff 85%);
  border-radius: 0 0 5px 5px;
}

/* ---------- Sample modal ---------- */
body.pb-modal-open { overflow: hidden; }
.pb-sample-modal {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  display: none;
  align-items: center;
  justify-content: center;
}
.pb-sample-modal.open { display: flex; }
.pb-sample-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}
.pb-sample-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  margin: 0 16px;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pb-sample-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--steel-border);
  background: var(--bg-black-card);
  flex-wrap: wrap;
}
.pb-sample-topbar-actions { display: flex; gap: 8px; }
.pb-sample-scroll {
  overflow-y: auto;
  padding: 24px;
  background: #2a2824;
}
.pb-sample-scroll .pb-page {
  margin: 0 auto;
  max-width: 816px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.45);
}

/* ---------- App shell ---------- */
.pb-shell {
  min-height: 70vh;
  padding: 130px 0 80px;
  background: var(--bg-almost-black);
}
.pb-shell .container { max-width: 1100px; }
#pb-app { background: var(--bg-almost-black); }
.pb-shell { padding-left: 24px; padding-right: 24px; max-width: 1080px; margin: 0 auto; }

.pb-app-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.pb-app-title { margin-bottom: 26px; }
.pb-app-h1 {
  font-family: var(--font-headline);
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 1px;
  color: var(--text-light-primary);
  margin: 6px 0 8px;
  line-height: 1.05;
}
.pb-app-sub { font-size: 16px; color: var(--text-light-secondary); max-width: 720px; margin: 0; }

.pb-link, .pb-btn-ghost {
  background: none;
  border: none;
  color: var(--text-light-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.pb-link:hover, .pb-btn-ghost:hover { color: var(--yellow-accent); }

.pb-panel {
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* Buttons */
.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-headline);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 46px;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
}
.pb-btn-primary {
  background: var(--yellow-accent);
  color: var(--bg-almost-black);
  font-weight: 700;
}
.pb-btn-primary:hover { background: var(--yellow-dark); transform: translateY(-1px); }
.pb-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.pb-btn-ghost {
  background: transparent;
  color: var(--text-light-primary);
  border-color: var(--steel-border);
}
.pb-btn-ghost:hover { border-color: var(--yellow-accent); color: var(--yellow-accent); }
.pb-btn-outline {
  background: transparent;
  color: var(--text-light-primary);
  border-color: var(--steel-border);
}
.pb-btn-outline:hover { border-color: var(--yellow-accent); color: var(--yellow-accent); }
.pb-btn-sm { padding: 8px 14px; font-size: 13px; min-height: 34px; }

.pb-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.pb-row-spacer { flex: 1; }
.pb-draft-actions { display: flex; gap: 8px; }

/* Demo / testing bar */
.pb-demo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 20px;
  background: rgba(242,197,0,0.06);
  border: 1px dashed var(--steel-border-gold);
  border-radius: var(--radius-md);
}
.pb-demo-badge {
  font-family: var(--font-headline);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--bg-almost-black);
  background: var(--yellow-accent);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* Category grid */
.pb-field-label {
  display: block;
  font-family: var(--font-headline);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text-light-primary);
  margin-bottom: 8px;
}
.pb-field-helper { font-size: 14px; color: var(--text-muted); margin: 0 0 18px; }
.pb-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 6px 0 22px;
}
.pb-cat {
  padding: 16px 18px;
  text-align: left;
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-md);
  color: var(--text-light-primary);
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pb-cat:hover { border-color: var(--steel-border-gold); }
.pb-cat.selected { border-color: var(--yellow-accent); background: rgba(242,197,0,0.08); color: var(--yellow-accent); }

/* Progress */
.pb-progress { margin-bottom: 20px; }
.pb-progress-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.pb-progress-track { height: 6px; background: var(--bg-black-card); border-radius: 3px; overflow: hidden; }
.pb-progress-fill { height: 100%; background: var(--yellow-accent); border-radius: 3px; transition: width 0.25s ease; }

/* Wizard grid */
.pb-wizard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.pb-section-nav {
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 10px;
  position: sticky;
  top: 90px;
}
.pb-section-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  color: var(--text-light-secondary);
  font-family: var(--font-body);
  font-size: 14px;
}
.pb-section-item:hover { background: var(--bg-black-card); }
.pb-section-item.current { background: var(--bg-black-card); color: var(--text-light-primary); }
.pb-section-dot {
  flex: 0 0 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  font-family: var(--font-headline);
  font-size: 13px;
  color: var(--text-muted);
}
.pb-section-dot.done { background: var(--yellow-accent); border-color: var(--yellow-accent); color: var(--bg-almost-black); }

.pb-section-body {
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.pb-section-heading {
  font-family: var(--font-headline);
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--text-light-primary);
  margin: 0 0 8px;
}
.pb-section-intro { font-size: 15px; color: var(--text-light-secondary); line-height: 1.55; margin: 0 0 20px; }

/* Questions */
.pb-question {
  border: none;
  border-bottom: 1px solid var(--steel-border);
  padding: 0 0 22px;
  margin: 0 0 22px;
}
.pb-question:last-child { border-bottom: none; margin-bottom: 0; }
.pb-q-label {
  font-family: var(--font-headline);
  font-size: 19px;
  letter-spacing: 0.4px;
  color: var(--text-light-primary);
  padding: 0;
  margin-bottom: 6px;
  display: block;
}
.pb-q-helper { font-size: 14px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.45; }

.pb-input {
  width: 100%;
  background: var(--bg-almost-black);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-sm);
  color: var(--text-light-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.pb-input:focus { outline: none; border-color: var(--yellow-accent); }
.pb-textarea { resize: vertical; line-height: 1.5; }
.pb-textarea-lg { min-height: 120px; }

.pb-mini-label {
  display: block;
  font-size: 13px;
  color: var(--text-light-secondary);
  margin: 0 0 5px;
}
.pb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pb-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.pb-mt-8 { margin-top: 8px; }

.pb-field-note { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; line-height: 1.45; }
.pb-field-note-important {
  color: var(--yellow-accent);
  background: rgba(242,197,0,0.08);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--yellow-accent);
}

.pb-check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-almost-black);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-light-primary);
}
.pb-check input { accent-color: var(--yellow-accent); width: 16px; height: 16px; }
.pb-check:has(input:checked) { border-color: var(--yellow-accent); }

/* Line items (pricing / upgrades) */
.pb-line-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pb-line-row {
  display: grid;
  grid-template-columns: 2fr 0.7fr 0.7fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.pb-upgrade-row { grid-template-columns: 1fr 0.7fr auto; }
.pb-line-total { font-weight: 700; color: var(--yellow-accent); font-size: 14px; white-space: nowrap; }
.pb-line-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
}
.pb-line-remove:hover { color: #e06a5a; }
.pb-input-group { display: flex; gap: 8px; }
.pb-select-inline { width: auto; flex: 0 0 auto; }

/* Readiness */
.pb-readiness {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
}
.pb-readiness-ring {
  --pct: 0;
  width: 96px; height: 96px;
  flex: 0 0 96px;
  border-radius: 50%;
  background: conic-gradient(var(--yellow-accent) calc(var(--pct) * 1%), var(--bg-black-card) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pb-readiness-ring span {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--bg-black-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 22px;
  color: var(--yellow-accent);
}
.pb-readiness-title { font-family: var(--font-headline); font-size: 24px; color: var(--text-light-primary); margin: 0 0 6px; }
.pb-readiness-sub { font-size: 15px; color: var(--text-light-secondary); margin: 0; }

.pb-summary { margin-bottom: 22px; }
.pb-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-bottom: none;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text-light-primary);
  font-family: var(--font-body);
  font-size: 15px;
}
.pb-summary-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.pb-summary-row:last-child { border-bottom: 1px solid var(--steel-border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pb-summary-row:hover { background: var(--bg-black-card); }
.pb-summary-name { flex: 1; }
.pb-summary-status { font-size: 13px; }
.pb-summary-status.ok { color: #7dbf8a; }
.pb-summary-status.empty { color: var(--text-muted); }

.pb-recommendations { margin-bottom: 22px; }
.pb-rec-heading { font-family: var(--font-headline); font-size: 22px; color: var(--text-light-primary); margin: 0 0 14px; }
.pb-rec-item {
  display: flex;
  gap: 14px;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}
.pb-rec-item i { color: var(--yellow-accent); font-size: 18px; margin-top: 2px; }
.pb-rec-item strong { color: var(--text-light-primary); }
.pb-rec-item p { font-size: 14px; color: var(--text-light-secondary); margin: 4px 0 0; line-height: 1.5; }

.pb-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
}
.pb-alert-error { background: rgba(224,106,90,0.12); border: 1px solid rgba(224,106,90,0.4); color: #f2b8b0; }
.pb-alert-info { background: rgba(242,197,0,0.08); border: 1px solid rgba(242,197,0,0.3); color: var(--text-light-secondary); }
.pb-alert-warn { background: rgba(242,197,0,0.08); border: 1px solid rgba(242,197,0,0.3); color: var(--text-light-secondary); }
.pb-alert .pb-btn { margin-left: auto; flex: 0 0 auto; }

/* Handoff */
.pb-handoff-grid { display: flex; flex-direction: column; gap: 18px; }
.pb-handoff-step {
  display: flex;
  gap: 16px;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.pb-handoff-step .pb-step-num { flex: 0 0 auto; }
.pb-step-title { font-family: var(--font-headline); font-size: 22px; color: var(--text-light-primary); margin: 0 0 8px; }
.pb-handoff-step p { font-size: 15px; color: var(--text-light-secondary); line-height: 1.55; margin: 0 0 12px; }
.pb-copied { color: #7dbf8a; font-size: 14px; margin-left: 12px; }

/* Instruction block (copyable reference text) */
.pb-instruction {
  background: var(--bg-almost-black);
  border: 1px dashed var(--steel-border-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-light-secondary);
  margin: 0 0 12px;
  word-break: break-word;
}
.pb-attachment-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--steel-border);
}
.pb-attachment-title { margin-top: 14px; }
.pb-handoff-help {
  margin-top: 22px;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.pb-handoff-help p { font-size: 15px; color: var(--text-light-secondary); line-height: 1.55; margin: 0 0 12px; }

.pb-import-error-box {
  background: rgba(224,106,90,0.12);
  border: 1px solid rgba(224,106,90,0.4);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
}
.pb-import-error-title { font-family: var(--font-headline); font-size: 22px; color: #f2b8b0; margin: 0 0 8px; }
.pb-import-error-body { color: var(--text-light-secondary); margin: 0 0 14px; line-height: 1.55; }
.pb-import-error-box .pb-instruction { background: rgba(0,0,0,0.25); border-color: rgba(224,106,90,0.4); }

/* Editor */
.pb-editor-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--steel-border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  font-family: var(--font-headline);
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.pb-tab.active { color: var(--yellow-accent); border-bottom-color: var(--yellow-accent); }
.pb-editor-panel { background: var(--bg-black-panel); border: 1px solid var(--steel-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.pb-editor-heading { font-family: var(--font-headline); font-size: 24px; color: var(--text-light-primary); margin: 0 0 16px; }
.pb-editor-note { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }
.pb-fin-subheading { font-family: var(--font-headline); font-size: 19px; color: var(--yellow-accent); margin: 22px 0 10px; letter-spacing: 0.5px; }

.pb-logo-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.pb-logo-preview { max-width: 120px; max-height: 90px; background: #fff; border-radius: var(--radius-sm); padding: 6px; }
.pb-logo-empty {
  width: 120px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--steel-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.pb-logo-actions { display: flex; flex-direction: column; gap: 8px; }
.pb-color-row { display: flex; gap: 8px; align-items: center; }
.pb-color { width: 46px; height: 46px; border: none; border-radius: var(--radius-sm); background: none; cursor: pointer; padding: 0; }

.pb-content-section { border: 1px solid var(--steel-border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 14px; }
.pb-content-section-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pb-content-heading { flex: 1; font-weight: 700; }
.pb-content-hidden-note { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 10px; }

.pb-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pb-switch input { display: none; }
.pb-switch-slider {
  width: 38px; height: 20px;
  background: var(--steel-border);
  border-radius: 10px;
  position: relative;
  transition: background 0.15s ease;
}
.pb-switch-slider::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: left 0.15s ease;
}
.pb-switch input:checked + .pb-switch-slider { background: var(--yellow-accent); }
.pb-switch input:checked + .pb-switch-slider::after { left: 20px; }
.pb-switch-label { font-size: 13px; color: var(--text-muted); }

.pb-scope-items, .pb-item-list, .pb-para-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pb-scope-item { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: start; }
.pb-list-item { display: flex; gap: 8px; align-items: center; }
.pb-para-item { display: flex; gap: 8px; align-items: flex-start; }
.pb-para-item .pb-textarea { flex: 1; }

.pb-pricing-summary { margin-bottom: 16px; }
.pb-fin-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(51,47,40,0.5);
  font-size: 14px;
  color: var(--text-light-secondary);
}
.pb-fin-row span:last-child { white-space: nowrap; }
.pb-fin-note span:last-child { color: var(--text-muted); white-space: normal; text-align: right; }
.pb-fin-totals { background: var(--bg-almost-black); border-radius: var(--radius-md); padding: 12px 16px; margin-top: 14px; }
.pb-fin-row.pb-fin-total { border-bottom: none; font-weight: 700; color: var(--text-light-primary); font-size: 16px; }

/* Drafts */
.pb-draft-actions-row { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.pb-draft-list { display: flex; flex-direction: column; gap: 12px; }
.pb-draft-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-black-panel);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.pb-draft-card-info { display: flex; flex-direction: column; gap: 4px; }
.pb-draft-card-info strong { color: var(--text-light-primary); }
.pb-draft-card-info span { font-size: 13px; color: var(--text-muted); }
.pb-draft-card-actions { display: flex; gap: 8px; }
.pb-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  background: var(--bg-black-panel);
  border: 1px dashed var(--steel-border);
  border-radius: var(--radius-lg);
}

/* Preview */
.pb-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pb-zoom { display: flex; align-items: center; gap: 8px; }
.pb-zoom span { color: var(--text-muted); font-size: 14px; min-width: 42px; text-align: center; }
.pb-preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pb-preview-canvas {
  background: #2a2824;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  overflow: auto;
}
.pb-page {
  background: #ffffff;
  color: #1a1a1a;
  max-width: 816px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 56px 60px;
  box-sizing: border-box;
  transform-origin: top center;
}

/* =============================================================
   Proposal document (on-screen + print)
   ============================================================= */
.pb-doc { font-family: 'Instrument Sans', Arial, sans-serif; font-size: 13px; line-height: 1.6; color: #1a1a1a; }

/* First page cover */
.pb-doc-cover { border-bottom: 3px solid var(--accent, #F2C500); padding-bottom: 20px; margin-bottom: 22px; }
.pb-doc-logo { max-height: 64px; max-width: 220px; margin-bottom: 12px; object-fit: contain; }
.pb-doc-company { font-size: 21px; font-weight: 800; color: #1a1a1a; margin-bottom: 2px; }
.pb-doc-company-contact { font-size: 11.5px; color: #555; margin-bottom: 14px; }
.pb-doc-label { font-size: 10px; text-transform: uppercase; letter-spacing: 3px; color: #888; font-weight: 800; margin-bottom: 6px; }
.pb-doc-title { font-size: 26px; font-weight: 800; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.3px; color: #1a1a1a; }
.pb-doc-parties { display: flex; flex-wrap: wrap; gap: 28px; }
.pb-doc-party-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: #999; font-weight: 800; display: block; margin-bottom: 2px; }
.pb-doc-party { font-size: 13px; }

/* Investment summary */
.pb-doc-invest-box { border: 1px solid #e2e2e2; border-left: 4px solid var(--accent, #F2C500); border-radius: 4px; padding: 14px 18px; margin: 0 0 20px; }
.pb-doc-invest-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #888; font-weight: 800; }
.pb-doc-invest-amt { display: block; font-size: 26px; font-weight: 800; color: #1a1a1a; line-height: 1.15; }
.pb-doc-invest-note { display: block; font-size: 11px; color: #777; margin-top: 4px; }

/* Highlights */
.pb-doc-highlights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; }
.pb-doc-highlights li { position: relative; padding-left: 16px; margin-bottom: 4px; }
.pb-doc-highlights li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, #F2C500); }

/* Credibility */
.pb-doc-cred { border-left: 3px solid var(--accent, #F2C500); padding: 6px 14px; margin: 18px 0 0; color: #444; }
.pb-doc-cred .pb-doc-p { margin: 0; }

/* Sections */
.pb-doc-section { margin-bottom: 18px; }
.pb-doc-h2 { font-size: 15px; font-weight: 800; color: #1a1a1a; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--accent, #F2C500); padding-bottom: 5px; margin: 0 0 10px; }
.pb-doc-h3 { font-size: 12px; font-weight: 700; margin: 0 0 4px; color: #333; }
.pb-doc-p { margin: 0 0 9px; }
.pb-doc-ul { margin: 0 0 10px; padding-left: 20px; }
.pb-doc-ul li { margin-bottom: 4px; }
.pb-doc-note { font-size: 12px; color: #666; }

/* Scope */
.pb-doc-scope-intro { color: #444; }
.pb-doc-scope { margin: 0 0 10px; padding-left: 22px; }
.pb-doc-scope > li { margin-bottom: 12px; padding-left: 4px; }
.pb-doc-scope-title { font-weight: 700; margin-bottom: 2px; }

/* Tables */
.pb-doc-table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.pb-doc-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: #666; font-weight: 800; text-align: left; padding: 6px 10px; border-bottom: 2px solid #d5d5d5; }
.pb-doc-table td { padding: 8px 10px; border-bottom: 1px solid #ececec; font-size: 12.5px; vertical-align: top; }
.pb-doc-table tr { break-inside: avoid; }
.pb-num { text-align: right; white-space: nowrap; }

/* Pricing total */
.pb-doc-total { display: flex; justify-content: space-between; align-items: center; border-top: 3px solid var(--accent, #F2C500); padding-top: 10px; margin-top: 4px; }
.pb-doc-total-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; color: #333; }
.pb-doc-total-amt { font-size: 18px; font-weight: 800; color: #1a1a1a; }
.pb-onetime td, .pb-adjust td { color: #666; }

/* Payment schedule */
.pb-payment-methods { margin-top: 8px; }

/* Terms */
.pb-doc-term { margin-bottom: 12px; }
.pb-doc-term .pb-doc-h3 { text-transform: none; color: #333; }

/* Validity */
.pb-doc-meta-rows { border: 1px solid #e2e2e2; border-radius: 4px; max-width: 420px; }
.pb-doc-meta-row { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid #ececec; font-size: 12.5px; }
.pb-doc-meta-row:last-child { border-bottom: none; }
.pb-doc-meta-row span:first-child { color: #777; }

/* Signature */
.pb-acceptance { break-inside: avoid; }
.pb-sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 22px; }
.pb-sign-line span { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: #888; font-weight: 700; }
.pb-sign-blank { border-bottom: 1px solid #888; height: 32px; margin-top: 6px; }

/* Footer */
.pb-doc-footer { margin-top: 16px; padding-top: 8px; border-top: 1px solid #e2e2e2; font-size: 10px; color: #999; text-align: center; }
.pb-doc-footer a { color: #999; text-decoration: none; }

/* Document style variants */
.pb-doc-clean-simple { font-size: 12px; }
.pb-doc-clean-simple .pb-doc-h2 { text-transform: none; letter-spacing: 0; border-bottom: 1px solid #e2e2e2; }
.pb-doc-classic-professional { font-family: 'DM Sans', Georgia, serif; }
.pb-doc-classic-professional .pb-doc-h2 { border-bottom: 1px solid #333; color: #1a1a1a; }

/* Toast */
.pb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-black-card);
  border: 1px solid var(--steel-border);
  color: var(--text-light-primary);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.pb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pb-toast.success { border-color: #7dbf8a; }
.pb-toast.error { border-color: #e06a5a; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pb-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .pb-hero-copy { max-width: 720px; }
  .pb-hero-visual { justify-content: flex-start; }
  .pb-sample-grid { grid-template-columns: 1fr; gap: 40px; }
  .pb-optional-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 900px) {
  .pb-steps { grid-template-columns: repeat(2, 1fr); }
  .pb-benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .pb-wizard-grid { grid-template-columns: 1fr; }
  .pb-section-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .pb-section-item { width: auto; }
  .pb-section-name { display: none; }
}
@media (max-width: 640px) {
  .pb-steps { grid-template-columns: 1fr; }
  .pb-benefit-grid { grid-template-columns: 1fr; }
  .pb-hero { padding: 130px 0 60px; }
  .pb-hero-doc { transform: none; }
  .pb-cat-grid { grid-template-columns: 1fr; }
  .pb-grid-2, .pb-grid-3 { grid-template-columns: 1fr; }
  .pb-check-grid { grid-template-columns: 1fr; }
  .pb-line-row { grid-template-columns: 1fr 1fr; }
  .pb-upgrade-row { grid-template-columns: 1fr 1fr; }
  .pb-line-total { grid-column: 1 / -1; text-align: right; }
  .pb-scope-item { grid-template-columns: 1fr; }
  .pb-page { padding: 30px 22px; }
  .pb-sample-page { padding: 30px 24px; max-height: 560px; }
  .pb-doc-title-row { flex-direction: column; align-items: flex-start; }
  .pb-doc-meta { text-align: left; }
  .pb-sign-grid { grid-template-columns: 1fr; }
  .pb-doc-parties { flex-direction: column; gap: 14px; }
  .pb-draft-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pb-sample-topbar { flex-direction: column; align-items: flex-start; }
  .pb-sample-dialog { max-height: 96vh; margin: 0 8px; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: Letter; margin: 0.65in 0.7in; }

  /* --- Isolate the proposal document (app preview / Print Proposal) --- */
  body.pb-print-mode .site-header,
  body.pb-print-mode .mobile-drawer,
  body.pb-print-mode .mobile-drawer-backdrop,
  body.pb-print-mode .site-footer,
  body.pb-print-mode .back-to-top-btn,
  body.pb-print-mode .video-modal,
  body.pb-print-mode #pb-landing,
  body.pb-print-mode #pb-sample-modal,
  body.pb-print-mode .pb-app-head,
  body.pb-print-mode .pb-app-title,
  body.pb-print-mode .pb-preview-toolbar,
  body.pb-print-mode .pb-row-actions,
  body.pb-print-mode .pb-toast,
  body.pb-print-mode .pb-demo-bar,
  body.pb-print-mode #pb-pdf-export {
    display: none !important;
  }
  body.pb-print-mode #main-content,
  body.pb-print-mode #pb-app,
  body.pb-print-mode .pb-shell,
  body.pb-print-mode .pb-preview-canvas {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    background: #fff !important;
  }
  body.pb-print-mode .pb-preview-canvas { padding: 0 !important; overflow: visible !important; }
  body.pb-print-mode .pb-page {
    box-shadow: none !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    zoom: 1 !important;
    width: auto !important;
  }

  /* --- Pagination --- */
  .pb-doc-section { break-inside: avoid; }
  .pb-doc-scope > li { break-inside: avoid; }
  .pb-doc-invest-box { break-inside: avoid; }
  .pb-sign-grid { break-inside: avoid; }
  .pb-acceptance { break-inside: avoid; }
  .pb-doc-cover { break-inside: avoid; }
  .pb-doc-table tr { break-inside: avoid; }
  .pb-doc-total { break-inside: avoid; }
  .pb-doc-footer { break-inside: avoid; }

  /* --- Sample proposal print (landing "Download Sample PDF") --- */
  body.pb-sample-print .site-header,
  body.pb-sample-print .mobile-drawer,
  body.pb-sample-print .mobile-drawer-backdrop,
  body.pb-sample-print .site-footer,
  body.pb-sample-print .back-to-top-btn,
  body.pb-sample-print .video-modal,
  body.pb-sample-print #pb-landing,
  body.pb-sample-print #pb-app,
  body.pb-sample-print .pb-toast {
    display: none !important;
  }
  body.pb-sample-print #main-content { padding: 0 !important; margin: 0 !important; }
  body.pb-sample-print .pb-sample-modal {
    position: absolute;
    inset: auto;
    left: 0; top: 0;
    display: block;
  }
  body.pb-sample-print .pb-sample-backdrop,
  body.pb-sample-print .pb-sample-topbar { display: none; }
  body.pb-sample-print .pb-sample-dialog {
    position: static;
    max-width: none;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  body.pb-sample-print .pb-sample-scroll {
    padding: 0;
    overflow: visible;
    background: #fff;
  }
  body.pb-sample-print #pb-sample-document {
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}
