/* CauseComp — Benchmarks for the Nonprofit Sector */

:root {
  --cc-navy:        #1A2E4A;   /* Navy — headings, dark accents */
  --cc-teal: #0E8074;   /* Teal — buttons, badges, active */
  --cc-teal-dark:   #0A6459;   /* Teal pressed / hover */
  --cc-teal-lite:   #EAF4F2;   /* Light teal tint backgrounds */
  --cc-gold-soft:    #C9B57E;   /* Soft gold — borders, dividers */
  --slate:          #5B6470;   /* Secondary text */
  --sand:           #C9B57E;   /* Soft gold alias */
  --sand-lite:      rgba(176,141,62,0.10);
  /* Full-strength brand references for charts and new components: */
  --cc-navy: #1A2E4A; --cc-teal: #0E8074; --cc-teal-bright: #3FB3A2;
  --cc-gold: #B08D3E; --cc-gold-text: #8A6D2C; --cc-charcoal: #22272E;
  --text:           #111827;
  --muted:          #6b7280;
  --border:         #e2e8f0;
  --bg:             #F6F8FB;   /* Cool cloud page background */
  --white:          #ffffff;
  --success:        #166534;
  --warn-bg:        #fffbeb;
  --warn-border:    #f59e0b;
  --warn-text:      #92400e;
  --radius:         8px;
  --shadow:         0 1px 3px rgba(0,0,0,0.09), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-lg:      0 4px 20px rgba(0,0,0,0.11);
  --font:           'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Visually-hidden (screen-reader only). Undefined until now, which left the
   Workforce header's <h1 class="sr-only"> rendering at full size — bloating the
   header two lines tall and colliding the tagline with the consultation CTA. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, #142438 0%, #1A2E4A 60%, #23405F 100%);
  color: white;
  padding: 0;
  box-shadow: 0 4px 24px rgba(26,46,74,0.30);
  border-bottom: 2px solid #B08D3E;   /* the benchmark line */
  position: relative;
  overflow: hidden;
}
/* Instrument scale: the header is the face of a measuring tool. Minor ticks
   in faint white, major ticks in faint gold, rising from the gold datum. */
.site-header::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 26px);
  pointer-events: none;
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: repeating-linear-gradient(90deg, rgba(201,181,126,0.30) 0 1px, transparent 1px 130px);
  pointer-events: none;
}
.header-inner {
  max-width: 1500px;   /* align with .main-wrapper content grid */
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Product-line eyebrow — matches the Workforce site's "Workforce Edition".
   Lives inside the flexible centered middle so it costs no header width. */
.header-product {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3FB3A2;   /* teal-bright on navy */
  white-space: nowrap;
  margin-bottom: 1px;
}
.header-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}
.header-brand h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.header-brand p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--sand);
  margin-top: 2px;
}
.header-pos {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.01em;
  white-space: nowrap;
  margin: 0 18px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-cred {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #C9B57E;
  white-space: nowrap;
}
.header-cred span + span::before {
  content: '·';
  margin-right: 14px;
  color: rgba(201,181,126,0.5);
}
.header-cta {
  padding: 10px 20px;
  border: 1px solid rgba(201,181,126,0.55);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.header-cta:hover {
  background: var(--cc-teal);
  border-color: var(--cc-teal);
}
/* Header responsive order: credentials yield first, then the positioning
   line, the CTA survives to phone width, the logo never leaves. */
@media (max-width: 1560px) { .header-cred { display: none; } }
@media (max-width: 1240px) { .header-pos  { display: none; } }
@media (max-width: 560px)  { .header-cta  { display: none; } }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.main-wrapper {
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .main-wrapper { grid-template-columns: 1fr; }
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--cc-teal-lite);
}
/* Panel titles are wayfinding, not display type: serif is reserved for the
   brand identity and the dollar figures themselves. */
.card-header h2 {
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cc-navy);
}
.card-body { padding: 20px; }

/* ── Form ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.form-group select,
.form-group input[type="text"],
.form-group input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-group input[type="text"],
.form-group input[type="number"] {
  background-image: none;
  padding-right: 12px;
}
.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--cc-navy);
  box-shadow: 0 0 0 3px rgba(14,128,116,0.12);
}

.revenue-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.revenue-toggle button {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.revenue-toggle button.active {
  background: var(--cc-teal);
  color: white;
}
.revenue-toggle button:hover:not(.active) { background: var(--cc-teal-lite); }

.revenue-input-section { display: none; }
.revenue-input-section.visible { display: block; }

.year-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.year-row select { flex: 1; }

/* ── Form section headers ────────────────────────────────────────────────── */
.section-hdr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.section-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cc-teal);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.section-hdr-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.section-hdr-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.section-hdr-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Section divider ─────────────────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201,181,126,0.6);
}
.section-divider span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sand);
  white-space: nowrap;
}

