:root {
  color-scheme: dark;
  --bg: #080c12;
  --bg-soft: #0d1520;
  --panel: #111c2a;
  --panel-deep: #0b141e;
  --line: #29445d;
  --text: #f4f8fb;
  --muted: #b0c0ce;
  --green: #38d996;
  --green-deep: #169967;
  --blue: #4f9cff;
  --yellow: #f5bd45;
  --red: #ff7b8c;
  --max: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { position: relative; margin: 0; color: var(--text); background: radial-gradient(circle at 100% 0, #163757 0, transparent 42rem), var(--bg); line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; min-height: 100vh; pointer-events: none; background: url('/assets/eeg24-background-live-flow.jpg') calc(100% + 80vw) 0vh / 180% auto no-repeat; opacity: .72; filter: saturate(1.15) brightness(1.15); }
body > * { position: relative; z-index: 1; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; border-radius: .6rem; background: var(--yellow); color: #111; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgb(255 255 255 / 10%); background: rgb(8 12 18 / 92%); backdrop-filter: blur(18px); }
.bar { width: min(100% - 2rem, var(--max)); min-height: 70px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: 1.22rem; font-weight: 900; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid var(--green); border-radius: .7rem; color: var(--green); box-shadow: 0 0 24px rgb(56 217 150 / 23%); transform: rotate(45deg); }
.brand-mark span { transform: rotate(-45deg); font-size: 1rem; }
.brand em { color: var(--green); font-style: normal; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; border: 1px solid var(--line); border-radius: .75rem; background: var(--panel); color: var(--text); font: inherit; font-weight: 800; }
.main-nav { display: none; }
.main-nav[data-open="true"] { display: grid; position: absolute; inset: 70px 0 auto; padding: 1rem max(1rem, calc((100vw - var(--max)) / 2)); gap: .35rem; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.main-nav a { padding: .8rem .9rem; border-radius: .65rem; color: var(--muted); font-weight: 750; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: rgb(79 156 255 / 14%); color: var(--text); }
main { width: min(100% - 2rem, var(--max)); margin: auto; padding: 1.35rem 0 4.5rem; }
.eyebrow { margin: 0 0 .45rem; color: #8fc7ff; font-size: .78rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.13; }
h1 { max-width: 820px; margin: 0; font-size: clamp(2.1rem, 9vw, 4.7rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: clamp(1.55rem, 5vw, 2.55rem); letter-spacing: -.025em; }
h3 { margin: 0; font-size: 1.13rem; }
.lead { max-width: 700px; margin: 1rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 3.5vw, 1.28rem); }
.hero { display: grid; gap: 1.4rem; padding: 2.1rem 0 2rem; }
.hero--dashboard { position: relative; isolation: isolate; overflow: hidden; min-height: 31rem; padding: 2.1rem 1rem 2rem; border: 1px solid rgb(79 156 255 / 18%); border-radius: 1.4rem; }
.hero--dashboard > :not(.dashboard-backdrop) { position: relative; z-index: 2; }
.dashboard-backdrop { position: absolute; z-index: 0; inset: -6rem -18rem -9rem -18rem; overflow: hidden; pointer-events: none; opacity: .19; filter: saturate(.8) blur(.5px); transform: scale(1.07); }
.dashboard-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(8 12 18 / 92%) 0%, rgb(8 12 18 / 63%) 53%, rgb(8 12 18 / 84%) 100%); }
.dashboard-backdrop iframe { width: 150%; height: 150%; border: 0; transform: translate(-17%, -11%); }
.hero-card, .card, .notice, .step, .source-card { border: 1px solid var(--line); border-radius: 1.25rem; background: linear-gradient(145deg, rgb(20 33 48 / 88%), rgb(10 19 29 / 88%)); box-shadow: 0 18px 45px rgb(0 0 0 / 18%); }
.hero-card { padding: 1.2rem; }
.stat-row { display: grid; grid-template-columns: auto 1fr; gap: .7rem 1rem; align-items: center; }
.stat-row + .stat-row { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgb(255 255 255 / 9%); }
.stat-icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: .85rem; background: rgb(56 217 150 / 12%); color: var(--green); font-weight: 900; }
.stat-row strong, .stat-row small { display: block; }
.stat-row small { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .45rem; padding: .75rem 1rem; border: 1px solid transparent; border-radius: .76rem; color: #fff; font-weight: 850; text-align: center; text-decoration: none; }
.button.primary { background: linear-gradient(135deg, var(--green), #20b982); color: #05120d; }
.button.secondary { border-color: #42627e; background: rgb(9 20 31 / 78%); }
.button.link { color: #a8d2ff; padding-left: 0; }
.notice { margin: 1rem 0 1.5rem; padding: 1rem; border-color: #65552d; background: linear-gradient(145deg, #242116, #15150e); }
.notice strong { color: #ffda79; }
.notice p { margin: .35rem 0 0; color: #e7e0c9; }
.status-note { margin: 0 0 1.2rem; padding: .85rem 1rem; border-left: 4px solid var(--blue); border-radius: .65rem; background: rgb(79 156 255 / 10%); color: #c7dcf3; }
.section { margin-top: 3.2rem; }
.section-head { max-width: 720px; margin-bottom: 1.15rem; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card, .source-card { padding: 1.15rem; }
.card p, .card li, .source-card p { color: var(--muted); }
.card.accent { border-color: rgb(56 217 150 / 47%); }
.card .tag { display: inline-block; margin-bottom: .7rem; color: var(--green); font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.eeg-rest-preview { margin-top: 1rem; }
.eeg-rest-preview-head { display: flex; align-items: center; gap: .9rem; }
.eeg-rest-preview-head h2 { font-size: clamp(1.35rem, 5vw, 2rem); }
.eeg-rest-preview-head p { margin: .2rem 0 0; }
.eeg-rest-preview-icon { display: grid; width: 3.4rem; height: 3.4rem; place-items: center; flex: 0 0 auto; border: 1px solid rgb(255 255 255 / 18%); border-radius: 50%; background: rgb(79 156 255 / 12%); color: var(--yellow); font-size: 1.65rem; }
.eeg-rest-preview-value { margin-top: 1.15rem; color: var(--green); font-size: clamp(3rem, 13vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -.055em; }
.eeg-rest-preview-bar { height: .75rem; margin-top: 1.1rem; overflow: hidden; border: 1px solid rgb(255 255 255 / 15%); border-radius: 999px; background: rgb(255 255 255 / 10%); }
.eeg-rest-preview-bar span { display: block; width: 28%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-deep), var(--green)); }
.compare { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 1.2rem; }
.compare > div { padding: 1.15rem; background: var(--panel-deep); }
.compare > div + div { border-top: 1px solid var(--line); }
.compare strong { display: block; margin-bottom: .35rem; }
.compare span { color: var(--muted); }
.steps { display: grid; gap: .9rem; counter-reset: step; }
.step { position: relative; padding: 1.1rem 1.1rem 1.1rem 4.25rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.1rem; display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border: 1px solid rgb(79 156 255 / 55%); border-radius: .72rem; background: rgb(79 156 255 / 13%); color: #9bc9ff; font-weight: 900; }
.step p { margin: .4rem 0 0; color: var(--muted); }
.checklist { margin: .65rem 0 0; padding: 0; list-style: none; }
.checklist li { padding: .34rem 0 .34rem 1.65rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.warning { border-left: 4px solid var(--yellow); padding-left: .8rem; color: #f1dda5; }
.quiet { color: var(--muted); }
.page-title { padding: 2.1rem 0 1rem; }
.page-title h1 { font-size: clamp(2rem, 7vw, 3.6rem); }
.source-card { display: grid; gap: .75rem; }
.source-card a { color: #abd5ff; font-weight: 800; }
.faq details { border-top: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq p { color: var(--muted); }
.info-accordions { display: grid; gap: 1rem; }
.info-accordions .section-head { margin-bottom: 0; }
.info-toggle { border: 1px solid var(--line); border-radius: 1.1rem; background: linear-gradient(145deg, rgb(20 33 48 / 98%), rgb(10 19 29 / 98%)); overflow: hidden; }
.info-toggle summary { width: 100%; cursor: pointer; list-style: none; justify-content: space-between; }
.info-toggle summary::-webkit-details-marker { display: none; }
.info-toggle[open] summary { border-radius: 0; border-bottom-color: var(--line); background: rgb(79 156 255 / 12%); }
.details-copy { padding: 1.15rem; color: var(--muted); }
.details-copy h3 { color: var(--text); }
.details-copy ol { margin: .7rem 0; padding-left: 1.3rem; }
.details-copy li { margin: .45rem 0; }
.details-copy a:not(.button) { color: #abd5ff; font-weight: 750; }
.site-footer { border-top: 1px solid var(--line); background: #071019; }
.footer-inner { width: min(100% - 2rem, var(--max)); margin: auto; padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-links { display: grid; gap: .35rem; }
.footer-links a, .footer-links span { color: var(--muted); font-size: .94rem; }
.footer-links span { opacity: .72; }
.footer-note { margin: 1.4rem 0 0; color: #8396a8; font-size: .86rem; }
@media (min-width: 760px) {
  .bar { min-height: 78px; }
  .menu-toggle { display: none; }
  .main-nav { display: flex; align-items: center; justify-content: flex-end; gap: .1rem; }
  .main-nav a { padding: .55rem .68rem; font-size: .88rem; }
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(285px, .65fr); align-items: center; padding: 4.2rem 0 3rem; }
  .hero--dashboard { padding: 4.2rem 2.2rem 3rem; }
  .compare { grid-template-columns: repeat(2, 1fr); }
  .compare > div + div { border-top: 0; border-left: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 1050px) { .main-nav a { padding: .62rem .78rem; } }

/* Desktop layout: give the larger viewport room to breathe without touching
   the mobile-first rules above.  The content column, feature cards and
   explanatory sections become wider/taller and use a deliberate two/three
   column rhythm instead of a compressed stack. */
@media (min-width: 1100px) {
  :root { --max: 1280px; }

  body::before {
    opacity: .28;
    background-position: calc(100% + 130px) top;
    background-size: min(1100px, 75vw) auto;
  }

  .bar {
    min-height: 86px;
  }

  .main-nav {
    gap: .35rem;
  }

  .main-nav a {
    padding: .72rem .9rem;
    font-size: .95rem;
  }

  main {
    padding: 2.4rem 0 7rem;
  }

  .hero {
    gap: 3.2rem;
    padding: 5.8rem 0 5.2rem;
  }

  .hero--dashboard {
    grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr);
    gap: 3.4rem;
    min-height: 43rem;
    padding: 5rem 4rem 4.5rem;
    border-radius: 2rem;
    background: linear-gradient(100deg, rgb(8 12 18 / 86%) 0%, rgb(8 12 18 / 66%) 58%, rgb(8 12 18 / 40%) 100%);
  }

  h1 {
    max-width: 900px;
    font-size: clamp(4.2rem, 5.8vw, 6.3rem);
  }

  h2 {
    font-size: clamp(2.4rem, 3.4vw, 3.35rem);
  }

  h3 {
    font-size: 1.42rem;
  }

  .lead {
    max-width: 780px;
    margin-top: 1.35rem;
    font-size: 1.38rem;
    line-height: 1.7;
  }

  .actions {
    gap: 1rem;
    margin-top: 2rem;
  }

  .button {
    min-height: 58px;
    padding: .95rem 1.35rem;
    border-radius: .9rem;
    font-size: 1.05rem;
  }

  .hero-card {
    padding: 2rem;
    border-radius: 1.6rem;
  }

  .stat-row {
    gap: 1rem 1.25rem;
  }

  .stat-row + .stat-row {
    margin-top: 1.35rem;
    padding-top: 1.35rem;
  }

  .stat-icon {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1rem;
    font-size: 1.15rem;
  }

  .stat-row strong {
    font-size: 1.2rem;
  }

  .stat-row small {
    margin-top: .2rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .notice {
    margin: 2rem 0 3rem;
    padding: 1.45rem 1.7rem;
    border-radius: 1.5rem;
  }

  .notice p,
  .section-head p {
    font-size: 1.08rem;
    line-height: 1.7;
  }

  .section {
    margin-top: 6rem;
  }

  .section-head {
    max-width: 900px;
    margin-bottom: 2rem;
  }

  .grid {
    gap: 1.6rem;
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card,
  .source-card {
    min-height: 260px;
    padding: 1.75rem;
    border-radius: 1.5rem;
  }

  .card .tag {
    margin-bottom: .95rem;
    font-size: .82rem;
  }

  .card p,
  .card li,
  .source-card p {
    font-size: 1.04rem;
    line-height: 1.7;
  }

  .steps {
    gap: 1.25rem;
  }

  .step {
    min-height: 190px;
    padding: 1.55rem 1.7rem 1.55rem 5.1rem;
    border-radius: 1.5rem;
  }

  .step::before {
    left: 1.7rem;
    top: 1.55rem;
    width: 2.55rem;
    height: 2.55rem;
  }

  .footer-inner {
    padding-top: 3.5rem;
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
  }
}
