/* ODEI Premium Theme — Black/White Edition
   Redesign: 2026-02-18
   - Pure black backgrounds (#000 base)
   - Neutral white text (no blue tint)
   - Jade (#4FD1C5) as accent only: glows, focus, active, pulse
   - Champagne (#F4C95D) for warnings and gold states
   - CRT scan-line + ambient orb atmosphere
   - All structure/layout/UX preserved — styles only
*/

:root {
  --odei-demo-banner-offset: 0px;

  /* Core surfaces — pure black spectrum */
  --bg: #000000;
  --card: #0a0a0a;
  --surface: #111111;
  --border: rgba(255, 255, 255, 0.07);

  /* Accent — jade as accent, not dominant */
  --accent: #4fd1c5;
  --gold: #f4c95d;

  /* Text — neutral white, no blue tint */
  --text: #e0e0e0;
  --bright: #ffffff;
  --dim: #888888;
  --muted: #555555;

  /* Backgrounds (alpha) */
  --premium-bg-soft: rgba(8, 8, 8, 0.95);
  --premium-bg-strong: rgba(4, 4, 4, 0.98);

  /* Jade glow system */
  --premium-jade-soft: rgba(79, 209, 197, 0.1);
  --premium-jade-mid: rgba(79, 209, 197, 0.22);
  --premium-jade-strong: rgba(79, 209, 197, 0.4);
  --premium-gold-soft: rgba(244, 201, 93, 0.18);
  --premium-shadow-lg: 0 0 40px rgba(79, 209, 197, 0.12), 0 0 20px rgba(79, 209, 197, 0.06);

  --mobile-overlay-top: calc(var(--odei-demo-banner-offset, 0px) + 82px);
  --mobile-rail-offset: 8px;
  --mobile-rail-width: 62px;
  --mobile-footer-clearance: 112px;
  --mobile-menu-gutter: 10px;
  --mobile-card-radius: 14px;
  --mobile-touch-target: 44px;
}

/* ─── Base ─────────────────────────────────────────────── */

html,
body,
body.font-sans {
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace !important;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal viewport scroll — body overflow:hidden doesn't propagate to html */
html {
  overflow-x: clip;
  max-width: 100vw;
}

body.font-sans * {
  font-family: inherit;
}

/* CRT scan-line overlay */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
}

/* Ambient orbs */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(79, 209, 197, 0.045) 0%, transparent 38%),
    radial-gradient(circle at 82% 64%, rgba(244, 201, 93, 0.025) 0%, transparent 34%),
    radial-gradient(circle at 48% 92%, rgba(79, 209, 197, 0.03) 0%, transparent 38%);
  animation: odeiOrbDrift 90s ease-in-out infinite alternate;
}

@keyframes odeiOrbDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-1.5%, 2%) scale(1.04);
  }
  66% {
    transform: translate(1%, -1.5%) scale(0.97);
  }
  100% {
    transform: translate(-0.5%, 1%) scale(1.02);
  }
}

body::before {
  opacity: 0.03 !important;
}

/* ─── Global nav rail for standalone pages ──────────────── */

body.odei-site-page {
  padding-left: clamp(78px, 5.8vw, 92px);
}

html.odei-embed body.odei-site-page {
  padding-left: 0 !important;
}

html.odei-embed #primary-sidebar-shell,
html.odei-embed #mobile-nav-backdrop,
html.odei-embed #mobile-nav-burger {
  display: none !important;
}

#terminal-area {
  padding-bottom: clamp(10px, 1.6vh, 16px);
}

#app {
  height: calc(100dvh - var(--odei-demo-banner-offset, 0px)) !important;
  min-height: calc(100dvh - var(--odei-demo-banner-offset, 0px)) !important;
  max-height: calc(100dvh - var(--odei-demo-banner-offset, 0px));
}

@supports not (height: 100dvh) {
  #app {
    height: calc(100vh - var(--odei-demo-banner-offset, 0px)) !important;
    min-height: calc(100vh - var(--odei-demo-banner-offset, 0px)) !important;
    max-height: calc(100vh - var(--odei-demo-banner-offset, 0px));
  }
}

/* ─── Global responsive guards ─────────────────────────── */

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

/* ─── Links ─────────────────────────────────────────────── */

a {
  color: var(--accent);
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

a:hover {
  color: #8ff3e7;
  text-shadow: 0 0 14px rgba(143, 243, 231, 0.18);
}

/* ─── Header / App Nav ──────────────────────────────────── */

.header,
.app-nav {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 0 22px 22px;
  padding-block: clamp(8px, 1.35vh, 12px);
  background: rgba(0, 0, 0, 0.96) !important;
  box-shadow:
    0 0 40px rgba(79, 209, 197, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(79, 209, 197, 0.08);
}

.header::before,
.app-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 6%, rgba(79, 209, 197, 0.08), transparent 40%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.03), transparent 40%);
  opacity: 0.85;
  z-index: 0;
  animation: odeiHeaderGlow 8s ease-in-out infinite alternate;
}

.header::after,
.app-nav::after {
  content: '';
  position: absolute;
  left: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  bottom: 1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 209, 197, 0.5),
    rgba(255, 255, 255, 0.3),
    rgba(79, 209, 197, 0.5),
    transparent
  );
  opacity: 0.7;
  z-index: 1;
}

.app-nav .nav-shell,
.header .nav-shell,
.app-nav .nav-inline,
.header .nav-inline,
.app-nav .brand-home-link,
.header .brand-home-link,
.app-nav .brand-cluster,
.header .brand-cluster {
  position: relative;
  z-index: 2;
}

.app-nav .nav-shell,
.header .nav-shell {
  width: min(1680px, calc(100% - 18px));
  margin-inline: auto;
}

.brand-home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  transition: transform 0.2s ease;
}

.brand-home-link:focus-visible {
  outline: 2px solid rgba(79, 209, 197, 0.62);
  outline-offset: 3px;
}

.brand-home-link:hover {
  transform: translateY(-1px);
}

.app-nav .nav-inline,
.header .nav-inline {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: clamp(4px, 0.6vw, 12px);
}

/* ─── Live Badge ────────────────────────────────────────── */

.app-nav-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.92);
  box-shadow:
    0 0 20px rgba(79, 209, 197, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: rgba(224, 224, 224, 0.95);
  font-size: 11px;
  letter-spacing: 0.02em;
  min-width: 0;
  max-width: clamp(240px, 30vw, 460px);
}

.app-nav-live__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(79, 209, 197, 0.46);
  color: rgba(136, 243, 229, 0.98);
  background: rgba(10, 10, 10, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  font-weight: 700;
}

.app-nav-live__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(79, 209, 197, 0.98);
  box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.35);
  animation: odeiNavPulse 1.8s ease-in-out infinite;
}

@keyframes odeiNavPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.36);
    opacity: 0.95;
  }
  70% {
    box-shadow: 0 0 0 8px rgba(79, 209, 197, 0);
    opacity: 0.78;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 209, 197, 0);
    opacity: 0.95;
  }
}

.app-nav-live__text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(224, 224, 224, 0.92);
}

/* ─── Telemetry Strip ───────────────────────────────────── */

