:root {
  /* Three flat surfaces (Midnight Sky-Slate) */
  --paper: #0F1726;
  --surface: #162133;
  --navy: #1E2D45;

  --ink: #F0F4F8;
  --ink-dark: #0F1726;
  --muted: #AEBFD4;
  --on-navy-muted: #BDD0E6;
  --line: rgba(197, 212, 232, 0.14);
  --line-strong: rgba(197, 212, 232, 0.28);

  /* Urbaniac Key-Art Accents (no violet) */
  --brand-gold: #FFD166;
  --brand-gold-hover: #F5C249;
  --brand-green: #7CC260;
  --brand-green-badge: #8FD473;
  --brand-green-bg: #1B3126;
  --brand-sky: #56C2F0;
  --brand-orange: #FF934F;
  --brand-wood: #C4926B;
  --brand-coral: #FF6B8B;
  --brand-pink: var(--brand-coral);

  /* Authentic Discord Embed Palette */
  --discord-bg: #23262F;
  --discord-surface: #1A1D24;
  --discord-text: #DBDEE1;
  --discord-muted: #A8B0BC;

  /* Typography & Motion */
  --font-display: "Chakra Petch", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  color-scheme: dark;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
ol {
  margin: 0;
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--font-display);
}

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

.stage-tab:focus-visible,
.preview-action-btn:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: -4px;
  position: relative;
  z-index: 3;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--brand-gold);
  color: var(--ink-dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: top 160ms var(--ease-out);
}

.skip-link:focus-visible {
  top: 16px;
}

.container {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(15, 23, 38, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-title-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

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

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--brand-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms var(--ease-out);
}

.nav a.is-current {
  color: var(--ink);
}

.nav a.is-current::after {
  transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover {
    color: var(--ink);
    background-color: var(--surface);
  }
}

.nav .nav-mobile-cta {
  display: none;
}

.nav .nav-mobile-cta::after {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Header Background Music Control */
.bgm-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.bgm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}

.bgm-btn[aria-pressed="true"] {
  color: var(--brand-gold);
}

.bgm-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.bgm-bars span {
  width: 2.5px;
  height: 11px;
  border-radius: 1px;
  background-color: currentColor;
  opacity: 0.45;
  transform-origin: bottom center;
  transform: scaleY(0.36);
}

.bgm-btn[aria-pressed="true"] .bgm-bars span {
  opacity: 1;
  transform: scaleY(0.75);
}

@media (prefers-reduced-motion: no-preference) {
  .bgm-btn[aria-pressed="true"] .bgm-bars span {
    animation: bgm-eq 0.9s ease-in-out infinite alternate;
  }

  .bgm-btn[aria-pressed="true"] .bgm-bars span:nth-child(2) {
    animation-delay: 0.25s;
  }

  .bgm-btn[aria-pressed="true"] .bgm-bars span:nth-child(3) {
    animation-delay: 0.5s;
  }
}

@keyframes bgm-eq {
  0% { transform: scaleY(0.28); }
  100% { transform: scaleY(1); }
}

@media (hover: hover) and (pointer: fine) {
  .bgm-btn:hover {
    color: var(--ink);
    background-color: var(--navy);
  }
}

.menu-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), transform 120ms var(--ease-out);
}

.menu-toggle:active {
  transform: scale(0.96);
}

