/* Pips Made Simple — style.css
   Mobile-first, dark theme. Typography and share images load from
   Google Fonts / og-image.png; everything else is self-contained.
   Palette: bg #0b0f14, panel #141b24, border #26303d,
   text #f2f4f7, muted #c8d0da, faint #8b98a9, accent #7ee787.
   Type: Sora (display) + Inter (body), system fallbacks throughout. */

:root {
  --bg: #0b0f14;
  --panel: #141b24;
  --panel-alt: #10161e;
  --border: #26303d;
  --text: #f2f4f7;
  --muted: #c8d0da;
  --faint: #8b98a9;
  --accent: #7ee787;
  --accent-strong: #6bd977;
  --accent-soft: rgba(126, 231, 135, 0.12);
  --accent-line: rgba(126, 231, 135, 0.4);
  --accent-dark: #0b0f14;
  --danger: #ff9c9c;
  --radius: 14px;
  --radius-lg: 18px;
  --header-h: 64px;
  --wrap: 1080px;
  --wrap-narrow: 760px;
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 18px 36px -20px rgba(0, 0, 0, 0.65);
  --shadow-panel: 0 28px 56px -28px rgba(0, 0, 0, 0.7);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: #2e3d4d var(--bg);
}
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2e3d4d;
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3a4c61; }

::selection { background: var(--accent); color: var(--accent-dark); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }

/* Anchor offset for the sticky header */
section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.container-narrow { max-width: var(--wrap-narrow); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.16;
  margin-top: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); font-weight: 700; letter-spacing: -0.022em; margin-bottom: 16px; }
h3 { font-size: 1.13rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
p { margin-top: 0; margin-bottom: 16px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-dark);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.86);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 15, 20, 0.94);
  border-bottom-color: rgba(126, 231, 135, 0.22);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.75);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.07em;
  font-size: 14.5px;
  white-space: nowrap;
  min-height: 44px;
}
.wordmark-mark { display: inline-flex; flex: none; }
.wordmark-mark svg { display: block; filter: drop-shadow(0 4px 10px rgba(126, 231, 135, 0.25)); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.primary-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(11, 15, 20, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
}
.primary-nav.is-open { display: block; }
.primary-nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  padding: 11px 0;
  min-height: 44px;
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--text); }
.primary-nav .btn-nav { margin-top: 10px; text-align: center; }
.primary-nav a.btn-primary { color: var(--accent-dark); }
.primary-nav a.btn-primary:hover, .primary-nav a.btn-primary:focus-visible { color: var(--accent-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  min-height: 48px;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease,
    background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #9df0a4 0%, var(--accent) 52%, var(--accent-strong) 100%);
  color: var(--accent-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 12px 26px -12px rgba(126, 231, 135, 0.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 18px 32px -12px rgba(126, 231, 135, 0.6);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border: 1px solid #3a4656;
}
.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.7);
}
.btn-lg { font-size: 17.5px; padding: 16px 26px; min-height: 54px; }

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 12px;
}
.cta-row .btn { width: 100%; }

