/* Ahead · Northern Lights Glassmorphic Design System (2nd Rework) */
:root {
  --bg: #0f0522;
  --bg2: #190a36;
  --card: rgba(29, 16, 58, 0.72);
  --card2: rgba(41, 24, 79, 0.82);
  --card-solid: #1b0f36;
  --line: rgba(200, 175, 255, 0.16);
  --line2: rgba(216, 196, 255, 0.32);
  --ink: #f6f3ff;
  --mute: #cec2ec;
  --faint: #9e8ec7;
  --violet: #8b5cf6;
  --violet2: #b695ff;
  --lav: #d0bcff;
  --mint: #2ee59d;
  --sky: #5ce1e6;
  --sun: #ffc857;
  --coral: #ff6b8b;
  --r: 22px;
  --r-sm: 14px;
  --wrap: 1140px;
  --f-head: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --f-sans: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font: 400 16px/1.65 var(--f-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 14% -6%, rgba(139, 92, 246, 0.34), transparent 62%),
    radial-gradient(920px 560px at 88% 4%, rgba(46, 229, 157, 0.16), transparent 60%),
    radial-gradient(980px 640px at 50% 48%, rgba(92, 225, 230, 0.08), transparent 65%),
    linear-gradient(180deg, #13062b 0%, var(--bg) 45%, #0b031a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Northern Lights ambient aura & subtle dot-grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50vmax 50vmax at 12% 18%, rgba(139, 92, 246, 0.16), transparent 65%),
    radial-gradient(44vmax 44vmax at 86% 24%, rgba(46, 229, 157, 0.11), transparent 65%),
    radial-gradient(46vmax 46vmax at 65% 82%, rgba(255, 107, 139, 0.08), transparent 65%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(80% 65% at 50% 25%, #000 30%, transparent 100%);
  mask-image: radial-gradient(80% 65% at 50% 25%, #000 30%, transparent 100%);
}

header, main, footer { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }
a { color: var(--lav); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
strong { color: #fff; font-weight: 700; }
code, .mono { font-family: var(--f-mono); font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.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; }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; }

/* Typography */
h1, h2, h3, h4 { margin: 0 0 0.45em; font-family: var(--f-head); font-weight: 700; letter-spacing: -0.028em; line-height: 1.13; color: #fff; }
h1 { font-size: clamp(2.35rem, 4.8vw, 3.85rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--mute); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 0.75rem/1 var(--f-mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--mint);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(46, 229, 157, 0.1);
  border: 1px solid rgba(46, 229, 157, 0.3);
  box-shadow: 0 0 24px -6px rgba(46, 229, 157, 0.35);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.lede { font-size: clamp(1.06rem, 1.45vw, 1.22rem); color: var(--mute); max-width: 56ch; line-height: 1.65; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font: 700 0.95rem/1.1 var(--f-sans);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #9d6eff 0%, #6d4aff 52%, #2ee59d 145%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px -8px rgba(123, 91, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 36px -6px rgba(123, 91, 255, 0.82), 0 0 20px rgba(46, 229, 157, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-mint {
  background: linear-gradient(135deg, var(--mint) 0%, #17b887 100%);
  color: #041d14;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 28px -8px rgba(46, 229, 157, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-mint:hover { color: #02130d; filter: brightness(1.06); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  border-color: var(--line2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.42); color: #fff; }
.btn-sm { padding: 9px 15px; font-size: 0.85rem; border-radius: 999px; }
.btn[disabled] { opacity: 0.42; pointer-events: none; }

/* Header / Glassmorphic Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  background: rgba(15, 5, 34, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.6);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 700 1.18rem/1 var(--f-head);
  color: #fff;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet) 0%, #5b38e8 55%, var(--mint) 130%);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -4px rgba(139, 92, 246, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand .mark svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a:not(.btn) {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--mute);
  font-weight: 600;
  font-size: 0.91rem;
  transition: background 0.18s, color 0.18s;
}
.nav nav a:not(.btn):hover,
.nav nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}
.nav nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.nav .cta { margin-left: 6px; }
.menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line2);
  color: #fff;
  padding: 8px 10px;
  border-radius: 11px;
  cursor: pointer;
}

/* Sections & Surfaces */
.sec { padding: 80px 0; border-top: 1px solid var(--line); position: relative; }
.sec-head { max-width: 66ch; margin-bottom: 36px; }
.sec-head p { font-size: 1.05rem; }

.pagehead {
  padding: 58px 0 38px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 280px at 30% 0%, rgba(139, 92, 246, 0.18), transparent 70%);
}
.pagehead h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.075) 0%, rgba(27, 14, 54, 0.78) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

/* Hero Section */
.hero { padding: 54px 0 44px; position: relative; overflow: hidden; }
.hero .two { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 44px; align-items: center; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(110deg, #fff 5%, var(--lav) 32%, var(--mint) 68%, var(--sky) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }

/* Hero Value Pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--mute);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--mint));
  box-shadow: 0 0 8px var(--c, var(--mint));
}

/* Hero Stage: 3D-Lit Phone + Pixel Watch + Floating Live Alert */
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 34px 18px 26px;
}
.stage::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.38) 0%, rgba(46, 229, 157, 0.18) 48%, transparent 72%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}

/* Floating Early-Warning Banner on Hero Stage */
.hero-alert {
  position: absolute;
  top: 4px;
  left: -10px;
  z-index: 4;
  max-width: 285px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(22, 11, 44, 0.92);
  border: 1px solid rgba(255, 200, 87, 0.48);
  border-left: 4px solid var(--sun);
  box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.85), 0 0 24px -6px rgba(255, 200, 87, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: float-alert 5s ease-in-out infinite alternate;
}
@keyframes float-alert {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}
.hero-alert .ha-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 700 0.64rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 5px;
}
.hero-alert .ha-top i {
  font-style: normal;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mute);
  font-size: 0.58rem;
}
.hero-alert .ha-main {
  font: 700 0.86rem/1.25 var(--f-head);
  color: #fff;
  margin-bottom: 3px;
}
.hero-alert .ha-why {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--mute);
}

.phone {
  position: relative;
  z-index: 2;
  width: 288px;
  border-radius: 40px;
  padding: 13px;
  background: linear-gradient(160deg, #321f62 0%, #160b30 48%, #0d061f 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 34px 75px -16px rgba(0, 0, 0, 0.82),
    0 0 0 1px rgba(139, 92, 246, 0.25),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.28),
    inset 0 -2px 6px rgba(0, 0, 0, 0.6);
}
.phone::before {
  content: "";
  display: block;
  width: 68px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  margin: 2px auto 8px;
}
.phone .screen {
  border-radius: 29px;
  padding: 15px 14px 14px;
  background:
    radial-gradient(220px 160px at 50% 18%, rgba(139, 92, 246, 0.26), transparent 70%),
    linear-gradient(180deg, #160a30 0%, #0d0520 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.phone .sample {
  position: absolute;
  top: 24px;
  right: 24px;
  font: 700 0.6rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(46, 229, 157, 0.12);
  color: var(--mint);
  border: 1px solid rgba(46, 229, 157, 0.32);
}

.phone .appbar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; text-align: left; }
.phone .appbar b { font: 800 0.88rem/1 var(--f-head); color: #fff; }
.phone .appbar small { font-size: 0.62rem; color: var(--faint); margin-right: auto; }
.phone .pill { font: 700 0.62rem/1 var(--f-mono); padding: 4px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); color: var(--lav); border: 1px solid var(--line); }
.phone .pill.ok { color: var(--mint); border-color: rgba(46, 229, 157, 0.35); background: rgba(46, 229, 157, 0.12); }

.phone .gcard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 11px 11px 10px;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.phone .cap { font: 700 0.56rem/1 var(--f-mono); letter-spacing: 0.12em; color: var(--faint); }
.phone .num2 { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 4px 0 2px; }
.phone .num2 b { font: 700 2.95rem/1 var(--f-head); letter-spacing: -0.04em; color: #fff; text-shadow: 0 0 28px rgba(46, 229, 157, 0.35); }
.phone .arr {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(46, 229, 157, 0.16);
  border: 1px solid rgba(46, 229, 157, 0.42);
  display: grid;
  place-items: center;
  color: var(--mint);
  box-shadow: 0 0 16px -2px rgba(46, 229, 157, 0.4);
}
.phone .arr svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.phone .sub { font-size: 0.7rem; color: var(--mute); }
.phone .sub em { font-style: normal; color: var(--mint); font-weight: 700; }
.phone .proj2 {
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(10, 4, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font: 600 0.64rem/1.2 var(--f-mono);
  color: var(--mute);
  display: flex;
  justify-content: center;
  gap: 8px;
}
.phone .proj2 b { color: #fff; }
.phone .iob {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 11px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(182, 149, 255, 0.26);
  font-size: 0.65rem;
  color: var(--lav);
  margin-bottom: 8px;
}
.phone .iob b { color: #fff; font-family: var(--f-mono); }
.phone .iob i { font-style: normal; margin-left: auto; color: var(--faint); font-size: 0.6rem; }
.phone .ghead { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--faint); margin-bottom: 3px; }
.phone .ghead b { color: var(--mute); letter-spacing: 0.08em; font-size: 0.56rem; }
.phone .spark { width: 100%; height: 68px; border-radius: 10px; background: rgba(8, 3, 20, 0.6); }

/* Pixel Watch Hardware Showcase */
.watch {
  position: absolute;
  right: -4px;
  bottom: 8px;
  z-index: 3;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background:
    radial-gradient(110% 85% at 28% 18%, rgba(255, 255, 255, 0.2), transparent 42%),
    radial-gradient(circle at 50% 50%, #190c36 0%, #090314 78%);
  border: 2px solid rgba(215, 196, 255, 0.28);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.82),
    0 0 28px -6px rgba(46, 229, 157, 0.25),
    inset 0 2px 5px rgba(255, 255, 255, 0.22),
    inset 0 -4px 10px rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
}
/* Pixel Watch side crown */
.watch::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, #d8c9ff, #6b539c);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.watch svg { width: 138px; height: 138px; transform: rotate(-90deg); }
.watch .w { position: absolute; text-align: center; line-height: 1.15; }
.watch .w .w-tag { display: block; font: 700 0.54rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--mint); margin-bottom: 2px; }
.watch .w b { font: 700 1.85rem/1 var(--f-head); color: #fff; display: block; letter-spacing: -0.03em; }
.watch .w small { font: 600 0.66rem/1.2 var(--f-mono); color: var(--lav); display: block; margin-top: 3px; }

/* Second-Buddy Safety Strip */
.strip {
  margin-top: 34px;
  padding: 15px 20px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 200, 87, 0.12) 0%, rgba(29, 16, 58, 0.75) 100%);
  border: 1px solid rgba(255, 200, 87, 0.35);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.strip .icon { color: var(--sun); }
.strip p { margin: 0; color: var(--ink); font-size: 0.94rem; flex: 1 1 280px; }
.strip a { font-weight: 700; color: var(--sun); white-space: nowrap; }

/* Feature Cards & 2x2 Bento Showcase (#does) */
.fcard {
  position: relative;
  overflow: hidden;
}
.fcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c, var(--violet)), transparent 85%);
  opacity: 0.85;
}
.fcard:hover {
  transform: translateY(-3px);
  border-color: var(--line2);
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.8), 0 0 28px -12px var(--c, var(--violet)), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.fcard .ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--c, var(--violet)) 16%, transparent);
  color: var(--c, var(--lav));
  border: 1px solid color-mix(in srgb, var(--c, var(--violet)) 42%, transparent);
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--c, var(--violet)) 45%, transparent);
}
.fcard p { font-size: 0.95rem; }
.fcard .tag {
  display: inline-block;
  font: 700 0.68rem/1 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.fcard .tag.exp { background: rgba(255, 200, 87, 0.14); color: var(--sun); border: 1px solid rgba(255, 200, 87, 0.35); }

/* Micro-UI Previews inside Home Bento Cards */
.bento-ui {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11, 4, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.8rem;
}
.vs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  font-family: var(--f-mono);
  font-size: 0.74rem;
}
.vs-row + .vs-row { border-top: 1px dashed rgba(255, 255, 255, 0.1); padding-top: 7px; margin-top: 2px; }
.vs-row .lbl { color: var(--faint); }
.vs-row .late { color: var(--coral); font-weight: 700; }
.vs-row .early { color: var(--mint); font-weight: 700; }