.app-nav-telemetry {
  margin-left: auto;
  display: inline-grid;
  gap: 2px;
  min-width: 260px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.92);
  box-shadow:
    0 0 20px rgba(79, 209, 197, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-nav-telemetry__kicker {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(120, 120, 120, 0.95);
  font-weight: 700;
}

.app-nav-telemetry__surface {
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(224, 224, 224, 0.98);
  font-weight: 650;
}

.app-nav-telemetry__detail {
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(144, 248, 234, 0.86);
  font-weight: 600;
}

/* ─── Mobile Burger ─────────────────────────────────────── */

.mobile-nav-burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 12, 0.92);
  color: rgba(224, 224, 224, 0.95);
  box-shadow:
    0 0 20px rgba(79, 209, 197, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mobile-nav-burger__line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(224, 224, 224, 0.96);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.mobile-nav-burger.is-open .mobile-nav-burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-burger.is-open .mobile-nav-burger__line:nth-child(2) {
  opacity: 0;
}

.mobile-nav-burger.is-open .mobile-nav-burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

/* ─── Brand Cluster ─────────────────────────────────────── */

.app-nav .brand-cluster,
.header .brand-cluster {
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 28px rgba(79, 209, 197, 0.08);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 12, 12, 0.92);
  box-shadow:
    0 0 28px rgba(79, 209, 197, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(79, 209, 197, 0.22));
}

.brand-logo-video {
  display: block;
  pointer-events: none;
}

.brand-copy,
.brand-row {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-left .app-nav-live {
  max-width: clamp(220px, 28vw, 420px);
}

@keyframes odeiHeaderGlow {
  0% {
    opacity: 0.6;
    transform: translateX(-1.5%);
  }
  100% {
    opacity: 0.85;
    transform: translateX(1.5%);
  }
}

.brand-home-link:hover .brand-cluster {
  border-color: rgba(79, 209, 197, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 28px rgba(79, 209, 197, 0.08),
    0 0 18px rgba(79, 209, 197, 0.14);
  transform: translateY(-1px);
}

/* ─── Brand Typography ──────────────────────────────────── */

.brand,
.brand-title,
nav h1 {
  color: var(--bright) !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-title,
nav h1 {
  font-size: clamp(24px, 1.55vw, 30px);
  font-weight: 620;
}

/* ─── Nav Links ─────────────────────────────────────────── */

.nav a {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(10, 10, 10, 0.9);
  color: rgba(220, 220, 220, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.nav a:hover,
.nav a.active {
  border-color: var(--premium-jade-strong) !important;
  color: #c9fbf4 !important;
  box-shadow: 0 0 14px rgba(79, 209, 197, 0.18);
}

/* ─── Panels ────────────────────────────────────────────── */

.panel,
.hero-panel,
.live-board,
.milestone-board,
.network-shell,
.network-showcase,
.network-write,
.site-shell-panel,
.site-shell-panel__chrome,
.site-shell-panel__viewport {
  border-color: rgba(255, 255, 255, 0.07) !important;
  background: rgba(8, 8, 8, 0.95) !important;
  box-shadow:
    var(--premium-shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ─── Terminal Boot ─────────────────────────────────────── */

.terminal-boot-shell {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 22px;
}

.terminal-boot-shell__badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 209, 197, 0.46);
  background: rgba(8, 8, 8, 0.8);
  color: rgba(150, 245, 233, 0.96);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.terminal-boot-shell__title {
  margin: 0;
  color: rgba(240, 240, 240, 0.97);
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 620;
}

.terminal-boot-shell__copy {
  margin: 0;
  color: rgba(168, 168, 168, 0.86);
  font-size: 13px;
  max-width: 52ch;
  line-height: 1.55;
}

.terminal-boot-shell__progress {
  width: min(380px, 86vw);
  height: 7px;
  border-radius: 0;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(79, 209, 197, 0.28);
  overflow: hidden;
}

.terminal-boot-shell__progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(79, 209, 197, 0.35), rgba(79, 209, 197, 0.92), rgba(79, 209, 197, 0.35));
  animation: odeiBootSweep 1.35s ease-in-out infinite;
}

@keyframes odeiBootSweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(240%);
  }
}

/* ─── Home Live Session Widget ──────────────────────────── */

.home-live-badge {
  background: rgba(79, 209, 197, 0.12) !important;
  border-color: rgba(79, 209, 197, 0.55) !important;
  color: #4fd1c5 !important;
  animation: homelivepulse 2.4s ease-in-out infinite;
}

@keyframes homelivepulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.home-live-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
}

.home-stat-num {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 700;
  color: #4fd1c5;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s;
}

.home-stat-lab {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(168, 168, 168, 0.7);
  font-weight: 500;
}

.home-latest-insight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 52ch;
  padding: 12px 16px;
  border: 1px solid rgba(79, 209, 197, 0.18);
  border-radius: 8px;
  background: rgba(79, 209, 197, 0.04);
}

.home-latest-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(79, 209, 197, 0.6);
  font-weight: 700;
}

.home-latest-text {
  font-size: 13px;
  color: rgba(220, 230, 240, 0.88);
  text-align: center;
  line-height: 1.45;
}

.home-live-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid rgba(79, 209, 197, 0.4);
  background: rgba(79, 209, 197, 0.08);
  color: #4fd1c5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
  cursor: pointer;
}

.home-live-cta:hover {
  background: rgba(79, 209, 197, 0.16);
  border-color: rgba(79, 209, 197, 0.7);
}

/* ─── Shell Panel Loading ───────────────────────────────── */

.site-shell-panel__loading-copy {
  display: grid;
  gap: 3px;
  justify-items: start;
}

.site-shell-panel__loading-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(224, 224, 224, 0.95);
  font-weight: 700;
}

.site-shell-panel__loading-subtitle {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(136, 136, 136, 0.94);
}

.site-shell-panel__loading-retry {
  margin-left: 10px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 0;
  border: 1px solid rgba(244, 201, 93, 0.48) !important;
  color: rgba(248, 226, 170, 0.98) !important;
  background: rgba(12, 12, 12, 0.92) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  font-weight: 700;
}

.site-shell-panel.is-load-slow .site-shell-panel__spinner {
  border-top-color: rgba(244, 201, 93, 0.95);
  border-color: rgba(244, 201, 93, 0.3);
}

/* ─── Shell Action Buttons ──────────────────────────────── */

.shell-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 0;
  border: 1px solid rgba(79, 209, 197, 0.4);
  text-decoration: none;
  color: rgba(150, 245, 233, 0.98);
  background: rgba(8, 8, 8, 0.92);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.shell-action-btn:hover {
  border-color: rgba(79, 209, 197, 0.72);
  color: rgba(200, 252, 245, 0.98);
  box-shadow: 0 0 12px rgba(79, 209, 197, 0.18);
}

.shell-action-btn--ghost {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(200, 200, 200, 0.94);
}

/* ─── Hero Panel ────────────────────────────────────────── */

.panel.is-hero,
.hero-panel {
  border-color: rgba(79, 209, 197, 0.18) !important;
}

.panel::before,
.hero-panel::before {
  border-color: rgba(79, 209, 197, 0.08) !important;
}

/* ─── Stats / Cards ─────────────────────────────────────── */