.microcopy {
  font-size: 14px;
  color: var(--faint);
  text-align: center;
  margin-bottom: 0;
}

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0) 120px),
    var(--panel-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section p { color: var(--muted); }
.section h2, .section h3 { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 68px;
  background:
    radial-gradient(ellipse 65% 45% at 78% -6%, rgba(126, 231, 135, 0.13), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(126, 231, 135, 0.09), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 231, 135, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 135, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 0%, #000 25%, transparent 76%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 0%, #000 25%, transparent 76%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .subhead {
  font-size: clamp(1.15rem, 4.5vw, 1.42rem);
  color: var(--text);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.hero-body { color: var(--muted); font-size: 1.05rem; }
.hero .microcopy { text-align: left; }

/* Hero product visual — the break-and-retest diagram in a glass panel */
.hero-visual {
  margin: 42px 0 0;
  max-width: 640px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008) 55%),
    rgba(20, 27, 36, 0.72);
  border: 1px solid rgba(126, 231, 135, 0.28);
  border-radius: var(--radius-lg);
  padding: 18px 18px 12px;
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-visual svg { display: block; width: 100%; height: auto; }
.hero-visual figcaption {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--faint);
  text-align: center;
  padding: 10px 6px 4px;
}
.hero-visual .svg-label {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 1.2px;
  fill: var(--muted);
}
.hero-visual .svg-num {
  font-family: var(--font-display);
  font-weight: 700;
  fill: var(--accent);
}
.hero-visual .svg-faint {
  font-family: var(--font-body);
  font-weight: 600;
  fill: var(--faint);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 30px;
}
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0) 46%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease-out), border-color 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 231, 135, 0.45);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card p { margin-bottom: 0; color: var(--muted); }
.card h3 { color: var(--text); }

/* ---------- Steps (The Setup) ---------- */
.steps, .how-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 30px 0;
}
.steps { position: relative; }
.steps::before {
  content: "";
  position: absolute;
  left: 37px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(126, 231, 135, 0.04),
    rgba(126, 231, 135, 0.38) 18%,
    rgba(126, 231, 135, 0.38) 82%,
    rgba(126, 231, 135, 0.04));
  z-index: 0;
}
.steps li, .how-steps li {
  counter-increment: step;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0) 46%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 20px 68px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 0.22s var(--ease-out), border-color 0.22s ease, box-shadow 0.22s ease;
}
.steps li:hover, .how-steps li:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 231, 135, 0.4);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.steps li::before, .how-steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #182619;
  border: 1px solid rgba(126, 231, 135, 0.5);
  box-shadow: 0 0 0 5px var(--panel);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 32px;
  text-align: center;
}
.steps li h3, .how-steps li h3 { margin-bottom: 4px; }
.steps li p, .how-steps li p { margin-bottom: 0; color: var(--muted); }

.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 20px;
  margin: 36px 0;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

.subheading { margin-top: 38px; font-size: 1.32rem; }

/* ---------- Filters (SVG check markers) ---------- */
.filters {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.filters li {
  position: relative;
  padding: 13px 0 13px 46px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.filters li:last-child { border-bottom: none; }
.filters li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background-color: rgba(126, 231, 135, 0.1);
  border: 1px solid rgba(126, 231, 135, 0.42);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ee787' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px 13px;
  background-position: center;
  background-repeat: no-repeat;
}
.filters li strong { color: var(--text); font-weight: 600; }

.filter-line {
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 22px;
  margin-bottom: 0;
}

/* ---------- Guide panel ---------- */
.guide-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(126, 231, 135, 0.05), rgba(255, 255, 255, 0.008) 46%),
    var(--panel);
  border: 1px solid rgba(126, 231, 135, 0.35);
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.guide-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 231, 135, 0.75), transparent);
}
.guide-panel h2 { margin-bottom: 12px; }
.list-heading { margin-top: 24px; }
.check-list { list-style: none; padding: 0; margin: 12px 0 24px; }
.check-list li {
  position: relative;
  padding: 9px 0 9px 38px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: rgba(126, 231, 135, 0.1);
  border: 1px solid rgba(126, 231, 135, 0.42);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ee787' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.why-free {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--muted) !important;
  font-size: 15px;
}
.guide-panel .cta-row { margin-top: 20px; }
.note-line {
  font-size: 14px;
  color: var(--faint) !important;
  margin-top: 16px;
  margin-bottom: 0;
}

/* ---------- Who this is for ---------- */
.who-list { list-style: none; padding: 0; margin: 24px 0; }
.who-list li {
  position: relative;
  padding: 11px 0 11px 34px;
  color: var(--muted);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.who-list li:last-child { border-bottom: none; }
.who-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ee787' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
}
.who-close { color: var(--text) !important; font-weight: 700; font-size: 1.1rem; margin-bottom: 0; }

