/* ===============================
   DE Flex Duct Tool — Design System
   =============================== */

:root {
  /* Brand */
  --de-orange: #f47b20;
  --de-orange-dark: #d96712;
  --de-navy: #0f2136;
  --de-navy-2: #1a2f4a;

  /* Neutrals */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;

  /* Feedback tones */
  --good: #16a34a;
  --caution: #ca8a04;
  --bad: #dc2626;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Layout */
  --max: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }

.mode-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-3);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font: 600 14px/1 var(--font-sans);
  color: var(--muted);
  cursor: pointer;
  transition: all 160ms ease;
}

.mode-btn:hover { color: var(--ink-2); }

.mode-btn.is-active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ============ HERO ============ */
.hero {
  padding: 72px 0 44px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--de-orange);
  margin: 0 0 16px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--de-navy);
  margin: 0 0 20px;
  max-width: 900px;
}

.accent { color: var(--de-orange); }

.hero-sub {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 0 22px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.hero-meta span[aria-hidden="true"] { color: var(--line-2); }

/* ============ MODE PANELS ============ */
.mode-panel {
  padding: 56px 0;
  display: none;
}
.mode-panel.is-active { display: block; }
.mode-panel[hidden] { display: none; }
.mode-panel.is-active[hidden] { display: none; }

.section-head {
  max-width: 720px;
  margin: 0 0 36px;
}

.section-head h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--de-navy);
  margin: 0 0 10px;
  font-weight: 700;
}

.section-head p {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0;
}

/* ============ DEFECT GRID (visual assessment) ============ */
.defect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.defect-card {
  appearance: none;
  text-align: left;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  box-shadow: var(--shadow-sm);
}

.defect-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}

.defect-card:focus-visible {
  outline: 3px solid rgba(244, 123, 32, 0.35);
  outline-offset: 2px;
}

.defect-card.is-selected {
  border-color: var(--de-orange);
  box-shadow: 0 0 0 3px rgba(244, 123, 32, 0.18), var(--shadow-md);
}

.defect-illustration {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  aspect-ratio: 200 / 120;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--de-navy-2);
}

.defect-illustration svg {
  width: 100%;
  height: 100%;
}

.defect-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--de-navy);
  line-height: 1.25;
}

.defect-desc {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
  flex: 1;
}

.defect-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--de-orange);
  background: rgba(244, 123, 32, 0.10);
  padding: 5px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.defect-card[data-defect="taut"] .defect-tag {
  color: var(--good);
  background: rgba(22, 163, 74, 0.10);
}

.defect-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
  max-width: 640px;
}

/* ============ RESULTS ============ */
.results {
  padding: 56px 0 72px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
}

.results-sub { color: var(--ink-2); }

.results-cards {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.result-card--headline {
  background: var(--de-navy);
  color: #fff;
  border-color: var(--de-navy);
}

.result-card--headline .result-eyebrow,
.result-card--headline .result-caption {
  color: rgba(255, 255, 255, 0.72);
}

.result-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.result-big {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--de-orange);
}

.result-card--headline .result-big { color: var(--de-orange); }

.result-num {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--de-navy);
  line-height: 1;
}

.result-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ============ DISCLOSURE ============ */
.disclosure {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--de-orange);
}
.disclosure p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ============ CTA ============ */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 14px 22px;
  border-radius: 10px;
  font: 700 15px/1 var(--font-sans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn-primary {
  background: var(--de-orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 123, 32, 0.30);
}
.btn-primary:hover { background: var(--de-orange-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244, 123, 32, 0.36); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--line-2);
}
.btn-ghost:hover { color: var(--de-navy); border-color: var(--de-navy-2); }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--de-navy);
  color: rgba(255, 255, 255, 0.72);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-wordmark {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}
.footer-wordmark span { color: var(--de-orange); }
.footer-brand p { margin: 0; font-size: 13.5px; }

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 140ms ease;
}
.footer-links a:hover { color: var(--de-orange); }

