/* ==========================================================================
   OGame: Project Orion - Interactive Player Guide & Tool
   Visual Design System & Stylesheet (Impeccable Standards)
   ========================================================================== */

:root {
  /* Surface Color Palette */
  --bg-deep: #070a0f;
  --bg-surface: #0c121a;
  --bg-elevated: #111a26;
  --bg-elevated-hover: #162232;
  --border-subtle: #192738;
  --border-accent: #23364d;
  --border-active: #38bdf8;

  /* Authentic OGame Themed Accents */
  --sky-primary: #38bdf8;
  --amber-solar: #f59e0b;
  --emerald-safe: #10b981;
  --crimson-danger: #ef4444;
  --cobalt-deuterium: #0284c7;

  /* Typography Colors (Contrast >= 4.5:1 everywhere) */
  --text-pure: #ffffff;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #8297b0; /* > 5.2:1 against #070a0f */

  /* Layout Constants */
  --max-content-width: 1240px;
  --header-height: 76px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Neutral Depth Shadows (Blur <= 12px to avoid wide diffuse blur) */
  --shadow-card: 0 3px 8px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Themed Browser Surfaces --- */
::selection {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1c2b3e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sky-primary);
}

:focus-visible {
  outline: 2px solid var(--sky-primary);
  outline-offset: 3px;
}

/* --- Ambient Cosmic Background --- */
body {
  min-height: 100vh;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.25), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 100px 150px, rgba(56, 189, 248, 0.4), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 240px 340px, rgba(255, 255, 255, 0.2), rgba(0,0,0,0)),
    radial-gradient(2px 2px at 450px 220px, rgba(245, 158, 11, 0.35), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 600px 480px, rgba(255, 255, 255, 0.15), rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 850px 120px, rgba(56, 189, 248, 0.3), rgba(0,0,0,0)),
    radial-gradient(1px 1px at 1100px 390px, rgba(255, 255, 255, 0.2), rgba(0,0,0,0)),
    linear-gradient(180deg, #070a0f 0%, #090e16 50%, #06090e 100%);
  background-size: 1200px 600px, 1200px 600px, 1200px 600px, 1200px 600px, 1200px 600px, 1200px 600px, 1200px 600px, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
  background-attachment: fixed;
}

/* --- Header & Top Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 16, 24, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-top {
  max-width: var(--max-content-width);
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.04em;
}

.brand-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge-pill.status-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-safe);
}

/* --- Sticky Tabs Navigation --- */
.nav-tabs-wrapper {
  background: rgba(12, 18, 27, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tabs {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 16px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.05);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sky-primary);
}

/* --- Main Content Area --- */
.main-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* --- Tab Panels & Sleek Deceleration Entrance --- */
.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}
.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: panelEntrance 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelEntrance {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Reduced Motion Accessibility Guarantee --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Typography Hierarchy (Target >= 1.25x steps: 16px -> 21.6px -> 28px -> 36px) --- */
h1.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 16px;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

h2.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

p.section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 82ch;
  line-height: 1.7;
}

/* --- Overview Hero with Swirling Nebula --- */
.overview-hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: center;
  margin-bottom: 28px;
}

.overview-hero-content {
  display: flex;
  flex-direction: column;
}

.overview-hero-content .section-title {
  margin-bottom: 12px;
}

.overview-hero-content .section-intro {
  margin-bottom: 0;
  max-width: none;
}

.overview-nebula-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.overview-nebula-img {
  width: 100%;
  max-width: 270px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.28));
  animation: nebula-drift 24s ease-in-out infinite alternate;
  user-select: none;
  pointer-events: none;
}

@keyframes nebula-drift {
  0% {
    transform: rotate(0deg) scale(0.96);
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.22));
  }
  50% {
    transform: rotate(4deg) scale(1.03);
    filter: drop-shadow(0 0 32px rgba(125, 211, 252, 0.35));
  }
  100% {
    transform: rotate(-3deg) scale(0.98);
    filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.25));
  }
}

}

