/* ==========================================================================
   MierCat Design System v1 (2026-11-14) — Single Source of Truth (tokens.css)
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=JetBrains+Mono:wght@400..700&family=Noto+Sans+SC:wght@400..700&family=Onest:wght@400..700&display=swap");

:root {
  --brand-cyber: #FF9E00;
  --brand-carbon: #0B0D10;
  --brand-sunset: #FF7A33;
  --brand-violet: #5B4FE0;
  --brand-navy: #0B1F2E;
  --brand-teal: #00B8C8;
  --brand-mint: #39E6E2;
  --brand-sand: #D8B38A;
  --brand-cream: #FDF4E6;
  --brand-blush: #F7D9CE;
  --brand-terracotta: #E07A4F;
  --brand-charcoal: #1F2937;
  --brand-gray: #6B7280;
  --brand-cloud: #FAFBFD;
  --bg: #FDF4E6;
  --surface: #FAFBFD;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F6EAD7;
  --ink: #0B1F2E;
  --ink-muted: #5A6472;
  --line: #E8DCC8;
  --line-strong: #6B7280;
  --accent: #FF9E00;
  --on-accent: #0B0D10;
  --accent-soft: #FFEDB8;
  --warm: #FF7A33;
  --on-warm: #0B0D10;
  --warm-ink: #A63A0E;
  --warm-soft: #F7D9CE;
  --violet: #5B4FE0;
  --on-violet: #FDF4E6;
  --violet-ink: #4A3DCC;
  --violet-soft: #E7E4FF;
  --sand: #D8B38A;
  --signal: #39E6E2;
  --focus: #0B1F2E;
  --success: #0B6B5C;
  --success-soft: #D8F0E6;
  --warning: #7A4D00;
  --warning-soft: #FBE7B8;
  --danger: #A3211A;
  --danger-soft: #FADAD5;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11,31,46,0.06), 0 1px 1px rgba(11,31,46,0.04);
  --shadow-md: 0 8px 24px -8px rgba(11,31,46,0.14), 0 2px 6px rgba(11,31,46,0.06);
  --shadow-lg: 0 24px 56px -16px rgba(11,31,46,0.22), 0 4px 12px rgba(11,31,46,0.08);
  --shadow-glow: 0 0 0 4px rgba(57,230,226,0.22), 0 0 16px rgba(57,230,226,0.55);
  --font-display: "Bricolage Grotesque", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-sans: "Onest", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1F2E;
    --surface: #152C3E;
    --surface-raised: #1D3A50;
    --surface-sunken: #081824;
    --ink: #FDF4E6;
    --ink-muted: #A9B8C4;
    --line: #24405A;
    --line-strong: #748897;
    --accent-soft: #3A2E0A;
    --warm-ink: #FF9E73;
    --warm-soft: #40291F;
    --violet-ink: #B4AEFF;
    --violet-soft: #25234F;
    --focus: #FF9E00;
    --success: #6FDDBB;
    --success-soft: #123B38;
    --warning: #F2C46B;
    --warning-soft: #3D3117;
    --danger: #FFA08F;
    --danger-soft: #45221F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px -8px rgba(0,0,0,0.6);
    --shadow-lg: 0 24px 56px -16px rgba(0,0,0,0.7);
  }
}

:root[data-theme="dark"],
:root[data-theme="night"] {
  --bg: #0B1F2E;
  --surface: #152C3E;
  --surface-raised: #1D3A50;
  --surface-sunken: #081824;
  --ink: #FDF4E6;
  --ink-muted: #A9B8C4;
  --line: #24405A;
  --line-strong: #748897;
  --accent-soft: #3A2E0A;
  --warm-ink: #FF9E73;
  --warm-soft: #40291F;
  --violet-ink: #B4AEFF;
  --violet-soft: #25234F;
  --focus: #FF9E00;
  --success: #6FDDBB;
  --success-soft: #123B38;
  --warning: #F2C46B;
  --warning-soft: #3D3117;
  --danger: #FFA08F;
  --danger-soft: #45221F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 56px -16px rgba(0,0,0,0.7);
}

/* ==========================================================================
   Base Reset & Focus Accessibility (2px solid var(--focus), offset 2px)
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  overflow-x: hidden;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

a,
button,
input,
[tabindex]:not([tabindex="-1"]) {
  transition:
    transform 200ms var(--ease-out),
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

code {
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* Theme-aware Official Logo Switching */
.logo-on-dark {
  display: none;
}
.logo-on-light {
  display: inline-block;
}
:root[data-theme="dark"] .logo-on-dark,
:root[data-theme="night"] .logo-on-dark {
  display: inline-block;
}
:root[data-theme="dark"] .logo-on-light,
:root[data-theme="night"] .logo-on-light {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-dark {
    display: inline-block;
  }
  :root:not([data-theme="light"]) .logo-on-light {
    display: none;
  }
}

