/* ===========================================================================
   LumAlarm — shared design system
   Sunrise-gradient brand language. Dark-first, warm amber ↔ indigo.
   =========================================================================== */

/* Fonts load in each page's <head> via preconnect + <link> (no render-blocking @import). */

:root, [data-theme="dark"] {
  /* night → dawn surface ramp */
  --night:       #0A0820;
  --night-2:     #0B0822;
  --night-3:     #0E0A26;
  --indigo:      #160F33;
  --card:        rgba(255,255,255,.045);
  --card-solid:  #16122F;
  --footer:      #08060F;

  /* themeable surfaces */
  --nav-bg:      rgba(10,8,26,.74);
  --menu-bg:     rgba(8,6,18,.92);
  --hover:       rgba(255,255,255,.06);
  --panel-1:     #160F2B;   /* elevated content panels (cards/articles/cta) */
  --panel-2:     #0E0A20;
  --paper-1:     #100B1F;   /* education "paper" sections */
  --paper-2:     #0C0918;
  --hero-bg:
    radial-gradient(120% 80% at 82% 108%, rgba(232,112,60,.30), transparent 58%),
    radial-gradient(90% 70% at 30% 120%, rgba(242,168,92,.16), transparent 55%),
    linear-gradient(180deg, #0A0820 0%, #0D0A26 52%, #160F33 100%);
  --edu-line:    rgba(255,221,180,.12);
  --edu-rule:    rgba(255,221,180,.22);

  /* sunrise accents */
  --amber:       #FFD27A;
  --amber-soft:  #FFD98A;
  --orange:      #F2A85C;
  --ember:       #E8703C;
  --sun-core:    #FFF2D8;
  --green:       #7FB89A;

  /* text */
  --ink:         #F8EFE2;
  --ink-2:       #F4ECE0;
  --body:        #C4BAD6;
  --body-2:      #C9BFD6;
  --muted:       #A99FC0;
  --muted-2:     #9C93B4;
  --faint:       #4A4263;

  /* lines & glass */
  --line:        rgba(255,255,255,.07);
  --line-2:      rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.18);

  /* gradients (brand — constant across themes) */
  --grad-cta:    linear-gradient(135deg, #FFD98A, #F2A85C 55%, #E8703C);
  --grad-sky:    linear-gradient(180deg,#FCE9CC 0%,#F6C98A 7%,#EF9A5A 15%,#E8703C 25%,#B8443C 35%,#7A2E5E 49%,#3A1A52 64%,#1A1442 82%,#080616 100%);
  --grad-sun:    radial-gradient(circle,#FFF2D8 0%,#FFE0A0 28%,#F6B45C 54%,rgba(242,168,92,0) 78%);

  --container:   1180px;
  --radius:      22px;
}

/* ---- LIGHT theme: warm paper, dark ink, deep-ember accents ------------ */
[data-theme="light"] {
  --night:       #FBF6EE;
  --night-2:     #F6EFE3;
  --night-3:     #F1E8D9;
  --indigo:      #EDE3D2;
  --card:        rgba(58,40,20,.035);
  --card-solid:  #FFFFFF;
  --footer:      #F1E8DA;

  --nav-bg:      rgba(251,246,238,.82);
  --menu-bg:     rgba(251,246,238,.97);
  --hover:       rgba(58,40,20,.05);
  --panel-1:     #FFFFFF;
  --panel-2:     #FBF5EB;
  --paper-1:     #F7F0E4;
  --paper-2:     #FBF6EE;
  --hero-bg:
    radial-gradient(120% 80% at 82% 108%, rgba(242,168,92,.34), transparent 58%),
    radial-gradient(90% 70% at 30% 120%, rgba(255,210,122,.22), transparent 55%),
    linear-gradient(180deg, #FFF7EC 0%, #FDEFDD 52%, #FBE7CF 100%);
  --edu-line:    rgba(120,72,20,.14);
  --edu-rule:    rgba(120,72,20,.26);

  /* accents darken so they read on light surfaces (CTA button stays vivid —
     it uses literal --grad-cta hues, not these tokens) */
  --amber:       #B5560E;
  --orange:      #C2531C;
  --ember:       #A23B17;
  --green:       #3F7A55;

  --ink:         #2A2140;
  --ink-2:       #322748;
  --body:        #564B6B;
  --body-2:      #4F4564;
  --muted:       #7A7090;
  --muted-2:     #8B8299;
  --faint:       #C9BFD3;

  --line:        rgba(50,34,16,.10);
  --line-2:      rgba(50,34,16,.16);
  --line-strong: rgba(50,34,16,.26);
}

/* ---- HIGH-CONTRAST theme: pure black, white ink, bold borders -------- */
[data-theme="contrast"] {
  --night:       #000000;
  --night-2:     #000000;
  --night-3:     #07040F;
  --indigo:      #0A0716;
  --card:        #0C0918;
  --card-solid:  #0C0918;
  --footer:      #000000;

  --nav-bg:      rgba(0,0,0,.92);
  --menu-bg:     rgba(0,0,0,.98);
  --hover:       rgba(255,255,255,.14);
  --panel-1:     #0C0918;
  --panel-2:     #0C0918;
  --paper-1:     #060410;
  --paper-2:     #000000;
  --hero-bg:
    radial-gradient(120% 80% at 82% 108%, rgba(232,112,60,.30), transparent 56%),
    linear-gradient(180deg, #000000 0%, #07040F 60%, #0A0716 100%);
  --edu-line:    rgba(255,221,180,.45);
  --edu-rule:    rgba(255,221,180,.7);

  --amber:       #FFD98A;
  --amber-soft:  #FFE3A6;
  --orange:      #FFB066;
  --ember:       #FF8A4C;
  --green:       #8FE0AE;

  --ink:         #FFFFFF;
  --ink-2:       #FFFFFF;
  --body:        #F2ECFB;
  --body-2:      #F2ECFB;
  --muted:       #D8D0E8;
  --muted-2:     #CCC3DD;
  --faint:       #9A90AE;

  --line:        rgba(255,255,255,.5);
  --line-2:      rgba(255,255,255,.62);
  --line-strong: rgba(255,255,255,.82);
}
[data-theme="contrast"] :focus-visible { outline-width: 3px; }
[data-theme="contrast"] .card,
[data-theme="contrast"] .quote-card,
[data-theme="contrast"] details.acc { border-width: 1.5px; }

/* --------------------------------------------------------------- reset --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink-2);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(242,168,92,.32); color: #fff; }

/* icons */
.ms {
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 1, 'opsz' 24, 'wght' 400;
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  user-select: none;
}
.ms.fill0 { font-variation-settings: 'FILL' 0, 'opsz' 24, 'wght' 400; }

/* --------------------------------------------------------------- layout -- */
.wrap   { width: min(var(--container), 92vw); margin: 0 auto; }
.narrow { width: min(900px, 92vw); margin: 0 auto; }
.section { padding: clamp(64px, 9vw, 108px) 0; position: relative; }
.section--tight { padding: clamp(54px, 7vw, 86px) 0; }
.section--line { border-top: 1px solid var(--line); }
.section--dawn { background: linear-gradient(180deg, var(--night-2), var(--night-3)); }
.section--dawn-rev { background: linear-gradient(180deg, var(--night-3), var(--night-2)); }

/* --------------------------------------------------------------- type ---- */
.serif  { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0; }
.italic { font-style: italic; }
.accent { color: var(--orange); }
.amber  { color: var(--amber); }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange);
}
.kicker { /* pill eyebrow with icon */
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 30px;
  background: var(--hover);
  border: 1px solid var(--line-2);
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: var(--amber); text-transform: uppercase;
}
.kicker .ms { font-size: 16px; font-variation-settings: 'FILL' 1, 'opsz' 18; }

h1.display { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; color: var(--ink); }
h2.title   { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.06; color: var(--ink); }
h3.sub     { font-size: clamp(20px, 2.6vw, 27px); line-height: 1.18; color: var(--ink-2); }

.lead { font-size: clamp(16px, 2vw, 19.5px); line-height: 1.6; color: var(--body); }
.muted { color: var(--muted); }

.serif-quote {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.28;
  color: var(--ink);
  letter-spacing: .005em;
}

.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head h2 { margin-top: 16px; }
.section-head p  { margin-top: 18px; }

/* --------------------------------------------------------------- nav ----- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: min(var(--container), 92vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #FFE6B0, #F2A85C 58%, #E8703C 100%);
  box-shadow: 0 0 16px rgba(242,168,92,.55);
  flex: none;
}
.brand__name { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 14.5px; font-weight: 500; color: var(--body-2); }
.nav__links a { opacity: .85; transition: color .18s, opacity .18s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; color: var(--amber); }
.nav__right { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14.5px;
  border-radius: 30px; padding: 11px 20px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s, border-color .18s;
  white-space: nowrap;
}
.btn .ms { font-size: 18px; font-variation-settings: 'FILL' 1, 'opsz' 20; }
.btn--cta {
  background: var(--grad-cta); color: #2A1430; font-weight: 800;
  box-shadow: 0 10px 24px -10px rgba(232,112,60,.6);
}
.btn--cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(232,112,60,.7); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { background: var(--hover); border-color: rgba(242,168,92,.5); }
.btn--lg { padding: 13px 24px; font-size: 15.5px; }

/* hamburger / mobile menu */
.nav__toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  color: var(--ink-2); border-radius: 12px; padding: 7px 9px; line-height: 0;
}
.nav__toggle .ms { font-size: 26px; }
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 55;
  background: var(--menu-bg); backdrop-filter: blur(20px);
  flex-direction: column; padding: 86px 8vw 40px; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 22px; font-weight: 600; padding: 14px 4px;
  border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.mobile-menu a:hover { color: var(--amber); }
.mobile-menu .btn { margin-top: 24px; justify-content: center; }

/* store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 13px; }
.store-btn {
  display: flex; align-items: center; gap: 11px;
  background: var(--card-solid); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 10px 20px 10px 14px;
  transition: transform .18s, border-color .18s;
}
.store-btn:hover { border-color: rgba(242,168,92,.5); transform: translateY(-2px); }
.store-btn .ms { font-size: 30px; color: var(--orange); font-variation-settings: 'FILL' 1, 'opsz' 28; }
.store-btn small { display: block; font-size: 10.5px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.store-btn b { display: block; font-size: 17px; font-weight: 700; color: var(--ink-2); margin-top: 1px; }
.store-btn--soon { opacity: .62; }

/* trust row */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trust span.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.trust .item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.trust .ms { font-size: 16px; color: var(--green); font-variation-settings: 'FILL' 1, 'opsz' 18; }

/* --------------------------------------------------------------- cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .25s ease, border-color .25s ease, background .25s;
}
.card:hover { border-color: rgba(242,168,92,.32); background: var(--hover); transform: translateY(-3px); }
.card__icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: inline-grid; place-items: center;
  background: linear-gradient(150deg, rgba(255,210,122,.16), rgba(232,112,60,.1));
  border: 1px solid rgba(255,210,122,.2);
  color: var(--amber); margin-bottom: 16px;
}
.card__icon .ms { font-size: 24px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.card p  { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* feature split rows */
.split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center; gap: clamp(32px, 5vw, 64px);
}
.split--rev > .split__media { order: -1; }
@media (min-width: 880px) { .split--rev > .split__media { order: 0; } }
.feat-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.feat-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--body-2); }
.feat-list .ms { color: var(--amber); font-size: 22px; flex: none; margin-top: 1px; }

