/* ═════════════════════════════════════════════════════════════════════
 * AI Automation Readiness Scan — v2 styles
 * Implements UX Design Spec v2 §2 (visual polish system) verbatim.
 * ═════════════════════════════════════════════════════════════════════ */

/* §2b — extended color tokens (v1 + new) */
:root {
  --primary: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-deep: #1E40AF;
  --dark: #0F172A;
  --body: #334155;
  --muted: #94A3B8;
  --muted-strong: #64748B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;

  /* AI / maturity tokens */
  --ai-purple: #6366F1;
  --ai-purple-soft: #EEF2FF;
  --system-blue: #3B82F6;
  --system-blue-soft: #DBEAFE;
  --spreadsheet-amber: #F59E0B;
  --spreadsheet-amber-soft: #FEF3C7;
  --manual-red: #EF4444;
  --manual-red-soft: #FEE2E2;
  --success: #10B981;
  --success-soft: #D1FAE5;
  --success-text: #065F46;
  --signal-bg: #FFF7ED;
  --signal-border: #FB923C;
  --signal-text: #7C2D12;

  /* §2c — elevation (3 levels) */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-2: 0 10px 25px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-3: 0 25px 50px rgba(0,0,0,0.18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { width: 100%; max-width: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* §2a — typography hierarchy */
h1 { font-weight: 700; font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; color: var(--dark); margin: 0 0 12px; }
h2 { font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--dark); margin: 0 0 12px; }
h3 { font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--dark); margin: 0 0 8px; }
p  { margin: 0 0 14px; font-size: 16px; font-weight: 400; color: var(--body); }
small, .micro { font-size: 13px; color: var(--muted-strong); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───── Phase 0 prototype banner ───── */
.prototype-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: #FFFBEB;
  border-left: 4px solid #FBBF24;
  border-bottom: 1px solid #FDE68A;
  color: #92400E;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 8px 18px;
  text-align: center;
}

/* ───── Header ───── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand .wordmark {
  font-weight: 700;
  font-size: 18px;
  color: var(--dark);
  letter-spacing: -0.01em;
}
.brand .tagline { font-size: 12px; color: var(--muted-strong); margin-top: 2px; }

.progress-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  max-width: 280px;
  flex: 1;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 350ms ease-out;   /* §2d motion */
}
.progress-label {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted-strong);
  min-width: 32px;
  text-align: right;
}

/* ───── Layout (sidebar + main) ───── */
.layout-wrap {
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 24px;
  padding: 24px 20px 80px;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .layout-wrap { grid-template-columns: 1fr; padding: 16px 14px 60px; }
  .area-sidebar { display: none !important; }
}

main {
  min-width: 0; /* keep grid item from blowing out */
  max-width: 100%;
}

/* ───── Screen card ───── */
.screen {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-1);
  animation: fadeSlideIn 250ms cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.screen .lede { font-size: 17px; color: var(--body); margin-bottom: 18px; }

.welcome-screen {
  width: 100%;
  max-width: 760px;
  margin: 16px auto 0;
}

.tool-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 24px;
}

.promise-grid > div {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 13px 14px;
  min-height: 112px;
}

.promise-grid strong {
  display: block;
  color: var(--dark);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 6px;
}

.promise-grid span {
  display: block;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .promise-grid { grid-template-columns: 1fr; }
  .promise-grid > div { min-height: auto; }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0 26px;
  color: var(--muted-strong);
  font-size: 13px;
}
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  min-height: 48px;
  transition: background 150ms ease, transform 80ms ease, box-shadow 180ms ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-deep); }
.btn-primary:disabled { background: #94A3B8; cursor: not-allowed; }

.btn-secondary { background: var(--surface); color: var(--body); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }

.btn-white {
  background: #fff; color: var(--primary); box-shadow: var(--shadow-1);
}
.btn-white:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }

.btn-block { width: 100%; }

.btn-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 140px; }