.stat,
.live-item,
.milestone-item,
.table-wrap,
.network-showcase-metric,
.shell-card,
.shell-metric,
.shell-event,
.shell-domain-list li {
  background: rgba(10, 10, 10, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* ─── Chips / Pills ─────────────────────────────────────── */

.chip,
.pill,
.status-pill,
.milestone-tag,
.stack-badge,
.shell-chip,
.shell-pill {
  background: rgba(10, 10, 10, 0.9) !important;
  border-color: rgba(79, 209, 197, 0.26) !important;
  color: rgba(166, 244, 232, 0.98) !important;
}

.chip--warn,
.pill--warn,
.status-pill.warn,
.shell-chip--warn,
.shell-pill--warn {
  border-color: rgba(244, 201, 93, 0.5) !important;
  color: rgba(248, 226, 170, 0.98) !important;
}

.shell-chip--gold {
  border-color: rgba(244, 201, 93, 0.6) !important;
  color: rgba(248, 226, 170, 0.98) !important;
  background: rgba(244, 201, 93, 0.08) !important;
}

.shell-chip--validated {
  border-color: rgba(79, 209, 197, 0.4) !important;
  color: rgba(166, 244, 232, 0.85) !important;
  background: rgba(79, 209, 197, 0.06) !important;
}

/* ─── Inputs / Buttons ──────────────────────────────────── */

input,
select,
textarea,
button,
.hero-action,
.showcase-action-btn,
.showcase-action-link,
.site-shell-panel__link {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(10, 10, 10, 0.94) !important;
  color: rgba(224, 224, 224, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
.hero-action:focus-visible {
  outline: 2px solid rgba(79, 209, 197, 0.56) !important;
  outline-offset: 2px;
}

button:hover,
.hero-action:hover,
.showcase-action-btn:hover,
.showcase-action-link:hover,
.site-shell-panel__link:hover {
  border-color: rgba(79, 209, 197, 0.5) !important;
  box-shadow: 0 0 16px rgba(79, 209, 197, 0.16);
}

/* ─── Primary Sidebar ───────────────────────────────────── */

.primary-sidebar {
  border-right-color: rgba(132, 235, 227, 0.14) !important;
  --odei-nav-accent-rgb: 79, 209, 197;
  --odei-nav-active-rgb: 114, 239, 229;
  background:
    radial-gradient(circle at 12% 0%, rgba(79, 209, 197, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(6, 10, 14, 0.96), rgba(4, 7, 11, 0.98)) !important;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.03),
    14px 0 32px rgba(0, 0, 0, 0.34);
}

.primary-sidebar__label {
  color: rgba(152, 177, 198, 0.9) !important;
  letter-spacing: 0.22em;
}

.primary-sidebar__divider {
  border-top-color: rgba(113, 228, 218, 0.16) !important;
}

#primary-sidebar .primary-sidebar__group-toggle {
  border-color: rgba(95, 214, 205, 0.18) !important;
  background: linear-gradient(160deg, rgba(10, 16, 24, 0.86), rgba(8, 12, 18, 0.82)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

#primary-sidebar .primary-sidebar__group-toggle:hover {
  border-color: rgba(var(--odei-nav-active-rgb), 0.34) !important;
  box-shadow:
    0 0 24px rgba(79, 209, 197, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.34);
  transform: translateY(-1px);
}

#primary-sidebar .primary-sidebar__group-title {
  color: rgba(176, 203, 223, 0.9) !important;
  letter-spacing: 0.24em;
}

#primary-sidebar .primary-sidebar__group-glyph {
  color: rgba(160, 191, 214, 0.78) !important;
}

#primary-sidebar .primary-sidebar__group-toggle:hover .primary-sidebar__group-glyph {
  color: rgba(213, 245, 255, 0.94) !important;
}

.primary-sidebar .primary-nav-item {
  border-color: rgba(96, 220, 210, 0.14) !important;
  background:
    radial-gradient(circle at 10% 12%, rgba(79, 209, 197, 0.08), transparent 56%),
    linear-gradient(160deg, rgba(8, 12, 18, 0.93), rgba(7, 11, 16, 0.98)) !important;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.primary-sidebar .primary-nav-item::before {
  opacity: 0.55 !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(79, 209, 197, 0.1), transparent 64%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 62%) !important;
}

.primary-sidebar .primary-nav-item::after {
  display: none !important;
}

.primary-sidebar .primary-nav-item:hover:not(:disabled) {
  border-color: rgba(var(--odei-nav-active-rgb), 0.3) !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(79, 209, 197, 0.12), transparent 56%),
    linear-gradient(160deg, rgba(9, 14, 20, 0.96), rgba(7, 11, 16, 0.99)) !important;
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.36),
    0 0 18px rgba(79, 209, 197, 0.16);
  transform: translateY(-1px);
}

.primary-sidebar .primary-nav-link.is-active,
.primary-sidebar .agent-tab.primary-nav-item.active {
  --odei-nav-accent-rgb: var(--odei-nav-active-rgb);
  border-color: rgba(var(--odei-nav-active-rgb), 0.54) !important;
  background:
    radial-gradient(circle at 14% 18%, rgba(var(--odei-nav-active-rgb), 0.17), transparent 58%),
    linear-gradient(160deg, rgba(10, 16, 24, 0.96), rgba(8, 12, 19, 0.98)) !important;
  box-shadow:
    0 0 0 1px rgba(var(--odei-nav-active-rgb), 0.2) inset,
    0 0 24px rgba(var(--odei-nav-active-rgb), 0.2),
    0 14px 26px rgba(0, 0, 0, 0.4);
  filter: brightness(1.04);
}

.primary-sidebar .primary-nav-link.is-active::before,
.primary-sidebar .agent-tab.primary-nav-item.active::before {
  opacity: 0.82 !important;
  background:
    radial-gradient(circle at 12% 12%, rgba(var(--odei-nav-active-rgb), 0.2), transparent 64%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), transparent 62%) !important;
}

.primary-sidebar .primary-nav-item__dot {
  border-color: rgba(173, 199, 218, 0.22) !important;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(79, 209, 197, 0.18) !important;
  animation: none !important;
}

.primary-sidebar .primary-nav-link.is-active .primary-nav-item__dot,
.primary-sidebar .agent-tab.primary-nav-item.active .primary-nav-item__dot {
  background: rgba(var(--odei-nav-active-rgb), 0.95) !important;
  border-color: rgba(225, 255, 251, 0.62) !important;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.3),
    0 0 14px rgba(var(--odei-nav-active-rgb), 0.62) !important;
}

