/* ============================================================
   Sinusly — design system
   Dark clinical theme, phosphor-green ECG accent.
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #070a0f;
  --bg-1:      #0a0e16;
  --bg-2:      #0f1622;
  --surface:   #121b2a;
  --surface-2: #162133;
  --line:      rgba(150, 180, 220, 0.10);
  --line-2:    rgba(150, 180, 220, 0.18);

  /* text */
  --text:   #e8eef6;
  --muted:  #a8b8ca;
  --faint:  #8b9cb1;   /* AA-compliant on all dark surfaces (≥4.5:1) */

  /* brand / signal */
  --accent:      #2ff0a8;   /* phosphor ECG green */
  --accent-deep: #16c089;
  --accent-glow: rgba(47, 240, 168, 0.45);
  --cyan:        #5cc8ff;
  --danger:      #ff5d6c;   /* STEMI / ischemia / premium emphasis */
  --danger-soft: rgba(255, 93, 108, 0.14);
  --warn:        #ffb454;
  --premium:     #ffcf6b;

  /* lead palette (precordial V1–V6 + limb) */
  --l-v1: #ff6b6b;
  --l-v2: #ff9f43;
  --l-v3: #feca57;
  --l-v4: #1dd1a1;
  --l-v5: #54a0ff;
  --l-v6: #a55eea;
  --l-limb: #5cc8ff;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* scale */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 40px -8px var(--accent-glow);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-image:
    radial-gradient(1100px 600px at 78% -8%, rgba(47, 240, 168, 0.08), transparent 60%),
    radial-gradient(900px 700px at 8% 0%, rgba(92, 200, 255, 0.07), transparent 55%);
  background-attachment: fixed;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input { font: inherit; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
sup { font-size: 0.65em; }

::selection { background: var(--accent); color: #04130d; }

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

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: var(--accent); color: #04130d; padding: 10px 16px;
  border-radius: 8px; font-weight: 600;
}

/* ------------------------------ layout ------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.container--narrow { max-width: 760px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.section__lead { color: var(--muted); margin-top: 14px; font-size: 1.06rem; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}

/* ------------------------------ buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  letter-spacing: -0.01em; transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn--sm { padding: 9px 16px; font-size: 0.88rem; }
.btn--block { display: flex; width: 100%; }
.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #04130d; box-shadow: 0 8px 24px -10px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px var(--accent-glow); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--line-2);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(47, 240, 168, 0.06); }

/* ------------------------------ chips ------------------------------ */
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--line-2); color: var(--muted); background: rgba(255, 255, 255, 0.02);
  transition: all 0.16s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--accent); color: #04130d; border-color: var(--accent); font-weight: 600; }