/* ----------------------------------------------------------- phone mock -- */
.phone {
  width: 300px; max-width: 86vw;
  border-radius: 42px; padding: 9px;
  background: linear-gradient(160deg, #2c2547, #15112b);
  box-shadow: 0 50px 90px -30px rgba(10,4,30,.7), 0 0 0 1px rgba(255,255,255,.06);
}
.phone__screen {
  position: relative; width: 100%; aspect-ratio: 282 / 620;
  border-radius: 34px; overflow: hidden; background: #0c0a1e;
}
.phone--float { animation: floaty 7s ease-in-out infinite; }
.phone__sky {
  position: absolute; inset: 0;
  background: var(--grad-sky); background-size: 100% 320%;
  animation: skyrise 18s ease-in-out infinite;
}
.phone__sun {
  position: absolute; left: 50%; top: 38%; width: 60%; aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--grad-sun);
  box-shadow: 0 0 60px 22px rgba(246,180,92,.36);
  animation: sunrise 18s ease-in-out infinite;
}
.phone__vignette {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,6,22,.32), transparent 22%, transparent 64%, rgba(8,6,22,.46));
}
.phone__ui {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 16px 18px 20px; color: var(--ink);
}
.phone__status { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: rgba(248,239,226,.82); }
.phone__status .grp { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.phone__status .ms { font-size: 14px; }
.phone__clock { text-align: center; }
.phone__pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 30px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.phone__pill .ms { font-size: 15px; }
.phone__time { font-family: 'Instrument Serif', serif; font-size: clamp(72px, 22vw, 92px); line-height: .92; margin-top: 10px; text-shadow: 0 4px 40px rgba(10,6,22,.4); }
.phone__time small { font-size: .28em; font-style: italic; vertical-align: top; margin-left: 5px; opacity: .82; }
.phone__date { font-size: 13px; color: rgba(248,239,226,.86); font-weight: 500; margin-top: 2px; }
.phone__actions { display: flex; gap: 11px; }
.phone__btn {
  flex: 1; height: 56px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 15px; font-weight: 600;
}
.phone__btn .ms { font-size: 19px; }
.phone__btn--snooze { border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.13); color: var(--ink); }
.phone__btn--dismiss { flex: 1.35; background: var(--grad-cta); color: #3A1422; font-weight: 800; box-shadow: 0 12px 30px -10px rgba(232,112,60,.6); }

/* --------------------------------------------------- timeline (how) ------ */
.timeline { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tl-step { position: relative; padding: 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.tl-step__mark { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.tl-step__mark .ms { font-size: 20px; }
.tl-step h4 { margin-top: 12px; font-size: 17px; color: var(--ink-2); font-weight: 700; }
.tl-step p  { margin-top: 7px; font-size: 14px; color: var(--muted); }

/* -------------------------------------------------- accordion (FAQ/guide) */
.accordion { display: grid; gap: 12px; }
details.acc {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); overflow: hidden;
  transition: border-color .2s, background .2s;
}
details.acc[open] { border-color: rgba(242,168,92,.3); background: rgba(255,255,255,.055); }
details.acc summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; font-size: 16.5px; font-weight: 600; color: var(--ink-2);
}
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .lead-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: var(--amber);
  background: linear-gradient(150deg, rgba(255,210,122,.15), rgba(232,112,60,.08));
  border: 1px solid rgba(255,210,122,.18);
}
details.acc summary .chev { margin-left: auto; color: var(--muted); transition: transform .25s; }
details.acc[open] summary .chev { transform: rotate(180deg); color: var(--amber); }
details.acc .acc__body { padding: 0 22px 22px 22px; color: var(--body); font-size: 15px; line-height: 1.65; }
details.acc summary .topic-tag { font-size: 10.5px; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; margin-left: auto; padding-right: 12px; }
details.acc[open] summary .topic-tag { color: var(--orange); }

/* ---------------------------------------------------- testimonials ------- */
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.quote-card .stars { color: var(--amber); letter-spacing: 2px; font-size: 15px; }
.quote-card blockquote { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink); font-weight: 500; }
.quote-card .who { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.quote-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-cta); display: grid; place-items: center; font-weight: 800; color: #2A1430; }
.quote-card .who b { display: block; font-size: 14.5px; color: var(--ink-2); }
.quote-card .who span { font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------- interactive demo ---- */
.demo-card {
  background: linear-gradient(165deg, var(--panel-1), var(--panel-2));
  border: 1px solid var(--line-2); border-radius: 26px; padding: 24px;
  box-shadow: 0 30px 60px -34px rgba(0,0,0,.4);
}
.demo-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.demo-card__head .ms { color: var(--amber); }
.demo-card__head b { font-size: 16px; font-weight: 700; }
.demo-card__head .live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--green);
}
.demo-card__head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(127,184,154,.6); animation: dotPulse 2.2s infinite; }
.demo-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; margin: 18px 0 10px; }