/* ---------- About ---------- */
.signature { color: var(--accent) !important; font-weight: 700; margin-top: 20px; margin-bottom: 0; }

/* ---------- FAQ (JS-animated accordion; native details fallback) ---------- */
.faq-list { margin-top: 28px; }
.faq-item {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0) 46%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: height 0.38s var(--ease-out), border-color 0.22s ease;
}
.faq-item:hover { border-color: rgba(126, 231, 135, 0.35); }
.faq-item[open] { border-color: rgba(126, 231, 135, 0.38); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 18px 52px 18px 20px;
  min-height: 56px;
  position: relative;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s var(--ease-out);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.faq-item p {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--muted);
}

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
  overflow: hidden;
  padding: 68px 0;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 112%, rgba(126, 231, 135, 0.13), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
}
.final-cta h2 { margin-bottom: 26px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 48px;
  background: var(--panel-alt);
}
.footer-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.footer-wordmark svg { display: block; flex: none; }
.footer-ig { color: var(--muted); margin-bottom: 16px; }
.footer-disclaimer { font-size: 13px; color: var(--faint); margin-bottom: 16px; }
.footer-copy { font-size: 13px; color: var(--faint); margin-bottom: 0; }

/* ---------- Scroll reveal (JS adds .js-reveal to <html> first) ---------- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s var(--ease-out);
  will-change: opacity, transform;
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero-visual { padding: 12px 12px 8px; margin-top: 34px; }
  .hero-visual .svg-faint { display: none; }
  .hero-visual figcaption { font-size: 13px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .section { padding: 76px 0; }
  .hero { padding: 100px 0 92px; }
  .cta-row { flex-direction: row; }
  .cta-row .btn { width: auto; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-panel { padding: 38px 38px; }
  .nav-toggle { display: none; }
  .primary-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 28px;
    background: none;
    border: none;
    padding: 0;
  }
  .primary-nav a { padding: 10px 0; }
  .primary-nav .btn-nav { margin-top: 0; padding: 10px 18px; font-size: 15px; min-height: 44px; }
  .how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .how-steps li { margin-bottom: 0; padding: 20px 20px 20px 68px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .card:hover, .steps li:hover, .how-steps li:hover,
  .btn-primary:hover, .btn-ghost:hover { transform: none; }
}

/* ---------- Guide modal ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(126, 231, 135, 0.045), rgba(255, 255, 255, 0.008) 46%),
    var(--panel);
  border: 1px solid rgba(126, 231, 135, 0.35);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  margin: auto;
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(126, 231, 135, 0.75), transparent);
}
.modal-card h2 { margin-bottom: 10px; padding-right: 40px; }
.modal-intro { color: var(--muted); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.form-field input {
  display: block;
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.4;
  padding: 12px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.form-field input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-field input[aria-invalid="true"] { border-color: var(--danger); }
.field-error {
  color: var(--danger);
  font-size: 14px;
  margin: 6px 0 0;
  min-height: 0;
}
.field-error:empty { display: none; }
.form-error {
  color: var(--danger);
  background: rgba(255, 156, 156, 0.08);
  border: 1px solid rgba(255, 156, 156, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  margin-bottom: 16px;
}
.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 0;
  overflow: hidden;
}
.modal-submit { width: 100%; border: none; cursor: pointer; }
.modal-submit:disabled { opacity: 0.6; cursor: wait; }
.modal-microcopy { margin-top: 12px; }

/* ---------- Congrats ---------- */
.congrats-section[hidden] { display: none; }
.congrats-panel h2:focus { outline: none; }
.congrats-block {
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 24px;
}
.congrats-block p { color: var(--muted); }
.congrats-block .btn { margin-top: 4px; }

@media (min-width: 720px) {
  .modal-card { padding: 36px 36px; }
}