.bento-notif {
  border-left: 3px solid var(--sun);
  padding-left: 11px;
}
.bento-notif b {
  display: block;
  font: 700 0.82rem/1.25 var(--f-head);
  color: #fff;
  margin-bottom: 3px;
}
.bento-notif span {
  display: block;
  font: 500 0.74rem/1.35 var(--f-mono);
  color: var(--mute);
}

.bento-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.bento-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  font: 600 0.73rem/1 var(--f-mono);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
}
.bento-chip.mint { background: rgba(46, 229, 157, 0.13); border-color: rgba(46, 229, 157, 0.35); color: var(--mint); }
.bento-chip.lav { background: rgba(182, 149, 255, 0.14); border-color: rgba(182, 149, 255, 0.35); color: var(--lav); }

/* Sample Notifications on details.html */
.alerts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.notif {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(20, 10, 42, 0.85));
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--mint));
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.6);
}
.notif .k { display: flex; justify-content: space-between; font: 700 0.72rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--c, var(--mint)); margin-bottom: 7px; }
.notif .k i { font-style: normal; color: var(--faint); font-weight: 500; }
.notif p { margin: 0; color: #fff; font-weight: 700; font-size: 0.96rem; }
.notif small { display: block; margin-top: 5px; color: var(--mute); font-size: 0.83rem; line-height: 1.45; }

/* Role Picker & Download Funnel (#apps) */
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.bigpick {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 24px 26px;
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(28, 15, 56, 0.78) 100%);
  border: 2px solid var(--line);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.bigpick:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}