.days { display: flex; gap: 7px; }
.day {
  flex: 1; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line-2);
  background: transparent; color: var(--body-2); font-weight: 600; font-size: 14px;
  display: grid; place-items: center; transition: all .18s;
}
.day:hover { border-color: rgba(242,168,92,.5); }
.day.on { background: var(--grad-cta); color: #2A1430; border-color: transparent; }

.slider-row { margin: 14px 0; }
.slider-row .top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.slider-row .top .ms { font-size: 18px; color: var(--orange); vertical-align: -3px; margin-right: 6px; }
.slider-row .top b { color: var(--amber); font-weight: 700; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 7px;
  border-radius: 4px; outline: none; margin-top: 10px;
  background: linear-gradient(90deg, var(--orange) var(--fill,50%), var(--line-2) var(--fill,50%));
}
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border: none; border-radius: 50%; background: var(--amber); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.45); }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: none; }
.toggle-row .ms { color: var(--orange); font-size: 20px; }
.toggle-row span.lbl { font-size: 14.5px; color: var(--body-2); }
.switch {
  margin-left: auto; width: 46px; height: 27px; border-radius: 30px; flex: none;
  background: var(--line-strong); border: 1px solid var(--line-2); position: relative;
  transition: background .2s; cursor: pointer;
}
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: linear-gradient(135deg, #F2A85C, #E8703C); border-color: transparent; }
.switch.on::after { transform: translateX(19px); }

/* warm-light live demo orb */
.warm-orb {
  width: 100%; aspect-ratio: 1; border-radius: 26px; margin-bottom: 4px;
  background: radial-gradient(circle at 50% 45%, var(--orb-core, #FFE6B0), var(--orb-mid, #F2A85C) 55%, #6a2c3e 100%);
  transition: background .25s, opacity .2s;
  display: grid; place-items: center;
}
.warm-orb .ms { font-size: 60px; color: rgba(255,255,255,.85); }

/* ------------------------------------------------------ science hero ----- */
.science-hero {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line-2); padding: clamp(28px, 4vw, 44px);
  background:
    radial-gradient(120% 100% at 80% 0%, rgba(232,112,60,.22), transparent 60%),
    linear-gradient(160deg, var(--panel-1), var(--panel-2));
}
.science-hero .eyebrow { color: var(--amber); }
.science-hero h3 { font-size: clamp(22px, 3vw, 30px); margin-top: 14px; color: var(--ink); font-weight: 700; line-height: 1.18; }
.science-hero p { margin-top: 16px; color: var(--body); font-size: 15.5px; line-height: 1.7; }

.disclaimer {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; font-size: 13.5px; color: var(--muted); line-height: 1.55;
}
.disclaimer .ms { color: var(--orange); font-size: 20px; flex: none; }

/* --------------------------------------------------------- big CTA ------- */
.cta {
  position: relative; overflow: hidden; border-radius: 30px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 120% at 50% 130%, rgba(232,112,60,.4), transparent 60%),
    linear-gradient(180deg, var(--panel-1), var(--panel-2));
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 60px);
  text-align: center;
}
.cta::before {
  content: ""; position: absolute; left: 50%; bottom: -40%; transform: translateX(-50%);
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,180,92,.34), transparent 64%);
  filter: blur(6px); animation: glowPulse 9s ease-in-out infinite;
}
.cta > * { position: relative; }