/* ───── Section divider ───── */
.divider-screen { text-align: center; padding: 64px 28px; }
.divider-screen .section-num {
  font-size: 13px; color: var(--primary); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.divider-screen h2 { font-size: 28px; margin-bottom: 12px; }
.divider-screen .sub { color: var(--muted-strong); margin-bottom: 32px; font-size: 17px; }

/* ───── Question ───── */
.q-num {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.q-text {
  font-size: 22px; font-weight: 600;
  color: var(--dark);
  margin: 0 0 22px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.quiz-back-row {
  margin: -6px 0 16px;
}
.quiz-back-row .btn {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 14px;
}

.option-list {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.option {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  min-height: 52px;
  font-size: 15px;
  color: var(--body);
}
.option:hover { border-color: var(--muted); background: var(--bg); }
.option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.option input {
  accent-color: var(--primary);
  margin: 0;
  width: 18px;
  height: 18px;
  opacity: 1;
  pointer-events: none;
}
.option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.option.selected .option-text { color: var(--dark); font-weight: 500; }

/* ───── Signal callout (§3b) ───── */
.signal-callout {
  background: var(--signal-bg);
  border-left: 4px solid var(--signal-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--signal-text);
  margin: 16px 0;
  animation: fadeSlideUp 300ms ease-out;
  line-height: 1.55;
}
.signal-callout strong { color: var(--dark); }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ───── Calculating ───── */
.calculating { text-align: center; padding: 80px 28px; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Area progress indicator (§3a) ───── */
.area-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 96px;
}
.area-sidebar .label {
  font-size: 11px; font-weight: 600;
  color: var(--muted-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.area-list { display: flex; flex-direction: column; gap: 14px; }
.area-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--muted);
  transition: color 200ms ease;
}
.area-row .ic {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--muted);
  border-radius: 50%;
  color: var(--muted);
  flex-shrink: 0;
  transition: border 220ms ease, background 220ms ease, color 220ms ease;
}
.area-row .ic svg { width: 12px; height: 12px; }
.area-row.in-progress { color: var(--body); }
.area-row.in-progress .ic { border: 1.5px solid var(--primary); border-style: solid; color: var(--primary); }
.area-row.scored { color: var(--dark); font-weight: 600; }
.area-row.scored .ic { border-style: solid; color: #fff; }
.area-row.scored.lvl-1 .ic { background: var(--manual-red);        border-color: var(--manual-red); }
.area-row.scored.lvl-2 .ic { background: var(--spreadsheet-amber); border-color: var(--spreadsheet-amber); }
.area-row.scored.lvl-3 .ic { background: var(--system-blue);       border-color: var(--system-blue); }
.area-row.scored.lvl-4 .ic { background: var(--ai-purple);         border-color: var(--ai-purple); }
.area-row.pulse .ic { animation: pulseOnce 400ms ease-in-out; }
@keyframes pulseOnce {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Mobile horizontal strip */
.area-strip {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 14px 4px;
  justify-content: space-between;
}
@media (min-width: 901px) { .area-strip { display: none !important; } }
.area-strip .area-row { flex: 1; flex-direction: column; gap: 4px; text-align: center; font-size: 10px; }
.area-strip .area-row .ic { width: 26px; height: 26px; margin: 0 auto; }
.area-strip .area-row .nm { display: none; } /* hide name on mobile per spec */

/* ───── Results — keystone insight block (v4) ───── */
.results-keystone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ai-purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 22px 26px;
  margin-bottom: 22px;
}
.results-keystone h2 {
  font-size: 24px; line-height: 1.2;
  margin: 0 0 8px;
  color: var(--dark);
}
.results-keystone p {
  font-size: 16px; line-height: 1.5;
  color: var(--body);
  margin: 0;
}

.priority-teaser {
  border-left-color: var(--success);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FFFB 100%);
}

.priority-teaser .label {
  color: var(--success-text);
}

.detail-divider {
  margin: 34px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.detail-divider h2 {
  margin-bottom: 4px;
}

.detail-divider p {
  color: var(--muted-strong);
  font-size: 14px;
  margin: 0;
}

@media (max-width: 540px) {
  .results-keystone { padding: 18px 18px; }
  .results-keystone h2 { font-size: 20px; }
  .results-keystone p { font-size: 15px; }
}

/* ───── Results — header + radar layout (v4 balanced 1fr 1fr) ───── */
.results-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}
.results-hero > * { min-width: 0; }
@media (max-width: 820px) { .results-hero { grid-template-columns: 1fr; } }

/* Radar wrapped in a real surface card so it matches the other blocks */
.radar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 22px 26px 16px;
  display: flex;
  flex-direction: column;
}
.radar-card .radar-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin: 0 auto;
  width: 100%;
}
.radar-card .radar-wrap canvas { width: 100% !important; height: 100% !important; }
.radar-card .radar-legend {
  display: flex; gap: 18px; justify-content: center;
  margin-top: 10px; font-size: 12px; color: var(--muted-strong);
  flex-wrap: wrap;
}
.radar-card .chip-row {
  justify-content: center;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
@media (max-width: 480px) {
  .radar-card { padding-left: 18px; padding-right: 18px; }
  .radar-card .radar-wrap { max-width: 280px; }
}

.legend-key { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 4px; border-radius: 2px; }
.legend-swatch.solid  { background: var(--ai-purple); }
.legend-swatch.dashed { border-top: 2px dashed var(--ai-purple); background: transparent; height: 0; }

/* v3 — PDF share actions */
.pdf-share-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  gap: 12px;
  box-shadow: var(--shadow-1);
}
.pdf-share-bar p {
  font-size: 14px;
  color: var(--body);
  margin: 0;
}
.pdf-share-bar strong { color: var(--dark); }
.btn-pdf {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  text-decoration: none;
}
.btn-pdf:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 16px;
  gap: 12px;
}
.section-header-row h2 { margin: 0; }
.link-pdf-inline {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.link-pdf-inline:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .pdf-share-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .btn-pdf { justify-content: center; width: 100%; }
  .section-header-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Score-display block — replaces the chip-row right column */
.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.score-card .micro-label {
  font-size: 11px; font-weight: 600;
  color: var(--muted-strong); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}
.score-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 14px;
}
.score-display .num {
  font-size: 56px;
  font-weight: 700;
  color: var(--ai-purple);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.score-display .denom {
  font-size: 20px;
  color: var(--muted-strong);
  font-weight: 500;
}
.score-display .label {
  font-size: 13px;
  color: var(--muted-strong);
  margin-left: 8px;
}
.score-card .what-means {
  font-size: 15px;
  color: var(--body);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 540px) {
  .score-display .num { font-size: 44px; }
}

.results-summary { font-size: 15px; color: var(--body); }
.results-summary h2 { font-size: 20px; }
.results-summary .micro-label {
  font-size: 11px; font-weight: 600;
  color: var(--muted-strong); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}

/* Maturity chip row */
.chip-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 6px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}
.chip .dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.chip.lvl-1 { background: var(--manual-red-soft);        color: #7F1D1D; border-color: #FCA5A5; }
.chip.lvl-1 .dot { background: var(--manual-red); }
.chip.lvl-2 { background: var(--spreadsheet-amber-soft); color: #78350F; border-color: #FCD34D; }
.chip.lvl-2 .dot { background: var(--spreadsheet-amber); }
.chip.lvl-3 { background: var(--system-blue-soft);       color: #1E40AF; border-color: #93C5FD; }
.chip.lvl-3 .dot { background: var(--system-blue); }
.chip.lvl-4 { background: var(--ai-purple-soft);         color: #3730A3; border-color: #C7D2FE; }
.chip.lvl-4 .dot { background: var(--ai-purple); }

/* v3 — accessible per-area bullet chart */
.bullet-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
}

.aggregate-callout {
  background: var(--ai-purple-soft);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0 18px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.aggregate-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ai-purple);
  margin-bottom: 4px;
}
.aggregate-number {
  font-size: 34px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.aggregate-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
  margin-top: 2px;
}
.aggregate-callout p {
  font-size: 12px;
  color: var(--muted-strong);
  margin: 8px 0 0;
}
.bullet-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 14px;
}
.bullet-row {
  display: grid;
  grid-template-columns: 140px 1fr 72px 132px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.bullet-row:last-child { margin-bottom: 0; }
.bullet-area-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}
.bullet-track-wrap { position: relative; min-width: 0; }
.bullet-track {
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  position: relative;
}
.bullet-zone { height: 100%; }
.zone-manual { background: #FECACA; }
.zone-sheet { background: #FEF9C3; }
.zone-system { background: #DBEAFE; }
.zone-ai { background: #EDE9FE; }
.bullet-bar {
  position: absolute;
  top: 2px;
  left: 0;
  height: calc(100% - 4px);
  background: var(--ai-purple);
  border-radius: 3px;
  transition: width 700ms ease-out;
}
.bullet-target {
  position: absolute;
  top: -2px;
  width: 3px;
  height: calc(100% + 4px);
  background: var(--dark);
  border-radius: 1px;
  transform: translateX(-50%);
}
.bullet-zone-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted-strong);
  margin-top: 3px;
}
.bullet-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bullet-level {
  font-size: 12px;
  color: var(--body);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .bullet-section { padding: 18px; }
  .bullet-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 12px;
  }
  .bullet-track-wrap { grid-column: 1 / -1; }
  .bullet-level { display: none; }
}

/* ───── Teaser opportunity ───── */
.opp-teaser {
  background: var(--ai-purple-soft);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 22px 0;
}
.opp-teaser .label {
  font-size: 12px; font-weight: 700;
  color: var(--ai-purple);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.opp-teaser .title { font-size: 19px; font-weight: 600; color: var(--dark); margin: 0 0 8px; }
.opp-teaser .body { font-size: 14px; color: var(--body); margin: 0; }

/* ───── Email gate ───── */
.email-gate {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-1);
}
.email-gate h3 { font-size: 17px; color: var(--dark); margin: 0 0 14px; font-weight: 600; }
.email-gate .input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.email-gate input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  color: var(--dark);
  min-height: 48px;
}
.email-gate input[type="email"]:focus { outline: none; border-color: var(--primary); }
.email-gate .fineprint { margin-top: 12px; font-size: 12px; color: var(--muted-strong); }
.email-error { color: var(--manual-red); font-size: 13px; margin-top: 6px; display: none; }
.email-error.visible { display: block; }

/* ───── Bar chart container ───── */
.bar-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 14px;
  box-shadow: var(--shadow-1);
  margin: 24px 0 18px;
}
.bar-chart-wrap h2 { font-size: 18px; margin-bottom: 4px; }
.bar-chart-wrap .sub {
  font-size: 13px; color: var(--muted-strong); margin-bottom: 16px;
}
.bar-chart-wrap canvas { width: 100% !important; max-height: 300px; }
@media (max-width: 720px) { .bar-chart-wrap canvas { max-height: 240px; } }