.bigpick[aria-pressed="true"] {
  border-color: var(--mint);
  background: linear-gradient(160deg, rgba(46, 229, 157, 0.16) 0%, rgba(139, 92, 246, 0.18) 100%);
  box-shadow: 0 20px 44px -16px rgba(46, 229, 157, 0.28), 0 0 0 3px rgba(46, 229, 157, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.bigpick .ic {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(139, 92, 246, 0.2);
  color: var(--lav);
  border: 1px solid rgba(182, 149, 255, 0.35);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bigpick[aria-pressed="true"] .ic {
  background: rgba(46, 229, 157, 0.2);
  color: var(--mint);
  border-color: rgba(46, 229, 157, 0.5);
}
.bigpick .ic .icon { width: 26px; height: 26px; }
.bigpick strong { display: block; font: 700 1.24rem/1.2 var(--f-head); color: #fff; margin-bottom: 4px; }
.bigpick span { display: block; font-size: 0.92rem; color: var(--mute); }

/* T1D Sensor Source Helper Banner (Fixes Step 1 AheadBLE confusion) */
.source-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line2);
}
html[data-role="t1d"] .source-bar { display: flex; }
.source-bar .sb-label {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}
.source-bar .sb-label small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--mute);
}
.source-pills {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 4, 24, 0.65);
  border: 1px solid var(--line);
}
.src-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--mute);
  font: 700 0.8rem/1.1 var(--f-sans);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.src-btn[aria-pressed="true"] {
  background: var(--mint);
  color: #041d14;
}