h3.sub-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-pure);
  margin: 32px 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-pure);
}

/* --- Content Panels (Clean depth, no nested cards) --- */
.content-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

/* --- Callout Alerts --- */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.callout-body strong {
  color: var(--text-pure);
  display: block;
  margin-bottom: 6px;
}

.callout.tip {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.05);
}
.callout.tip .callout-icon { color: var(--sky-primary); }

.callout.warning {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}
.callout.warning .callout-icon { color: var(--crimson-danger); }

.callout.important {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}
.callout.important .callout-icon { color: var(--amber-solar); }

/* --- Steps Grid (Flat, cleanly separated) --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--sky-primary);
}

.step-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--sky-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  line-height: 1;
}

.step-card h3, .step-card h4 {
  font-size: 1.15rem;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Stylish Mathematical Formula Presentation (KaTeX & Notation) --- */
.formula-card {
  background: #090e16;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 22px 0;
  box-shadow: var(--shadow-card);
}

.formula-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.formula-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sky-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.formula-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-solar);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.math-display {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #1e3046;
  border-radius: var(--radius-md);
  margin: 12px 0 14px;
  overflow-x: auto;
  font-size: 1.06rem;
  line-height: 1.5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  text-align: center;
}

/* KaTeX Theming */
.katex-display {
  margin: 0 !important;
}
.katex {
  font-size: 1.05em !important;
  color: #ffffff !important;
}
.katex .mord.text {
  color: var(--sky-primary) !important;
  font-weight: 600;
}
.katex .mbin, .katex .mrel {
  color: var(--amber-solar) !important;
}

.formula-variables {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
}

.variable-pill {
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.variable-pill:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated-hover);
}

.variable-pill strong {
  color: var(--sky-primary);
  font-weight: 700;
  font-size: 0.90rem;
}

/* --- Interactive Formula <-> Legend Hover Highlighting --- */
.formula-term-interactive,
.formula-var {
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.formula-term-interactive.active,
.formula-term-interactive:hover,
.formula-var.active,
.formula-var:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  color: var(--sky-primary) !important;
  outline: 1px solid var(--sky-primary);
  border-radius: 4px;
}

.formula-term-interactive.active span,
.formula-term-interactive:hover span {
  color: var(--sky-primary) !important;
}

.variable-pill[data-var] {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.variable-pill[data-var].active,
.variable-pill[data-var]:hover {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: var(--sky-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-1px);
  color: #ffffff !important;
}

.variable-pill[data-var].active strong,
.variable-pill[data-var]:hover strong {
  color: #ffffff !important;
}

.formula-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.6;
}

/* --- Data Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  margin: 22px 0;
}

table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

table.data-table th {
  background: var(--bg-elevated);
  color: var(--text-pure);
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-accent);
  white-space: nowrap;
}

table.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.numeric-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* --- Facility Cell with Thumbnails --- */
.facility-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.facility-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  object-fit: cover;
  flex-shrink: 0;
  background: #090e16;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.facility-info {
  display: flex;
  flex-direction: column;
}

.facility-title {
  font-weight: 700;
  color: var(--text-pure);
  font-size: 0.96rem;
}