.primary-sidebar .primary-nav-item__label {
  color: rgba(228, 232, 240, 0.98) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.045em !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.primary-sidebar .primary-nav-item__role {
  color: rgba(131, 149, 170, 0.88) !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.primary-sidebar .primary-nav-item__text {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 0;
}

@media (min-width: 881px) {
  :root {
    --odei-rail-collapsed-width: clamp(66px, 4.9vw, 74px);
    --odei-rail-open-width: clamp(240px, 18.5vw, 292px);
    --odei-rail-card-min-height: clamp(62px, 7.1vh, 82px);
    --odei-rail-card-pad-y: clamp(10px, 1.2vh, 14px);
    --odei-rail-card-pad-x: clamp(12px, 1.05vw, 18px);
    --odei-rail-card-radius: clamp(15px, 1.05vw, 20px);
    --odei-rail-label-size: clamp(14px, 1.02vw, 17px);
    --odei-rail-role-size: clamp(9px, 0.56vw, 10px);
    --odei-rail-dot-size: clamp(13px, 0.95vw, 16px);
  }

  /* Desktop sidebar cards: clean geometry, no decorative overlays. */
  #primary-sidebar .primary-nav-item {
    min-height: var(--odei-rail-card-min-height);
    padding: var(--odei-rail-card-pad-y) var(--odei-rail-card-pad-x) !important;
    gap: clamp(9px, 0.78vw, 12px);
    border-radius: var(--odei-rail-card-radius) !important;
    border: 1px solid rgba(99, 214, 205, 0.26) !important;
    background: linear-gradient(150deg, rgba(18, 34, 47, 0.28), rgba(10, 15, 23, 0.9) 28%, rgba(8, 12, 18, 0.96) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 8px 18px rgba(0, 0, 0, 0.3) !important;
    transition:
      border-color 0.16s ease,
      box-shadow 0.16s ease,
      background 0.16s ease !important;
  }

  #primary-sidebar .primary-sidebar__section {
    gap: clamp(10px, 1.2vh, 14px) !important;
  }

  #primary-sidebar .primary-nav-item::before,
  #primary-sidebar .primary-nav-item::after {
    display: none !important;
    content: none !important;
  }

  #primary-sidebar .primary-nav-item:hover:not(:disabled) {
    transform: none !important;
    border-color: rgba(var(--odei-nav-active-rgb), 0.4) !important;
    background: linear-gradient(150deg, rgba(24, 46, 60, 0.3), rgba(12, 18, 27, 0.92) 30%, rgba(9, 13, 20, 0.97) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 10px 22px rgba(0, 0, 0, 0.32) !important;
  }

  #primary-sidebar .primary-nav-link.is-active,
  #primary-sidebar .agent-tab.primary-nav-item.active {
    border-color: rgba(var(--odei-nav-active-rgb), 0.56) !important;
    background: linear-gradient(150deg, rgba(32, 62, 78, 0.34), rgba(12, 20, 30, 0.94) 30%, rgba(9, 14, 22, 0.98) 100%) !important;
    box-shadow:
      inset 0 0 0 1px rgba(var(--odei-nav-active-rgb), 0.2),
      0 12px 24px rgba(0, 0, 0, 0.34) !important;
    filter: none;
  }

  #primary-sidebar .primary-nav-link.is-active::before,
  #primary-sidebar .agent-tab.primary-nav-item.active::before {
    display: none !important;
  }

  #primary-sidebar .primary-nav-link[data-shell-view='grok'],
  #primary-sidebar .primary-nav-link[data-shell-view='grok']:hover:not(:disabled) {
    border-color: rgba(99, 214, 205, 0.3) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 10px 22px rgba(0, 0, 0, 0.32) !important;
  }

  #primary-sidebar .primary-nav-link[data-shell-view='grok']::after {
    display: none !important;
    content: none !important;
    animation: none !important;
  }

  #primary-sidebar .primary-nav-item__dot {
    width: var(--odei-rail-dot-size);
    height: var(--odei-rail-dot-size);
    border: 2px solid rgba(176, 199, 217, 0.24) !important;
    box-shadow:
      0 0 0 3px rgba(7, 11, 16, 0.72),
      0 0 10px rgba(98, 187, 217, 0.14) !important;
    animation: none !important;
    flex-shrink: 0;
  }

  #primary-sidebar .primary-nav-link.is-active .primary-nav-item__dot,
  #primary-sidebar .agent-tab.primary-nav-item.active .primary-nav-item__dot {
    border-color: rgba(218, 255, 250, 0.72) !important;
    box-shadow:
      0 0 0 3px rgba(7, 11, 16, 0.72),
      0 0 12px rgba(var(--odei-nav-active-rgb), 0.36) !important;
  }

  #primary-sidebar .primary-nav-item__label {
    font-size: var(--odei-rail-label-size) !important;
    font-weight: 620 !important;
    line-height: 1.14 !important;
    letter-spacing: 0.038em !important;
  }

  #primary-sidebar .primary-nav-item__role {
    margin-top: clamp(4px, 0.5vh, 6px);
    font-size: var(--odei-rail-role-size) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.13em !important;
  }
}

@media (min-width: 881px) and (max-height: 860px), (min-width: 881px) and (max-width: 1240px) {
  :root {
    --odei-rail-open-width: clamp(224px, 17.2vw, 264px);
    --odei-rail-card-min-height: clamp(56px, 6.4vh, 68px);
    --odei-rail-card-pad-y: clamp(8px, 0.95vh, 11px);
    --odei-rail-card-pad-x: clamp(10px, 0.85vw, 14px);
    --odei-rail-label-size: clamp(13px, 0.92vw, 15px);
    --odei-rail-dot-size: clamp(12px, 0.82vw, 14px);
  }

  #primary-sidebar .primary-sidebar__section {
    gap: clamp(8px, 0.95vh, 11px) !important;
  }

  #primary-sidebar .primary-nav-item__role {
    margin-top: 3px;
    letter-spacing: 0.12em !important;
  }
}

/* ─── Memory Filters ───────────────────────────────────── */

#memory-filter-panel {
  --odei-filter-row-radius: 11px;
  --odei-filter-row-height: 42px;
}

#memory-filter-panel .memory-panel-header {
  align-items: flex-start;
  gap: 10px;
}

#memory-filter-panel .memory-panel-heading {
  min-width: 0;
}

#memory-filter-panel .memory-panel-title {
  line-height: 1.08;
}

#memory-filter-panel .memory-panel-subtitle {
  line-height: 1.32;
}

#memory-filter-panel .memory-filter-groups {
  gap: 10px;
  padding-bottom: 8px;
}

#memory-filter-panel .memory-panel-card {
  border-radius: 14px !important;
  padding: 12px !important;
}

#memory-filter-panel .memory-panel-card-header {
  min-height: 42px;
  align-items: center;
}

#memory-filter-panel .memory-panel-card-title-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

#memory-filter-panel .memory-panel-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px !important;
}

#memory-filter-panel .memory-panel-card-title {
  min-width: 0;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#memory-filter-panel .memory-panel-card-subtitle {
  line-height: 1.22;
}

#memory-filter-panel .memory-panel-card-toggle {
  width: 32px;
  height: 32px;
  border-radius: 9px !important;
}

#memory-filter-panel .memory-domains-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}

#memory-filter-panel .memory-domain-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  min-height: var(--odei-filter-row-height);
  padding: 6px 8px;
  border-radius: var(--odei-filter-row-radius) !important;
}

#memory-filter-panel .memory-domain-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px !important;
}

#memory-filter-panel .memory-domain-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.08em;
}

#memory-filter-panel .memory-loop-grid,
#memory-filter-panel .memory-status-grid,
#memory-filter-panel .memory-integrity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#memory-filter-panel .memory-loop-toggle,
#memory-filter-panel .memory-status-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--odei-filter-row-height);
  padding: 7px 9px;
  border-radius: var(--odei-filter-row-radius) !important;
}

#memory-filter-panel .memory-loop-label,
#memory-filter-panel .memory-status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#memory-filter-panel .memory-integrity-toggle {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  border-radius: 9px !important;
}

#memory-filter-panel .memory-domain-count,
#memory-filter-panel .memory-loop-count,
#memory-filter-panel .memory-status-count,
#memory-filter-panel .memory-integrity-count {
  min-width: 52px;
  margin-left: 0;
  justify-self: end;
  text-align: center;
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}

#memory-filter-panel .memory-search-block input {
  padding-right: 84px;
}

#memory-filter-panel .memory-shortcut-hint {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container memoryFilters (max-width: 520px) {
  #memory-filter-panel .memory-domains-grid,
  #memory-filter-panel .memory-loop-grid,
  #memory-filter-panel .memory-status-grid,
  #memory-filter-panel .memory-integrity-grid {
    grid-template-columns: 1fr !important;
  }

  #memory-filter-panel .memory-domain-count,
  #memory-filter-panel .memory-loop-count,
  #memory-filter-panel .memory-status-count,
  #memory-filter-panel .memory-integrity-count {
    min-width: 56px;
  }
}

@media (max-width: 640px) {
  #memory-filter-panel {
    --odei-filter-row-height: 40px;
  }

  #memory-filter-panel .memory-panel-card {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  #memory-filter-panel .memory-panel-card-header {
    min-height: 40px;
  }

  #memory-filter-panel .memory-panel-card-title {
    font-size: 12px;
  }

  #memory-filter-panel .memory-panel-card-subtitle {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
}