/* --------------------------------------------------------- footer -------- */
.footer { background: var(--footer); border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer h5 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 16px; font-weight: 700; }
.footer a { display: block; font-size: 14.5px; color: var(--body-2); padding: 5px 0; transition: color .15s; }
.footer a:hover { color: var(--amber); }
.footer__brand p { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 280px; line-height: 1.55; }
.footer__bottom {
  margin-top: clamp(36px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 13px; color: var(--muted-2);
}
.footer__bottom .tech { display: inline-flex; align-items: center; gap: 7px; }
.footer__bottom .ms { font-size: 17px; color: var(--orange); }

/* --------------------------------------------------- hero backdrop ------- */
.hero { position: relative; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--hero-bg);
}
/* in light theme the hero stars would be invisible on a pale sky */
[data-theme="light"] .stars { display: none; }
.hero__glow {
  position: absolute; right: -6%; bottom: -22%; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,180,92,.42), rgba(242,120,60,0) 66%);
  animation: glowPulse 9s ease-in-out infinite; filter: blur(6px); pointer-events: none;
}
.stars { position: absolute; inset: 0; pointer-events: none; animation: starfade 20s ease-in-out infinite; }
.star { position: absolute; border-radius: 50%; background: #fff; width: 2px; height: 2px; animation: twinkle 4s infinite; }
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: center; gap: 48px; padding: clamp(48px, 7vw, 72px) 0 clamp(60px, 8vw, 84px);
}
.hero__media { display: flex; justify-content: center; }

