:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-alt: #f0f4f3;
  --surface-raised: #ffffff;
  --text: #121e1b;
  --text-muted: #3d524c;
  --text-dim: #5c726b;
  --border: #d0dcda;
  --border-subtle: #e3ebe9;
  --teal: #075c56;
  --teal-hover: #03423e;
  --teal-subtle: #e4efec;
  --tag-bg: #e6f0ee;
  --tag-text: #133f38;
  --tag-border: #c4d8d3;
  --hotspot: #c94a29;
  --shadow-sm: 0 1px 2px rgba(18, 30, 27, 0.05);
  --shadow-md: 0 6px 18px rgba(18, 30, 27, 0.08);
  --shadow-lg: 0 12px 32px rgba(18, 30, 27, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --container: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1413;
    --surface: #141f1c;
    --surface-alt: #1a2824;
    --surface-raised: #1f2e29;
    --text: #eef5f3;
    --text-muted: #9cb1ab;
    --text-dim: #778f88;
    --border: #263934;
    --border-subtle: #1c2b27;
    --teal: #34ad9f;
    --teal-hover: #4ec4b6;
    --teal-subtle: #132a25;
    --tag-bg: #162c26;
    --tag-text: #8ce0d4;
    --tag-border: #254940;
    --hotspot: #e06543;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--teal-subtle);
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Accessibility Skip Link */
.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border: 2px solid var(--teal);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Structural Container */
.container {
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

p {
  margin: 0 0 1.25rem;
  max-width: 68ch;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1.75rem;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

/* Navigation Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px var(--teal-subtle);
}

nav.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

nav.main-nav a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

nav.main-nav a:not(.button):hover {
  color: var(--teal);
}

nav.main-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  cursor: pointer;
}

.button-primary {
  background: var(--teal);
  color: #ffffff;
  border: 1px solid var(--teal);
  box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
  .button-primary {
    color: #0b1715;
    background: var(--teal);
    border-color: var(--teal);
  }
}

.button-primary:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--text-dim);
  transform: translateY(-1px);
  text-decoration: none;
}

.button-small {
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0 2rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
  margin: 0;
}

.hero-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
}

.hero-pill-item svg {
  color: var(--teal);
  flex-shrink: 0;
}

/* Product Showcase Frame (Instrument style) */
.product-showcase {
  margin-top: 2rem;
  position: relative;
}

.instrument-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.instrument-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.instrument-lights {
  display: flex;
  gap: 6px;
}

.instrument-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 1000;
  object-fit: cover;
  background: var(--surface-alt);
}

.instrument-caption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Section Separators */
section.landing-section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* 3-Step Process (ADHD scannable, numbered) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 1rem;
  line-height: 1;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.55;
}

/* What You Learn (Focus order, competing elements, clarity) */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.learn-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  border-top: 4px solid var(--teal);
}

.learn-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.learn-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.learn-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Callout Box / Privacy & Science Notices */
.callout-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
}

.callout-box h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.callout-box p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.callout-box .callout-action {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Prediction Limits / Honest Warning */
.prediction-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 5px solid var(--hotspot);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
}

.prediction-box h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.prediction-box p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

/* Compare & Alternatives Links Section (Max 5 per list) */
.reference-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.reference-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.reference-col h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.clean-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.clean-link-list li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0;
}

.clean-link-list li a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* FAQ Accordion */
.faq-list {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--teal);
}

.faq-item summary {
  padding: 1.1rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--teal);
  margin-left: 1rem;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-content {
  padding: 0 1.4rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.faq-content p {
  margin: 0;
}

/* Bottom CTA Banner */
.closing-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.closing-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.closing-cta p {
  margin-inline: auto;
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .steps-grid,
  .learn-grid,
  .reference-columns {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  nav.main-nav {
    width: 100%;
    gap: 0.25rem 0.75rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  section.landing-section {
    padding: 3rem 0;
  }

  .closing-cta {
    padding: 2.5rem 1.5rem;
  }

  .closing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .closing-actions .button {
    width: 100%;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 390px) {
  .container {
    width: calc(100% - 1.5rem);
  }
  
  h1 {
    font-size: 2rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .callout-box,
  .prediction-box,
  .step-card,
  .learn-item,
  .reference-col {
    padding: 1.5rem 1.1rem;
  }
}

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