/* ─── Desktop Layout ────────────────────────────────────── */

@media (min-width: 881px) {
  body.odei-site-page #primary-sidebar-shell {
    position: fixed;
    left: 12px;
    top: calc(env(safe-area-inset-top, 0px) + 92px);
    bottom: 14px;
    width: var(--odei-rail-collapsed-width);
    z-index: 140;
    transition:
      width 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      filter 0.22s ease;
  }

  body.odei-site-page #primary-sidebar {
    height: 100%;
    width: 100%;
    border-radius: clamp(15px, 1.2vw, 18px);
    padding: clamp(8px, 1vh, 12px) clamp(8px, 0.8vw, 10px);
    overflow: auto;
  }

  body.odei-site-page #primary-sidebar-shell:hover,
  body.odei-site-page #primary-sidebar-shell:focus-within {
    width: var(--odei-rail-open-width);
    filter: drop-shadow(0 0 28px rgba(79, 209, 197, 0.08));
  }

  body.odei-site-page #primary-sidebar-shell:hover .primary-nav-item__text,
  body.odei-site-page #primary-sidebar-shell:focus-within .primary-nav-item__text {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 0;
    animation: sidebarTextIn 0.18s ease both;
    animation-delay: 0.08s;
  }

  @keyframes sidebarTextIn {
    from {
      opacity: 0;
      transform: translateX(-6px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-sidebar__label,
  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-sidebar__divider,
  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-nav-item__text,
  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-nav-item__meta,
  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-sidebar__group-toggle {
    display: none !important;
  }

  body.odei-site-page
    #primary-sidebar-shell:not(:hover):not(:focus-within)
    .primary-sidebar__section--group
    .primary-sidebar__group-body {
    display: contents !important;
  }

  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-sidebar__section {
    gap: 10px !important;
  }

  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-nav-item {
    justify-content: center;
    padding: clamp(9px, 0.95vh, 11px) clamp(6px, 0.55vw, 8px) !important;
    min-height: clamp(40px, 4.7vh, 46px);
  }

  body.odei-site-page #primary-sidebar-shell:not(:hover):not(:focus-within) .primary-nav-item__dot {
    width: clamp(11px, 0.8vw, 12px);
    height: clamp(11px, 0.8vw, 12px);
  }
}

/* ─── Footer ────────────────────────────────────────────── */

#app-footer.app-footer--premium {
  position: relative;
  z-index: 48;
  flex-shrink: 0;
  overflow: hidden;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(0, 0, 0, 0.96) !important;
  box-shadow:
    0 0 32px rgba(79, 209, 197, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px)) !important;
}

#app-footer.app-footer--premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    rgba(79, 209, 197, 0.35),
    rgba(255, 255, 255, 0.12),
    transparent
  );
}

#app-footer.app-footer--premium .footer-inline--premium {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  max-width: none;
  margin: 0;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 10, 0.9);
  box-shadow:
    0 0 24px rgba(79, 209, 197, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-product-signature {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.92);
  box-shadow: 0 0 18px rgba(79, 209, 197, 0.07);
}

.footer-product-signature__kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(100, 100, 100, 0.95);
}

.footer-product-signature__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224, 224, 224, 0.98);
}

.footer-premium-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 6px;
  overflow: visible;
  padding-bottom: 0;
  scrollbar-width: none;
}

.footer-premium-pills::-webkit-scrollbar {
  display: none;
}

.footer-premium-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.9);
  color: rgba(200, 200, 200, 0.93);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  max-width: 100%;
}

.footer-premium-pill--live {
  border-color: rgba(79, 209, 197, 0.46);
  color: rgba(150, 245, 233, 0.98);
  box-shadow: 0 0 12px rgba(79, 209, 197, 0.16);
}

.footer-premium-pill--gold {
  border-color: rgba(244, 201, 93, 0.46);
  color: rgba(247, 226, 172, 0.98);
}

.footer-runtime-timestamp {
  justify-self: end;
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(120, 120, 120, 0.92);
  white-space: nowrap;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 8, 8, 0.8);
}

/* ─── Mobile Layout ─────────────────────────────────────── */

