:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --surface: #fbfbfc;
  --surface-2: #e9ebf0;
  --text: #17191e;
  --muted: #5c616d;
  --line: #ced2da;
  --accent: #3557d6;
  --accent-strong: #2644b7;
  --accent-soft: #e2e8ff;
  --danger: #a33131;
  --shadow: 0 18px 60px rgba(35, 45, 78, .13);
  --radius: 16px;
  --radius-small: 10px;
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #181b22;
    --surface-2: #252a34;
    --text: #f1f3f7;
    --muted: #aab0bc;
    --line: #343a46;
    --accent: #7f9aff;
    --accent-strong: #aabaff;
    --accent-soft: #222c51;
    --danger: #ff9a9a;
    --shadow: 0 20px 70px rgba(2, 5, 12, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 10; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-small); }
.skip-link:focus { top: 16px; }

.site-header {
  width: min(calc(100% - 32px), var(--max));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 780; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 12px; letter-spacing: -.03em; }
.site-header nav, footer nav { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
.site-header nav a, footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.site-header nav a:hover, footer nav a:hover { color: var(--text); }
.site-header .nav-cta { color: var(--text); border: 1px solid var(--line); padding: 9px 14px; border-radius: var(--radius-small); }

.hero {
  width: min(calc(100% - 32px), var(--max));
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
  padding: 48px 0 72px;
}
.hero-copy { max-width: 660px; }
.eyebrow, .kicker { margin: 0 0 16px; color: var(--accent); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 11ch; margin-bottom: 24px; font-size: clamp(44px, 6vw, 74px); line-height: .98; letter-spacing: -.065em; }
.hero-sub { max-width: 48ch; margin-bottom: 30px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid transparent; border-radius: var(--radius-small); font-weight: 760; text-decoration: none; transition: transform .18s ease, background-color .18s ease, border-color .18s ease; white-space: nowrap; }
.button:active, button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: #f7f8ff; }
.button.primary:hover { background: var(--accent-strong); }
.button.secondary { border-color: var(--line); background: var(--surface); color: var(--text); }
.button.full { width: 100%; }
.button[aria-disabled="true"] { cursor: not-allowed; opacity: .62; pointer-events: none; }
.text-link { color: var(--accent); font-weight: 760; text-underline-offset: 4px; }

.quick-card { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.quick-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.quick-heading .kicker { margin-bottom: 7px; }
.quick-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.privacy-note { color: var(--muted); font-size: 12px; }
.quick-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 720; }
label small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.35; }
input, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--bg); color: var(--text); padding: 0 12px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:invalid { border-color: var(--danger); }
.quick-output { margin: 24px 0 18px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick-output span, .quick-output small { display: block; color: var(--muted); }
.quick-output strong { display: block; margin: 2px 0; font-size: clamp(36px, 6vw, 58px); line-height: 1; letter-spacing: -.055em; }

.signal-strip { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.signal-strip p { display: grid; gap: 3px; margin: 0; padding: 20px 24px; }
.signal-strip p + p { border-left: 1px solid var(--line); }
.signal-strip strong { font-size: 14px; }
.signal-strip span { color: var(--muted); font-size: 13px; }

.calculator-section, .benchmarks-section, .faq-section { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 112px 0; }
.section-intro { max-width: 670px; margin-bottom: 38px; }
.section-intro h2, .formula-copy h2, .kit-copy h2, .faq-section > h2 { margin-bottom: 14px; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.02; letter-spacing: -.05em; }
.section-intro p, .formula-copy > p, .kit-copy > p { color: var(--muted); font-size: 17px; }
.calculator-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); align-items: start; gap: 24px; }
.calculator-form { display: grid; gap: 16px; }
.form-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 4px; }
.compact-field { max-width: 150px; }
.text-button, .icon-button { border: 0; background: transparent; color: var(--accent); padding: 8px; font-weight: 760; cursor: pointer; }
fieldset { margin: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
legend { padding: 0 8px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-error { margin: 0; padding: 12px 14px; border: 1px solid var(--danger); border-radius: var(--radius-small); color: var(--danger); }

.results-panel { position: sticky; top: 20px; padding: 26px; border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .results-panel { background: #f0f2f6; color: #14161b; } }
.results-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.results-header .kicker { color: inherit; opacity: .65; margin-bottom: 8px; }
.results-header h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.results-panel .icon-button { color: inherit; border: 1px solid currentColor; border-radius: 8px; opacity: .8; }
.quote-total { padding: 28px 0 24px; }
.quote-total span { display: block; font-size: clamp(46px, 6vw, 70px); font-weight: 820; line-height: 1; letter-spacing: -.06em; }
.quote-total small { opacity: .67; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 24px; overflow: hidden; border: 1px solid rgba(127, 127, 127, .34); border-radius: var(--radius-small); background: rgba(127, 127, 127, .34); }
.metrics-grid div { padding: 13px; background: var(--text); }
@media (prefers-color-scheme: dark) { .metrics-grid div { background: #f0f2f6; } }
.metrics-grid dt { opacity: .62; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.metrics-grid dd { margin: 2px 0 0; font-size: 17px; font-weight: 800; }
.breakdown { padding: 18px 0; border-top: 1px solid rgba(127, 127, 127, .42); border-bottom: 1px solid rgba(127, 127, 127, .42); }
.breakdown h3 { margin-bottom: 12px; font-size: 14px; }
.breakdown dl { display: grid; gap: 8px; margin: 0; }
.breakdown dl div { display: flex; justify-content: space-between; gap: 18px; font-size: 13px; }
.breakdown dt { opacity: .67; }
.breakdown dd { margin: 0; font-weight: 720; }
.quote-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 20px 0; }
.quote-options button { min-width: 0; border: 1px solid rgba(127, 127, 127, .45); border-radius: 8px; background: transparent; color: inherit; padding: 10px 6px; cursor: pointer; }
.quote-options button.selected { background: var(--bg); color: var(--text); }
@media (prefers-color-scheme: dark) { .quote-options button.selected { background: #17191e; color: #f1f3f7; } }
.quote-options span, .quote-options strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.quote-options span { font-size: 10px; opacity: .67; }
.quote-options strong { margin-top: 3px; font-size: 13px; }
.copy-status { min-height: 18px; margin: 9px 0 0; text-align: center; font-size: 12px; opacity: .7; }

.formula-section { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 48px 0 112px; display: grid; grid-template-columns: .8fr 1.2fr; grid-template-rows: auto auto; gap: 24px 42px; }
.formula-copy { align-self: end; padding-bottom: 16px; }
.workbench-visual { grid-column: 2; grid-row: 1 / 3; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); min-height: 520px; }
.workbench-visual img { width: 100%; height: 100%; object-fit: cover; }
.workbench-visual figcaption { padding: 9px 12px; background: var(--surface); color: var(--muted); font-size: 12px; }
.formula-card { align-self: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); }
.formula-card p { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.formula-card strong { display: block; margin-bottom: 8px; color: var(--accent-strong); font-size: clamp(21px, 2.7vw, 34px); letter-spacing: -.035em; }
.formula-card span { color: var(--muted); font-size: 13px; }

.benchmark-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.benchmark-grid article { min-height: 210px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.benchmark-grid article:nth-child(2), .benchmark-grid article:nth-child(3) { background: var(--accent-soft); }
.benchmark-grid span { color: var(--muted); font-size: 13px; }
.benchmark-grid strong { display: block; margin: 20px 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1; letter-spacing: -.045em; }
.benchmark-grid p { max-width: 38ch; color: var(--muted); font-size: 14px; }
.source-note { margin-top: 14px; color: var(--muted); font-size: 12px; }

.kit-section { width: min(calc(100% - 32px), var(--max)); margin: 48px auto 112px; padding: clamp(32px, 5vw, 68px); display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 54px; border-radius: var(--radius); background: var(--accent-soft); }
.kit-copy { max-width: 650px; }
.kit-copy ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 26px; margin: 28px 0 0; padding: 0; list-style: none; }
.kit-copy li { padding-left: 20px; position: relative; font-weight: 680; }
.kit-copy li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.price-block { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-block > span { color: var(--muted); font-size: 13px; }
.price-block > strong { display: block; font-size: 72px; line-height: 1; letter-spacing: -.065em; }
.price-block > p { color: var(--muted); }
.price-block > small { display: block; margin-top: 10px; color: var(--muted); text-align: center; }
.kit-preview { grid-column: 1 / -1; margin: 4px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 64px rgba(24, 27, 35, .12); }
.kit-preview img { display: block; width: 100%; height: auto; }
.kit-preview figcaption { padding: 12px 16px; color: var(--muted); font-size: 12px; }

.faq-section { display: grid; grid-template-columns: .65fr 1.35fr; gap: 70px; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { padding: 20px 0; cursor: pointer; font-weight: 760; }
details p { max-width: 62ch; padding: 0 30px 18px 0; color: var(--muted); }

footer { width: min(calc(100% - 32px), var(--max)); min-height: 160px; margin: 0 auto; padding: 42px 0; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 24px; border-top: 1px solid var(--line); }
footer p { margin: 0; color: var(--muted); font-size: 14px; }

.content-page { width: min(calc(100% - 32px), 860px); margin: 0 auto; padding: 88px 0 120px; }
.content-page h1 { max-width: 14ch; font-size: clamp(42px, 7vw, 68px); }
.content-page .lead { color: var(--muted); font-size: 20px; }
.content-page .byline { margin: -4px 0 32px; color: var(--muted); font-size: 13px; font-weight: 680; }
.content-page h2 { margin: 62px 0 14px; font-size: 32px; letter-spacing: -.035em; }
.content-page h3 { margin-top: 32px; }
.content-page p, .content-page li { color: var(--muted); font-size: 17px; line-height: 1.72; }
.content-page .inline-cta { margin: 48px 0; padding: 26px; border-radius: var(--radius); background: var(--accent-soft); }
.content-page code { padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); overflow-wrap: anywhere; }
.content-page a { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 68px 0 84px; }
  .hero-copy { max-width: 720px; }
  .calculator-shell { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .formula-section { grid-template-columns: 1fr; grid-template-rows: auto; }
  .workbench-visual { grid-column: 1; grid-row: auto; min-height: 420px; }
  .kit-section { grid-template-columns: 1fr; }
  .faq-section { grid-template-columns: 1fr; gap: 30px; }
  footer { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header nav a:not(.nav-cta) { display: none; }
  .site-header { width: min(calc(100% - 24px), var(--max)); }
  .hero, .signal-strip, .calculator-section, .formula-section, .benchmarks-section, .kit-section, .faq-section, footer { width: min(calc(100% - 24px), var(--max)); }
  .hero { padding-top: 44px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .quick-fields, .field-grid, .signal-strip, .benchmark-grid { grid-template-columns: 1fr; }
  .quick-fields { gap: 14px; }
  .signal-strip p + p { border-left: 0; border-top: 1px solid var(--line); }
  .calculator-section, .benchmarks-section, .faq-section { padding: 82px 0; }
  fieldset { padding: 20px 16px; }
  .workbench-visual { min-height: 330px; }
  .kit-section { padding: 28px 20px; margin-bottom: 80px; }
  .kit-copy ul { grid-template-columns: 1fr; }
  .quote-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