.dl-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.dl-bar h3 { margin: 0; font-size: 1.22rem; }
.dl-bar p { margin: 4px 0 0; font-size: 0.94rem; }
.link-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line2);
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--lav);
  font: 600 0.84rem var(--f-sans);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.link-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* App Download Cards Grid & Smart Role Filtering */
.apps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
html[data-role="t1d"] .apps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
html[data-role="t1d"] .app[data-role="follower"] {
  display: none;
}
html[data-role="follower"] .apps {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}
html[data-role="follower"] .app[data-role="t1d"] {
  display: none;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}
.app:hover {
  transform: translateY(-3px);
  border-color: var(--line2);
}

/* Flagship Main App ("Ahead") Highlight */
.app.app-flagship {
  border-color: rgba(46, 229, 157, 0.45);
  background: linear-gradient(165deg, rgba(46, 229, 157, 0.11) 0%, rgba(139, 92, 246, 0.14) 45%, rgba(27, 14, 54, 0.88) 100%);
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(46, 229, 157, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* When user selects "I already use the Dexcom app", visually de-emphasize AheadBLE */
html[data-source="dexcom"] .app[data-name="AheadBLE"] {
  opacity: 0.68;
  border-style: dashed;
}

.app-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(182, 149, 255, 0.35);
  display: grid;
  place-items: center;
  color: var(--lav);
}
.app-flagship .app-ic {
  background: rgba(46, 229, 157, 0.18);
  border-color: rgba(46, 229, 157, 0.45);
  color: var(--mint);
}
.badge {
  font: 700 0.7rem/1 var(--f-mono);
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--lav);
  border: 1px solid var(--line);
}
.badge.fam { background: rgba(46, 229, 157, 0.14); color: var(--mint); border-color: rgba(46, 229, 157, 0.36); }
.badge.main-badge { background: rgba(46, 229, 157, 0.18); color: var(--mint); border-color: rgba(46, 229, 157, 0.45); }

.app h3 { margin: 0; font-size: 1.2rem; }
.app .role { font-size: 0.84rem; color: var(--lav); font-weight: 600; margin-top: -6px; }
.app .desc { font-size: 0.91rem; flex: 1; }
.app .meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(9, 3, 22, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  margin: 0;
}
.app .meta dt { color: var(--faint); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.app .meta dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; font-family: var(--f-mono); }
.app .actions { display: flex; flex-direction: column; gap: 8px; }
.app .actions .btn { width: 100%; }
.app .sha { border-top: 1px solid var(--line); padding-top: 10px; font-size: 0.78rem; color: var(--faint); }
.app .sha summary { cursor: pointer; font-weight: 600; color: var(--mute); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.app .sha summary::-webkit-details-marker { display: none; }
.app .sha summary::after { content: "▾"; opacity: 0.7; transition: transform 0.18s; }
.app .sha[open] summary::after { transform: rotate(180deg); }
.app .sha code { display: block; word-break: break-all; padding: 8px; margin-top: 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.42); color: var(--lav); font-size: 0.71rem; }
.app .pkg { font-size: 0.74rem; color: var(--faint); margin: 0; }