@media (max-width: 880px) {
  body.odei-site-page {
    padding-left: 0;
  }

  body.odei-site-page.mobile-nav-open,
  body.mobile-nav-open {
    padding-left: 0;
    /* Give the mobile menu more usable area (height + width) */
    --mobile-footer-clearance: 8px;
    --mobile-menu-gutter: 6px;
  }

  #app {
    min-height: calc(100svh - var(--odei-demo-banner-offset, 0px)) !important;
    height: calc(100svh - var(--odei-demo-banner-offset, 0px)) !important;
    max-height: calc(100svh - var(--odei-demo-banner-offset, 0px)) !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Prevent body/main/header from causing horizontal viewport overflow */
  body.odei-site-page,
  body.odei-site-page > main,
  body.odei-site-page > header {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* iOS Safari: overflow:hidden on body alone doesn't prevent horizontal scroll.
     Must also constrain html element. */
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Fix graph area horizontal overflow:
     - min-width:0 allows flex items to shrink below content size
     - overflow:hidden clips graph overlays/labels that extend beyond
     - width:100% ensures terminal fills available space only */
  #terminal-area {
    min-width: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  #app > .flex.flex-1 {
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  /* Graph internals: constrain command center and filter bar */
  .command-center,
  .command-center-v2 {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .cc3-decide-filters {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cc3-decide-filters::-webkit-scrollbar {
    display: none;
  }

  .header,
  .app-nav {
    border-radius: 0 0 14px 14px !important;
    padding-block: 8px;
    overflow-x: hidden;
    max-width: 100%;
  }

  .app-nav .nav-inline,
  .header .nav-inline {
    gap: 8px;
    padding-inline: 6px;
  }

  .primary-sidebar {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  /* Mobile cleanup: hide arrow-only graph controls to free viewport area */
  .memory-navpad,
  .memory-nav-key,
  #memory-expand-filters,
  #memory-collapse-filters,
  .wm-legend-toggle {
    display: none !important;
  }

  .mobile-nav-burger {
    display: inline-flex;
  }

  .app-nav-telemetry {
    display: none;
  }

  .app-nav-live {
    max-width: none;
    flex: 0 1 auto;
  }

  .app-nav-live__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .header-left .app-nav-live {
    max-width: 240px;
    overflow: hidden;
  }

  /* In-page nav tabs (token, integrate, roadmap, docs header nav) */
  .header .nav,
  header .nav {
    flex-wrap: wrap;
    overflow: hidden;
    max-width: 100%;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    top: var(--mobile-overlay-top);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.92);
    transition: opacity 0.2s ease;
  }

  /* Class-based fallback: covers any element without the ID */
  .primary-sidebar-shell {
    display: none !important;
    position: fixed !important;
    left: var(--mobile-rail-offset) !important;
    width: var(--mobile-rail-width) !important;
    transform: none !important;
    pointer-events: none !important;
  }

  /* ID-based rules always win (higher specificity) */
  #primary-sidebar-shell {
    display: none !important;
    position: fixed !important;
    top: var(--mobile-overlay-top) !important;
    left: var(--mobile-rail-offset) !important;
    bottom: calc(var(--mobile-footer-clearance, 112px) + env(safe-area-inset-bottom, 0px)) !important;
    width: var(--mobile-rail-width) !important;
    height: auto !important;
    transform: none !important;
    z-index: 160 !important;
    pointer-events: auto !important;
    overflow: hidden;
  }

  #primary-sidebar {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 7px !important;
    border-radius: var(--mobile-card-radius) !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  #primary-sidebar .primary-sidebar__section {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  #primary-sidebar .primary-nav-item {
    width: 100% !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
    border-radius: 11px !important;
  }

  #primary-sidebar-toggle {
    display: none !important;
  }

  #app > .flex.flex-1 {
    padding-left: 0 !important;
  }

  body:not(.mobile-nav-open) #primary-sidebar .primary-sidebar__label,
  body:not(.mobile-nav-open) #primary-sidebar .primary-sidebar__divider,
  body:not(.mobile-nav-open) #primary-sidebar .primary-nav-item__text,
  body:not(.mobile-nav-open) #primary-sidebar .primary-nav-item__meta,
  body:not(.mobile-nav-open) #primary-sidebar .primary-sidebar__group-toggle {
    display: none !important;
  }

  body:not(.mobile-nav-open) #primary-sidebar .primary-sidebar__section--group .primary-sidebar__group-body {
    display: contents !important;
  }

  body:not(.mobile-nav-open) #primary-sidebar .primary-sidebar__section {
    gap: 10px !important;
  }

  body:not(.mobile-nav-open) #primary-sidebar .primary-nav-item {
    justify-content: center;
    padding: 9px 7px !important;
    min-height: var(--mobile-touch-target) !important;
  }

  body:not(.mobile-nav-open) #primary-sidebar .primary-nav-item__dot {
    width: 12px;
    height: 12px;
  }

  body.mobile-nav-open #mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-nav-open #primary-sidebar-shell {
    display: block !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
  }

  body.mobile-nav-open #primary-sidebar {
    inset: auto !important;
    top: var(--mobile-overlay-top) !important;
    left: var(--mobile-menu-gutter, 10px) !important;
    right: var(--mobile-menu-gutter, 10px) !important;
    bottom: calc(var(--mobile-footer-clearance, 112px) + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(
      100svh - var(--mobile-overlay-top) - var(--mobile-footer-clearance, 112px) - env(safe-area-inset-bottom, 0px) -
        10px
    ) !important;
    padding: 8px !important;
    pointer-events: auto !important;
  }

  body.mobile-nav-open #primary-sidebar .primary-sidebar__section {
    gap: 6px !important;
  }

  body.mobile-nav-open #primary-sidebar .primary-nav-item {
    min-height: 42px !important;
    padding: 8px 9px !important;
  }

  body.mobile-nav-open #app > .flex.flex-1 {
    padding-left: 0;
  }

  body.mobile-nav-open #primary-sidebar .primary-sidebar__label,
  body.mobile-nav-open #primary-sidebar .primary-sidebar__divider {
    display: block !important;
  }

  body.mobile-nav-open #primary-sidebar .primary-nav-item__role {
    display: block !important;
  }

  body.mobile-nav-open #primary-sidebar .primary-nav-item__text {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 0;
  }

  body.mobile-nav-open #primary-sidebar .primary-sidebar__group-toggle {
    display: inline-flex !important;
  }

  body.mobile-nav-open #primary-sidebar .primary-sidebar__section--group .primary-sidebar__group-body {
    display: grid !important;
  }

  body.mobile-nav-open #app-footer.app-footer--premium {
    opacity: 0.2;
    pointer-events: none;
    transform: translateY(4px);
  }

  body.mobile-shell-open #app-footer.app-footer--premium {
    opacity: 0.7;
  }

  #site-shell-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: var(--mobile-overlay-top) !important;
    bottom: calc(var(--mobile-footer-clearance, 112px) + env(safe-area-inset-bottom, 0px)) !important;
    inset: auto !important;
    z-index: 165 !important;
    border-radius: 16px !important;
    padding: 8px !important;
    opacity: 0;
    transform: translateY(12px) scale(0.986);
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease !important;
  }

  #site-shell-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    box-shadow:
      0 0 28px rgba(79, 209, 197, 0.08),
      0 0 0 9999px rgba(0, 0, 0, 0.65);
  }

  #site-shell-panel .site-shell-panel__chrome {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  #site-shell-panel .site-shell-panel__viewport {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  #site-shell-panel .site-shell-panel__content {
    height: 100%;
    overflow: auto;
    padding: 10px !important;
    -webkit-overflow-scrolling: touch;
  }

  #site-shell-panel .site-shell-panel__link {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 10px;
  }

  .primary-sidebar .primary-nav-item {
    min-height: 44px;
  }

  .app-nav .brand-cluster,
  .header .brand-cluster {
    border-radius: 14px;
    padding: 5px 8px;
  }

  #app-footer.app-footer--premium {
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app-footer.app-footer--premium .footer-inline--premium {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    padding: 7px;
    border-radius: 12px;
  }

  .footer-product-signature {
    width: 100%;
  }

  .footer-premium-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    overflow: visible;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .footer-premium-pills::-webkit-scrollbar {
    display: none;
  }

  .footer-premium-pill {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
    min-height: 32px;
    font-size: 9px;
  }

  .footer-runtime-timestamp {
    justify-self: center;
    width: 100%;
    text-align: center;
  }

  /* ─── Narrow phones (< 400px) ────────────────────────── */
  @media (max-width: 400px) {
    body.odei-site-page {
      padding-left: 0;
    }

    #app > .flex.flex-1 {
      padding-left: 0 !important;
    }

    body.odei-site-page.mobile-nav-open {
      padding-left: 0;
    }

    .footer-premium-pills {
      grid-template-columns: 1fr;
    }

    .footer-premium-pill {
      font-size: 8.5px;
    }

    #app-footer.app-footer--premium .footer-inline--premium {
      padding: 5px;
    }
  }
}

/* ─── Small Mobile ──────────────────────────────────────── */

@media (max-width: 640px) {
  .brand,
  .brand-title,
  nav h1 {
    letter-spacing: 0.08em;
  }

  .brand-title,
  nav h1 {
    font-size: clamp(17px, 4.4vw, 19px);
    line-height: 1;
  }

  .app-nav .brand-cluster,
  .header .brand-cluster {
    min-height: 40px;
    padding: 4px 8px;
    border-radius: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-logo-img {
    width: 28px;
    height: 28px;
  }

  .brand-copy,
  .brand-row {
    align-items: center;
  }

  .app-nav .nav-inline,
  .header .nav-inline {
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(0, max-content) 40px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    row-gap: 0;
    padding-inline: 8px;
    flex-wrap: nowrap; /* fallback if display is overridden by legacy CSS */
  }

  .brand-home-link {
    grid-column: 1;
    align-self: center;
    flex: 0 0 auto;
    min-width: 0;
  }

  .header-left {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .header-left .app-nav-live {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .mobile-nav-burger {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    margin-left: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
  }

  .app-nav-live {
    grid-column: 3;
    align-self: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
    gap: 6px;
    padding: 6px 8px;
    margin: 0;
    min-height: 40px;
  }

  .app-nav-live__badge {
    padding: 2px 7px;
    font-size: 8px;
    letter-spacing: 0.1em;
    gap: 5px;
    min-height: 20px;
  }

  .app-nav-live__pulse {
    width: 6px;
    height: 6px;
  }

  .app-nav-live__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    line-height: 1.35;
    flex: 1 1 auto;
    max-width: none;
  }

  @media (max-width: 430px) {
    .app-nav-live__text {
      display: none;
    }

    .app-nav-live {
      justify-content: center;
    }
  }

  .mobile-nav-burger__line {
    width: 16px;
  }

  /* Subpage in-header nav (token/integrate/roadmap/docs) → 2-col grid on small mobile */
  .header .nav,
  header .nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .header .nav a,
  header .nav a {
    width: 100%;
    text-align: center;
    min-height: 44px;
    padding: 0 6px;
    font-size: 10px;
    letter-spacing: 0.06em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 8, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.mobile-nav-open #primary-sidebar {
    top: var(--mobile-overlay-top) !important;
    left: var(--mobile-menu-gutter, 10px) !important;
    right: var(--mobile-menu-gutter, 10px) !important;
    bottom: calc(var(--mobile-footer-clearance, 112px) + env(safe-area-inset-bottom, 0px)) !important;
    padding: 8px !important;
    border-radius: 16px !important;
  }

  #site-shell-panel {
    left: 8px !important;
    right: 8px !important;
    top: var(--mobile-overlay-top) !important;
    bottom: calc(var(--mobile-footer-clearance, 112px) + env(safe-area-inset-bottom, 0px)) !important;
    padding: 7px !important;
    border-radius: 14px !important;
  }

  #site-shell-panel .site-shell-panel__content {
    padding: 8px !important;
  }

  #app-footer.app-footer--premium {
    padding: 6px 7px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer-premium-pill {
    min-height: 0;
    font-size: 8px;
    padding: 6px 8px;
    letter-spacing: 0.08em;
    line-height: 1.2;
    white-space: normal;
  }

  #app-footer.app-footer--premium .footer-inline--premium {
    gap: 5px;
    padding: 6px;
    border-radius: 9px;
  }

  .footer-product-signature {
    padding: 5px 7px;
  }

  .footer-product-signature__kicker {
    font-size: 8px;
  }

  .footer-product-signature__title {
    font-size: 10px;
  }

  .footer-premium-pill--gold {
    display: none;
  }

  .footer-premium-pills {
    grid-template-columns: 1fr;
  }

  .footer-runtime-timestamp {
    display: block;
  }
}

