:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1b1b;
  --glow-1: rgba(96, 205, 255, 0.18);
  --glow-2: rgba(176, 128, 255, 0.14);
  --glow-3: rgba(255, 185, 70, 0.1);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.786);
  --text-3: rgba(255, 255, 255, 0.55);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --acrylic: rgba(40, 40, 40, 0.62);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-hover: rgba(255, 255, 255, 0.1);
  --accent: #60cdff;
  --accent-ink: #002433;
  --accent-soft: rgba(96, 205, 255, 0.16);
  --success: #6ccb5f;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 12px 32px rgba(0, 0, 0, 0.28);
  --nav: rgba(28, 28, 28, 0.72);
  --noise: 0.05;
  --bay: rgba(255, 255, 255, 0.03);
  --font: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.1, 0.9, 0.2, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f3;
  --glow-1: rgba(0, 103, 192, 0.16);
  --glow-2: rgba(135, 80, 196, 0.1);
  --glow-3: rgba(255, 170, 40, 0.16);
  --text: #1a1a1a;
  --text-2: rgba(0, 0, 0, 0.72);
  --text-3: rgba(0, 0, 0, 0.52);
  --stroke: rgba(0, 0, 0, 0.08);
  --stroke-strong: rgba(0, 0, 0, 0.14);
  --acrylic: rgba(255, 255, 255, 0.72);
  --fill: rgba(0, 0, 0, 0.04);
  --fill-hover: rgba(0, 0, 0, 0.07);
  --accent: #005fb8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 95, 184, 0.12);
  --success: #0f7b0f;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.08);
  --nav: rgba(243, 243, 243, 0.78);
  --noise: 0.04;
  --bay: rgba(255, 255, 255, 0.45);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 560px at 8% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, var(--glow-2), transparent 55%),
    radial-gradient(800px 480px at 70% 110%, var(--glow-3), transparent 50%);
}

.mica {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 600;
}

.skip:focus { top: 12px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

section { scroll-margin-top: 84px; position: relative; z-index: 1; }
main { position: relative; z-index: 1; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
}

.nav-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand-logo {
  display: grid;
  place-items: center;
  height: 32px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #140018;
}

.brand-logo img {
  display: block;
  height: 24px;
  width: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
}

.primary-nav a:hover,
.primary-nav a[aria-current="true"] {
  background: var(--fill);
  color: var(--text);
}

.nav-toggle,
.theme-toggle,
.icon-button,
.pivot-tab,
.chip,
.btn {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 32px;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  background: var(--fill);
  padding: 8px 7px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
}

.theme-toggle,
.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  background: var(--fill);
  color: var(--text);
}

.theme-toggle svg,
.icon-button svg { width: 16px; height: 16px; }