/* Verify Box */
.verify {
  margin-top: 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(22, 11, 45, 0.8));
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.verify > summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.verify > summary::-webkit-details-marker { display: none; }
.verify > summary::after { content: "Show verifier ▾"; font: 600 0.8rem var(--f-mono); color: var(--lav); }
.verify[open] > summary::after { content: "Hide ▴"; }
.verify .vbody { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.drop {
  margin-top: 14px;
  padding: 20px;
  border: 1.5px dashed var(--line2);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  display: block;
  background: rgba(11, 4, 24, 0.45);
  transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.over { border-color: var(--mint); background: rgba(46, 229, 157, 0.08); }
.drop input { display: none; }
.vres { margin-top: 10px; font: 600 0.88rem var(--f-mono); }
.vres.ok { color: var(--mint); }
.vres.bad { color: var(--coral); }
.code {
  background: rgba(8, 3, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: 500 0.8rem/1.55 var(--f-mono);
  color: var(--lav);
  overflow-x: auto;
  margin-top: 10px;
  white-space: pre;
}

/* Setup Guide Tabs & Interactive Checklist */
.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(18, 8, 38, 0.85);
  border: 1px solid var(--line2);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--mute);
  font: 700 0.92rem var(--f-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--violet), #6441e8);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(139, 92, 246, 0.7);
}
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 0.86rem; color: var(--mute); }
.progress .bar { flex: 1; max-width: 240px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--violet), var(--mint)); transition: width 0.25s; }
.progress .reset { background: none; border: 0; color: var(--faint); font: 600 0.8rem var(--f-sans); cursor: pointer; text-decoration: underline; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(24, 12, 48, 0.78));
  border: 1px solid var(--line);
  transition: border-color 0.2s, opacity 0.2s;
}
.step.done { border-color: rgba(46, 229, 157, 0.42); background: rgba(46, 229, 157, 0.06); }
.step.done h3 { text-decoration: line-through; color: var(--mute); }
.step .tick { display: flex; align-items: center; cursor: pointer; user-select: none; }
.step .tick input { position: absolute; opacity: 0; pointer-events: none; }
.step .box {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1.5px solid var(--line2);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  font: 700 0.86rem var(--f-mono);
  color: var(--lav);
  transition: 0.15s;
}
.step .box svg { width: 16px; height: 16px; opacity: 0; }
.step.done .box { background: var(--mint); border-color: var(--mint); color: #052016; }
.step.done .box .n { display: none; }
.step.done .box svg { opacity: 1; }
.step h3 { margin: 2px 0 6px; font-size: 1.06rem; }
.step p { font-size: 0.93rem; margin: 0 0 8px; }
.step .tip {
  font-size: 0.85rem;
  color: var(--lav);
  padding: 9px 13px;
  border-radius: 11px;
  background: rgba(139, 92, 246, 0.13);
  border: 1px solid rgba(182, 149, 255, 0.26);
  margin-top: 8px;
}
.opt-badge { font: 700 0.68rem/1 var(--f-mono); padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); color: var(--mute); margin-left: 6px; vertical-align: middle; }

/* Architecture Flow Diagram (guide.html) */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; margin: 26px 0; }
.flow .node {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(27, 14, 54, 0.82));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.flow .node b { display: block; color: #fff; font-family: var(--f-head); font-size: 0.98rem; margin-bottom: 3px; }
.flow .node span { font-size: 0.8rem; color: var(--mute); display: block; }
.flow .node.opt { border-style: dashed; }
.flow .link { color: var(--lav); font: 600 0.72rem var(--f-mono); text-align: center; padding: 0 2px; }
.flow .link::before { content: "→"; display: block; font-size: 1.15rem; color: var(--mint); }
.accts { margin-top: 22px; }
.accts .card h4 { margin: 0 0 6px; font-size: 1.02rem; }
.accts .card p { font-size: 0.9rem; }
.accts .card .badge { display: inline-block; margin-bottom: 8px; }
.badge-n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(46, 229, 157, 0.16);
  border: 1px solid rgba(46, 229, 157, 0.4);
  color: var(--mint);
  font: 700 0.84rem/1 var(--f-mono);
  margin-bottom: 10px;
}

/* Safety & Data Lists */
.notice {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 200, 87, 0.09);
  border: 1px solid rgba(255, 200, 87, 0.35);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.notice .icon { color: var(--sun); margin-top: 2px; }
.notice p { margin: 0; color: var(--ink); font-size: 0.95rem; }
.notice.good { background: rgba(46, 229, 157, 0.1); border-color: rgba(46, 229, 157, 0.38); margin-top: 16px; }
.notice.good .icon { color: var(--mint); }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 0.93rem; color: var(--mute); }
.list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: var(--lav); }
.list.ok li::before { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.list.go li::before { background: var(--sky); }
.list.no li::before { background: var(--coral); }
.card h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lav); margin: 18px 0 8px; font-family: var(--f-mono); }
.card h4:first-of-type { margin-top: 6px; }

/* Accordions (Permissions & FAQ) */
.acc {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(24, 12, 48, 0.78));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.acc:hover { border-color: var(--line2); }
.acc + .acc { margin-top: 10px; }
.acc > summary {
  padding: 17px 20px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "+"; font: 400 1.3rem/1 var(--f-mono); color: var(--lav); transition: transform 0.18s; }