/* ── Role searchable combobox ────────────────────────────────────────────── */
.role-combo { position: relative; }
.role-search-input {
  width: 100%;
  padding: 9px 36px 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: white;
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.role-search-input:focus {
  outline: none;
  border-color: var(--cc-navy);
  box-shadow: 0 0 0 3px rgba(14,128,116,0.10);
  cursor: text;
  background-image: none;
}
.role-search-input.has-value { background-image: none; }
.role-combo-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.role-combo-clear:hover { color: var(--cc-navy); }
.role-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 200;
}
.role-group-label {
  padding: 7px 12px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.role-group-label:first-child { border-top: none; }
.role-option {
  padding: 8px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
}
.role-option:hover,
.role-option.focused { background: var(--cc-teal-lite); color: var(--cc-navy); }
.role-option.selected { font-weight: 600; color: var(--cc-navy); }
.role-no-results {
  padding: 14px 12px;
  font-size: 0.87rem;
  color: var(--muted);
  text-align: center;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--cc-teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(14,128,116,0.35);
}
.btn-primary:hover  { background: var(--cc-navy); box-shadow: 0 4px 14px rgba(26,46,74,0.40); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--muted);
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
.spinner.active { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results panel ───────────────────────────────────────────────────────── */
#results-panel { display: none; }
#results-panel.visible { display: block; }

.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--muted);
  text-align: center;
  padding: 40px;
}
.placeholder-panel .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}
.placeholder-panel p {
  font-size: 0.95rem;
  max-width: 260px;
  line-height: 1.7;
}

.results-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.meta-chip {
  background: var(--cc-teal-lite);
  color: var(--cc-navy);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.78rem;
}

/* Percentile bars */
.comp-range {
  margin-bottom: 28px;
}
.comp-range-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}
.percentile-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;   /* the median is the protagonist */
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}
.pct-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  position: relative;
  transition: box-shadow 0.15s;
}
.pct-box:hover { box-shadow: var(--shadow-lg); }
.pct-box.highlight {
  border-color: var(--cc-navy);
  background: var(--cc-teal-lite);
}
.pct-box.highlight::before {
  content: 'MEDIAN';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cc-navy);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.08em;
}
.pct-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* Money is set in serif: the numbers are the product, so the numbers carry
   the brand voice. Flanking percentiles defer to the median in size and ink. */