[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon { display: none; }

.hero { padding: 48px 0 24px; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(28px, 3vw, 36px); }
h3 { font-size: 20px; }

.lede {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  backdrop-filter: blur(20px);
  font-size: 13px;
  color: var(--text-2);
}

.status.is-live { color: var(--text); border-color: color-mix(in srgb, var(--success) 45%, var(--stroke)); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.status.is-live .dot { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 25%, transparent); }

.clock-block { margin-top: 32px; }

.clock-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.clock-wrap { overflow-x: auto; padding-bottom: 4px; }

.clock {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}

.cell, .acrylic {
  background: var(--acrylic);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
}

.cell {
  min-width: 108px;
  padding: 16px 12px 12px;
  border-radius: 8px;
  text-align: center;
}

.cell strong {
  display: block;
  font-size: 52px;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cell span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.colon {
  font-size: 32px;
  color: var(--text-3);
  padding-bottom: 18px;
}

.anchor, .fine, .meta, .date, .table-note {
  color: var(--text-3);
  font-size: 13px;
}

.anchor { margin: 12px 0 0; }

.meter {
  margin-top: 16px;
  height: 4px;
  border-radius: 99px;
  background: var(--fill);
  overflow: hidden;
  max-width: 560px;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
}

.hero-grid, .split, .news-grid, .trailer-grid, .cast-grid, .bay-grid {
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
  margin-top: 28px;
  align-items: stretch;
}

.art, .feature, .news-card, .trailer, .quote-card, .cast, .table-card, .preload-panel, .update-note {
  border-radius: 8px;
}

.art { margin: 0; overflow: hidden; }
.logo-stage {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 48px 36px;
  background:
    radial-gradient(420px 240px at 50% 42%, rgba(255, 43, 144, 0.34), transparent 68%),
    linear-gradient(165deg, #2a0848, #100818 72%);
}
.logo-stage img {
  display: block;
  width: min(100%, 420px);
  height: auto;
}
.art figcaption { padding: 10px 14px 12px; color: var(--text-3); font-size: 12px; }

.feature, .news-card, .trailer, .quote-card, .cast { padding: 22px; }
.feature p, .quote-card p, .cast p, .news-card p, .trailer p { color: var(--text-2); }
.feature h2, .quote-card h2 { margin-bottom: 8px; }
.feature .date { margin: 0 0 10px; }
.feature .btn { margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-subtle {
  background: var(--fill);
  border-color: var(--stroke);
  color: var(--text);
}
.btn-subtle:hover { background: var(--fill-hover); }

section#mods,
section#news,
section#trailers,
section#leonida,
section#characters,
section#timezones,
section#faq { padding: 28px 0; }

.faq-list { display: grid; gap: 10px; }
.faq-item {
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--acrylic);
  backdrop-filter: blur(24px) saturate(1.3);
}
.faq-item h3 { font-size: 18px; margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--text-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head p:last-child { margin: 0; color: var(--text-2); }

.mod-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.search input,
.chip {
  min-height: 32px;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  background: var(--fill);
  color: var(--text);
}

.search input {
  padding: 0 12px;
  min-width: min(280px, 100%);
  font: inherit;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip { padding: 0 12px; font-size: 13px; }
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

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

.bay, .mod-card {
  border-radius: 8px;
  border: 1px dashed var(--stroke-strong);
  background: var(--bay);
  padding: 16px;
  min-height: 132px;
}

.mod-card {
  border-style: solid;
  background: var(--acrylic);
  backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: var(--shadow);
}

.bay span, .mod-card .tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 650;
}

.bay strong, .mod-card h3 { display: block; margin: 18px 0 4px; font-size: 18px; }
.bay p, .mod-card p { margin: 0; color: var(--text-3); font-size: 14px; }
.mod-card .byline { margin-top: 4px; color: var(--text-2); font-size: 13px; }
.mod-card .summary { margin-top: 10px; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags span, .places li {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--fill);
  color: var(--text-2);
}

.meta { margin: 12px 0 0; }
.update-note { margin-top: 16px; padding: 0 16px; background: var(--fill); border: 1px solid var(--stroke); }
.update-note summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.update-note p { margin: 0 0 14px; color: var(--text-2); }
code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
  background: var(--fill);
  padding: 1px 5px;
  border-radius: 4px;
}

.news-grid, .trailer-grid { grid-template-columns: repeat(3, 1fr); }
.news-card h3, .trailer h3 { margin: 6px 0 8px; }
.news-card p, .trailer p { margin: 0; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  margin-bottom: 12px;
}

.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.split { grid-template-columns: 1fr 1fr; align-items: start; }
.split article p { color: var(--text-2); }
.places { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }

.cast-grid { grid-template-columns: 1fr 1fr; }
.cast-compact {
  background: var(--fill);
  border: 1px solid var(--stroke);
  box-shadow: none;
}
.cast h3 { margin-bottom: 8px; }
.cast p { margin: 0; }
.cast-grid .cast-compact:nth-child(n + 3) { min-height: 0; }
.cast-grid { }
.cast-grid .cast:nth-child(n + 3) {
  /* supporting cast sits in the same grid, two columns */
}

.pivot { display: flex; gap: 0; margin-bottom: 12px; border-bottom: 1px solid var(--stroke); }
.pivot-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  padding: 8px 14px;
  margin-bottom: -1px;
  font-weight: 650;
}
.pivot-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.table-card { padding: 8px 8px 4px; overflow-x: auto; }
.table-note { margin: 8px 10px 4px; max-width: 70ch; }
.times { width: 100%; border-collapse: collapse; }
.times th, .times td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  font-variant-numeric: tabular-nums;
}
.times th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.times tr:last-child td { border-bottom: 0; }
.times tbody tr:hover td { background: var(--fill); }
.times .you td { background: var(--accent-soft); font-weight: 650; }

.preload {
  position: fixed;
  left: 0;
  top: 46%;
  z-index: 45;
}

.preload-tab {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border: 1px solid var(--stroke);
  border-right: 0;
  background: var(--nav);
  color: var(--text);
  backdrop-filter: blur(24px);
  border-radius: 0 8px 8px 0;
  padding: 14px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.preload-panel {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 32px));
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

body.preload-open { padding-bottom: 128px; }

.panel-copy { min-width: 180px; }
.panel-kicker { margin: 0; font-weight: 650; }
.mini-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mini-clock span {
  background: var(--fill);
  border-radius: 6px;
  text-align: center;
  padding: 8px 4px;
}
.mini-clock strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.mini-clock small { color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; }
.preload-panel .fine { flex: 1 1 220px; margin: 0; }
.preload-panel .btn { width: auto; }

.footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  border-top: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.footer-inner { padding: 22px 0 32px; display: grid; gap: 6px; }
.footer p { margin: 0; color: var(--text-3); font-size: 13px; }

@media (max-width: 900px) {
  .hero-grid, .split, .news-grid, .trailer-grid, .section-head { grid-template-columns: 1fr; }
  .bay-grid { grid-template-columns: 1fr 1fr; }
  .cast-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(1120px, calc(100% - 32px)); }
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 56px;
    z-index: 5;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--stroke);
    box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 10px; }
  .cell { min-width: 76px; padding: 12px 8px 10px; }
  .cell strong { font-size: 32px; }
  .colon { font-size: 20px; }
  .preload {
    position: sticky;
    top: 56px;
    left: auto;
    display: block;
  }
  .preload-tab {
    writing-mode: horizontal-tb;
    transform: none;
    width: 100%;
    border-right: 1px solid var(--stroke);
    border-radius: 0;
    letter-spacing: 0.12em;
    padding: 10px 16px;
    text-align: left;
    background: var(--acrylic);
  }
  .preload-panel {
    position: static;
    transform: none;
    width: auto;
    margin: 0 16px 8px;
    left: auto;
    bottom: auto;
  }
  body.preload-open { padding-bottom: 0; }
  .bay-grid { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