.acc[open] > summary::after { content: "−"; color: var(--mint); }
.acc .body { padding: 0 20px 18px; color: var(--mute); font-size: 0.94rem; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; }
.perm { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.perm th, .perm td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.perm th { color: var(--faint); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--f-mono); }
.perm td:first-child { color: #fff; font-family: var(--f-mono); font-size: 0.8rem; white-space: nowrap; }
.perm tr:last-child td { border-bottom: 0; }

.faq-tools { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.faq-tools input {
  flex: 1 1 240px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(18, 8, 38, 0.8);
  color: #fff;
  font: inherit;
}
.faq-tools input::placeholder { color: var(--faint); }
.empty { padding: 24px; text-align: center; color: var(--faint); display: none; }

/* Learn Callout */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(46, 229, 157, 0.11));
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 30px;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.callout h2 { margin-bottom: 6px; }
.callout .btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 52px 0 58px; color: var(--faint); font-size: 0.88rem; background: rgba(8, 2, 18, 0.55); }
footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 32px; }
footer h5 { margin: 0 0 12px; color: #fff; font: 700 0.82rem var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; }
footer a { color: var(--mute); display: block; padding: 4px 0; }
footer .legalese { padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.55; color: var(--faint); }

/* Click-through Download Modal Gate */
dialog.gate {
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid var(--line2);
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(165deg, #211142, #120726);
  color: var(--ink);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
dialog.gate::backdrop { background: rgba(6, 2, 15, 0.78); backdrop-filter: blur(6px); }
.gate h3 { margin-bottom: 8px; }
.gate ul { padding-left: 18px; color: var(--mute); font-size: 0.9rem; margin: 10px 0 16px; }
.gate li { margin-bottom: 6px; }
.gate label.chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 10px;
}
.gate label.chk input { margin-top: 3px; accent-color: var(--mint); }
.gate .g-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #231347;
  color: #fff;
  border: 1px solid var(--mint);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s;
  z-index: 60;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Reveal on Scroll */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.cap { font-size: 0.82rem; color: var(--faint); margin-top: 12px; }

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .hero .two { grid-template-columns: 1fr; }
  .stage { margin-top: 16px; }
  .hero-alert { left: 4px; top: -6px; }
  .g4, .apps, html[data-role="t1d"] .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .alerts { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow .link::before { content: "↓"; }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    background: rgba(18, 7, 38, 0.97);
    border: 1px solid var(--line2);
    border-radius: 18px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.75);
  }
  .nav nav.open { display: flex; }
  .nav .cta { margin: 6px 0 0; }
  .g2, .g4, .apps, html[data-role="t1d"] .apps, .pick-grid { grid-template-columns: 1fr; }
  .sec { padding: 56px 0; }
  .hero-alert { position: relative; left: 0; top: 0; max-width: 100%; margin-bottom: 14px; }
  .stage { flex-direction: column; padding-top: 10px; }
  .watch { right: 8px; bottom: -10px; width: 136px; height: 136px; }
  .watch svg { width: 120px; height: 120px; }
  .watch .w b { font-size: 1.55rem; }
  footer .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* Interactive Wyze-Style Coachmark Tour Preview (guide.html) */
.tour-demo {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(22, 11, 46, 0.85));
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: 0 24px 52px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.td-phone {
  position: relative;
  width: 288px;
  margin-inline: auto;
  border-radius: 38px;
  padding: 12px;
  background: linear-gradient(160deg, #321f62 0%, #14092c 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 60px -14px rgba(0, 0, 0, 0.85), inset 0 1.5px 2px rgba(255, 255, 255, 0.25);
  user-select: none;
  cursor: pointer;
}
.td-screen {
  position: relative;
  border-radius: 28px;
  padding: 14px 13px;
  background: linear-gradient(180deg, #160a30 0%, #0b041c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.td-spot {
  position: relative;
  border-radius: 12px;
  padding: 6px 8px;
  border: 1.5px solid transparent;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.24s, box-shadow 0.24s, opacity 0.24s, background 0.24s;
}
.td-screen.dimming .td-spot:not(.active) {
  opacity: 0.32;
  filter: brightness(0.75);
}
.td-spot.active {
  opacity: 1 !important;
  filter: none !important;
  border-color: var(--mint);
  background: rgba(46, 229, 157, 0.1);
  box-shadow: 0 0 0 4px rgba(46, 229, 157, 0.22), 0 8px 24px -4px rgba(0, 0, 0, 0.7);
  transform: scale(1.02);
  z-index: 3;
}
.td-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.74rem; }
.td-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  margin-left: 5px;
}
.td-alarm {
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(182, 149, 255, 0.38);
  font: 700 0.65rem var(--f-mono);
  color: #fff;
}
.td-num {
  text-align: center;
  font: 700 2.6rem/1 var(--f-head);
  color: var(--mint);
  letter-spacing: -0.03em;
}
.td-num small {
  display: block;
  font: 700 0.56rem/1 var(--f-mono);
  color: var(--faint);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.td-iob {
  text-align: center;
  font: 700 0.88rem/1.2 var(--f-mono);
  color: #fff;
}
.td-iob small { display: block; font: 500 0.64rem var(--f-sans); color: var(--mute); }
.td-rate { text-align: center; font: 600 0.76rem var(--f-mono); color: var(--ink); }
.td-proj {
  text-align: center;
  font: 600 0.72rem var(--f-mono);
  color: var(--lav);
  background: rgba(255, 255, 255, 0.04);
}
.td-age { text-align: center; font-size: 0.68rem; color: var(--mute); }
.td-why {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  color: #f3e8ff;
  background: rgba(139, 92, 246, 0.16);
}
.td-graph { padding: 8px; background: rgba(8, 3, 20, 0.65); }
.td-graph small { display: block; font: 700 0.56rem var(--f-mono); color: var(--faint); margin-bottom: 4px; }

/* Coachmark Bubble Panel */
.td-coach {
  background: linear-gradient(180deg, #241346 0%, #170b30 100%);
  border: 1.5px solid #7c5cff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.8);
  position: relative;
}
.td-coach-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.td-step-lbl { font: 700 0.74rem/1 var(--f-mono); letter-spacing: 0.12em; color: var(--mint); text-transform: uppercase; }
.td-dots { display: flex; gap: 6px; }
.td-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.18s, background 0.18s;
}
.td-dots button.on { background: var(--mint); transform: scale(1.25); box-shadow: 0 0 8px var(--mint); }
.td-coach h3 { font-size: 1.35rem; margin: 0 0 8px; color: #fff; }
.td-coach p { font-size: 0.96rem; color: #e6ddf7; margin: 0 0 16px; min-height: 3.2em; }
.td-coach-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.td-coach-foot small { font-size: 0.8rem; color: var(--faint); }
.td-btns { display: flex; gap: 8px; }

@media (max-width: 820px) {
  .tour-demo { grid-template-columns: 1fr; }
}


/* third pass 2026-11-10 */
.pick-hint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 8px; color: var(--mute); font-size: 0.94rem; }
html:not(.js) .pick-hint { display: none; }
html[data-role] .pick-hint { display: none; }
html.js:not([data-role]) .apps, html.js:not([data-role]) .dl-bar { display: none; }
.dl-note { font-size: 0.9rem; color: var(--mute); margin: 10px 0 0; max-width: 66ch; }
.dl-note a { white-space: nowrap; }
html[data-role="t1d"][data-source="dexcom"] .app[data-name="AheadBLE"] { display: none; }
html[data-role="t1d"][data-source="dexcom"] .apps { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 760px) { html[data-role="t1d"][data-source="dexcom"] .apps { grid-template-columns: 1fr; } }


/* contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.contact-form { padding: 28px; display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.field em { font-weight: 400; font-style: normal; color: var(--faint); font-size: 0.82rem; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(10, 4, 24, 0.55); color: var(--ink); font: 500 1rem/1.4 var(--f-sans); transition: border-color 0.18s, box-shadow 0.18s; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(46, 229, 157, 0.18); }
.field select option { background: #1c0f38; color: #f6f0ff; }
.count { justify-self: end; color: var(--faint); font: 500 0.74rem var(--f-mono, monospace); font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--mute); }
.form-status.ok { color: var(--mint); }
.form-status.err { color: var(--coral, #ff7b8c); }
.contact-form .fine { margin: 0; font-size: 0.82rem; color: var(--faint); }
.contact-side { display: grid; gap: 16px; }
.side-card { padding: 20px 22px; }
.side-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.side-card p, .side-card li { font-size: 0.92rem; color: var(--mute); margin: 0; }
.side-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.side-warn { border-color: rgba(255, 200, 87, 0.45); background: linear-gradient(165deg, rgba(255, 200, 87, 0.1), rgba(27, 14, 54, 0.88)); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .contact-form { padding: 20px; } }

/* Windows preview card: quieter than a real download card */
.app-preview { border-style: dashed; }
.app-preview .btn-dl-ask { align-self: flex-start; }

/* Small shared bits used by the Learn pages */
.say { font-family: var(--f-mono); font-size: 0.86rem; color: var(--sun); margin: 2px 0 6px; }
.lead { font-size: clamp(1.05rem, 1.9vw, 1.25rem); color: var(--mute); max-width: 44em; margin-bottom: 24px; line-height: 1.6; }


/* ---- 2026-11-13: What's new timeline, About page, install walkthrough ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--violet), rgba(139, 92, 246, 0.1)); }
.tl-item { position: relative; padding-left: 40px; }
.tl-item::before { content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--violet2); }
.tl-next::before { border-color: var(--mint); box-shadow: 0 0 0 6px rgba(46, 229, 157, 0.16); }
.tl-when { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; color: var(--faint); font: 600 0.84rem var(--f-mono); }
.tl-tag { padding: 3px 10px; border-radius: 999px; background: rgba(139, 92, 246, 0.18); color: var(--lav); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; }
.tl-next .tl-tag { background: rgba(46, 229, 157, 0.16); color: var(--mint); }
.tl-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.tl-card ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--mute); }
.tl-card strong { color: var(--ink); }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.about-side { display: grid; gap: 22px; }
.about-story h2 { margin-top: 0; }
.about-story p { color: var(--mute); font-size: 1.05rem; }
.about-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--mute); }
.about-list strong { color: var(--ink); }
.about-draft-note { color: var(--sun) !important; font: 600 0.9rem var(--f-mono) !important; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.install-walk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: walk; }
.iw-step { display: grid; gap: 12px; }
.iw-phone { position: relative; aspect-ratio: 9 / 16; border-radius: 26px; padding: 26px 14px 16px; background: #f4f2f8; color: #1c1b1f; border: 6px solid #1b1430; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; justify-content: center; font-family: Roboto, system-ui, sans-serif; }
.iw-phone::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38%; height: 5px; margin-left: -19%; border-radius: 4px; background: #d7d3e0; }
.iw-dialog { background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 6px 18px rgba(30, 20, 60, 0.15); font-size: 0.78rem; line-height: 1.4; }
.iw-dialog b { display: block; font-size: 0.86rem; margin-bottom: 6px; }
.iw-btns { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; font-weight: 700; font-size: 0.74rem; color: #6750a4; }
.iw-btns .go { background: #6750a4; color: #fff; border-radius: 999px; padding: 4px 10px; box-shadow: 0 0 0 4px rgba(46, 229, 157, 0.55); }
.iw-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iw-switch { width: 34px; height: 18px; border-radius: 999px; background: #6750a4; position: relative; flex: none; box-shadow: 0 0 0 4px rgba(46, 229, 157, 0.55); }
.iw-switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.iw-cap h3 { margin: 0 0 4px; font-size: 1rem; }
.iw-cap h3::before { counter-increment: walk; content: counter(walk) ". "; color: var(--mint); }
.iw-cap p { margin: 0; color: var(--mute); font-size: 0.9rem; }
@media (max-width: 900px) { .install-walk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .install-walk { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; } }
.about-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.about-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.about-facts div { padding: 14px 16px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); display: grid; gap: 4px; }
.about-facts span { color: var(--faint); font: 600 0.72rem var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.about-facts strong { color: var(--ink); font-size: 0.98rem; }
.about-col { display: grid; gap: 22px; }
.about-quote p { font: 700 1.35rem/1.35 var(--f-head); margin: 0 0 8px; color: var(--lav); }
.about-quote span { color: var(--faint); font-size: 0.9rem; }
.narrow-faq { max-width: 820px; }
.about-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 860px) { .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ---- 2026-11-13: logo "Past & Ahead" + its animation ----
   Solid leg = where you've been, dotted leg = where you're heading, mint dot = now. */
.brand .mark { background: #16112a; border: 1px solid rgba(182, 149, 255, 0.28); box-shadow: 0 6px 18px -8px rgba(139, 92, 246, 0.6); }
.brand .mark svg.ahead-mark { width: 26px; height: 26px; stroke: none; }
.ahead-mark .am-past, .ahead-mark .am-bar { stroke: #fff; stroke-width: 10; stroke-linecap: round; fill: none; }
.ahead-mark .am-bar { stroke-width: 8; }
.ahead-mark .am-dot { fill: var(--violet2); }
.ahead-mark .am-d2 { opacity: 0.75; } .ahead-mark .am-d3 { opacity: 0.5; }
.ahead-mark .am-now { fill: var(--mint); }
.ahead-mark .am-halo { fill: var(--mint); opacity: 0; transform-origin: 47px 17px; }

@media (prefers-reduced-motion: no-preference) {
  /* Visible by default; the animation only starts from hidden ("backwards" fill), so anything that
     doesn't run animations still shows the finished logo. */
  .ahead-mark .am-past { stroke-dasharray: 70; animation: amDraw 0.6s 0.1s ease-out backwards; }
  .ahead-mark .am-bar { stroke-dasharray: 16; animation: amDrawBar 0.3s 0.55s ease-out backwards; }
  .ahead-mark .am-dot, .ahead-mark .am-now { transform-box: fill-box; transform-origin: center; }
  .ahead-mark .am-dot { animation: amPop 0.35s cubic-bezier(.2, 1.6, .4, 1) backwards; }
  .ahead-mark .am-d1 { animation-delay: 0.75s; } .ahead-mark .am-d2 { animation-delay: 0.9s; } .ahead-mark .am-d3 { animation-delay: 1.05s; }
  .ahead-mark .am-now { animation: amPop 0.45s 0.35s cubic-bezier(.2, 1.6, .4, 1) backwards; }
  .ahead-mark .am-halo { animation: amHalo 2.6s 1.4s ease-out infinite; }
}
@keyframes amDraw { from { stroke-dashoffset: 70; } to { stroke-dashoffset: 0; } }
@keyframes amDrawBar { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
@keyframes amPop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes amHalo { 0% { opacity: 0.55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }

/* Big hero version on the home page: the dots keep "moving ahead" in a slow loop. */
.hero-mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; margin-bottom: 18px;
  background: radial-gradient(circle at 30% 20%, #241a44, #120c24); border: 1px solid rgba(182, 149, 255, 0.3);
  box-shadow: 0 18px 40px -16px rgba(139, 92, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.hero-mark .ahead-mark { width: 60px; height: 60px; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark .am-dot { animation: amPop 0.35s cubic-bezier(.2, 1.6, .4, 1) backwards, amAhead 2.4s 1.6s ease-in-out infinite; }
  .hero-mark .am-d1 { animation-delay: 0.75s, 1.6s; } .hero-mark .am-d2 { animation-delay: 0.9s, 1.8s; } .hero-mark .am-d3 { animation-delay: 1.05s, 2.0s; }
}
@keyframes amAhead { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.35); } }