/* ───── Opportunity card v2 ───── */
.opp-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-1);
  transition: box-shadow 180ms ease, transform 180ms ease;
  opacity: 0;
  animation: fadeSlideUp 350ms ease-out forwards;
}
.opp-card-v2:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.opp-card-v2 .badge-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.seq-tag {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.seq-FIRST { background: var(--success-soft);    color: var(--success-text); border-color: #6EE7B7; }
.seq-NEXT  { background: var(--system-blue-soft); color: var(--primary-deep); border-color: #93C5FD; }
.seq-LATER { background: #F5F3FF;                color: #4C1D95;             border-color: #C4B5FD; }
.ai-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ai-purple-soft);
  color: #3730A3;
  border: 1px solid #C7D2FE;
  letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 4px;
}

/* v3 — AI capability chip per opp card (PM G1) */
.cap-chip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ai-purple-soft);
  color: #312E81;
  border: 1px solid #C7D2FE;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center;
}

/* v3 — Productivity-soft chip (PM G2) */
.soft-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--body);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
}

.opp-card-v2 .opp-title {
  font-size: 17px; font-weight: 600; color: var(--dark);
  margin: 0 0 8px;
  line-height: 1.35;
}
.opp-card-v2 .opp-tools {
  font-size: 13px; color: var(--muted-strong);
  margin-bottom: 14px;
}
.opp-card-v2 .opp-tools b { color: var(--body); font-weight: 600; }