/* page header (interior pages) */
.page-hero { position: relative; overflow: hidden; padding: clamp(60px, 9vw, 110px) 0 clamp(40px, 6vw, 64px); }
.page-hero__inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(38px, 6vw, 66px); margin-top: 20px; color: var(--ink); }
.page-hero p { margin: 22px auto 0; max-width: 560px; }

/* search box */
.search {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 14px 18px; max-width: 520px; margin: 28px auto 0;
  transition: border-color .2s;
}
.search:focus-within { border-color: rgba(242,168,92,.5); }
.search .ms { color: var(--muted); }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--ink-2); font-size: 16px; font-family: inherit; }
.search input::placeholder { color: var(--muted-2); }

/* category quick-links */
.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--card);
  transition: transform .2s, border-color .2s, background .2s;
}
.cat:hover { transform: translateY(-3px); border-color: rgba(242,168,92,.35); background: var(--hover); }
.cat .ms { font-size: 26px; color: var(--amber); }
.cat b { display: block; font-size: 16px; color: var(--ink-2); }
.cat span { font-size: 13px; color: var(--muted); }
.cat .ms.arrow { margin-left: auto; font-size: 20px; color: var(--muted); }

/* numbered steps */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  display: flex; gap: 18px; padding: 22px 24px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--card);
}
.step__num {
  counter-increment: step; flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; color: #2A1430;
  background: var(--grad-cta); box-shadow: 0 8px 18px -8px rgba(232,112,60,.6);
}
.step__num::before { content: counter(step); }
.step h4 { font-size: 17px; color: var(--ink-2); font-weight: 700; }
.step p { margin-top: 6px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* prose for about/help long-form */
.prose { max-width: 720px; }
.prose p { color: var(--body); font-size: 16.5px; line-height: 1.75; margin-top: 20px; }
.prose p:first-child { margin-top: 0; }
.prose h3 { margin-top: 40px; font-size: 24px; color: var(--ink); font-weight: 700; }
.prose .serif-lead { font-family: 'Instrument Serif', serif; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.32; color: var(--ink); }

/* stat blocks */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat { text-align: center; padding: 24px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.stat b { display: block; font-family: 'Instrument Serif', serif; font-size: 46px; line-height: 1; color: var(--amber); }
.stat span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* principle list (about) */
.principles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.principle { padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.principle .num { font-family: 'Instrument Serif', serif; font-size: 28px; color: var(--orange); }
.principle h4 { margin-top: 10px; font-size: 19px; color: var(--ink-2); font-weight: 700; }
.principle p { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* contact cards */
.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact { padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: center; transition: border-color .2s, transform .2s; }
.contact:hover { border-color: rgba(242,168,92,.35); transform: translateY(-3px); }
.contact .ms { font-size: 30px; color: var(--amber); }
.contact b { display: block; margin-top: 12px; font-size: 16px; color: var(--ink-2); }
.contact span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.contact a.link { color: var(--orange); font-weight: 600; font-size: 14px; }

/* empty state for search */
.no-results { text-align: center; padding: 40px; color: var(--muted); display: none; }
.no-results.show { display: block; }

/* ------------------------------------------------- scroll reveal --------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------- animations ------ */
@keyframes skyrise   { 0%{background-position:0% 100%} 45%{background-position:0% 26%} 70%{background-position:0% 0%} 100%{background-position:0% 100%} }
@keyframes sunrise   { 0%{transform:translateX(-50%) translateY(150px) scale(.82);opacity:0} 26%{opacity:1} 58%{transform:translateX(-50%) translateY(-26px) scale(1.05)} 72%{transform:translateX(-50%) translateY(-44px) scale(1.1);opacity:1} 88%{opacity:.5} 100%{transform:translateX(-50%) translateY(150px) scale(.82);opacity:0} }
@keyframes starfade  { 0%{opacity:.7} 33%{opacity:.45} 50%{opacity:0} 72%{opacity:0} 90%{opacity:.5} 100%{opacity:.7} }
@keyframes twinkle   { 0%,100%{opacity:.2} 50%{opacity:.9} }
@keyframes floaty    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes glowPulse { 0%,100%{opacity:.45;transform:scale(1)} 50%{opacity:.8;transform:scale(1.08)} }
@keyframes dotPulse  { 0%,100%{box-shadow:0 0 0 0 rgba(127,184,154,.5)} 50%{box-shadow:0 0 0 9px rgba(127,184,154,0)} }

/* ------------------------------------------------------- responsive ------ */
@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .nav__links, .nav__right .btn--cta { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero__inner { gap: 30px; }
}

/* ===========================================================================
   EDUCATION CENTER — editorial "sleep library" layer.
   Deliberately distinct from the Help support center: serif-forward
   headings, warmer paper surfaces, magazine grid, long-form reading column.
   =========================================================================== */

/* warm "paper" surfaces — a touch warmer/plummier than the cool indigo help */
.section--paper   { background: linear-gradient(180deg, var(--paper-1), var(--paper-2)); }
.section--paper-2 { background: linear-gradient(180deg, var(--paper-2), var(--paper-1)); }
:root { --edu-line: rgba(255,221,180,.12); --edu-rule: rgba(255,221,180,.22); }

/* reading-progress bar (education long-reads) */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--amber), var(--ember));
  box-shadow: 0 0 12px rgba(242,168,92,.5);
  transition: width .08s linear;
}

/* editorial hero */
.edu-hero h1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0; }
.edu-hero .display { font-size: clamp(44px, 7vw, 80px); line-height: 1.02; }
.edu-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: center; margin-top: 22px; color: var(--muted); font-size: 13.5px; }
.edu-meta .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

