/* ==========================================================================
   RecoverMCP — styles
   Neutral, document-like design. One accent (teal) used sparingly.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --text: #0f1115;
  --text-2: #4b5260;
  --text-3: #6b7280;

  --accent: #0f766e;
  --accent-soft: #e7f4f2;
  --accent-text: #0f766e;

  --danger: #b42318;
  --danger-soft: #fdecea;
  --success: #067647;
  --success-soft: #e7f5ec;
  --warning: #b54708;

  --btn-bg: #0f1115;
  --btn-fg: #ffffff;
  --btn-bg-hover: #2a2e36;

  --brand-mark: #0f1115;
  --brand-mark-fg: #ffffff;

  --code-bg: #0e1117;
  --code-border: #0e1117;
  --code-text: #d6dae1;
  --code-muted: #8b93a1;
  --code-key: #9ecbff;
  --code-str: #a5d6a7;
  --code-num: #f5c38b;
  --code-fn: #e2c4ff;
  --code-err: #ff9b8f;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.04);
  --shadow: 0 1px 2px rgba(15, 17, 21, 0.04), 0 8px 24px rgba(15, 17, 21, 0.06);

  --container: 1120px;
  --gutter: 24px;
  --header-h: 64px;
  --section-y: 104px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --bg-subtle: #111419;
    --surface: #14171c;
    --border: #23272f;
    --border-strong: #323843;

    --text: #e8eaee;
    --text-2: #a7aeba;
    --text-3: #838b98;

    --accent: #3cc2b1;
    --accent-soft: rgba(60, 194, 177, 0.12);
    --accent-text: #5fd3c3;

    --danger: #f97066;
    --danger-soft: rgba(249, 112, 102, 0.12);
    --success: #47cd89;
    --success-soft: rgba(71, 205, 137, 0.12);
    --warning: #fdb022;

    --btn-bg: #e8eaee;
    --btn-fg: #0b0d10;
    --btn-bg-hover: #ffffff;

    --brand-mark: #e8eaee;
    --brand-mark-fg: #0b0d10;

    --code-bg: #0f1217;
    --code-border: #23272f;

    --shadow-sm: none;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; stroke-width: 2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); }

.btn-ghost { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-ghost .icon { transition: transform 0.15s ease; }
.btn-ghost:hover .icon { transform: translateX(2px); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.tag-neutral { background: var(--bg-subtle); color: var(--text-2); border: 1px solid var(--border); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark { width: 26px; height: 26px; color: var(--brand-mark); }
.brand-mark g { stroke: var(--brand-mark-fg); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav ul { display: flex; gap: 28px; }
.primary-nav ul a {
  font-size: 0.9375rem;
  color: var(--text-2);
  transition: color 0.15s ease;
}
.primary-nav ul a:hover { color: var(--text); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 16px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 var(--section-y);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.lead {
  margin-top: 24px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.status-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-3);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent);
}

/* Hero code panel */
.hero-panel {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--code-text);
  overflow: hidden;
}
.panel-block { padding: 20px 22px; }
.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--code-muted);
}
.hero-panel .tag-danger { background: rgba(255, 155, 143, 0.12); color: var(--code-err); }
.hero-panel .tag-ok { background: rgba(165, 214, 167, 0.12); color: var(--code-str); }

.panel-divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--code-muted);
}
.panel-divider::before,
.panel-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.panel-divider span {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
.code code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; }
.c-key { color: var(--code-key); }
.c-str { color: var(--code-str); }
.c-num { color: var(--code-num); }
.c-fn  { color: var(--code-fn); }
.c-err { color: var(--code-err); }

.hero-panel figcaption {
  padding: 12px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--code-muted);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--border);
}
.section-subtle { background: var(--bg-subtle); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.section-intro {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--text-2);
}
.section-closing {
  margin-top: 48px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}
.split-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.split-head .section-head { margin-bottom: 0; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.9375rem; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.card-icon.icon-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Five questions / numbered lists ---------- */
.question-list,
.dev-steps {
  display: grid;
  border-top: 1px solid var(--border);
}
.question-list li,
.dev-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.question-list h3,
.dev-steps h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.question-list p,
.dev-steps p { color: var(--text-2); font-size: 0.9375rem; }

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 24px;
  border-top: 2px solid var(--border-strong);
}
.step:first-child { border-top-color: var(--accent); }
.step-num {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-text);
}
.step h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Example comparison ---------- */
.example { margin-top: 88px; }
.example-title {
  font-size: 1.25rem;
  margin-bottom: 24px;
}
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.trace {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.trace-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.trace-head h4 { font-size: 0.9375rem; }
.trace-good .trace-head { border-top: 3px solid var(--success); }
.trace-bad .trace-head { border-top: 3px solid var(--border-strong); }

.trace-list {
  flex: 1;
  padding: 12px 24px;
}
.trace-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.trace-list li + li { border-top: 1px dashed var(--border); }
.role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--text-3);
}
.trace-list li.is-error > span:last-child { color: var(--danger); }
.trace-list li.is-ok > span:last-child { color: var(--success); font-weight: 500; }
.trace-list li.is-recover .role { color: var(--accent-text); }
.trace-list li.is-recover > span:last-child { color: var(--text); font-weight: 500; }

.trace-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 24px;
  font-size: 0.9375rem;
  border-top: 1px solid var(--border);
}
.trace-result .icon { margin-top: 4px; }
.result-bad { background: var(--danger-soft); color: var(--danger); }
.result-good { background: var(--success-soft); color: var(--success); }
.trace-result strong { font-weight: 600; }