/* ==========================================================================
   MierCat Design System v1 Official Component Primitives
   ========================================================================== */
.mc-btn,
.btn-primary,
.btn-secondary,
.btn-warm,
.btn-violet,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.mc-btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-warm:hover,
.btn-violet:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.mc-btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-warm:active,
.btn-violet:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
  transition-duration: 120ms;
}

/* Rule: accent (#FF9E00) is the sole primary CTA fill, ALWAYS paired with carbon black (#0B0D10) */
.mc-btn-primary,
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.mc-btn-warm,
.btn-warm {
  background: var(--warm);
  border-color: var(--warm);
  color: var(--on-warm);
  font-weight: 700;
}

.mc-btn-violet,
.btn-violet {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--on-violet);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.mc-btn-ghost,
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

.mc-btn-ghost:hover,
.btn-ghost:hover {
  background: var(--surface-sunken);
  box-shadow: none;
  transform: none;
}

.full-width {
  width: 100%;
}

/* Official Signal Dot (#39E6E2, 2.4s pulse, ONLY looping animation in system) */
.mc-signal,
.pulse-dot,
.badge-dot,
.vp-dot,
.theme-indicator-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: var(--shadow-glow);
  animation: mc-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes mc-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* Official Badge */
.mc-badge,
.stage-badge,
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mc-badge-accent,
.tag-ready {
  background: var(--accent-soft);
  color: var(--ink);
}

.mc-badge-violet,
.tag-rd {
  background: var(--violet-soft);
  color: var(--violet-ink);
}

.mc-badge-warm {
  background: var(--warm-soft);
  color: var(--warm-ink);
}

.mc-badge-success,
.badge-live,
.tag-live {
  background: var(--success-soft);
  color: var(--success);
}

/* Official Waypoint Component */
.mc-waypoint {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.mc-waypoint-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--brand-navy);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.mc-waypoint-current .mc-waypoint-index {
  background: var(--accent);
  color: var(--on-accent);
}
.mc-waypoint-name {
  font-size: 15px;
  line-height: 22px;
  font-weight: 650;
  color: var(--ink);
}
.mc-waypoint-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-muted);
}
.mc-waypoint-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

/* Official Callout Component */
.mc-callout {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--violet-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 22px;
}
.mc-callout svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--violet-ink);
}
.mc-callout-title {
  font-weight: 650;
  color: var(--violet-ink);
}

/* ==========================================================================
   Layout Containers & 4px Grid Spacing (space-8 / space-9 for external pages)
   ========================================================================== */
.container {
  width: min(1240px, calc(100% - var(--space-6)));
  margin-inline: auto;
}

.section-block {
  position: relative;
  padding-block: var(--space-9);
  border-top: 1px solid var(--line);
}

.section-header {
  max-width: 680px;
  margin-bottom: var(--space-7);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-ink);
  margin-bottom: var(--space-3);
}

:root[data-theme="dark"] .section-eyebrow,
:root[data-theme="night"] .section-eyebrow {
  color: var(--brand-cyber);
}

/* Rule: Bricolage Grotesque ONLY on external display headings, weight 650-700, tight tracking */
.hero-title,
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
}

.hero-title {
  font-size: clamp(2.5rem, 4.8vw, 4.25rem);
  line-height: 1.06;
}

.section-title {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.12;
}

.section-title span,
.gradient-accent {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
}

/* Rule: External page body copy max-width 680px */
.hero-lede,
.section-desc,
.dossier-lead {
  max-width: 680px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-muted);
  margin: 0;
}

.hero-lede strong,
.section-desc strong,
.dossier-lead strong {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   Top Sentinel Navigation HUD
   ========================================================================== */
.hud-header {
  position: sticky;
  top: var(--space-3);
  z-index: 50;
  width: min(1240px, calc(100% - var(--space-5)));
  margin-inline: auto;
}

.hud-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 60px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink);
  padding-inline: var(--space-2);
}

.brand-wordmark-img {
  height: 26px;
  width: auto;
  min-width: 96px;
  display: block;
}

/* Rule: TECH × EXPLORE is a positioning descriptor using label style */
.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-ink);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
}