/* shared editorial bits */
.cat-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
}
.cat-tag .ms { font-size: 14px; }
.read-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted-2); font-weight: 500;
}
.read-badge .ms { font-size: 15px; }

/* section heads, serif variant for education */
.section-head--serif h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0; font-size: clamp(32px, 4.6vw, 54px); }

/* ---- cornerstone feature article -------------------------------------- */
.feature-article {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 52px);
  align-items: center;
  border: 1px solid var(--edu-line); border-radius: 28px; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-1), var(--panel-2));
}
.feature-article__cover {
  position: relative; min-height: 300px; height: 100%;
  background:
    radial-gradient(80% 70% at 50% 18%, rgba(255,242,216,.5), transparent 60%),
    var(--grad-sky);
  display: grid; place-items: center; overflow: hidden;
}
.feature-article__cover::after {
  content: ""; position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--grad-sun);
  box-shadow: 0 0 70px 26px rgba(246,180,92,.4);
}
.feature-article__cover .badge {
  position: relative; z-index: 1; align-self: flex-start; margin: 22px;
  justify-self: start;
}
.feature-article__body { padding: clamp(26px, 3.5vw, 44px); }
.feature-article__body h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0;
  font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; color: var(--ink); margin-top: 16px;
}
.feature-article__body p { margin-top: 16px; color: var(--body); font-size: 16px; line-height: 1.7; }
.feature-article__meta { display: flex; align-items: center; gap: 14px; margin-top: 22px; }

/* ---- article grid (magazine cards) ------------------------------------ */
.article-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.article-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--edu-line); border-radius: 22px; overflow: hidden;
  background: linear-gradient(170deg, var(--panel-1), var(--panel-2));
  transition: transform .25s ease, border-color .25s ease;
}
.article-card:hover { transform: translateY(-4px); border-color: var(--edu-rule); }
.article-card__cover {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(155deg, var(--c1, #3A1A52), var(--c2, #0E0A20));
  overflow: hidden;
}
.article-card__cover::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 80% at 78% 110%, rgba(242,168,92,.4), transparent 60%);
}
.article-card__cover .ms { position: relative; font-size: 40px; color: rgba(255,242,216,.92); }
.article-card__cover .num {
  position: absolute; top: 14px; left: 16px; z-index: 1;
  font-family: 'Instrument Serif', serif; font-size: 30px; color: rgba(255,255,255,.85);
}
.article-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.article-card__body h3 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0;
  font-size: 23px; line-height: 1.14; color: var(--ink); margin-top: 12px;
}
.article-card__body p { margin-top: 10px; color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; }
.article-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--edu-line); }
.article-card__foot .more { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--amber); }