.facility-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* --- Clean Badges --- */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-s-plus { background: #451a03; color: #fde68a; border: 1px solid #d97706; }
.tag-s { background: #3c2415; color: #fed7aa; border: 1px solid #b45309; }
.tag-a { background: #064e3b; color: #a7f3d0; border: 1px solid #059669; }
.tag-b { background: #1e293b; color: #cbd5e1; border: 1px solid #475569; }
.tag-utility { background: #082f49; color: #7dd3fc; border: 1px solid #0284c7; }

.tag-pvp { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid var(--crimson-danger); }
.tag-pve { background: rgba(16, 185, 129, 0.15); color: #86efac; border: 1px solid var(--emerald-safe); }

/* --- Rules Grid (Tab 2: Core Lithium Rules) --- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 28px;
}

.rule-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.rule-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-pure);
  font-weight: 700;
  font-size: 0.95rem;
}

.rule-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: var(--sky-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Facility Showcase Layout (Tab 2) --- */
.facility-showcase {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 28px 0;
}

.facility-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Screenshot Containers --- */
.screenshot-frame {
  margin: 28px auto;
  max-width: 960px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-accent);
  background: #090e16;
  box-shadow: var(--shadow-elevated);
}

.screenshot-frame.compact {
  max-width: 440px;
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.screenshot-caption .file-hint {
  font-family: monospace;
  color: var(--sky-primary);
  font-size: 0.82rem;
}

/* --- Anomaly Intel Showcase Gallery (Tab 4: Mission Types) --- */
.anomaly-gallery {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: start;
  margin: 28px 0 36px;
}

.anomaly-intel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.anomaly-intel-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.anomaly-card-header {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-pure);
  font-weight: 600;
}

.card-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.intel-badge {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-scanner {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-mission {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-safe);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.intel-img-container {
  background: #06090e;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.intel-img-container img {
  width: 100%;
  height: auto;
  display: block;
}

.anomaly-card-caption {
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.anomaly-card-caption strong {
  color: var(--text-pure);
}

/* --- Missions 2-Column Split Layout (Tab 4: Mission Types) --- */
.missions-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}

.missions-split-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.missions-split-col > .content-section {
  margin-bottom: 0;
}

/* --- Walkthrough Guide Styling --- */
.walkthrough-header {
  margin-bottom: 18px;
}

.walkthrough-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.walkthrough-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.walkthrough-step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.walkthrough-step-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.step-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(2, 132, 199, 0.35));
  border: 1px solid var(--sky-primary);
  color: var(--sky-primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body h4 {
  font-size: 0.95rem;
  color: var(--text-pure);
  margin-bottom: 4px;
  font-weight: 600;
}

.step-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.step-body code {
  font-family: monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--sky-primary);
  border: 1px solid var(--border-subtle);
}

.walkthrough-pro-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.walkthrough-pro-tip strong {
  color: #fbbf24;
}

.pro-tip-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

/* --- Filter Toolbar --- */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.search-input-group {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  background: #080d14;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-size: 0.92rem;
}

.search-input:focus {
  border-color: var(--sky-primary);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #080d14;
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-pure);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--sky-primary);
  border-color: var(--sky-primary);
}

/* --- Interactive Calculator Layout --- */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .overview-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .overview-nebula-wrapper {
    order: -1;
    max-width: 220px;
  }
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .facility-showcase {
    grid-template-columns: 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

/* Quick Scenarios Bar */
.calc-presets-bar {
  margin-bottom: 24px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.calc-presets-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--sky-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.calc-presets-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-preset-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-preset-btn:hover {
  color: var(--text-pure);
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.08);
}

.calc-preset-btn.active {
  color: #04101d;
  background: var(--sky-primary);
  border-color: var(--sky-primary);
  font-weight: 700;
}

/* Controls Column Unified Surface */
.calc-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 20px 0;
  border: none;
}

.calc-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.calc-group-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  object-fit: cover;
  flex-shrink: 0;
}

.calc-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-pure);
  margin: 0;
  line-height: 1.2;
}

.calc-group-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.calc-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-input-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-pure);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-input-row label span.helper {
  font-size: 0.78rem;
  font-weight: normal;
  color: var(--text-secondary);
}

.calc-quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.calc-chip-btn {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-chip-btn:hover {
  color: var(--sky-primary);
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.08);
}

.calc-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.calc-wave-track {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  background: #080d14;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
}

.calc-wave-step {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.calc-wave-step:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.calc-wave-step.in-range {
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.06);
}

.calc-wave-step.active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--sky-primary);
  box-shadow: inset 0 0 0 1px var(--sky-primary), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.helper-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-variant-numeric: tabular-nums;
}