/* ═══════════════════════════════════════════════════════════
   Theme Enforcement Overrides
   Override styles.css (21K-line Tailwind output) to enforce
   premium-dark-theme.md specification. Loaded last → wins.
   ═══════════════════════════════════════════════════════════ */

/* ─── Font: IBM Plex Mono everywhere ───────────────────── */
/* Design spec: "One font. No exceptions."
   Excludes icon font classes to avoid breaking icon rendering. */
*:not(.icon):not(.fa):not(.fas):not(.far):not(.fab):not(.material-icons):not([class*='icon-font']),
*:not(.icon):not(.fa):not(.fas):not(.far):not(.fab):not(.material-icons):not([class*='icon-font'])::before,
*:not(.icon):not(.fa):not(.fas):not(.far):not(.fab):not(.material-icons):not([class*='icon-font'])::after {
  font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace !important;
}

/* ─── Buttons: transparent + border, zero radius ──────── */
/* Design spec: no gradient fills, terminal aesthetic */
.primary-action-btn {
  background: transparent !important;
  border: 1px solid var(--accent, #4fd1c5) !important;
  border-radius: 0 !important;
  color: var(--accent, #4fd1c5) !important;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.primary-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(79, 209, 197, 0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.primary-action-btn:hover::before {
  transform: scaleX(1);
}
.primary-action-btn:hover {
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(79, 209, 197, 0.2) !important;
  background: transparent !important;
}
.primary-action-btn:active {
  transform: scale(0.95);
  background: rgba(79, 209, 197, 0.2) !important;
}

.conv-action-btn {
  background: transparent !important;
  border: 1px solid rgba(79, 209, 197, 0.3) !important;
  border-radius: 0 !important;
  color: #888888 !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.conv-action-btn:hover {
  border-color: var(--accent, #4fd1c5) !important;
  color: var(--accent, #4fd1c5) !important;
  background: transparent !important;
  box-shadow: none !important;
}
.conv-action-btn:active {
  transform: scale(0.95);
  background: rgba(79, 209, 197, 0.1) !important;
}

/* ─── Interactive elements: sharp edges ───────────────── */
/* Terminal aesthetic — zero radius on all interactive controls */
button,
input,
select,
textarea,
[role='button'],
.btn,
.button,
.toggle,
.switch {
  border-radius: 0 !important;
}

/* Override high-specificity !important rules in styles.css */
#companion-terminal-section > .relative button,
#recent-conversations-section > .relative button,
.conversation-search,
.rc-reload-save-wrap,
.rc-search-input {
  border-radius: 0 !important;
}

/* ─── Content containers: soft radius preserved ───────── */
/* Design spec: 12px for cards/panels */
.card,
.panel,
.modal,
[class*='panel'],
[class*='card'] {
  border-radius: 12px;
}

/* Sidebar nav items: standardize to 12px (site.introduction.css sets 16px) */
.primary-nav-item {
  border-radius: 12px !important;
}

/* ── Grok × ODEI live session page ─────────────────────── */

@keyframes grok-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.6);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 0 6px rgba(79, 209, 197, 0);
  }
}

/* Hero */
.grok-hero {
  margin-bottom: 24px;
}
.grok-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #4fd1c5;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 12px;
}
.grok-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4fd1c5;
  border-radius: 50%;
  animation: grok-pulse 2s ease-in-out infinite;
}
.grok-headline {
  font-size: clamp(30px, 2.4vw, 36px);
  font-weight: 700;
  color: #e8ecf4;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.08;
}
.grok-subline {
  font-size: 14px;
  color: #90a0b8;
  line-height: 1.58;
  max-width: 70ch;
  margin: 0 0 12px;
}
.grok-meta {
  font-size: 11px;
  color: #647185;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.grok-meta-link {
  color: #4fd1c5;
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 209, 197, 0.2);
  transition: border-color 0.15s;
}
.grok-meta-link:hover {
  border-color: rgba(79, 209, 197, 0.6);
}

/* Stats bar */
.grok-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
  background: rgba(79, 209, 197, 0.03);
  border: 1px solid rgba(79, 209, 197, 0.12);
  border-radius: 14px;
  padding: 18px 0;
  margin-bottom: 22px;
}
.grok-stat-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.grok-stat--hero {
  padding: 0 24px;
}
.grok-stat--hero:first-child {
  padding-left: 20px;
}
.grok-stat-divider {
  width: 1px;
  height: auto;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  margin-block: 3px;
}
.grok-stat-val {
  font-size: clamp(28px, 2.8vw, 34px);
  font-weight: 700;
  color: #4fd1c5;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
}
.grok-stat-val--gold {
  color: #f4c95d;
}
.grok-stat-lab {
  font-size: 10px;
  color: #7f90a8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.35;
}
.grok-progress-wrap {
  flex: 1;
  min-width: 180px;
  padding: 0 20px;
  align-self: center;
}
.grok-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.grok-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4fd1c5, #f4c95d);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.grok-pct-label {
  font-size: 11px;
  color: #7f90a8;
  margin-top: 7px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Filter tabs */