/* ---- long-form reading column ----------------------------------------- */
.reading { max-width: 720px; margin: 0 auto; }
.reading > p { color: var(--body); font-size: 17.5px; line-height: 1.85; margin-top: 22px; }
.reading > p:first-of-type { margin-top: 0; }
.reading .dropcap::first-letter {
  font-family: 'Instrument Serif', Georgia, serif; float: left;
  font-size: 68px; line-height: .82; padding: 6px 12px 0 0; color: var(--orange);
}
.reading h3 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0;
  font-size: clamp(24px, 3vw, 32px); color: var(--ink); margin-top: 42px;
}
.reading h3 .ms { font-size: .8em; color: var(--orange); vertical-align: -2px; margin-right: 8px; }
.reading ul.dotted { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.reading ul.dotted li { display: flex; gap: 12px; font-size: 16.5px; line-height: 1.6; color: var(--body); }
.reading ul.dotted .ms { color: var(--amber); font-size: 20px; flex: none; margin-top: 2px; }

.pullquote {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.32; color: var(--ink);
  margin: 40px 0; padding-left: 26px; border-left: 3px solid var(--orange);
}

.takeaways {
  margin-top: 40px; border: 1px solid var(--edu-rule); border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,210,122,.07), rgba(232,112,60,.04));
  padding: 26px 28px;
}
.takeaways h4 { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); font-weight: 700; }
.takeaways ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 13px; }
.takeaways li { display: flex; gap: 12px; font-size: 15.5px; line-height: 1.55; color: var(--body-2); }
.takeaways .ms { color: var(--green); font-size: 21px; flex: none; }

.byline { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--edu-line); color: var(--muted); font-size: 14px; }
.byline .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-cta); display: grid; place-items: center; color: #2A1430; font-weight: 800; flex: none; }

/* ---- table of contents (sticky) --------------------------------------- */
.toc-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: 92px; }
.toc h5 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; font-weight: 700; }
.toc a { display: block; font-size: 14px; color: var(--muted); padding: 7px 0 7px 14px; border-left: 2px solid var(--edu-line); transition: color .15s, border-color .15s; }
.toc a:hover, .toc a.active { color: var(--amber); border-color: var(--orange); }
@media (max-width: 880px) { .toc-layout { grid-template-columns: 1fr; } .toc { display: none; } }

/* ---- playbooks (day-by-day plans) ------------------------------------- */
.playbook { border: 1px solid var(--edu-line); border-radius: 22px; background: linear-gradient(170deg, var(--panel-1), var(--panel-2)); padding: clamp(22px, 3vw, 32px); }
.playbook__head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.playbook__head .ms { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: var(--amber); background: linear-gradient(150deg, rgba(255,210,122,.16), rgba(232,112,60,.1)); border: 1px solid rgba(255,210,122,.2); }
.playbook__head h3 { font-family: 'Instrument Serif', serif; font-weight: 400; letter-spacing: 0; font-size: 26px; color: var(--ink); }
.playbook > p.intro { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 4px 0 22px; }
.plan { display: grid; gap: 12px; }
.plan__row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--edu-line); }
.plan__row:first-child { border-top: none; }
.plan__day { flex: none; min-width: 74px; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--amber); padding-top: 2px; }
.plan__row p { font-size: 15px; color: var(--body-2); line-height: 1.55; }
.plan__row p b { color: var(--ink-2); }

/* ---- cheat sheets ----------------------------------------------------- */
.cheat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cheat { border: 1px solid var(--edu-line); border-radius: 20px; background: var(--card); padding: 24px; }
.cheat h4 { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--ink-2); font-weight: 700; }
.cheat h4 .ms { color: var(--amber); }
.cheat dl { margin: 16px 0 0; display: grid; gap: 0; }
.cheat .crow { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--edu-line); font-size: 14.5px; }
.cheat .crow:first-child { border-top: none; }
.cheat .crow dt { color: var(--body-2); }
.cheat .crow dd { margin: 0; color: var(--amber); font-weight: 600; text-align: right; flex: none; }

/* ---- myth vs fact ----------------------------------------------------- */
.mf-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.mf { border: 1px solid var(--edu-line); border-radius: 20px; overflow: hidden; background: linear-gradient(170deg, var(--panel-1), var(--panel-2)); }
.mf__myth { padding: 20px 22px; border-bottom: 1px solid var(--edu-line); }
.mf__myth .tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #E68B8B; }
.mf__myth .tag .ms { font-size: 16px; }
.mf__myth p { margin-top: 8px; font-size: 16px; color: var(--body-2); font-style: italic; }
.mf__fact { padding: 20px 22px; }
.mf__fact .tag { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--green); }
.mf__fact .tag .ms { font-size: 16px; }
.mf__fact p { margin-top: 8px; font-size: 14.5px; color: var(--body); line-height: 1.6; }