.calc-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.calc-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.calc-segment-btn:hover {
  color: var(--text-pure);
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.04);
}

.calc-segment-btn.active {
  color: var(--text-pure);
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: inset 0 0 0 1px var(--sky-primary);
}

.calc-segment-btn.roll-high.active {
  border-color: var(--emerald-safe);
  color: #ffffff;
  background: rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 0 0 1px var(--emerald-safe);
}

.calc-segment-btn.roll-low.active {
  border-color: var(--amber-solar);
  color: #ffffff;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: inset 0 0 0 1px var(--amber-solar);
}

.segment-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.segment-indicator.pve {
  background: var(--emerald-safe);
}

.segment-indicator.pvp {
  background: var(--crimson-danger);
}

.segment-indicator.high {
  background: var(--emerald-safe);
}

.segment-indicator.low {
  background: var(--amber-solar);
}

.calc-class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.calc-class-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 56px;
}

.calc-class-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.15s ease;
}

.calc-class-btn:hover img {
  transform: scale(1.08);
}

.calc-class-btn:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.04);
}

.calc-class-btn.active {
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: inset 0 0 0 1px var(--sky-primary);
}

.calc-thumb-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-field-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  object-fit: cover;
  flex-shrink: 0;
}

/* Facilities List & Rows */
.calc-facilities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.calc-facility-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(8, 13, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calc-facility-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.45);
}

.calc-facility-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  object-fit: cover;
  flex-shrink: 0;
}

.calc-facility-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-facility-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-pure);
  line-height: 1.2;
  margin: 0;
  cursor: pointer;
}

.calc-facility-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.calc-facility-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.calc-fac-input {
  width: 82px;
  padding: 6px 10px;
  text-align: right;
  font-weight: 700;
  font-size: 0.88rem;
}

.calc-fac-suffix {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 14px;
}

.calc-input, .calc-select {
  padding: 10px 14px;
  background: #080d14;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
}

.calc-input:focus, .calc-select:focus {
  border-color: var(--sky-primary);
  outline: none;
}

/* Result Panel Column Unified Surface */
.calc-result-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.calc-hero-stat {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
}

.calc-hero-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}

.calc-hero-label {
  font-size: 0.84rem;
  color: var(--sky-primary);
  font-weight: 700;
}

.calc-tier-badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.calc-tier-badge.tier-splus {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.calc-tier-badge.tier-s {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.calc-tier-badge.tier-a {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.calc-tier-badge.tier-b {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.calc-tier-badge.tier-c {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.calc-hero-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 6px 0;
  letter-spacing: -0.02em;
}

.calc-hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.calc-hero-sub {
  font-size: 0.9rem;
  color: var(--sky-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.calc-hero-roi {
  font-size: 0.8rem;
  color: var(--emerald-safe);
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-variant-numeric: tabular-nums;
}

/* Custom Mission Archetype Dropdown */
.calc-custom-dropdown {
  position: relative;
  width: 100%;
}

.calc-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #080d14;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 44px;
}

.calc-dropdown-trigger:hover,
.calc-dropdown-trigger[aria-expanded="true"] {
  border-color: var(--sky-primary);
  background: rgba(15, 23, 42, 0.7);
}

.dropdown-selected-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-title-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-pure);
}

.dropdown-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.calc-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--sky-primary);
}

.calc-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: #0b121e;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 50;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-dropdown-group-label {
  padding: 6px 8px 3px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  pointer-events: none;
}

.calc-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.calc-dropdown-option:hover {
  background: rgba(56, 189, 248, 0.1);
}

.calc-dropdown-option.active {
  background: rgba(56, 189, 248, 0.16);
}

.calc-option-title {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-pure);
  font-weight: 500;
}

.calc-option-mult {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sky-primary);
  font-variant-numeric: tabular-nums;
}

/* Mission Type Badges */
.mission-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  flex-shrink: 0;
}