/* ============ NARRATIVE (comparison table + curve chart) ============ */
.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;
}

.narrative {
  padding: 32px 0 64px;
  background: var(--surface);
}

.narrative-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
}

.narrative-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-sm);
}

.narrative-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--de-orange);
  margin-bottom: 8px;
}
.narrative-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 10px;
}
.narrative-lede {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Comparison table */
.compare-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table thead th {
  text-align: left;
  padding: 8px 12px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.compare-table thead th.num,
.compare-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compare-table tbody tr {
  transition: background 140ms ease;
}
.compare-table tbody tr + tr td { border-top: 1px solid var(--line); }
.compare-table td {
  padding: 11px 12px;
  color: var(--ink);
  vertical-align: middle;
}
.compare-loss { color: var(--de-orange); font-weight: 600; }
.compare-loss--zero { color: var(--muted); font-weight: 500; }

.compare-table tbody tr.is-current {
  background: rgba(244, 123, 32, 0.08);
  position: relative;
}
.compare-table tbody tr.is-current td:first-child {
  box-shadow: inset 3px 0 0 var(--de-orange);
  font-weight: 700;
}
.compare-table tbody tr.is-current td { color: var(--ink); }
.compare-table tbody tr.is-current .compare-loss { color: var(--de-orange); font-weight: 700; }

.narrative-sources {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.narrative-sources a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(15, 33, 54, 0.2);
  text-underline-offset: 2px;
}
.narrative-sources a:hover { color: var(--de-orange); text-decoration-color: var(--de-orange); }

/* Curve chart */
.curve-chart-wrap {
  margin-top: 6px;
}
.curve-chart {
  width: 100%;
  height: auto;
  display: block;
}
.curve-chart .curve-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.curve-chart .curve-axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.curve-chart .curve-axis-title {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.curve-chart .curve-line {
  fill: none;
  stroke: var(--de-navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
}
.curve-chart .curve-fill {
  fill: url(#curveGradient);
  opacity: 0.35;
}
.curve-chart .curve-dot {
  fill: #fff;
  stroke: var(--de-navy);
  stroke-width: 2;
  transition: transform 160ms ease;
}
.curve-chart .curve-dot--current {
  fill: var(--de-orange);
  stroke: var(--de-orange);
  stroke-width: 3;
}
.curve-chart .curve-dot-halo {
  fill: var(--de-orange);
  opacity: 0.18;
}
.curve-chart .curve-dot-label {
  fill: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.curve-chart .curve-dot-label--current {
  fill: var(--de-orange);
  font-weight: 800;
  font-size: 12px;
}

@media (max-width: 900px) {
  .narrative-grid { grid-template-columns: 1fr; gap: 20px; margin: 32px 0 20px; }
  .narrative-block { padding: 22px 20px 20px; }
  .narrative-title { font-size: 19px; }
}

/* ============ ENGINEERING READOUT ============ */
.engineering-details {
  margin: 20px 0 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.engineering-summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--de-navy);
  transition: background 140ms ease;
}
.engineering-summary::-webkit-details-marker { display: none; }
.engineering-summary:hover { background: rgba(15, 33, 54, 0.03); }
.engineering-summary-label { text-transform: uppercase; }
.engineering-chevron {
  transition: transform 220ms ease;
  color: var(--muted);
}
.engineering-details[open] .engineering-chevron { transform: rotate(180deg); }
.engineering-inner {
  padding: 8px 20px 20px;
  border-top: 1px solid var(--line);
}

/* Pro Mode: always-visible engineering block (no <details>) */
.pro-engineering {
  margin: 36px 0 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-sm);
}
.section-head--compact { margin-bottom: 20px; }
.pro-engineering-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--de-navy);
  margin: 0 0 4px;
}
.pro-engineering-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Two big-number cards (rigid + flex) */
.engineering-headline { margin: 16px 0 20px; }
.engineering-headline-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.engineering-hcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border-left-width: 4px;
  border-left-style: solid;
  min-width: 0;
}
.engineering-hcard--rigid { border-left-color: #2b6cb0; }
.engineering-hcard--flex  { border-left-color: var(--de-orange); }
.engineering-hcard-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.engineering-hcard-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 40px;
  font-weight: 700;
  color: var(--de-navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.engineering-hcard-unit {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.engineering-hcard-meta {
  margin-top: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}

/* Six pill tiles: Reynolds, regime, friction f, compression, friction rate, effective ID */
.engineering-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.eng-tile {
  background: #f0f3f7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  min-width: 0;
}
.eng-tile-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.eng-tile-val {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--de-navy);
  letter-spacing: -0.01em;
  line-height: 1;
}
.eng-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbe6f4;
  color: #2b6cb0;
}
.eng-badge.eng-badge--laminar      { background: #d8ecd8; color: #2f7a2f; }
.eng-badge.eng-badge--transitional { background: #fce9c9; color: #a56b1a; }

.engineering-fineprint {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-style: italic;
}

@media (max-width: 900px) {
  .engineering-headline-cards { grid-template-columns: 1fr; }
  .engineering-tiles { grid-template-columns: 1fr 1fr; }
  .engineering-hcard-big { font-size: 32px; }
  .pro-engineering { padding: 20px 18px 18px; }
}

/* ============ DUAL-CURVE CHART (Pro Mode) ============ */
.dualcurve-panel {
  margin: 28px 0 4px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.dualcurve-head { margin-bottom: 14px; }
.dualcurve-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--de-navy);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dualcurve-title::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--de-navy);
  border-radius: 50%;
  display: inline-block;
}
.dualcurve-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.5;
}
.dualcurve-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink);
  margin-top: 8px;
}
.dualcurve-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.dualcurve-legend-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid;
}
.dualcurve-legend-dot--rigid { border-color: #2b6cb0; background: rgba(43, 108, 176, 0.15); }
.dualcurve-legend-dot--flex  { border-color: var(--de-orange); background: rgba(244, 123, 32, 0.15); }
.dualcurve-chart-wrap {
  position: relative;
  width: 100%;
}
.dualcurve-chart {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.dualcurve-tooltip {
  position: absolute;
  background: #0f2136;
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  pointer-events: none;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 120ms ease;
  z-index: 5;
}
.dualcurve-tooltip[hidden] { display: none; }
.dualcurve-tooltip-cfm { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.dualcurve-tooltip-row { display: flex; align-items: center; gap: 6px; }
.dualcurve-tooltip-sq {
  width: 10px; height: 10px;
  display: inline-block;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .dualcurve-panel { padding: 16px 14px; }
  .dualcurve-title { font-size: 15px; }
}

/* ============ CAPTURE (shared) ============ */
.capture-input {
  height: 44px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  min-width: 0;
}
.capture-input::placeholder { color: #9aa4b0; }
.capture-input:focus {
  outline: none;
  border-color: var(--de-orange);
  box-shadow: 0 0 0 3px rgba(244, 123, 32, 0.18);
}
.capture-input.is-invalid {
  border-color: #c94a3a;
  box-shadow: 0 0 0 3px rgba(201, 74, 58, 0.12);
}
.capture-fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.capture-success {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(20, 145, 90, 0.08);
  color: #147450;
  border: 1px solid rgba(20, 145, 90, 0.25);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.capture-success[hidden] { display: none; }
.capture-success svg { flex: none; }

/* ============ CAPTURE — INLINE (results panel) ============ */
.capture--inline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  margin: 24px 0 16px;
  box-shadow: var(--shadow-sm);
}
.capture-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--de-orange);
  margin-bottom: 6px;
}
.capture-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.capture--inline .capture-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) 90px 130px auto;
  gap: 10px;
  align-items: center;
}
.capture--inline .capture-input--small { text-align: left; }
.capture-submit { height: 44px; padding: 0 20px; white-space: nowrap; }