:root[data-theme="dark"] .brand-badge,
:root[data-theme="night"] .brand-badge {
  color: var(--brand-cyber);
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet-ink);
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.horizon-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-3) 2px 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--surface-raised);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.horizon-slider {
  width: 72px;
  accent-color: var(--accent);
  cursor: pointer;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section: 4D Spatial Field & Official Key Visual / Mascot Showcase
   ========================================================================== */
.hero-section {
  position: relative;
  padding-top: var(--space-7);
  padding-bottom: var(--space-9);
  overflow: hidden;
}

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#spatialCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, transparent 20%, var(--bg) 92%);
}

.hero-container {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - var(--space-6)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: var(--space-6);
  align-items: start;
}

.hero-content {
  display: grid;
  gap: var(--space-5);
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-1);
}

.domain-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding-top: var(--space-2);
}

.domain-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.domain-chip:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.chip-host {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--violet-ink);
}

.chip-tag {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}

/* Right Column: Official Key Visual & Telemetry Card */
.hero-right-stack {
  display: grid;
  gap: var(--space-4);
}

.hero-sentinel-card {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
}

.sentinel-card-frame {
  display: grid;
  gap: var(--space-4);
}

.sentinel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.sc-mode {
  color: var(--ink);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
}

.sentinel-image-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.sentinel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 200ms var(--ease-out);
}

.sentinel-img-night {
  opacity: 0;
}
.sentinel-img-day {
  opacity: 1;
}
:root[data-theme="dark"] .sentinel-img-night,
:root[data-theme="night"] .sentinel-img-night {
  opacity: 1;
}
:root[data-theme="dark"] .sentinel-img-day,
:root[data-theme="night"] .sentinel-img-day {
  opacity: 0;
}

/* Key Visual Overlay Lockup (Night: left clear; Day: right clear) */
.kv-caption-overlay {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  max-width: 46%;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(11, 31, 46, 0.76);
  color: var(--brand-cream);
  backdrop-filter: blur(8px);
  display: grid;
  gap: var(--space-1);
}

:root[data-theme="light"] .kv-caption-overlay {
  left: auto;
  right: var(--space-4);
  background: rgba(253, 244, 230, 0.88);
  color: var(--brand-navy);
}

.kv-caption-overlay img {
  height: 20px;
  width: auto;
}

.kv-caption-overlay span {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sentinel-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.sc-stat {
  display: grid;
  gap: 2px;
}

.sc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.sc-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sc-swatches {
  display: inline-flex;
  gap: 6px;
}

.sc-swatches i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

/* Telemetry Mode Tabs Bar */
.hero-telemetry-hud {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-3);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.telemetry-row {
  display: grid;
  gap: 2px;
}

.t-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.t-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.telemetry-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
}

.mode-pill {
  flex: 1;
  min-width: 96px;
  height: 36px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mode-pill:hover {
  color: var(--ink);
}

.mode-pill.active {
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Section 01: 4-Property Bento Grid (padding: space-5, gap: space-5, radius-lg)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5);
}

.bento-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.card-featured-world {
  grid-column: span 7;
}
.card-featured-travel {
  grid-column: span 5;
}

.bento-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.domain-pill code {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--violet-ink);
}

.card-body {
  display: grid;
  gap: var(--space-3);
}

.card-body h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 28px;
  font-weight: 650;
  color: var(--ink);
}

.card-body p {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-muted);
}

.card-body p strong {
  color: var(--ink);
}

.tech-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-1);
}

.tech-tag-row span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.metric-item {
  display: grid;
  gap: 2px;
}

.metric-item strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.metric-item span {
  font-size: 12px;
  line-height: 18px;
  color: var(--ink-muted);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.card-action-link,
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--violet-ink);
  text-decoration: none;
}

.card-action-link:hover,
.external-link:hover {
  text-decoration: underline;
}

.card-route-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Section 02: world.mier.cat Interactive 4D World Model Workbench
   ========================================================================== */
.world-workbench {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-5);
  align-items: start;
}

.world-viewport-panel {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-4);
}

.vp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.vp-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.vp-layer-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
}

.vp-tab {
  height: 36px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.vp-tab.active {
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.vp-canvas-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--brand-navy);
  border: 1px solid var(--line);
}

#worldSandboxCanvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: grab;
}

#worldSandboxCanvas:active {
  cursor: grabbing;
}

.vp-overlay-hud {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  pointer-events: none;
}

.vp-chip {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(11, 31, 46, 0.84);
  color: var(--brand-cream);
  border: 1px solid rgba(253, 244, 230, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.vp-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.vp-control {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 160px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.vp-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.vp-reset-btn {
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.vp-reset-btn:hover {
  background: var(--accent-soft);
}

.world-spec-panel {
  display: grid;
  gap: var(--space-4);
}

.spec-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-2);
}

.spec-step {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-ink);
}

:root[data-theme="dark"] .spec-step,
:root[data-theme="night"] .spec-step {
  color: var(--brand-cyber);
}

.spec-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 650;
  color: var(--ink);
}