.mission-type-pill.combat {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.mission-type-pill.delivery {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.mission-type-pill.utility {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Formula Multiplier Pipeline */
.calc-pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-pipeline-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.calc-breakdown-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.calc-breakdown-item span.title {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.calc-breakdown-item span.val {
  color: var(--text-pure);
  font-weight: 700;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

/* --- FAQ Accordion --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--border-accent);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--text-pure);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-toggle-icon {
  width: 18px;
  height: 18px;
  stroke: var(--sky-primary);
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
  animation: answerFade 0.22s ease-out;
}

@keyframes answerFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   OGame Nexus Feature Showcase Styling (Tab 7: OGame Nexus)
   ========================================================================== */
.nexus-header-hero {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.nexus-header-hero-content {
  flex: 1;
}

.nexus-stores-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 4px;
  margin-left: auto;
}

.nexus-store-link {
  display: inline-block;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 0;
}

.nexus-store-link:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.nexus-store-badge-img {
  height: 24px;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: block;
}

@media (max-width: 768px) {
  .nexus-header-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .nexus-stores-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    padding-top: 12px;
    margin-left: 0;
  }

  .nexus-store-badge-img {
    height: 22px;
  }
}

.nexus-section {
  margin-bottom: 44px;
}

.nexus-hero-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.section-eyebrow {
  margin-bottom: 18px;
}

.eyebrow-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 9px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

/* --- Comparisons: Vanilla vs Nexus --- */
.nexus-compare-block {
  margin-bottom: 32px;
}

.compare-block-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-block-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-pure);
  margin: 0;
}

.compare-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nexus-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.nexus-compare-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-accent);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.nexus-compare-card.nexus {
  border-color: rgba(56, 189, 248, 0.45);
}

.nexus-compare-card.vanilla {
  border-color: rgba(148, 163, 184, 0.25);
}

.compare-card-top {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compare-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 9999px;
}

.compare-pill.vanilla {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.compare-pill.nexus {
  background: rgba(56, 189, 248, 0.18);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.compare-state {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.compare-img-wrap {
  background: #06090e;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-img-wrap img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.compare-card-body {
  padding: 16px 18px;
  flex-grow: 1;
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.87rem;
  line-height: 1.5;
}

.compare-list li {
  position: relative;
  padding-left: 20px;
}

.compare-list.vanilla li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--red-danger);
  font-weight: 700;
  font-size: 0.82rem;
}

.compare-list.nexus li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald-safe);
  font-weight: 700;
  font-size: 0.88rem;
}

.compare-list.vanilla li {
  color: var(--text-secondary);
}

.compare-list.nexus li {
  color: var(--text-secondary);
}

.compare-list.nexus li strong {
  color: var(--text-pure);
}

/* --- Combat Simulator Video Showcase --- */
.nexus-video-showcase {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

.nexus-video-card {
  background: #070b12;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 10px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.nexus-video-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
}

.video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.video-overlay-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fef3c7;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.03em;
}

.status-dot-amber {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
}

.video-caption {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.nexus-video-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.feature-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.feature-icon {
  font-size: 1.3rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.feature-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-text strong {
  display: block;
  color: var(--text-pure);
  margin-bottom: 2px;
  font-size: 0.92rem;
}

/* --- Scanner Intelligence Bento Grid --- */
.nexus-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.bento-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.bento-card.bento-wide {
  grid-column: span 2;
}

.bento-header {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bento-header h4 {
  font-size: 0.95rem;
  color: var(--text-pure);
  margin: 0;
  font-weight: 600;
}

.bento-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid;
  background: rgba(15, 23, 42, 0.6);
  white-space: nowrap;
}

.bento-media {
  background: #06090e;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.bento-media img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.bento-media-split {
  background: #06090e;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  flex-grow: 1;
}

.media-sub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.media-sub-item img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.sub-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.sub-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-safe);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sub-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sub-badge.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-solar);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.bento-desc {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.bento-desc strong {
  color: var(--text-pure);
}

/* --- In-Flight Tracking Grid --- */
.nexus-tracking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 20px;
}