.pct-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--slate);
  margin-top: 4px;
  letter-spacing: -0.5px;
}
.pct-box.highlight .pct-value {
  font-size: 2.35rem;
  color: var(--cc-navy);
  line-height: 1.15;
}
.pct-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Visual range bar */
.range-bar-wrap {
  margin: 4px 0 16px;
}
.range-viz {
  position: relative;
  padding: 26px 0 18px;   /* room for incumbent marker above, median label below */
}
.range-viz .range-bar-track {
  margin-bottom: 0;
}
.range-tick {
  position: absolute;
  top: 34px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.range-tick-line {
  display: block;
  width: 2px;
  height: 8px;
  margin: 0 auto;
  background: var(--slate, #5B6470);
  opacity: 0.85;
}
.range-tick-lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.range-incumbent {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1;
  pointer-events: none;
}
.range-incumbent-diamond {
  display: block;
  font-size: 15px;
  color: var(--cc-navy);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.range-incumbent-lbl {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--cc-navy);
  margin-top: 1px;
  white-space: nowrap;
}
.incumbent-verdict {
  margin: 2px 0 18px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.incumbent-verdict--within {
  background: rgba(14,128,116,0.08);
  border-color: rgba(14,128,116,0.35);
  color: #0E8074;
}
.incumbent-verdict--above {
  background: rgba(176,141,62,0.10);
  border-color: rgba(176,141,62,0.40);
  color: #8A6D2C;
}
.incumbent-verdict--below {
  background: rgba(180,83,9,0.08);
  border-color: rgba(180,83,9,0.35);
  color: #B45309;
}
.range-bar-track {
  background: var(--border);
  border-radius: 4px;
  height: 8px;
  position: relative;
  margin-bottom: 4px;
}
.range-bar-fill {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cc-gold-soft), var(--cc-navy));
}
.range-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Print report (Save PDF Report button → branded one-pager) ─────────── */
.print-header, .print-footer { display: none; }

@media print {
  @page { margin: 14mm; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  /* Only the results panel prints */
  .site-header, #input-card, #placeholder-card, .reg-overlay,
  .forecast-bar, .cta-panel, .btn-export, #export-btn, #pdf-btn,
  .teaser-overlay, .methodology-panel, .warning-box,
  .postings-freshness, .disclaimer-box { display: none !important; }

  .main-wrapper { display: block !important; max-width: none !important; padding: 0 !important; }
  .card#results-panel {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    border-bottom: 3px solid #1A2E4A;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .print-header-brand { display: flex; align-items: center; gap: 12px; }
  .print-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.25rem;
    color: #1A2E4A;
  }
  .print-sub  { font-size: 0.78rem; color: #5B6470; }
  .print-meta { text-align: right; font-size: 0.75rem; color: #5B6470; line-height: 1.5; }

  .print-footer {
    display: block;
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid #C9B57E;
    font-size: 0.68rem;
    color: #5B6470;
    line-height: 1.5;
  }
  .print-footer p { margin: 0 0 6px; }
}

/* Board policy target percentile */
.pct-target {
  margin: 4px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pct-target-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.pct-target-head strong { color: var(--cc-navy); }
#pct-target-value { font-weight: 700; font-size: 0.95rem; }
.pct-target input[type="range"] {
  width: 100%;
  accent-color: var(--cc-navy, #1A2E4A);
}
.pct-target-gap {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* §4958 comparables */
.comparables-note {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin: 8px 0 18px;
}
@media print {
  .pct-target input[type="range"] { display: none; }
}

/* Pin-to-compare */
#compare-table th { vertical-align: top; }
.pin-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 2px 0 0;
}
.pin-remove:hover { color: var(--cc-navy); }
@media print { #compare-card { display: none !important; } }

/* Example-mode banner (landing state) */
.example-banner {
  background: var(--cc-teal-lite);
  border: 1px solid rgba(14,128,116,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--cc-teal-dark);
  margin-bottom: 14px;
}

/* Form clusters: named groups, not numbered steps */
.form-cluster-hdr {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--cc-teal);
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  margin: 22px 0 14px;
}
.form-cluster-hdr:first-child { margin-top: 0; }

/* The submit button stays reachable while the long form scrolls */
#submit-btn {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  box-shadow: 0 6px 18px rgba(14,128,116,0.35);
}

/* Provenance strip: one composed line of trust facts */
.provenance-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 4px 0 14px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sand);
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.provenance-strip span + span::before {
  content: '·';
  margin-right: 18px;
  color: var(--sand);
}
.prov-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--cc-teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#pct-target-value { font-family: 'DM Serif Display', serif; font-size: 1.15rem; }

/* Age data to a future effective date */
.age-data {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -10px 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--slate);
}
.age-data label {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.age-data input[type="date"],
.age-data input[type="number"] {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink, #1A2E4A);
  background: #fff;
}
.age-data input[type="number"] { width: 68px; }
.age-unit { font-size: 0.75rem; }
.age-note {
  margin-left: auto;
  font-weight: 700;
  color: var(--cc-teal-dark);
}

/* Teaser gate: blurred breakdown behind a register CTA */
.breakdown-wrap {
  position: relative;
}
.breakdown-table.teaser-blur {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
.teaser-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 18px;
  background: transparent;
}
.teaser-overlay p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}
.teaser-unlock-btn {
  width: auto;
  padding: 10px 22px;
}

/* Comp breakdown */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.breakdown-table th {
  background: var(--cc-teal-lite);
  color: var(--cc-navy);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid var(--cc-gold-soft);
}
.breakdown-table th.col-p25,
.breakdown-table th.col-median,
.breakdown-table th.col-p75 { text-align: right; }
.breakdown-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.breakdown-table td.col-p25,
.breakdown-table td.col-median,
.breakdown-table td.col-p75 { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown-table td.col-median { font-weight: 600; }
.breakdown-table tr.bd-row-total td { border-top: 2px solid var(--cc-gold-soft); background: var(--cc-teal-lite); }
.breakdown-table tr:not(.bd-row-total):hover td { background: var(--cc-teal-lite); }
.breakdown-table tr:last-child td { border-bottom: none; }

/* Warning box */
.warning-box {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.warning-box .warn-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.warning-box p { font-size: 0.82rem; color: var(--warn-text); line-height: 1.5; }

/* Obs count */
.obs-count {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.obs-count strong { color: var(--text); }

/* Export button */
.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: white;
  color: var(--cc-navy);
  border: 2px solid var(--cc-navy);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  margin-top: 4px;
}
.btn-export:hover { background: var(--cc-navy); color: white; }
.btn-export svg { flex-shrink: 0; }

/* ── Disclaimer ──────────────────────────────────────────────────────────── */
.disclaimer-box {
  background: var(--cc-teal-lite);
  border-left: 3px solid var(--cc-gold-soft);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 20px;
}
.disclaimer-box p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer-box strong { color: var(--text); }

/* ── Error state ─────────────────────────────────────────────────────────── */
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #991b1b;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.error-box.visible { display: block; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--white);
}

/* ── Forecast UI ─────────────────────────────────────────────────────────── */
.forecast-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* Data vintage badge */
.vintage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.vintage-badge--green  { background: #dcfce7; color: #166534; }
.vintage-badge--yellow { background: #fef9c3; color: #854d0e; }
.vintage-badge--grey   { background: #f3f4f6; color: #4b5563; }
.vintage-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.vintage-badge--green  .vintage-dot { background: #16a34a; }
.vintage-badge--yellow .vintage-dot { background: #ca8a04; }
.vintage-badge--grey   .vintage-dot { background: #9ca3af; }

/* Confidence badge */
.confidence-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}
.confidence-badge--high   { background: #dcfce7; color: #166534; }
.confidence-badge--medium { background: #fef9c3; color: #854d0e; }
.confidence-badge--low    { background: #fee2e2; color: #991b1b; }

/* Methodology toggle button */
.methodology-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.methodology-btn:hover {
  background: var(--cc-teal-lite);
  color: var(--cc-navy);
  border-color: var(--cc-gold-soft);
}

/* Methodology panel */
.methodology-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}
.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}
.meth-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.meth-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.meth-value {
  font-weight: 600;
  color: var(--text);
}

/* Job postings freshness note */
.postings-note {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .percentile-grid { grid-template-columns: 1fr; }
  .pct-box.highlight::before { display: none; }
  .header-inner {
  max-width: 1500px;   /* align with .main-wrapper content grid */
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
}
}

/* ── Registration modal ──────────────────────────────────────────────────── */
.reg-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.reg-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 32px 28px;
  max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.reg-modal-logo { text-align: center; margin-bottom: 20px; }
.reg-modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.45rem; font-weight: 400;
  color: var(--cc-navy); text-align: center; margin-bottom: 8px;
}
.reg-modal-sub {
  font-size: 0.88rem; color: var(--muted);
  text-align: center; margin-bottom: 24px; line-height: 1.5;
}
.reg-field { margin-bottom: 16px; }
.reg-field label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text); margin-bottom: 5px;
}
.reg-field input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font); color: var(--text);
  background: var(--white); transition: border-color .15s;
}
.reg-field input:focus { outline: none; border-color: var(--cc-navy); }
.req { color: var(--cc-navy); }
.opt { color: var(--muted); font-weight: 400; }
.reg-submit { width: 100%; margin-top: 8px; font-size: 1rem; padding: 12px; }
.reg-error {
  background: #fff5f5; border: 1px solid #fed7d7;
  color: #c53030; border-radius: var(--radius);
  padding: 10px 12px; font-size: 0.83rem; margin-bottom: 14px;
}
.reg-legal {
  font-size: 0.72rem; color: var(--muted);
  text-align: center; margin-top: 16px; line-height: 1.5;
}

/* ── Consultation CTA panel ──────────────────────────────────────────────── */
.cta-panel {
  background: linear-gradient(135deg, #142438 0%, #1A2E4A 60%, #23405F 100%);
  border-radius: 10px;
  padding: 24px 24px 20px;
  margin-top: 20px;
  color: white;
}
.cta-inner {
  display: flex; flex-direction: column; gap: 18px;
}
.cta-eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; opacity: .75; margin-bottom: 4px;
}
.cta-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem; font-weight: 400; line-height: 1.3; margin-bottom: 8px;
}
.cta-body {
  font-size: 0.83rem; opacity: .88; line-height: 1.55;
}
.cta-btn-primary {
  display: inline-block;
  background: white; color: var(--cc-navy);
  font-weight: 700; font-size: 0.9rem;
  padding: 11px 22px; border-radius: var(--radius);
  border: 2px solid var(--sand);
  text-decoration: none; transition: background .15s, transform .1s;
  white-space: nowrap;
}
.cta-btn-primary:hover { background: #fdf8f4; transform: translateY(-1px); }
.cta-divider {
  font-size: 0.75rem; opacity: .6; margin: 10px 0 8px;
}
.cta-services {
  display: flex; flex-direction: column; gap: 5px;
}
.cta-services span {
  font-size: 0.78rem; opacity: .88;
}
@media (min-width: 600px) {
  .cta-inner { flex-direction: row; align-items: center; }
  .cta-text   { flex: 1; }
  .cta-actions { flex-shrink: 0; text-align: center; min-width: 200px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Free-tier gating (Phase 5 frontend)
   Three distinct signals, kept visually separate on purpose:
     • teal  .example-banner  → "this is a live demo benchmark"
     • navy  .cta-panel       → "book a consultation" (consulting funnel)
     • GOLD  .sample-banner /.paywall → "locked feature, upgrade to unlock"
   Gold is the brand's board-grade/premium accent, so it carries the paywall.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sample banner — sits atop the results panel when a free/anonymous user is
   shown the pre-computed sample instead of a live benchmark. Louder and more
   explicit than the teal example-banner: it must never be mistaken for the
   user's own organization's data. */
.sample-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--sand-lite);
  border: 1px solid var(--cc-gold-soft);
  border-left: 4px solid var(--cc-gold);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.sample-banner__icon {
  flex-shrink: 0;
  color: var(--cc-gold-text);
  margin-top: 1px;
}
.sample-banner__body { flex: 1; min-width: 0; }
.sample-banner__eyebrow {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cc-gold-text); display: block;
  margin-bottom: 2px;
}
.sample-banner__text {
  font-size: 0.85rem; line-height: 1.5; color: var(--cc-navy); margin: 0;
}
.sample-banner__text strong { font-weight: 700; }
.sample-banner__link {
  color: var(--cc-gold-text); font-weight: 700; text-decoration: underline;
  text-underline-offset: 2px; white-space: nowrap;
}

/* Paywall card — the upgrade prompt itself. Used centered inside .form-lock
   (decorative exec form) and inline as the Workforce quota-exhausted panel. */
.paywall {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--cc-gold-soft);
  border-top: 3px solid var(--cc-gold);
  border-radius: 12px;
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
  margin: 0 auto;
}
.paywall__lock {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand-lite); color: var(--cc-gold-text);
  margin-bottom: 6px;
}
.paywall__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem; font-weight: 400; line-height: 1.25;
  color: var(--cc-navy); margin: 0;
}
.paywall__body {
  font-size: 0.88rem; line-height: 1.55; color: var(--slate); margin: 2px 0 6px;
}
.paywall__cta {
  display: inline-block; width: auto;
  background: var(--cc-gold); color: #fff;
  font-weight: 700; font-size: 0.92rem; letter-spacing: 0.01em;
  padding: 11px 26px; border-radius: var(--radius);
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 2px 10px rgba(176,141,62,0.35);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.paywall__cta:hover { background: var(--cc-gold-text); transform: translateY(-1px); }
.paywall__note { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.paywall__note a { color: var(--cc-teal); font-weight: 600; text-decoration: none; }
.paywall__note a:hover { text-decoration: underline; }

/* Form lock — overlays the exec search form for free/anonymous users. The form
   stays visible underneath (so the product's capability is legible) but is
   greyed, softened, and made fully non-interactive; the paywall floats over it. */
.input-card--locked { position: relative; }
.input-card--locked .card-body { position: relative; }
.input-card--locked .form-decorative {
  filter: grayscale(0.35) opacity(0.55);
  pointer-events: none;
  user-select: none;
}
.form-lock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Soft wash so the paywall reads clearly over the decorative form. */
  background: linear-gradient(180deg,
              rgba(246,248,251,0.55) 0%, rgba(246,248,251,0.9) 100%);
  border-radius: var(--radius);
}

/* Workforce free-search quota chip — sits under the Run button. */
.wf-quota {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--cc-gold-soft);
  border-radius: 8px;
  background: var(--sand-lite);
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--cc-navy);
}
.wf-quota svg { flex-shrink: 0; color: var(--cc-gold-text); }
.wf-quota strong { font-weight: 700; }
.wf-quota a { color: var(--cc-gold-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Close affordance on the Workforce upgrade paywall modal. */
.paywall__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 2px 6px;
}
.paywall__close:hover { color: var(--cc-navy); }