/* ------------------------------ nav ------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 10, 15, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 10, 15, 0.9); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand__mark { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }
.brand__name { color: var(--text); }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links > a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.16s; }
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__signin { color: var(--text) !important; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------ hero ------------------------------ */
.hero { padding-top: clamp(40px, 7vw, 86px); padding-bottom: clamp(48px, 7vw, 90px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; }
.hero__title-accent { color: var(--accent); }
.hero__sub { color: var(--muted); font-size: clamp(1.04rem, 1.5vw, 1.22rem); margin-top: 20px; max-width: 36ch; }
.hero__sub em { color: var(--text); font-style: normal; font-weight: 600; }
.hero__cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero__stats dt { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.hero__stats dd { color: var(--faint); font-size: 0.84rem; max-width: 16ch; margin-top: 2px; }
.hero__footnote { color: var(--faint); font-size: 0.74rem; margin-top: 18px; }

/* hero showcase: the 3D heart above the live ECG line */
.hero__showcase { display: flex; flex-direction: column; gap: 14px; }
.hero__heart {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 320px; display: grid; place-items: center;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(58% 52% at 50% 42%, rgba(47, 240, 168, 0.13), transparent 70%),
    radial-gradient(90% 90% at 50% 48%, var(--bg-2), var(--bg-1));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hero__heart .heart3d { width: 100%; }
.hero__heart-fallback {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--faint); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em;
}
.hero__heart.is-live .hero__heart-fallback { display: none; }
.monitor { perspective: 1400px; }
.monitor__bezel {
  background: linear-gradient(160deg, #0c1320, #070b12);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}
.monitor__readout { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.monitor__hr { color: var(--accent); }
.monitor__hr b { font-size: 1.5rem; font-weight: 700; }
.monitor__lead { color: var(--faint); }
.monitor__btn { margin-left: auto; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 0.78rem; font-family: var(--font-mono); transition: all 0.16s; }
.monitor__btn:hover { color: var(--accent); border-color: var(--accent); }
.monitor__canvas {
  width: 100%; height: auto; border-radius: 12px;
  background:
    repeating-linear-gradient(to right, rgba(47, 240, 168, 0.05) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(to bottom, rgba(47, 240, 168, 0.05) 0 1px, transparent 1px 16px),
    radial-gradient(120% 140% at 50% 0%, #08140f, #050a08);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
}
.monitor__rhythm-picker { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chip--rhythm { font-family: var(--font-mono); font-size: 0.76rem; }
.hero__monitor-caption { color: var(--faint); font-size: 0.8rem; text-align: center; }
.monitor--slim .monitor__bezel { padding: 12px 12px 14px; }

/* ---- stage-center hero: the 3D heart is the centrepiece ---- */
.hero--stage { position: relative; overflow: hidden; padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero--stage::before {
  content: ""; position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%);
  width: min(840px, 96vw); height: min(840px, 96vw); border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 240, 168, 0.16), rgba(84, 160, 255, 0.06) 42%, transparent 68%);
  filter: blur(6px); pointer-events: none; z-index: 0;
}
.hero__stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero--stage .eyebrow { margin-bottom: 6px; }
.hero--stage .hero__title { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
.hero--stage .hero__sub { margin: 16px auto 0; max-width: 54ch; text-align: center; }
.hero__heart--stage {
  width: min(560px, 92vw); margin: 4px auto 0; min-height: 320px;
  border: none; background: none; box-shadow: none; overflow: visible;
}
.hero__heart-cue { color: var(--faint); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em; margin-top: 2px; }
.hero--stage .hero__cta { justify-content: center; margin-top: 18px; }
.monitor--stage { width: min(720px, 96vw); margin: 26px auto 0; }
.hero--stage .hero__stats { justify-content: center; margin-top: 30px; }
.hero--stage .hero__footnote { text-align: center; max-width: 60ch; margin: 18px auto 0; }

/* 3D heart on-canvas control rail (rotate / zoom / reset) */
.heart3d__tools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; flex-direction: column; gap: 7px; }
.heart3d__tool {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; color: var(--muted); background: rgba(10, 14, 22, 0.55); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.heart3d__tool:hover { color: var(--accent); border-color: var(--accent); background: rgba(47, 240, 168, 0.08); }
.heart3d__tool[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

/* ------------------------------ audience ------------------------------ */
.audience__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.segment {
  background: linear-gradient(170deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.segment:hover { transform: translateY(-4px); border-color: var(--line-2); }
.segment__icon { width: 38px; height: 38px; color: var(--accent); margin-bottom: 14px; }
.segment__name { font-size: 1.08rem; }
.segment__job { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.segment__tag { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ------------------------------ explorer ------------------------------ */
.explorer__layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.explorer__stage {
  background: radial-gradient(120% 120% at 50% 10%, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px;
}
.explorer__tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tab {
  padding: 9px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 500;
  color: var(--muted); border: 1px solid transparent; transition: all 0.16s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: rgba(47, 240, 168, 0.1); color: var(--accent); border-color: var(--accent); }
.explorer__diagram { width: 100%; }
.explorer__diagram svg { width: 100%; height: auto; }
.heart3d { width: 100%; position: relative; touch-action: none; cursor: grab; }
.heart3d canvas { display: block; width: 100%; }
.tab--dim { margin-left: auto; font-family: var(--font-mono); }
.explorer__hint { color: var(--faint); font-size: 0.8rem; margin-top: 10px; text-align: center; }
.explorer__hint kbd { font-family: var(--font-mono); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; font-size: 0.78rem; }

/* lead diagram interactive bits */
.lead-node { cursor: pointer; transition: opacity 0.18s; }
.lead-node text { font-family: var(--font-mono); font-weight: 600; }
.lead-node:focus-visible { outline: none; }
.lead-node:focus-visible .lead-node__bg { stroke: var(--accent); stroke-width: 3.5; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.lead-node[aria-pressed="true"] .lead-node__bg { stroke: var(--accent); stroke-width: 3; }
.lead-node.is-dim { opacity: 0.28; }
.lead-vector { transition: opacity 0.2s, stroke-width 0.2s; }
.territory-wall { transition: opacity 0.25s, fill 0.25s; }

.explorer__readout {
  background: linear-gradient(170deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; min-height: 360px;
}
.readout__empty { color: var(--muted); }
.readout__lead-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; font-size: 1.3rem; }
.readout__dot { width: 13px; height: 13px; border-radius: 50%; }
.readout__row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.readout__row:last-child { border-bottom: none; }
.readout__k { color: var(--faint); font-size: 0.82rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.readout__v { color: var(--text); font-weight: 500; text-align: right; }
.readout__v .artery { color: var(--danger); font-weight: 600; }
.readout__rows { margin-top: 14px; }
.readout__morph { margin-top: 16px; }
.readout__morph svg { width: 100%; height: 90px; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }
.readout__note { margin-top: 14px; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.readout__note strong { color: var(--text); }
.rcp-chip { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--faint); margin-left: 4px; }
.lead-node { outline: none; cursor: pointer; }
.lead-node:hover .lead-node__bg { filter: brightness(1.25); }
/* only the lead nodes are interactive; all decorative layers ignore pointer events */
.explorer__diagram svg { pointer-events: none; }
.lead-node { pointer-events: auto; }

/* ------------------------------ how ------------------------------ */
.how__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.how__step { background: linear-gradient(170deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.how__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; font-family: var(--font-display);
  font-weight: 700; background: rgba(47, 240, 168, 0.12); color: var(--accent);
  border: 1px solid var(--accent); margin-bottom: 16px;
}
.how__step h3 { font-size: 1.12rem; }
.how__step p { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }

/* ------------------------------ library ------------------------------ */
.library__controls { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.library__search { position: relative; flex: 1 1 280px; max-width: 420px; }
.library__search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.library__search input {
  width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  transition: border-color 0.18s;
}
.library__search input:focus { outline: none; border-color: var(--accent); }
.library__search input::placeholder { color: var(--muted); }
.library__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.library__count { color: var(--faint); font-size: 0.84rem; font-family: var(--font-mono); margin-bottom: 18px; }

.library__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.cond-card {
  text-align: left; width: 100%; background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.25s; display: flex; flex-direction: column;
}
.cond-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.cond-card__strip { background: var(--bg); border-bottom: 1px solid var(--line); }
.cond-card__strip svg { width: 100%; height: 76px; }
.cond-card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.cond-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cond-card__cat { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.cond-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; letter-spacing: -0.01em; }
.cond-card__blurb { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.cond-card__meta { display: flex; gap: 12px; margin-top: auto; padding-top: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 0.72rem; }
.badge { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.badge--free { background: rgba(47, 240, 168, 0.14); color: var(--accent); }
.badge--premium { background: rgba(255, 207, 107, 0.14); color: var(--premium); }
.library__empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; }

/* ------------------------------ drawer ------------------------------ */
.drawer { position: fixed; inset: 0; z-index: 150; }
.drawer[hidden] { display: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(3, 6, 10, 0.72); backdrop-filter: blur(3px); animation: fade 0.2s var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 100%);
  background: var(--bg-1); border-left: 1px solid var(--line-2); box-shadow: var(--shadow);
  overflow-y: auto; padding: 26px; animation: slideIn 0.28s var(--ease);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer__close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; transition: all 0.16s; }
.drawer__close:hover { color: var(--text); border-color: var(--accent); }
.drawer__head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.drawer__cat { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.drawer__title { font-size: 1.7rem; margin-top: 4px; }
.drawer__strip { margin: 18px 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.drawer__strip svg { width: 100%; height: 150px; }
.drawer__section-h { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }
.drawer__points { display: flex; flex-direction: column; gap: 10px; }
.drawer__point { display: flex; gap: 11px; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.drawer__point svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; }
.drawer__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.drawer__fact { background: var(--bg-1); padding: 12px 14px; }
.drawer__fact dt { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.drawer__fact dd { color: var(--text); font-weight: 500; margin-top: 3px; font-size: 0.92rem; }
.drawer__premium-note { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--danger-soft); border: 1px solid rgba(255, 207, 107, 0.25); color: var(--premium); font-size: 0.9rem; }

/* ------------------------------ quiz ------------------------------ */
.practice__wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.quiz { background: linear-gradient(170deg, var(--surface), var(--bg-1)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.quiz__strip { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.quiz__strip svg { width: 100%; height: 140px; }
.quiz__q { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; margin-bottom: 16px; }
.quiz__options { display: grid; gap: 10px; }
.quiz__opt {
  text-align: left; padding: 13px 16px; border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02); color: var(--text); font-size: 0.95rem;
  transition: all 0.15s var(--ease); display: flex; align-items: center; gap: 11px;
}
.quiz__opt:hover:not(:disabled) { border-color: var(--accent); background: rgba(47, 240, 168, 0.05); }
.quiz__opt .opt__key { font-family: var(--font-mono); font-size: 0.78rem; width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.quiz__opt.is-correct { border-color: var(--accent); background: rgba(47, 240, 168, 0.12); }
.quiz__opt.is-correct .opt__key { background: var(--accent); color: #04130d; border-color: var(--accent); }
.quiz__opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.quiz__opt.is-wrong .opt__key { background: var(--danger); color: #fff; border-color: var(--danger); }
.quiz__opt:disabled { cursor: default; }

.quiz__confidence { margin: 16px 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quiz__confidence span { color: var(--faint); font-size: 0.82rem; font-family: var(--font-mono); }
.conf-btns { display: flex; gap: 6px; }
.conf-btn { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 0.8rem; transition: all 0.15s; }
.conf-btn.is-active { border-color: var(--cyan); color: var(--cyan); background: rgba(92, 200, 255, 0.1); }

.quiz__feedback { margin-top: 16px; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); animation: fade 0.25s var(--ease); }
.quiz__feedback.is-correct { border-color: var(--accent); background: rgba(47, 240, 168, 0.07); }
.quiz__feedback.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.quiz__verdict { font-family: var(--font-display); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.quiz__teach { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.quiz__actions { display: flex; gap: 12px; margin-top: 16px; }

.quiz__score { background: linear-gradient(170deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.quiz__score h3 { font-size: 1rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 500; }
.score__big { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--accent); margin: 8px 0 2px; }
.score__row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.score__row:last-child { border-bottom: none; }
.score__row span:last-child { font-family: var(--font-mono); color: var(--text); }
.score__streak { color: var(--warn); }

/* ------------------------------ pricing ------------------------------ */
.pricing__toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 36px; color: var(--muted); font-size: 0.94rem; }
.pricing__save { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); font-style: normal; }
.switch { width: 52px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; transition: background 0.2s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.22s var(--ease); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(24px); }

.pricing__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 22px; display: flex; flex-direction: column; position: relative;
}
.plan--featured { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.plan__badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #04130d; font-size: 0.7rem; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 999px; }
.plan__name { font-size: 1.2rem; }
.plan__price { margin: 12px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.plan__amount { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; }
.plan__per { color: var(--faint); font-size: 0.9rem; }
.plan__tag { color: var(--muted); font-size: 0.86rem; min-height: 38px; }
.plan__edu, .plan__soon { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }
.plan__soon { color: var(--faint); }
.plan__features { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 22px; flex: 1; }
.plan__features li { color: var(--muted); font-size: 0.88rem; padding-left: 24px; position: relative; line-height: 1.45; }
.plan__features li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan__alt { text-align: center; color: var(--faint); font-size: 0.82rem; margin-top: 12px; }
.plan__alt a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pricing__note { text-align: center; color: var(--faint); font-size: 0.8rem; margin-top: 26px; }

/* ------------------------------ trust ------------------------------ */
.section.trust { padding-block: clamp(22px, 4vw, 44px); }
.trust__band { background: linear-gradient(170deg, var(--surface), var(--bg-2)); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: 0.95fr 1.7fr; gap: 34px; align-items: center; }
.trust__band .eyebrow { margin-bottom: 12px; }
.trust__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.trust__sub { color: var(--muted); margin-top: 10px; font-size: 0.96rem; }
.trust__pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust__pillars li { display: flex; gap: 11px; }
.trust__icon { color: #04130d; background: var(--accent); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.trust__pillars h3 { font-size: 0.98rem; }
.trust__pillars p { color: var(--muted); font-size: 0.84rem; margin-top: 4px; line-height: 1.5; }
@media (max-width: 860px) { .trust__band { grid-template-columns: 1fr; gap: 24px; } .trust__pillars { grid-template-columns: 1fr; } }

/* ------------------------------ proof ------------------------------ */
.proof__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.quote { background: linear-gradient(170deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.quote p { font-size: 1.02rem; line-height: 1.55; }
.quote footer { color: var(--faint); font-size: 0.84rem; margin-top: 14px; font-family: var(--font-mono); }

/* ------------------------------ faq ------------------------------ */
.faq__list { display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; transition: border-color 0.2s; }
.faq__item[open] { border-color: var(--line-2); }
.faq__item summary { cursor: pointer; padding: 16px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; font-weight: 400; transition: transform 0.2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--muted); padding-bottom: 18px; font-size: 0.94rem; line-height: 1.6; }

/* ------------------------------ cta ------------------------------ */
.cta__inner { text-align: center; background: linear-gradient(170deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); box-shadow: var(--shadow-glow); }
.cta__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta__sub { color: var(--muted); margin-top: 12px; }
.cta__form { display: flex; gap: 10px; max-width: 440px; margin: 26px auto 0; flex-wrap: wrap; }
.cta__form input { flex: 1 1 200px; padding: 13px 18px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); }
.cta__form input:focus { outline: none; border-color: var(--accent); }
.cta__status { margin-top: 14px; font-size: 0.9rem; min-height: 22px; color: var(--accent); }
.cta__status.is-error { color: var(--danger); }

/* ------------------------------ footer ------------------------------ */
.footer { border-top: 1px solid var(--line); padding-top: 56px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 30px; padding-bottom: 40px; }
.footer__tag { color: var(--faint); margin-top: 12px; font-size: 0.9rem; }
.footer__col h3 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 14px; }
.footer__col a { display: block; color: var(--muted); padding: 5px 0; font-size: 0.92rem; transition: color 0.16s; }
.footer__col a:hover { color: var(--text); }
.footer__sources { color: var(--faint); font-size: 0.82rem; line-height: 1.5; }
.footer__bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 0 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.82rem; }
.footer__bar strong { color: var(--muted); }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .explorer__layout { grid-template-columns: 1fr; }
  .practice__wrap { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch;
    background: rgba(7, 10, 15, 0.97); backdrop-filter: blur(14px); padding: 18px 22px 26px;
    border-bottom: 1px solid var(--line-2); gap: 4px; transform: translateY(-120%); transition: transform 0.3s var(--ease); z-index: 90;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links > a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 10px; }
  .nav__toggle { display: flex; }
  .hero__stats { gap: 20px; }
  .footer__grid { grid-template-columns: 1fr; }
  .drawer__panel { width: 100%; padding: 20px; }
  .drawer__facts { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .container { padding-inline: 16px; }
  .hero__title { font-size: 2.7rem; }
  .hero__stats dt { font-size: 1.5rem; }
}
