:root {
  --bg: #03050a;
  --panel: rgba(8, 13, 22, 0.78);
  --panel-strong: rgba(11, 17, 28, 0.94);
  --line: rgba(226, 239, 255, 0.12);
  --line-strong: rgba(226, 239, 255, 0.24);
  --text: #f8fbff;
  --muted: rgba(226, 239, 255, 0.72);
  --soft: rgba(226, 239, 255, 0.52);
  --accent: #7dd3fc;
  --accent-2: #38bdf8;
  --glow: rgba(125, 211, 252, 0.18);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body.flagship-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  background:
    radial-gradient(circle at 76% 12%, var(--glow), transparent 30rem),
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.055), transparent 24rem),
    linear-gradient(180deg, #03050a 0%, #050912 46%, #020309 100%);
  letter-spacing: 0;
  overflow-x: hidden;
}

body.theme-cyan { --accent: #22d3ee; --accent-2: #67e8f9; --glow: rgba(34, 211, 238, 0.18); }
body.theme-terminal { --accent: #22d3ee; --accent-2: #4ade80; --glow: rgba(34, 211, 238, 0.16); }
body.theme-red { --accent: #ef4444; --accent-2: #fb7185; --glow: rgba(239, 68, 68, 0.2); }
body.theme-violet { --accent: #a855f7; --accent-2: #c084fc; --glow: rgba(168, 85, 247, 0.2); }
body.theme-orange { --accent: #f97316; --accent-2: #fbbf24; --glow: rgba(249, 115, 22, 0.18); }
body.theme-teal { --accent: #2dd4bf; --accent-2: #38bdf8; --glow: rgba(45, 212, 191, 0.18); }
body.theme-gold { --accent: #f7c35f; --accent-2: #fde68a; --glow: rgba(247, 195, 95, 0.18); }

a { color: inherit; }
img { max-width: 100%; height: auto; }

.cortex-universe-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: rgba(2, 4, 8, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.cortex-universe-nav__links {
  width: min(1320px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  flex-wrap: wrap;
}
.cortex-universe-nav__links a {
  color: rgba(226, 236, 248, 0.76);
  font-family: var(--mono);
  font-size: clamp(10px, 0.92vw, 13px);
  font-weight: 800;
  letter-spacing: 0.23em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.cortex-universe-nav__links a:hover,
.cortex-universe-nav__links a[aria-current="page"] {
  color: #fff;
  text-shadow: 0 0 18px var(--glow);
}

.cx-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.cx-hero { padding: clamp(72px, 10vw, 132px) 0 clamp(54px, 8vw, 92px); }
.cx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.82fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
}
.cx-hero__grid > * { min-width: 0; }
.cx-hero__copy {
  max-width: 720px;
  min-width: 0;
}
.cx-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
}
h1, h2, h3, p {
  margin-top: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
h1 {
  margin-bottom: 18px;
  font-size: clamp(3.8rem, 10vw, 8.8rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 42px var(--glow);
  text-wrap: balance;
}
h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.25;
}
.cx-deck {
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(1.45rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}
.cx-copy,
.cx-section__head p,
.cx-statement p,
.cx-boundary p,
.cx-section--cta p,
.cx-audio p,
.cx-terminal p {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.72;
  max-width: 100%;
}
.cx-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.cx-actions--center { justify-content: center; }
.cx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}
.cx-button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #02050a;
}
.cx-visual {
  position: relative;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 14px;
  overflow: hidden;
  background: #02050a;
  box-shadow: 0 30px 90px rgba(0,0,0,.58), 0 0 58px var(--glow);
}
.cx-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  object-fit: contain;
  object-position: center;
  background: #02050a;
}
.cx-visual--secondary { max-width: 560px; justify-self: center; }
.cx-visual--secondary img { max-height: min(68vh, 640px); }
.cx-visual figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(0,0,0,.66);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.cx-section {
  padding: clamp(58px, 8vw, 104px) 0;
  border-top: 1px solid rgba(255,255,255,.075);
}
.cx-section--compact { padding: clamp(42px, 6vw, 72px) 0; }
.cx-section--split {
  background: radial-gradient(circle at 80% 30%, var(--glow), transparent 34rem), rgba(255,255,255,.012);
}
.cx-section--statement { background: rgba(0,0,0,.22); }
.cx-section--cta { text-align: center; }
.cx-section--cta .cx-shell { max-width: 850px; }
.cx-section__head { max-width: 820px; margin-bottom: 34px; }
.cx-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cx-card {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(255,255,255,.018));
}
.cx-card span,
.cx-timeline span {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.cx-card p,
.cx-timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}
.cx-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.cx-timeline {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.cx-timeline li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.cx-timeline strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cx-statement,
.cx-boundary,
.cx-audio,
.cx-terminal {
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(255,255,255,.018));
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}
.cx-statement { padding: clamp(26px, 4vw, 44px); }
.cx-boundary,
.cx-audio {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
}
.cx-terminal { padding: clamp(20px, 4vw, 34px); }
.cx-terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cx-terminal__bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}
.cx-terminal pre {
  margin: 0 0 18px;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #02050a;
  color: #dffeff;
  font-family: var(--mono);
  font-size: clamp(13px, 1.4vw, 16px);
  line-height: 1.75;
}
.cx-symbol {
  min-height: min(72vh, 620px);
  display: grid;
  align-items: stretch;
}
.cx-symbol__canvas {
  min-height: min(72vh, 620px);
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  place-items: center;
  gap: 28px;
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 24rem),
    #02050a;
  background-size: 42px 42px, 42px 42px, auto, auto;
}
.cx-symbol__shield,
.cx-symbol__forge {
  position: relative;
  width: min(300px, 54vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 80px var(--glow), inset 0 0 52px color-mix(in srgb, var(--accent) 16%, transparent);
}
.cx-symbol__shield::before,
.cx-symbol__forge::before,
.cx-symbol__shield::after,
.cx-symbol__forge::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  transform: rotate(45deg);
}
.cx-symbol__shield::after,
.cx-symbol__forge::after {
  inset: 28%;
  transform: rotate(0deg);
  border-radius: 18px;
}
.cx-symbol__shield i,
.cx-symbol__forge i {
  width: 38%;
  aspect-ratio: 0.82;
  clip-path: polygon(50% 0, 92% 16%, 82% 76%, 50% 100%, 18% 76%, 8% 16%);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 48px var(--glow);
}
.cx-symbol__forge i {
  clip-path: polygon(50% 0, 92% 25%, 78% 82%, 50% 100%, 22% 82%, 8% 25%);
}
.cx-symbol__rows {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cx-symbol__rows b,
.cx-symbol__gate span {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-align: center;
}
.cx-symbol__gate {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cx-footer {
  padding: 34px 0 42px;
  border-top: 1px solid rgba(255,255,255,.09);
  color: var(--soft);
  font-size: 13px;
}
.cx-footer .cx-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cx-footer strong { color: #fff; }
.cx-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cx-footer a { color: var(--muted); text-decoration: none; }

body.baby-quality-pass .char-chip { max-width: 216px; border-radius: 14px; }
body.baby-quality-pass .char-chip__portrait,
body.baby-quality-pass .char-chip__ring {
  height: auto;
  aspect-ratio: 1 / 1.18;
  display: grid;
  place-items: center;
}
body.baby-quality-pass .char-chip__portrait img,
body.baby-quality-pass .char-chip__ring img,
body.baby-quality-pass .subs-face img,
body.baby-quality-pass .subs-mini img {
  object-fit: contain !important;
  object-position: center bottom !important;
  padding: 8px;
  background: transparent;
}
body.baby-quality-pass .seasonal-drop { max-width: 920px; border-radius: 14px; }
body.baby-quality-pass .seasonal-baby-card__art img { object-fit: contain !important; padding: 8px; }
body.baby-quality-pass .baby-chat__avatar img { object-fit: contain !important; padding: 8px; }
body.baby-quality-pass .play-yard__frame,
body.baby-quality-pass .device-card,
body.baby-quality-pass .subs-card { border-radius: 12px; }

@media (max-width: 1020px) {
  .cx-hero__grid,
  .cx-split,
  .cx-boundary,
  .cx-audio { grid-template-columns: 1fr; }
  .cx-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-hero { padding-top: 58px; }
}
@media (max-width: 760px) {
  .cortex-universe-nav {
    min-height: auto;
    padding: 14px;
    justify-content: center;
    overflow-x: hidden;
  }
  .cortex-universe-nav__links {
    width: min(100%, 420px);
    min-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
  }
  .cortex-universe-nav__links a {
    white-space: nowrap;
    font-size: 10px;
    letter-spacing: 0.16em;
  }
  .cx-shell {
    width: calc(100% - 28px);
    max-width: 1180px;
  }
  .cx-hero__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }
  .cx-hero__grid > *,
  .cx-hero__copy,
  .cx-actions,
  .cx-button,
  .cx-visual,
  .cx-symbol {
    width: 100%;
    max-width: calc(100vw - 28px);
  }
  .cx-hero__copy,
  .cx-kicker,
  .cx-deck,
  .cx-copy,
  .cx-section__head,
  .cx-section__head p,
  .cx-statement p,
  .cx-boundary p,
  .cx-section--cta p,
  .cx-audio p,
  .cx-terminal p {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  h1 {
    font-size: clamp(2.65rem, 15vw, 4.2rem);
    line-height: 0.9;
  }
  h2 { font-size: clamp(1.85rem, 8vw, 2.8rem); }
  .cx-deck {
    font-size: clamp(1.2rem, 6vw, 1.7rem);
    line-height: 1.12;
  }
  .cx-copy,
  .cx-section__head p,
  .cx-statement p,
  .cx-boundary p,
  .cx-section--cta p,
  .cx-audio p,
  .cx-terminal p {
    font-size: 0.98rem;
    line-height: 1.62;
  }
  .cx-card-grid { grid-template-columns: 1fr; }
  .cx-card { min-height: 0; }
  .cx-button { width: 100%; }
  .cx-visual img,
  .cx-visual--secondary img { max-height: 62vh; }
  .cx-symbol,
  .cx-symbol__canvas { min-height: 420px; }
  .cx-symbol__rows,
  .cx-symbol__gate { grid-template-columns: 1fr; }
  .cx-visual figcaption { position: relative; left: auto; right: auto; bottom: auto; border-radius: 0; }
}