.menu-toggle .icon-menu,
.menu-toggle .icon-close {
  position: absolute;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.menu-toggle .icon-menu {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.menu-toggle .icon-close {
  opacity: 0;
  transform: scale(0.7) rotate(-45deg);
}

.menu-toggle[aria-expanded="true"] .icon-menu {
  opacity: 0;
  transform: scale(0.7) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .icon-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-ui), color 160ms var(--ease-ui), border-color 160ms var(--ease-ui);
}

.btn-sm {
  min-height: 44px;
  padding: 10px 16px;
}

.btn-primary,
.btn-gold {
  background-color: var(--brand-gold);
  color: var(--ink-dark);
}

.btn:active,
.btn-primary:active,
.btn-gold:active {
  transform: scale(0.97);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
  transition: color 160ms var(--ease-ui), transform 160ms var(--ease-out);
}

.btn-link:active {
  transform: scale(0.97);
}

.icon-arrow,
.icon-down {
  flex-shrink: 0;
  transition: transform 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .menu-toggle:hover {
    background-color: var(--navy);
    border-color: var(--line-strong);
  }

  .btn-primary:hover,
  .btn-gold:hover {
    background-color: var(--brand-gold-hover);
    transform: translateY(-1px);
  }

  .btn:hover .icon-arrow {
    transform: translate(2px, -2px);
  }

  .btn-link:hover {
    color: var(--brand-sky);
  }

  .btn-link:hover .icon-down {
    transform: translateY(2px);
  }
}

/* Hero (fills first viewport cleanly) */
.hero {
  min-height: calc(100svh - 76px);
  padding: 36px 0 40px;
  display: flex;
  align-items: center;
  background-image: radial-gradient(rgba(197, 212, 232, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--line);
}

.hero-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.hero-art {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 1440 / 540;
  object-fit: cover;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title-col {
    animation: heroTextEnter 340ms var(--ease-out) backwards;
  }

  .hero-copy-col {
    animation: heroTextEnter 340ms var(--ease-out) 60ms backwards;
  }

  .hero-art img {
    animation: heroArtSettle 680ms var(--ease-out) both;
  }
}

/* Core Game Scope Strip */
.specs-band {
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: 44px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
}

.spec-item {
  padding: 14px 18px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.spec-item dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-gold);
  margin-bottom: 4px;
}

.spec-item dd {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-green);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2.15rem, 3.85vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-facts {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-wrap: pretty;
  color: var(--muted);
}

.hero-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

@keyframes heroTextEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroArtSettle {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1);
  }
}

/* Shared Section Layout */
.section {
  padding-block: 84px;
}

.surface-band {
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* Unified h3 across the entire landing page */
.stage-panel-main h3,
.showcase-item h3,
.system-card h3,
.step h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* Video Activity Showcase */
.showcase-split {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.showcase-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.showcase-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background-color: var(--paper);
}

.showcase-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.showcase-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.showcase-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.showcase-item-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--paper);
  border: 1px solid var(--line);
}

.showcase-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* City Progression Interactive Switcher */
.stage-showcase {
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stage-tablist {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.stage-tablist::before {
  content: "";
  position: absolute;
  position-anchor: --active-stage-tab;
  inset-block-start: calc(anchor(self-end) - 3px);
  inset-inline-start: anchor(self-start);
  inset-inline-end: anchor(self-end);
  border-block-end: 3px solid var(--brand-gold);
  pointer-events: none;
  z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
  .stage-tablist::before {
    transition: inset 200ms var(--ease-out);
  }
}

.stage-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease-ui), color 160ms var(--ease-ui), transform 120ms var(--ease-out);
}

.stage-tab:last-of-type {
  border-right: 0;
}

.stage-tab:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .stage-tab:hover {
    background-color: var(--navy);
  }
}

.stage-tab[aria-selected="true"] {
  anchor-name: --active-stage-tab;
  background-color: var(--paper);
  color: var(--ink);
}

@supports not (position-anchor: --active-stage-tab) {
  .stage-tablist::before {
    content: none;
  }

  .stage-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    border-block-end: 3px solid var(--brand-gold);
    pointer-events: none;
  }
}

.stage-tab-cap {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.stage-tab[aria-selected="true"] .stage-tab-cap {
  color: var(--brand-gold);
}

.stage-tab-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.stage-rail {
  height: 4px;
  background-color: var(--surface);
  overflow: hidden;
}

.stage-rail-fill {
  height: 100%;
  width: 100%;
  background-color: var(--brand-green);
  transform-origin: left center;
  transform: scaleX(0.2);
  transition: transform 280ms var(--ease-out);
}

.stage-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding: 28px 32px;
  min-height: 316px;
  align-items: start;
}

.stage-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
}