.grok-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.grok-tab {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #7c889a !important;
  min-height: 34px;
  padding: 0 14px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1;
  white-space: nowrap;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.grok-tab:hover {
  border-color: rgba(79, 209, 197, 0.3) !important;
  color: #b6c0d2 !important;
  background: transparent !important;
}
.grok-tab.active {
  background: rgba(79, 209, 197, 0.08) !important;
  border-color: rgba(79, 209, 197, 0.4) !important;
  color: #4fd1c5 !important;
}
.grok-tab[data-filter='built'].active {
  background: rgba(244, 201, 93, 0.07) !important;
  border-color: rgba(244, 201, 93, 0.35) !important;
  color: #f4c95d !important;
}

/* Insight cards */
.grok-card {
  background: linear-gradient(160deg, rgba(11, 15, 22, 0.98), rgba(9, 13, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.grok-card:hover {
  border-color: rgba(79, 209, 197, 0.2);
}
.grok-card[data-status='built'] {
  border-left: 2px solid rgba(244, 201, 93, 0.52);
  background: linear-gradient(145deg, rgba(244, 201, 93, 0.05) 0%, rgba(11, 15, 22, 0.98) 30%, rgba(9, 13, 20, 0.98) 100%);
}
.grok-card[data-status='built']:hover {
  border-left-color: rgba(244, 201, 93, 0.72);
  box-shadow: 0 0 24px rgba(244, 201, 93, 0.06);
}
.grok-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.grok-card-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 620;
  color: #e8ecf4;
  line-height: 1.42;
}
.grok-card-ts {
  font-size: 10px;
  color: #66748a;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}
.grok-card-body {
  font-size: 13px;
  color: #99a5b8;
  line-height: 1.55;
  margin: 0 0 10px;
}
.grok-tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.grok-tag {
  font-size: 10px;
  background: rgba(79, 209, 197, 0.05);
  border: 1px solid rgba(79, 209, 197, 0.12);
  color: #66768d;
  padding: 2px 8px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
}
.grok-impl-note {
  font-size: 12px;
  color: #f4c95d;
  background: rgba(244, 201, 93, 0.05);
  border: 1px solid rgba(244, 201, 93, 0.16);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.grok-impl-note-label {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  color: #f4c95d;
}
.grok-card-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.grok-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 10px;
  color: #4fd1c5;
  border: 1px solid rgba(79, 209, 197, 0.22);
  padding: 0 10px;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.04em;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.grok-link:hover {
  border-color: rgba(79, 209, 197, 0.5);
  background: rgba(79, 209, 197, 0.08);
}

/* Mobile */
@media (max-width: 880px) {
  #grok-live-section {
    padding: 2px;
  }

  .grok-hero {
    margin-bottom: 16px;
  }

  .grok-eyebrow {
    margin-bottom: 9px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .grok-headline {
    font-size: clamp(22px, 7.1vw, 30px);
    line-height: 1.12;
    margin-bottom: 8px;
  }

  .grok-subline {
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .grok-meta {
    font-size: 10px;
    line-height: 1.4;
  }

  .grok-stats-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    margin-bottom: 16px;
  }

  .grok-stat-divider {
    display: none;
  }

  .grok-stat--hero,
  .grok-stat--hero:first-child {
    padding: 10px 9px;
    border: 1px solid rgba(79, 209, 197, 0.14);
    border-radius: 10px;
    background: linear-gradient(155deg, rgba(10, 14, 22, 0.92), rgba(8, 12, 18, 0.95));
    min-height: 74px;
    justify-content: center;
  }

  .grok-stat-val {
    font-size: clamp(22px, 6vw, 28px);
  }

  .grok-stat-lab {
    font-size: 9px;
    line-height: 1.35;
    letter-spacing: 0.07em;
  }

  .grok-progress-wrap {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 4px 2px 0;
    margin-top: 2px;
  }

  .grok-pct-label {
    font-size: 10px;
    margin-top: 5px;
    text-align: right;
  }

  .grok-filter-row {
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .grok-filter-row::-webkit-scrollbar {
    display: none;
  }

  .grok-tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .grok-card {
    padding: 12px 12px 11px;
    margin-bottom: 8px;
  }

  .grok-card-top {
    gap: 7px;
    margin-bottom: 7px;
  }

  .grok-card-top .shell-chip {
    order: 1;
  }

  .grok-card-ts {
    order: 2;
    margin-left: auto;
  }

  .grok-card-title {
    order: 3;
    flex-basis: 100%;
    font-size: 13px;
    line-height: 1.38;
  }

  .grok-card-body {
    font-size: 12px;
    line-height: 1.52;
    margin-bottom: 8px;
  }

  .grok-tag {
    font-size: 9px;
    padding: 2px 7px;
  }

  .grok-impl-note {
    font-size: 11px;
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .grok-link {
    min-height: 28px;
    font-size: 9px;
    padding-inline: 9px;
  }
}

@media (max-width: 560px) {
  .grok-stats-bar {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .grok-stat--hero,
  .grok-stat--hero:first-child {
    min-height: 66px;
    padding: 9px;
  }

  .grok-progress-wrap {
    padding-top: 6px;
  }

  .grok-headline {
    font-size: clamp(20px, 8vw, 26px);
  }
}

/* Mobile Header Stabilizer
   WHY: enforce one consistent mobile hierarchy on every template:
   logo (left) / status banner (center lane) / burger (right),
   with hard cache-safe overrides for legacy inline header rules. */
@media (max-width: 880px) {
  .app-nav .nav-inline,
  .header .header-inner {
    --odei-mobile-header-control-h: 46px;
    --odei-mobile-header-gap: 10px;
    display: grid !important;
    grid-template-columns: minmax(0, max-content) minmax(140px, 1fr) var(--odei-mobile-header-control-h) !important;
    align-items: center !important;
    column-gap: var(--odei-mobile-header-gap) !important;
    row-gap: 0;
    min-height: 56px;
    width: 100%;
  }

  .app-nav .nav-inline {
    padding-inline: 8px !important;
  }

  .header .header-inner {
    padding: 8px 0 !important;
  }

  .header .header-left {
    grid-column: 1 / span 2;
    display: grid !important;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    align-items: center;
    column-gap: var(--odei-mobile-header-gap);
    min-width: 0;
  }

  .app-nav .brand-cluster,
  .header .brand-cluster {
    min-height: var(--odei-mobile-header-control-h);
    padding: 4px 10px;
    border-radius: 14px;
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand-logo-img {
    width: 30px;
    height: 30px;
  }

  .brand-title,
  nav h1 {
    font-size: clamp(18px, 3.1vw, 22px);
    line-height: 1;
    letter-spacing: 0.12em;
  }

  .brand-home-link {
    grid-column: 1;
    justify-self: start;
    align-self: center;
    min-width: 0;
  }

  .app-nav-live,
  .header-left .app-nav-live {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    width: min(100%, 520px) !important;
    max-width: 100%;
    min-width: 0;
    min-height: var(--odei-mobile-header-control-h);
    margin: 0 !important;
    margin-inline: auto !important;
    padding: 0 12px;
    gap: 8px;
    justify-content: center !important;
  }

  .app-nav-live__badge {
    display: none !important;
  }

  .app-nav-live__text {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: clamp(9px, 1.7vw, 11px);
    line-height: 1.15;
    font-weight: 620;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-burger {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    align-self: center;
    margin-left: 0 !important;
    width: var(--odei-mobile-header-control-h);
    height: var(--odei-mobile-header-control-h);
    min-width: var(--odei-mobile-header-control-h);
    flex: 0 0 var(--odei-mobile-header-control-h);
    border-radius: 10px;
  }

  .app-nav-telemetry {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .app-nav .nav-inline,
  .header .header-inner {
    --odei-mobile-header-control-h: 40px;
    --odei-mobile-header-gap: 8px;
    grid-template-columns: minmax(0, max-content) minmax(110px, 1fr) var(--odei-mobile-header-control-h) !important;
    min-height: 50px;
  }

  .app-nav-live,
  .header-left .app-nav-live {
    padding-inline: 9px;
  }

  .brand-title,
  nav h1 {
    font-size: clamp(16px, 4.2vw, 18px);
    letter-spacing: 0.1em;
  }
}

@media (max-width: 430px) {
  .app-nav-live,
  .header-left .app-nav-live {
    padding-inline: 8px;
  }

  .app-nav-live__text {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
}