@media (max-width: 900px) {
  .capture--inline .capture-fields {
    grid-template-columns: 1fr 1fr;
  }
  .capture--inline .capture-input:nth-of-type(1) { grid-column: 1 / -1; }  /* name */
  .capture--inline .capture-input:nth-of-type(2) { grid-column: 1 / -1; }  /* email */
  .capture-submit { grid-column: 1 / -1; }
}

/* ============ LEAD MAGNET (always visible) ============ */
.lead-magnet {
  padding: 40px 0 72px;
  background: var(--surface);
}
.lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  background: linear-gradient(135deg, var(--de-navy) 0%, #14314f 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px 44px 40px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.lead-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(244, 123, 32, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.lead-copy { position: relative; z-index: 1; }
.lead-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--de-orange);
  margin-bottom: 10px;
}
.lead-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #fff;
}
.lead-lede {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 18px;
}
.lead-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lead-bullets li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.lead-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 6px;
  border-left: 2px solid var(--de-orange);
  border-bottom: 2px solid var(--de-orange);
  transform: rotate(-45deg);
}

.capture--stacked {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  align-self: start;
}
.capture-fields--stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.capture-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.capture-submit--stacked { width: 100%; margin-top: 4px; }
.capture--stacked .capture-fineprint { color: var(--muted); }