.badge-era {
  background-color: var(--navy);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.badge-cap {
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.badge-mod {
  background-color: var(--brand-green-bg);
  color: var(--brand-green-badge);
  border: 1px solid rgba(124, 194, 96, 0.35);
}

.stage-panel-main h3 {
  margin-bottom: 8px;
}

.stage-panel-main p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.stage-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.stage-metric dt {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.stage-metric dd {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.stage-visual-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.7);
}

.stage-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 456;
  object-fit: cover;
}

.stage-shot[hidden] {
  display: none;
}

/* Core Systems 3x2 Grid */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.system-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-top-width: 3px;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.system-card-alt {
  background-color: var(--paper);
}

.accent-orange {
  border-top-color: var(--brand-orange);
}

.accent-sky {
  border-top-color: var(--brand-sky);
}

.accent-gold {
  border-top-color: var(--brand-gold);
}

.accent-wood {
  border-top-color: var(--brand-wood);
}

.accent-green {
  border-top-color: var(--brand-green);
}

.accent-coral,
.accent-pink {
  border-top-color: var(--brand-coral);
}

.system-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.system-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--paper);
  border: 1px solid var(--line);
}

.icon-orange {
  color: var(--brand-orange);
}

.icon-sky {
  color: var(--brand-sky);
}

.icon-gold {
  color: var(--brand-gold);
}

.icon-wood {
  color: var(--brand-wood);
}

.icon-green {
  color: var(--brand-green);
}

.icon-coral,
.icon-pink {
  color: var(--brand-coral);
}

.system-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.system-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* Discord Embed Previews */
.embeds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
}

.discord-embed {
  background-color: var(--discord-bg);
  color: var(--discord-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border-left: 5px solid var(--brand-green);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.embed-general {
  border-left-color: var(--brand-green);
}

.embed-economy {
  border-left-color: var(--brand-gold);
}

.embed-crafting {
  border-left-color: var(--brand-wood);
}

.embed-crew {
  border-left-color: var(--brand-sky);
}

.embed-activity {
  border-left-color: var(--brand-pink);
}

.embed-bot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.embed-bot-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.embed-bot-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.embed-bot-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #5865F2;
  color: #FFFFFF;
}

.embed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.embed-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.embed-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background-color: var(--discord-surface);
  color: var(--brand-gold);
}

.embed-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.embed-field-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--discord-muted);
}

.embed-field-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

progress.embed-xp-bar {
  appearance: none;
  border: 0 solid;
  overflow: clip;
  width: 100%;
  max-width: 240px;
  height: 10px;
  border-radius: 999px;
  background-color: var(--discord-surface);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35);
}

progress.embed-xp-bar::-webkit-progress-bar {
  background: transparent;
}

progress.embed-xp-bar::-webkit-progress-value {
  background-color: var(--brand-green);
  border-radius: 999px;
}

progress.embed-xp-bar::-moz-progress-bar {
  background-color: var(--brand-green);
  border-radius: 999px;
}

.embed-xp-text {
  font-variant-numeric: tabular-nums;
}

.embed-inline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}

.embed-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.preview-action-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: var(--discord-surface);
  color: var(--discord-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 160ms var(--ease-ui), border-color 160ms var(--ease-ui), color 160ms var(--ease-ui), transform 120ms var(--ease-out);
}

.preview-action-btn:active {
  transform: scale(0.97);
}

.preview-action-btn.is-active {
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--ink-dark);
}

@media (hover: hover) and (pointer: fine) {
  .preview-action-btn:not(.is-active):hover {
    background-color: var(--navy);
    border-color: var(--line-strong);
  }
}

.embed-dynamic-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.embed-market-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--discord-surface);
}

.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.trend-up {
  font-style: normal;
  color: var(--brand-green);
}

.trend-down {
  font-style: normal;
  color: var(--brand-orange);
}

.trend-neutral {
  font-style: normal;
  color: var(--brand-sky);
}

.embed-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--discord-muted);
}

/* Closing Onboarding + CTA + Support Band */
.start-section {
  background-color: var(--navy);
  color: var(--ink);
  padding-block: 84px;
  border-bottom: 1px solid var(--line);
}

.section-head-dark h2 {
  color: var(--ink);
}

.section-head-dark .section-lead {
  color: var(--on-navy-muted);
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.step {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.step-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-gold);
}

.step-icon {
  color: var(--brand-sky);
}

.step p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-navy-muted);
}

.closing-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
}

.closing-cta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.closing-note {
  font-size: 16px;
  color: var(--on-navy-muted);
}

.support-mail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  padding: 20px 24px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-height: 76px;
  transition: border-color 160ms var(--ease-ui), transform 160ms var(--ease-out);
}

.support-mail:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .support-mail:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
  }

  .support-mail:hover .support-arrow {
    transform: translate(2px, -2px);
  }
}