.tracking-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.tracking-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.tracking-header {
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tracking-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tracking-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.tracking-header h4 {
  font-size: 0.95rem;
  color: var(--text-pure);
  margin: 0;
  font-weight: 600;
}

.tracking-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.tracking-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tracking-badge.pool {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tracking-badge.claimed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-safe);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tracking-img-wrap {
  background: #06090e;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.tracking-img-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.tracking-desc {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.tracking-desc strong {
  color: var(--text-pure);
}

/* --- Anomalies Tracker Dashboard (Part 5) --- */
.tracker-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.tracker-summary-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
}

.tracker-summary-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.tracker-summary-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tracker-summary-text strong {
  display: block;
  color: var(--text-pure);
  margin-bottom: 3px;
  font-size: 0.92rem;
}

.nexus-tracker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tracker-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.tracker-feature-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.tracker-card-header {
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tracker-card-header h4 {
  font-size: 0.96rem;
  color: var(--text-pure);
  margin: 0;
  font-weight: 600;
}

.tracker-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tracker-card-badge.cyan {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tracker-card-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-safe);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tracker-card-badge.amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-solar);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tracker-card-badge.purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tracker-card-media {
  background: #06090e;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  flex-grow: 1;
}

.tracker-card-media img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.tracker-card-body {
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  background: var(--bg-surface);
}

.tracker-card-body strong {
  color: var(--text-pure);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #070a0f;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--sky-primary);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 960px) {
  .anomaly-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .missions-split-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .nexus-compare-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .nexus-video-showcase {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .bento-card.bento-wide {
    grid-column: span 1;
  }
  .nexus-tracking-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .nexus-tracker-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .header-top {
    height: auto;
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .main-container {
    padding: 24px 16px 60px;
  }
  .content-section {
    padding: 22px 18px;
  }
  h2.section-title {
    font-size: 1.6rem;
  }
  .tab-btn {
    padding: 12px 14px;
    font-size: 0.88rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .math-display {
    font-size: 1.05rem;
    padding: 14px 16px;
  }
  .variable-pill {
    font-size: 0.88rem;
    padding: 6px 10px;
  }
}

@media (max-width: 640px) {
  .bento-media-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .nexus-compare-block {
    padding: 16px;
  }
  .compare-block-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Interactive Anomaly Schema Blueprint Styles
   Anti-Slop, High-Contrast & Impeccable Standards
   ========================================================================== */

.loop-blueprint-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  margin: 32px 0 28px;
  box-shadow: var(--shadow-card);
}

.loop-blueprint-header {
  margin-bottom: 24px;
}

/* 4-Step Pipeline Stepper */
.loop-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.loop-step-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  box-shadow: var(--shadow-card);
}

.loop-step-btn:hover {
  border-color: var(--border-active);
  color: var(--text-pure);
  background: var(--bg-elevated-hover);
}

.loop-step-btn:active {
  transform: scale(0.98);
}

.loop-step-btn.active {
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-pure);
}

.loop-step-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--sky-primary);
  border-radius: 2px;
}

.loop-step-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.loop-step-btn.active .loop-step-tag {
  color: var(--sky-primary);
}

.loop-step-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.3;
}

.loop-step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.loop-pipeline-arrow {
  color: var(--text-muted);
  opacity: 0.45;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loop Compounding Banner */
.loop-cycle-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(56, 189, 248, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.loop-cycle-badge {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.loop-cycle-text {
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.loop-cycle-text strong {
  color: var(--sky-primary);
}

/* Phase Panels Container */
.loop-panels-wrapper {
  margin-bottom: 24px;
}

.loop-panel {
  display: none;
  animation: panelFadeIn 0.25s ease-out;
}

.loop-panel.active {
  display: block;
}

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

/* Panel Hero */
.loop-panel-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.panel-hero-meta h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure);
  margin: 6px 0 8px;
}

.panel-hero-meta p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 820px;
}

.phase-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
}