.spec-card p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Section 03: Dual Interactive Workbenches (Travel Waypoints + Optical Loupe)
   ========================================================================== */
.dual-workbench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.workbench-box {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.wb-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.wb-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-ink);
}

.wb-header h3 {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 26px;
  font-weight: 650;
}

.wb-status {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.wb-intro {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-muted);
}

.signal-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.signal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.signal-btn.active {
  background: var(--accent-soft);
  border-color: var(--ink);
  color: var(--ink);
}

.waypoint-stack {
  display: grid;
  gap: var(--space-2);
}

.terminal-window {
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.term-dots {
  display: inline-flex;
  gap: 6px;
}

.term-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.term-code {
  margin: 0;
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 19px;
  color: var(--ink);
  overflow-x: auto;
  max-height: 210px;
}

/* Optical Comparator */
.optical-comparator {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  user-select: none;
}

.comp-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-overlay {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
}

.comp-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brand-cream);
  cursor: ew-resize;
}

.comp-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--brand-carbon);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.comp-badge {
  position: absolute;
  bottom: var(--space-3);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(11, 31, 46, 0.82);
  color: var(--brand-cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.badge-left {
  left: var(--space-3);
}
.badge-right {
  right: var(--space-3);
}

.exif-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.exif-cell {
  display: grid;
  gap: 2px;
}

.e-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.e-v {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   Section 04: Architecture Topology Table
   ========================================================================== */
.topology-table-wrap {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.topology-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  line-height: 22px;
}

.topology-table th {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.topology-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-muted);
}

.topology-table td strong {
  color: var(--ink);
}

/* ==========================================================================
   Section 05: Startup Dossier & Official Mascot Dual Pair (At most 1 group/screen)
   ========================================================================== */
.dossier-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-6);
  align-items: start;
}

.dossier-left {
  display: grid;
  gap: var(--space-5);
}

.workload-grid {
  display: grid;
  gap: var(--space-4);
}

.workload-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-2);
}

.workload-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 650;
  color: var(--ink);
}

.workload-card p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-muted);
}

.verification-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-5);
}

.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.vc-llc-logo {
  height: 30px;
  width: auto;
}

/* Official Master Mascot Pair Showcase (Rule: MierCat <= 340px, Mier slightly smaller when together) */
.mascot-sentinel-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.mascot-pair-imgs {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

.mascot-img-miercat {
  height: 92px;
  width: auto;
  max-width: 340px;
  object-fit: contain;
}

.mascot-img-mier {
  height: 78px;
  width: auto;
  object-fit: contain;
}

.vc-list {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.vc-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.vc-row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.vc-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.vc-row dd a {
  color: var(--violet-ink);
  text-decoration: none;
  font-family: var(--font-mono);
}

.vc-actions {
  display: grid;
  gap: var(--space-3);
}

/* ==========================================================================
   Footer & Official LLC Wordmark
   ========================================================================== */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.footer-brand-col {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.footer-tagline {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-muted);
}

.footer-location {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-location a {
  color: var(--violet-ink);
  text-decoration: none;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.footer-col h4 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.footer-col a,
.footer-modal-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
}

.footer-col a:hover,
.footer-modal-link:hover {
  color: var(--violet-ink);
}

.footer-bottom {
  padding-top: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

/* ==========================================================================
   Modals & Command Palette (surface-raised, radius-xl)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 31, 46, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.cmd-modal,
.legal-modal {
  width: min(640px, 100%);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cmd-search-bar,
.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.cmd-search-bar input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
}

.cmd-search-bar input:focus {
  outline: none;
}

.cmd-close {
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.cmd-list {
  padding: var(--space-3);
  display: grid;
  gap: 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.cmd-item:hover {
  background: var(--accent-soft);
}

.cmd-item-left {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.legal-modal-body {
  padding: var(--space-5);
  max-height: 70svh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-muted);
}

.legal-modal-body h4 {
  color: var(--ink);
  margin: var(--space-4) 0 var(--space-2);
}

/* Custom Reticle hidden on touch or reduced motion */
.cursor-reticle {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .hero-container,
  .world-workbench,
  .dual-workbench-grid,
  .dossier-shell,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .bento-card,
  .card-featured-world,
  .card-featured-travel {
    grid-column: span 12;
  }
  .hud-nav {
    display: none;
  }
}

/* Rule: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .mc-signal,
  .pulse-dot,
  .badge-dot,
  .vp-dot,
  .theme-indicator-dot {
    animation: none !important;
  }
}