.opp-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px;
  font-size: 13.5px; color: var(--body);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 14px;
}
@media (max-width: 540px) { .opp-meta { grid-template-columns: 1fr; } }
.opp-meta .row { display: flex; align-items: flex-start; gap: 8px; }
.opp-meta .row .ico { font-size: 16px; line-height: 1.2; }

.week1 {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.week1 .w1-label {
  font-size: 11px; font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}
.week1 ol {
  margin: 0; padding-left: 20px;
  font-size: 13.5px;
  color: var(--body);
  line-height: 1.55;
}
.week1 ol li { margin-bottom: 3px; }
.week1 ol li:last-child { margin-bottom: 0; }

.placeholder-note {
  background: var(--signal-bg);
  border: 1px dashed var(--signal-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--signal-text);
  margin-bottom: 14px;
}

.similar-profile-note {
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--primary-deep);
  margin: 12px 0 14px;
}
.similar-profile-note strong { color: var(--dark); }

.why-this-for-you {
  font-size: 13px;
  font-style: italic;
  color: var(--muted-strong);
  margin: 6px 0 10px;
  line-height: 1.5;
}

/* v3 — Peer cohort benchmark */
.peer-comparison {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.peer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}
.peer-head h3 {
  font-size: 15px;
  margin: 0;
}
.peer-head span {
  color: var(--muted-strong);
  font-size: 12px;
  text-align: right;
}
.peer-row {
  display: grid;
  grid-template-columns: 72px 1fr 86px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.peer-label {
  color: var(--muted-strong);
  font-weight: 600;
}
.peer-track {
  height: 9px;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.peer-fill,
.peer-band {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}
.peer-fill {
  left: 0;
  background: var(--primary);
}
.peer-band {
  background: rgba(99, 102, 241, 0.24);
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.peer-value {
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.peer-comparison p {
  color: var(--muted-strong);
  font-size: 11.5px;
  line-height: 1.45;
  margin: 10px 0 0;
}

/* v3 — Projection radar and delta table */
.projection-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  margin: 22px 0;
}
.projection-section .sub {
  margin: -4px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
}
.projection-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 22px;
  align-items: center;
  margin-top: 12px;
}
.projection-chart-wrap {
  height: 280px;
  min-height: 280px;
}
.projection-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.projection-table th,
.projection-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.projection-table th:first-child,
.projection-table td:first-child {
  text-align: left;
}
.projection-table thead th {
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.projection-table tbody th {
  color: var(--dark);
  font-weight: 600;
}
.projection-table tbody td:nth-child(3) {
  color: var(--success-text);
  font-weight: 700;
}
.projection-note {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 0 0;
  color: var(--muted-strong);
  font-size: 12.5px;
  line-height: 1.45;
}

/* v3 — Risk / avoid block */
.risk-block {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr);
  gap: 20px;
  align-items: start;
}
.risk-block h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.risk-block p {
  color: #78350F;
  font-size: 14px;
  margin: 0;
}
.risk-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.risk-tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #FCD34D;
  color: #78350F;
  font-size: 12px;
  font-weight: 700;
}

/* v3 — About Esther credibility block */
.credibility-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-1);
  margin: 24px 0 20px;
}
.credibility-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 16px;
}
.credibility-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.credibility-avatar,
.credibility-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}
.credibility-avatar {
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.credibility-avatar-placeholder {
  background: linear-gradient(135deg, var(--primary) 0%, var(--ai-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
}
.credibility-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 2px;
}
.credibility-content .title {
  font-size: 14px;
  color: var(--body);
  margin: 0 0 12px;
}
.credential-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.credibility-bio {
  font-size: 14px;
  color: var(--body);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 540px) {
  .peer-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .peer-head span {
    text-align: left;
  }
  .peer-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .peer-value {
    text-align: left;
  }
  .projection-grid,
  .risk-block {
    grid-template-columns: 1fr;
  }
  .projection-chart-wrap {
    height: 240px;
    min-height: 240px;
  }
  .projection-table-wrap {
    overflow-x: auto;
  }
  .risk-tool-list {
    justify-content: flex-start;
  }
  .credibility-inner {
    flex-direction: column;
  }
}

/* ───── Credibility block (§4b v2 treatment) ───── */
.disclosure {
  background: var(--bg);
  border-left: 3px solid var(--border);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin: 28px 0;
  font-size: 14px;
  color: var(--body);
}
.disclosure h3 { margin: 0 0 8px; font-size: 15px; color: var(--dark); }
.disclosure p { margin: 0 0 8px; font-size: 14px; }
.disclosure p:last-child { margin-bottom: 0; }

/* ───── Gradient CTA block (§4b) ───── */
.cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--ai-purple) 100%);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  color: #fff;
  margin-top: 32px;
  box-shadow: var(--shadow-2);
}
.cta-block h2 {
  font-size: 26px; font-weight: 700; color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.cta-block .sub {
  font-size: 16px; color: rgba(255,255,255,0.85);
  margin: 0 0 22px;
}
.cta-block .btn-white {
  padding: 14px 28px; font-size: 16px; font-weight: 600;
}
.cta-block .pdf-link {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.cta-block .pdf-link:hover { color: #fff; }

/* ───── Thank-you screen ───── */
.thankyou-hero { text-align: center; padding: 16px 8px 8px; }
.thankyou-hero .check {
  font-size: 56px; line-height: 1; color: var(--success);
  margin-bottom: 8px;
}

/* ───── Footer ───── */
.site-footer {
  text-align: center;
  padding: 28px 20px 40px;
  color: var(--muted-strong);
  font-size: 13px;
}
.site-footer .footer-sep { margin: 0 8px; }

/* ───── Mobile tweaks ───── */
@media (max-width: 540px) {
  .prototype-banner { padding: 8px 12px; }
  .site-header { top: 0; }
  h1 {
    font-size: 26px;
    overflow-wrap: anywhere;
  }
  h2 { font-size: 20px; }
  .layout-wrap { padding-left: 10px; padding-right: 10px; }
  .screen { padding: 22px 14px; border-radius: var(--radius); }
  .q-text { font-size: 19px; }
  .btn-row .btn { width: 100%; flex: none; }
  .cta-block { padding: 28px 22px; }
  .cta-block h2 { font-size: 22px; }
  .site-header { padding: 12px 14px; flex-wrap: wrap; }
  .brand { flex: 1; min-width: 0; }
  .progress-wrap { width: 100%; margin-left: 0; margin-top: 8px; max-width: none; }
  .opp-card-v2 { padding: 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