.support-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.support-mail strong {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.support-arrow {
  color: var(--brand-sky);
}

/* Footer */
.footer {
  background-color: var(--paper);
}

.footer-inner {
  min-height: 88px;
  padding-block: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-copy {
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--ink);
    background-color: var(--surface);
  }
}

@media (max-width: 1024px) {
  .systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet & Drawer Breakpoint (fixes 768px nav wrap while keeping CTA visible) */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.7);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-3px) scale(0.99);
    transition: opacity 130ms var(--ease-out), transform 130ms var(--ease-out), visibility 0s linear 130ms;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 0s;
  }

  .nav a::after {
    display: none;
  }

  .hero-container {
    gap: 36px;
  }

  .hero-head,
  .section-head,
  .stage-panel,
  .showcase-split,
  .embeds-grid,
  .steps,
  .closing-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-panel {
    min-height: 0;
  }

  .footer-inner {
    flex-wrap: wrap;
  }

  .footer-links {
    margin-left: -10px;
  }

  .footer-copy {
    order: 3;
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .container {
    width: calc(100% - 32px);
  }

  .hero {
    min-height: calc(100svh - 76px);
    padding: 24px 0 32px;
  }

  .hero-container {
    gap: 24px;
  }

  .systems-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .start-section {
    padding-block: 56px;
  }

  /* Horizontal single-row scrollable tabs with IntersectionObserver fade hints */
  .stage-tablist {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
    --fade-size: 2.5rem;
    scroll-padding-inline: var(--fade-size);
    mask:
      linear-gradient(black, black) no-clip subtract,
      linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
      linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
    transition: --fade-start 0.2s, --fade-end 0.2s;
  }

  .stage-tablist.more-start {
    --fade-start: var(--fade-size);
  }

  .stage-tablist.more-end {
    --fade-end: var(--fade-size);
  }

  .stage-tablist::-webkit-scrollbar {
    display: none;
  }

  .stage-tab {
    flex: 0 0 auto;
    min-width: 132px;
    scroll-snap-align: start;
  }

  .stage-panel {
    padding: 22px 18px;
  }

  .stage-metrics {
    grid-template-columns: 1fr;
  }

  .footer-links {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .specs-grid {
    grid-template-columns: 1fr;
  }

  .header-cta {
    display: none;
  }

  .nav .nav-mobile-cta {
    display: inline-flex;
    margin-top: 8px;
  }

  .embed-action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .bgm-btn {
    padding: 0 9px;
    gap: 5px;
  }

  .bgm-label {
    display: none;
  }
}

/* Legal Pages (/terms/ and /privacy/) */
.legal-header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legal-header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 160ms var(--ease-ui), background-color 160ms var(--ease-ui);
}

@media (hover: hover) and (pointer: fine) {
  .legal-header-nav a:hover {
    color: var(--ink);
    background-color: var(--surface);
  }
}

.legal-header-nav a[aria-current="page"] {
  color: var(--ink);
  background-color: var(--navy);
  border: 1px solid var(--line-strong);
}

.legal-main {
  padding: 52px 0 88px;
}

.legal-container {
  width: min(820px, calc(100% - 48px));
  margin-inline: auto;
}

.legal-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 36px;
}

.legal-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-gold);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 3.8vw, 2.85rem);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.legal-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.legal-intro {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.legal-intro p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-section h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--ink);
}

.legal-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 8px 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.legal-section a {
  color: var(--brand-sky);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 160ms var(--ease-ui);
}

@media (hover: hover) and (pointer: fine) {
  .legal-section a:hover {
    color: var(--brand-gold);
  }
}

.legal-info-box {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 14px 0;
  display: grid;
  gap: 6px;
}

.legal-info-box p {
  margin-bottom: 0;
  font-size: 15px;
  color: var(--ink);
}

.legal-info-box .legal-info-label {
  font-weight: 700;
  color: var(--ink);
}

.legal-signoff {
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.legal-signoff strong {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.legal-signoff span {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 720px) {
  .legal-container {
    width: calc(100% - 32px);
  }

  .legal-main {
    padding: 36px 0 64px;
  }

  .legal-header-nav {
    gap: 2px;
  }

  .legal-header-nav a {
    padding: 0 9px;
    font-size: 13px;
  }
}

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