@media (max-width: 900px) {
  .lead-card {
    grid-template-columns: 1fr;
    padding: 28px 24px 24px;
    gap: 24px;
  }
  .lead-title { font-size: 22px; }
  .lead-magnet { padding: 24px 0 40px; }
}

/* ============ PRO MODE ============ */
.pro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.pro-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slider-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.slider-label label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.slider-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--de-orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

.slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--de-orange) 0%, var(--de-orange) var(--fill, 0%), var(--bg-3) var(--fill, 0%), var(--bg-3) 100%);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.slider-row input[type="range"]:focus-visible {
  outline: 2px solid var(--de-orange);
  outline-offset: 3px;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--de-orange);
  box-shadow: 0 2px 6px rgba(15, 33, 54, 0.16);
  cursor: pointer;
  transition: transform 120ms ease;
}
.slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}
.slider-row input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--de-orange);
  box-shadow: 0 2px 6px rgba(15, 33, 54, 0.16);
  cursor: pointer;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pro-reset {
  align-self: flex-start;
  margin-top: 4px;
}

/* Right column: live readout */
.pro-readout {
  position: sticky;
  top: 92px;
  padding: 32px;
  background: var(--de-navy);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.pro-readout-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.pro-readout-big {
  font-size: 88px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--de-orange);
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
}
.pro-readout-caption {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.pro-readout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.pro-mini-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.pro-mini-big {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 2px;
}
.pro-mini-caption {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
}

.pro-basis {
  margin: 20px 0 24px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}
.pro-basis strong { color: #fff; font-weight: 700; }

.pro-readout .cta-row { padding-top: 4px; }
.pro-readout .cta-row .btn-primary { width: 100%; text-align: center; justify-content: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pro-layout { grid-template-columns: 1fr; gap: 24px; }
  .pro-readout { position: static; }
}

@media (max-width: 780px) {
  .hero { padding: 52px 0 32px; }
  .mode-panel { padding: 40px 0; }
  .results { padding: 40px 0 56px; }
  .results-cards { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .pro-readout-big { font-size: 72px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .mode-toggle { align-self: flex-start; }
  .defect-grid { grid-template-columns: 1fr; }
  .pro-form { padding: 20px; }
  .pro-readout { padding: 24px; }
  .pro-readout-big { font-size: 64px; }
  .pro-readout-split { grid-template-columns: 1fr; gap: 16px; }
}