/* ---- glossary --------------------------------------------------------- */
.glossary { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.glossary dl { margin: 0; }
.gterm { border: 1px solid var(--edu-line); border-radius: 16px; background: var(--card); padding: 20px 22px; transition: border-color .2s; }
.gterm:hover { border-color: var(--edu-rule); }
.gterm dt { font-family: 'Instrument Serif', serif; font-size: 21px; color: var(--amber); }
.gterm dt .say { font-family: 'Hanken Grotesk', sans-serif; font-size: 12.5px; color: var(--muted-2); font-style: italic; margin-left: 8px; }
.gterm dd { margin: 8px 0 0; font-size: 14.5px; color: var(--body); line-height: 1.6; }

/* responsive for education */
@media (max-width: 820px) {
  .feature-article { grid-template-columns: 1fr; }
  .feature-article__cover { min-height: 220px; }
}

/* ---- local search: hide non-matches & empty groups -------------------- */
.hide { display: none !important; }

/* science chapters become filterable units; keep the reading look */
.reading .chapter { display: block; }
.reading .chapter > p:not(.pullquote) { color: var(--body); font-size: 17.5px; line-height: 1.85; margin-top: 22px; }
.reading .chapter:first-child > h3 { margin-top: 0; }

/* while actively searching, drop the sticky TOC and let results fill the column */
.searching .toc { display: none; }
.searching .toc-layout { grid-template-columns: 1fr; }
.searching .read-progress { opacity: 0; }

/* ===========================================================================
   Theme toggle, skip link & a11y helpers
   =========================================================================== */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: var(--grad-cta); color: #2A1430; font-weight: 800;
  padding: 10px 18px; border-radius: 12px; transform: translateY(-160%);
  transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--hover); border: 1px solid var(--line-2);
  border-radius: 30px; padding: 3px;
}
.theme-toggle button {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: none; color: var(--muted);
  transition: background .18s, color .18s;
}
.theme-toggle button .ms { font-size: 19px; }
.theme-toggle button:hover { color: var(--ink-2); }
.theme-toggle button[aria-pressed="true"] {
  background: var(--grad-cta); color: #2A1430;
}
/* visually-hidden utility (for live region & labels) */
.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;
}
@media (max-width: 880px) {
  .nav .theme-toggle { display: none; }
}
.mobile-menu .theme-toggle { align-self: flex-start; margin-top: 22px; }
.mobile-menu .theme-toggle button { width: 40px; height: 40px; }
.mobile-menu__themelabel { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-top: 26px; }

/* ---- device mockups & live demo always render in the app's dark palette,
        independent of the site theme (they depict the dark app UI) -------- */
.phone, .demo-card {
  --ink:#F8EFE2; --ink-2:#F4ECE0; --body:#C4BAD6; --body-2:#C9BFD6;
  --muted:#A99FC0; --muted-2:#9C93B4; --faint:#4A4263;
  --card:rgba(255,255,255,.045); --card-solid:#16122F; --hover:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.07); --line-2:rgba(255,255,255,.12); --line-strong:rgba(255,255,255,.18);
  --panel-1:#160F2B; --panel-2:#0E0A20;
  --amber:#FFD27A; --orange:#F2A85C; --ember:#E8703C; --green:#7FB89A;
  color: var(--ink-2);
}

/* ===========================================================================
   Comparison table — LumAlarm vs. an ordinary alarm
   =========================================================================== */
.compare {
  max-width: 860px; margin: 48px auto 0;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--card);
}
.compare__head, .compare__row {
  display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; align-items: center;
}
.compare__row { border-top: 1px solid var(--line); }
.compare__head { background: var(--hover); }
.compare__col, .compare__feat, .compare__cell { padding: 16px 20px; font-size: 15px; }
.compare__col {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; color: var(--ink-2); font-size: 14.5px;
}
.compare__col .ms { font-size: 19px; color: var(--muted); }
.compare__col .brand__mark { width: 22px; height: 22px; }
.compare__col--us {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(242,168,92,.14), rgba(232,112,60,.06));
}
.compare__feat { font-weight: 600; color: var(--body-2); font-size: 14px; }
.compare__cell { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); }
.compare__cell--us {
  color: var(--ink-2); font-weight: 500;
  background: linear-gradient(180deg, rgba(242,168,92,.07), rgba(242,168,92,.02));
}
.compare__cell .ms { font-size: 19px; flex: none; margin-top: 1px; }
.compare__cell .ms.ok { color: var(--green); }
.compare__cell .ms.x  { color: #C76B6B; }
[data-theme="contrast"] .compare__cell .ms.x { color: #FF9A9A; }
.compare__row:hover .compare__cell--us { background: linear-gradient(180deg, rgba(242,168,92,.12), rgba(242,168,92,.04)); }

@media (max-width: 640px) {
  .compare__head { display: none; }
  .compare__row { grid-template-columns: 1fr; padding: 6px 0 14px; }
  .compare__feat { padding-bottom: 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
  .compare__cell { padding-top: 6px; padding-bottom: 6px; }
  .compare__cell--plain::after { content: "Ordinary"; margin-left: auto; font-size: 11px; color: var(--muted-2); align-self: center; }
  .compare__cell--us::after { content: "LumAlarm"; margin-left: auto; font-size: 11px; color: var(--orange); font-weight: 700; align-self: center; }
}