.phase-badge.cyan {
  color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.phase-badge.emerald {
  color: var(--emerald-safe);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.phase-badge.amber {
  color: var(--amber-solar);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.phase-badge.purple {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.panel-tab-jump-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: var(--sky-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.panel-tab-jump-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--sky-primary);
  color: #ffffff;
}

.panel-tab-jump-btn:active {
  transform: translateY(1px);
}

/* 3 Pillars Grid */
.loop-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.loop-pillar-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.loop-pillar-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pillar-inline-icon {
  color: var(--sky-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loop-pillar-item h5 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-pure);
  margin: 0;
  line-height: 1.3;
}

.loop-pillar-item p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Interactive Estimator / Widget Box */
.loop-widget-box {
  background: #090e16;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.loop-widget-box .widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.widget-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-pure);
}

.widget-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.widget-toggle-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.widget-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.widget-toggle-btn:hover {
  color: var(--text-pure);
}

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

.widget-toggle-btn.active {
  background: var(--sky-primary);
  color: #040912;
  font-weight: 700;
}

.widget-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.widget-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.widget-stat-card .stat-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.widget-stat-card .stat-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.widget-stat-card .stat-value.highlight {
  color: var(--sky-primary);
  font-weight: 700;
}

/* Linear Navigation Controls */
.loop-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.loop-nav-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.loop-nav-btn:hover:not(:disabled) {
  border-color: var(--sky-primary);
  color: var(--sky-primary);
  background: var(--bg-elevated-hover);
}

.loop-nav-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.loop-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-subtle);
}

.loop-nav-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loop-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.loop-dot.active {
  width: 24px;
  border-radius: 6px;
  background: var(--sky-primary);
}

/* Responsive Media Queries for Loop Blueprint */
@media (max-width: 980px) {
  .loop-pipeline {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .loop-pipeline-arrow {
    display: none;
  }
  .loop-pillars-grid {
    grid-template-columns: 1fr;
  }
  .widget-stats-grid {
    grid-template-columns: 1fr;
  }
  .loop-panel-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .loop-pipeline {
    grid-template-columns: 1fr;
  }
  .loop-blueprint-container {
    padding: 20px 16px;
  }
  .calc-hero-value {
    font-size: 2.1rem;
  }
}

@media (max-width: 480px) {
  .calc-wave-step {
    height: 32px;
    font-size: 0.78rem;
  }
  .calc-fac-input {
    width: 68px;
    padding: 6px 8px;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Reward Distribution Sliders & Lock Switches
   ========================================================================== */
.calc-dist-presets-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.calc-dist-presets-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sky-primary);
  flex-shrink: 0;
}

.calc-dist-presets-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.calc-dist-preset-btn {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-dist-preset-btn:hover {
  color: var(--text-pure);
  border-color: var(--sky-primary);
  background: rgba(56, 189, 248, 0.08);
}

.calc-dist-preset-btn.active {
  color: #04101d;
  background: var(--sky-primary);
  border-color: var(--sky-primary);
  font-weight: 700;
}

/* 6-Column Bento Grid */
.calc-dist-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.calc-dist-col {
  background: rgba(4, 10, 20, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.calc-dist-col:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.calc-dist-col.is-locked {
  background: rgba(14, 28, 48, 0.35);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

/* Header with Icon and Title */
.calc-dist-channel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.calc-dist-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  object-fit: cover;
}

.calc-dist-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.1;
  white-space: nowrap;
}

/* Readout Box with % Sign */
.calc-dist-readout-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #060b14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  width: 90%;
  max-width: 72px;
}

.calc-dist-col.is-locked .calc-dist-readout-wrap {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.05);
}

.calc-dist-num-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.calc-dist-num-input::-webkit-outer-spin-button,
.calc-dist-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-dist-pct-sign {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Vertical Slider Container */
.calc-dist-slider-track-wrap {
  position: relative;
  width: 28px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070d18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px 0;
  overflow: hidden;
}

.calc-dist-col.is-locked .calc-dist-slider-track-wrap {
  opacity: 0.75;
  border-color: rgba(56, 189, 248, 0.3);
}

/* Visual Fill Bar */
.calc-dist-slider-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  transform-origin: bottom;
  pointer-events: none;
  transition: transform 0.06s ease;
  border-radius: 0 0 9999px 9999px;
  opacity: 0.45;
}

.channel-metal .calc-dist-slider-fill { background: #94a3b8; }
.channel-crystal .calc-dist-slider-fill { background: #38bdf8; }
.channel-deuterium .calc-dist-slider-fill { background: #3b82f6; }
.channel-ships .calc-dist-slider-fill { background: #f97316; }
.channel-artifacts .calc-dist-slider-fill { background: #a855f7; }
.channel-xp .calc-dist-slider-fill { background: #10b981; }

/* The Native Vertical Range Input */
.calc-dist-slider {
  -webkit-appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 26px;
  height: 132px;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
}

.channel-metal .calc-dist-slider { accent-color: #94a3b8; }
.channel-crystal .calc-dist-slider { accent-color: #38bdf8; }
.channel-deuterium .calc-dist-slider { accent-color: #3b82f6; }
.channel-ships .calc-dist-slider { accent-color: #f97316; }
.channel-artifacts .calc-dist-slider { accent-color: #a855f7; }
.channel-xp .calc-dist-slider { accent-color: #10b981; }

.calc-dist-col.is-locked .calc-dist-slider {
  cursor: not-allowed;
  pointer-events: none;
}

/* Lock Switch Button */
.calc-dist-lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 92%;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calc-dist-lock-btn:hover {
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.calc-dist-lock-btn.is-locked {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.calc-dist-lock-btn.is-locked .lock-open {
  display: none !important;
}

.calc-dist-lock-btn.is-locked .lock-closed {
  display: inline-block !important;
}

/* Governed Facility Badge */
.calc-dist-fac-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 92%;
  padding: 5px 8px;
  background: #050a12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-size: 0.72rem;
  line-height: 1.2;
}

.calc-dist-fac-badge .fac-tag {
  color: var(--text-secondary);
  font-weight: 700;
}

.calc-dist-fac-badge .fac-val {
  color: var(--emerald-safe);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Mini Yield Preview */
.calc-dist-yield-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sky-primary);
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 98%;
  min-height: 18px;
  font-variant-numeric: tabular-nums;
}

.calc-dist-mini-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
}

.calc-dist-yield-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status Bar */
.calc-dist-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: #060b14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.dist-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.dist-status-left strong {
  color: var(--text-pure);
  font-variant-numeric: tabular-nums;
}

.dist-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--emerald-safe);
}

.dist-status-dot.invalid {
  background: var(--crimson-danger);
}

.dist-lock-count {
  color: var(--text-secondary);
  font-weight: 600;
}

@media (max-width: 1080px) {
  .calc-dist-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 540px) {
  .calc-dist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Calculator Bottom Nexus Callout Card
   ========================================================================== */
.calc-nexus-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 18px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.calc-nexus-callout-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.calc-nexus-callout-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-primary);
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.calc-nexus-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.calc-nexus-callout-text h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--text-pure);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.calc-nexus-callout-text p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.calc-nexus-callout-action {
  flex-shrink: 0;
}

.calc-nexus-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #0284c7;
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.calc-nexus-cta-btn:hover {
  background: #0369a1;
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.calc-nexus-cta-btn:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .calc-nexus-callout {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .calc-nexus-callout-main {
    align-items: flex-start;
  }

  .calc-nexus-cta-btn {
    width: 100%;
    justify-content: center;
  }
}