.footnote {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-3);
  max-width: 760px;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.feature h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 0.9375rem; }

.feature-grid .feature:nth-child(3n) { border-right: 0; }
.feature-grid .feature:nth-last-child(-n + 3) { border-bottom: 0; }

.feature-planned {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
}
.feature-planned .card-icon {
  margin-bottom: 0;
  background: var(--bg-subtle);
  color: var(--text-3);
}
.feature-planned h3 { display: flex; align-items: center; gap: 10px; }

/* ---------- Use cases ---------- */
.use-case h3 { margin-bottom: 20px; }
.use-case dl { margin: 0; display: grid; gap: 14px; }
.use-case dl > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
}
.use-case dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.use-case dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.use-case dl > div:last-child dt { color: var(--accent-text); }
.use-case dl > div:last-child dd { color: var(--text); }

/* ---------- Safety ---------- */
.callout {
  margin-top: 40px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.callout h3 { font-size: 0.9375rem; margin-bottom: 6px; }
.callout p { font-size: 0.9375rem; color: var(--text-2); }

.rules {
  counter-reset: rule;
  border-top: 1px solid var(--border);
}
.rules li {
  counter-increment: rule;
  position: relative;
  padding: 22px 0 22px 52px;
  border-bottom: 1px solid var(--border);
}
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-text);
}
.rules h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.rules p { color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Developers ---------- */
.dev-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}
.table-wrap { min-width: 0; }

.tools-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9375rem;
}
.table-title { font-size: 1rem; margin-bottom: 12px; }
.tools-table th,
.tools-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
}
.tools-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.tools-table td { color: var(--text-2); }
.tools-table tbody tr + tr td { border-top: 1px solid var(--border); }
.tools-table td:first-child { white-space: nowrap; width: 1%; }
.tools-table code {
  color: var(--text);
  background: var(--bg-subtle);
}

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 33px;
  width: 14px;
  height: 2px;
  background: var(--text-3);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list summary:hover { color: var(--accent-text); }
.faq-body { padding: 0 48px 24px 0; }
.faq-body p { color: var(--text-2); }

/* ---------- Waitlist ---------- */
.waitlist { background: var(--bg-subtle); }
.waitlist-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.waitlist-copy h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  letter-spacing: -0.025em;
}
.waitlist-copy p {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--text-2);
  max-width: 30rem;
}

.waitlist-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.optional { font-weight: 400; color: var(--text-3); }
.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); opacity: 0.8; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.field-error { font-size: 0.8125rem; color: var(--danger); }

.form-note {
  font-size: 0.8125rem;
  color: var(--text-3);
  text-align: center;
}
.waitlist-form button[disabled] { opacity: 0.6; cursor: progress; }

.waitlist-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--success-soft);
  outline: none;
}
.waitlist-success p { color: var(--text); }
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: var(--bg);
}
.success-icon .icon { width: 16px; height: 16px; stroke-width: 2.5; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.footer-col h2 {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a,
.muted-link {
  font-size: 0.9375rem;
  color: var(--text-2);
}
.footer-col a:hover { color: var(--text); }
.muted-link { color: var(--text-3); }
.soon {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
}
.footer-bottom { margin-top: 48px; }
.footer-bottom p {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --section-y: 88px; }

  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { max-width: 18ch; }
  .hero-panel { max-width: 620px; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }

  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-head { position: static; }

  .dev-grid { grid-template-columns: 1fr; gap: 48px; }

  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid .feature:nth-child(3n) { border-right: 1px solid var(--border); }
  .feature-grid .feature:nth-child(2n) { border-right: 0; }
  .feature-grid .feature:nth-last-child(-n + 3) { border-bottom: 1px solid var(--border); }
  .feature-grid .feature:nth-last-child(-n + 2) { border-bottom: 0; }

  .waitlist-card { grid-template-columns: 1fr; gap: 36px; padding: 40px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .nav-cta { margin-top: 16px; height: 44px; font-size: 0.9375rem; }

  .site-header.menu-open { background: var(--bg); border-bottom-color: var(--border); }

  .grid-3,
  .grid-2,
  .compare { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --section-y: 72px; }

  .hero { padding-top: 48px; }
  .lead { font-size: 1.0625rem; }
  .hero-actions .btn { flex: 1 1 auto; }

  .section-head { margin-bottom: 40px; }

  .steps { grid-template-columns: 1fr; gap: 32px; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid .feature { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .feature-grid .feature:last-child { border-bottom: 0 !important; }
  .feature { padding: 24px 20px; }
  .feature-planned { flex-direction: column; gap: 16px; }

  .card { padding: 22px 20px; }
  .example { margin-top: 64px; }
  .trace-head, .trace-list, .trace-result { padding-left: 18px; padding-right: 18px; }
  .trace-list li { grid-template-columns: 1fr; gap: 2px; }

  .use-case dl > div { grid-template-columns: 1fr; gap: 2px; }

  .rules li { padding-left: 40px; }

  .tools-table, .tools-table tbody, .tools-table tr, .tools-table td { display: block; width: 100%; }
  .tools-table thead { display: none; }
  .tools-table td:first-child { width: 100%; padding-bottom: 4px; }
  .tools-table td:last-child { padding-top: 0; }
  .tools-table tbody tr + tr td { border-top: 0; }
  .tools-table tbody tr + tr { border-top: 1px solid var(--border); }

  .faq-list summary { font-size: 1rem; padding-right: 36px; }
  .faq-body { padding-right: 0; }

  .waitlist-card { padding: 28px 20px; border-radius: var(--radius); }

  .footer-grid { gap: 32px; }
}

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