@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ========================================================================== */
/* ARCHITECTURAL AI INFRASTRUCTURE DESIGN SYSTEM — GUDANG.AI                  */
/* Obsidian Carbon + Alabaster Stone Light Mode + 6 Live Accent Presets       */
/* ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #07080a;
  --bg-2: #0b0d10;
  --bg-subtle: #0b0d10;
  --bg-card: #0f1216;
  --bg-elevated: #15191f;
  --bg-input: #090b0e;
  --bg-hover: rgba(255, 255, 255, 0.035);
  --bg-glass: rgba(7, 8, 10, 0.84);
  --bg-code: #090b0f;
  --bg-code-header: #0d1016;

  --border: #1e232b;
  --border-light: #2c333f;
  --border-subtle: rgba(255, 255, 255, 0.06);

  --text: #f3f5f7;
  --text-2: #b0b8c4;
  --text-muted: #75808f;

  --green: #00dc82;
  --emerald-ink: #00dc82;
  --amber: #f59e0b;
  --red: #f43f5e;
  --cyan: #06b6d4;
  --indigo: #6366f1;
  --purple: #8b5cf6;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --card-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.045);
  --shadow-card: var(--card-specular), 0 10px 28px -10px rgba(0, 0, 0, 0.65);
  --shadow-elevated: inset 0 1px 0 0 rgba(255, 255, 255, 0.075), 0 24px 58px -12px rgba(0, 0, 0, 0.78);
  --grid-line: rgba(255, 255, 255, 0.04);
  --scrollbar-track: #07080a;
  --scrollbar-thumb: #232933;

  color-scheme: dark;
}

/* Crisp Architectural Alabaster / Stone Paper Light Mode */
[data-theme="light"] {
  --bg: #f6f7f8;
  --bg-2: #eef0f3;
  --bg-subtle: #eef0f3;
  --bg-card: #ffffff;
  --bg-elevated: #f1f3f6;
  --bg-input: #ffffff;
  --bg-hover: rgba(11, 14, 20, 0.038);
  --bg-glass: rgba(246, 247, 248, 0.88);
  --bg-code: #090b0f;
  --bg-code-header: #0e1218;

  --border: #dfe3e8;
  --border-light: #c8cfd8;
  --border-subtle: rgba(11, 14, 20, 0.06);

  --text: #0b0e14;
  --text-2: #374151;
  --text-muted: #64748b;

  --emerald-ink: #059669;
  --card-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --shadow-card: 0 1px 2px rgba(11, 14, 20, 0.04), 0 8px 24px -8px rgba(11, 14, 20, 0.07);
  --shadow-elevated: 0 22px 54px -12px rgba(11, 14, 20, 0.18), 0 0 0 1px rgba(11, 14, 20, 0.05);
  --grid-line: rgba(11, 14, 20, 0.055);
  --scrollbar-track: #eef0f3;
  --scrollbar-thumb: #c4ccd6;

  color-scheme: light;
}

/* ========================================================================== */
/* 6 LIVE ACCENT PRESETS                                                      */
/* ========================================================================== */

/* 1. Solar Ember (Default) */
:root,
[data-accent="ember"] {
  --primary: #ff5526;
  --primary-hover: #e04316;
  --accent-rgb: 255, 85, 38;
  --accent-mid: #fb923c;
  --accent-mid-rgb: 251, 146, 60;
  --btn-primary-fg: #ffffff;
  --accent-ink: #ff5526;
  --logo-hi: #ffc285;
  --logo-mid: var(--primary);
  --logo-left-hi: #ff6a3d;
  --logo-left-deep: #c8320d;
  --logo-right-hi: #d93811;
  --logo-right-deep: #6e1806;
  --logo-wire: #ffd8b8;
  --logo-core: #ffffff;
}

[data-theme="light"][data-accent="ember"],
[data-theme="light"]:not([data-accent]) {
  --accent-ink: #dc3c10;
}

/* 2. Cyber Emerald */
[data-accent="emerald"] {
  --primary: #00dc82;
  --primary-hover: #00b86b;
  --accent-rgb: 0, 220, 130;
  --accent-mid: #38bdf8;
  --accent-mid-rgb: 56, 189, 248;
  --btn-primary-fg: #04130c;
  --accent-ink: #00dc82;
  --logo-hi: #86efac;
  --logo-mid: var(--primary);
  --logo-left-hi: #10b981;
  --logo-left-deep: #047857;
  --logo-right-hi: #059669;
  --logo-right-deep: #064e3b;
  --logo-wire: #a7f3d0;
  --logo-core: #ffffff;
}

/* 3. Laser Cyan */
[data-accent="cyan"] {
  --primary: #06b6d4;
  --primary-hover: #0891b2;
  --accent-rgb: 6, 182, 212;
  --accent-mid: #818cf8;
  --accent-mid-rgb: 129, 140, 248;
  --btn-primary-fg: #041418;
  --accent-ink: #06b6d4;
  --logo-hi: #67e8f9;
  --logo-mid: var(--primary);
  --logo-left-hi: #06b6d4;
  --logo-left-deep: #0e7490;
  --logo-right-hi: #0891b2;
  --logo-right-deep: #164e63;
  --logo-wire: #a5f3fc;
  --logo-core: #ffffff;
}

/* 4. Electric Cobalt */
[data-accent="cobalt"] {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent-rgb: 59, 130, 246;
  --accent-mid: #38bdf8;
  --accent-mid-rgb: 56, 189, 248;
  --btn-primary-fg: #ffffff;
  --accent-ink: #3b82f6;
  --logo-hi: #93c5fd;
  --logo-mid: var(--primary);
  --logo-left-hi: #3b82f6;
  --logo-left-deep: #1d4ed8;
  --logo-right-hi: #2563eb;
  --logo-right-deep: #1e3a8a;
  --logo-wire: #bfdbfe;
  --logo-core: #ffffff;
}

/* 5. Crimson Pulse */
[data-accent="rose"] {
  --primary: #f43f5e;
  --primary-hover: #e11d48;
  --accent-rgb: 244, 63, 94;
  --accent-mid: #fb923c;
  --accent-mid-rgb: 251, 146, 60;
  --btn-primary-fg: #ffffff;
  --accent-ink: #f43f5e;
  --logo-hi: #fda4af;
  --logo-mid: var(--primary);
  --logo-left-hi: #f43f5e;
  --logo-left-deep: #be123c;
  --logo-right-hi: #e11d48;
  --logo-right-deep: #881337;
  --logo-wire: #fecdd3;
  --logo-core: #ffffff;
}

/* 6. Hyper Violet */
[data-accent="violet"] {
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --accent-rgb: 139, 92, 246;
  --accent-mid: #c084fc;
  --accent-mid-rgb: 192, 132, 252;
  --btn-primary-fg: #ffffff;
  --accent-ink: #8b5cf6;
  --logo-hi: #c4b5fd;
  --logo-mid: var(--primary);
  --logo-left-hi: #8b5cf6;
  --logo-left-deep: #6d28d9;
  --logo-right-hi: #7c3aed;
  --logo-right-deep: #4c1d95;
  --logo-wire: #ddd6fe;
  --logo-core: #ffffff;
}

/* Crisp Optical Ink Calibration for Light Mode Accents */
[data-theme="light"]:not([data-accent]),
[data-theme="light"][data-accent="ember"],
[data-theme="light"] [data-accent="ember"] {
  --accent-ink: #dc3c10;
}

[data-theme="light"][data-accent="emerald"],
[data-theme="light"] [data-accent="emerald"] {
  --accent-ink: #008a50;
}

[data-theme="light"][data-accent="cyan"],
[data-theme="light"] [data-accent="cyan"] {
  --accent-ink: #087f96;
}

[data-theme="light"][data-accent="cobalt"],
[data-theme="light"] [data-accent="cobalt"] {
  --accent-ink: #2563eb;
}

[data-theme="light"][data-accent="rose"],
[data-theme="light"] [data-accent="rose"] {
  --accent-ink: #e11d48;
}

[data-theme="light"][data-accent="violet"],
[data-theme="light"] [data-accent="violet"] {
  --accent-ink: #7c3aed;
}

/* ========================================================================== */
/* RESET, BASE TYPOGRAPHY & BESPOKE SVG ICON SYSTEM                           */
/* ========================================================================== */

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  position: relative;
  isolation: isolate;
  background-color: var(--bg);
  background-image: radial-gradient(
    ellipse 70% 300px at 50% -110px,
    rgba(var(--accent-rgb), 0.085),
    transparent 72%
  );
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.22s var(--ease-out), color 0.22s var(--ease-out);
}

::selection {
  background: rgba(var(--accent-rgb), 0.26);
  color: var(--text);
}

h1,
h2,
h3,
h4,
.hero-display-title,
.kpi-value,
.stat-value,
.trust-val,
.brand-name {
  font-family: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.032em;
  color: var(--text);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

input[type='range'] {
  accent-color: var(--primary);
  cursor: pointer;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}

a:hover {
  color: var(--primary);
}

/* Custom Architectural Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.mono,
code,
pre,
kbd {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.kpi-value.mono,
.stat-value.mono,
.trust-val.mono {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Bespoke Inline SVG Icon System */
.ico {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -2px;
  display: inline-block;
}

.ico:not([fill]) {
  fill: none;
}

.ico:not([stroke]) {
  stroke: currentColor;
}

.ico-sm {
  width: 13px;
  height: 13px;
  vertical-align: -1.5px;
}

.ico-lg {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

.container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 22px;
}

.hidden {
  display: none !important;
}

/* ========================================================================== */
/* TOP ARCHITECTURAL LIVE TELEMETRY & PROTOCOL STATUS BAR                     */
/* ========================================================================== */

.top-ticker-bar {
  min-height: 32px;
  padding: 0 16px;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(5, 7, 11, 0.94) 24%, rgba(5, 7, 11, 0.94) 76%, rgba(56, 189, 248, 0.08) 100%),
    #05070b;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 102;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

[data-theme="light"] .top-ticker-bar {
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.11) 0%, rgba(15, 23, 42, 0.96) 24%, rgba(15, 23, 42, 0.96) 76%, rgba(56, 189, 248, 0.11) 100%),
    #0f172a;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.30);
}

.ticker-status-pin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.11);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  position: relative;
  z-index: 3;
}

.ticker-latency-tag {
  color: var(--primary);
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.ticker-marquee-mask {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: tickerScroll 40s linear infinite;
}

.top-ticker-bar:hover .ticker-track,
.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #94a3b8;
}

.ticker-item strong,
.ticker-item b,
.ticker-val {
  color: #f8fafc;
  font-weight: 700;
}

.ticker-sep {
  color: rgba(var(--accent-rgb), 0.72);
  font-weight: 700;
  margin: 0 14px;
}

.ticker-actions-pin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.ticker-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8.5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.ticker-quick-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.14);
  color: #ffffff;
}

.ticker-mcp-chip {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--primary);
}

@media (max-width: 960px) {
  .ticker-actions-pin {
    display: none;
  }
}

@media (max-width: 600px) {
  .ticker-latency-tag {
    display: none;
  }
  .top-ticker-bar {
    padding: 0 10px;
    gap: 8px;
    min-height: 30px;
  }
  .ticker-status-pin {
    padding: 2.5px 7.5px;
    gap: 5px;
    font-size: 9.5px;
  }
}

@media (max-width: 390px) {
  .ticker-pin-title {
    letter-spacing: 0.02em;
  }
  .ticker-status-pin {
    padding: 2px 6.5px;
    font-size: 9px;
  }
}

/* ========================================================================== */
/* 1. TOP NAVIGATION BAR, UTILITY CONTROLS (⌘K, THEME, ACCENT SWATCHES)       */
/* ========================================================================== */

.navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 6px 18px;
  gap: 12px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.brand-badge {
  background: var(--primary);
  color: var(--btn-primary-fg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 11.5px;
  padding: 5.5px 8.5px;
  border-radius: 7px;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 12px rgba(var(--accent-rgb), 0.32);
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.038em;
  color: var(--text);
}

.brand-dot {
  color: var(--primary);
}

.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 9px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5.5px 10.5px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.nav-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-btn.active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.13);
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: inset 0 -1.5px 0 var(--primary);
}

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

.guest-actions-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Header Utility Controls: ⌘K Shortcut Trigger + Theme & Accent Cluster */
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 7px 0 9px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s var(--ease-out);
}

.cmdk-trigger:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
  background: var(--bg-elevated);
}

.cmdk-kbd,
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 5.5px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-2);
}

.theme-cluster {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2.5px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
}

.theme-btn,
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.theme-btn:hover,
.theme-btn.active,
.theme-toggle-btn:hover,
.theme-toggle-btn.active {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border);
}

.accent-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.accent-swatch-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

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

.accent-swatch-trigger .swatch-dot,
#activeAccentDot {
  width: 12px;
  height: 12px;
  background-color: var(--primary) !important;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.72) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transform: none !important;
  pointer-events: none;
}

.accent-swatch-trigger:empty::after,
.accent-swatch-dot,
.swatch-current-dot {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  flex-shrink: 0;
}

.accent-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  max-width: calc(100vw - 24px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-elevated);
  z-index: 260;
  white-space: nowrap;
  animation: cmdkPop 0.15s var(--ease-out);
}

.accent-popover[aria-hidden="true"] {
  display: none;
}

.swatch-dot {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s var(--ease-out), border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

[data-theme="light"] .swatch-dot {
  border-color: rgba(11, 14, 20, 0.16);
}

.swatch-dot[data-accent="emerald"],
.swatch-dot[data-swatch="emerald"],
.swatch-dot.emerald {
  background: #00dc82;
}

.swatch-dot[data-accent="ember"],
.swatch-dot[data-swatch="ember"],
.swatch-dot.ember {
  background: #ff5526;
}

.swatch-dot[data-accent="cyan"],
.swatch-dot[data-swatch="cyan"],
.swatch-dot.cyan {
  background: #06b6d4;
}

.swatch-dot[data-accent="cobalt"],
.swatch-dot[data-swatch="cobalt"],
.swatch-dot.cobalt {
  background: #3b82f6;
}

.swatch-dot[data-accent="rose"],
.swatch-dot[data-swatch="rose"],
.swatch-dot.rose {
  background: #f43f5e;
}

.swatch-dot[data-accent="violet"],
.swatch-dot[data-swatch="violet"],
.swatch-dot.violet {
  background: #8b5cf6;
}

.swatch-dot:hover {
  transform: scale(1.16);
  border-color: var(--text);
}

.swatch-dot.active,
.swatch-dot[aria-pressed="true"] {
  transform: scale(1.15);
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 12px rgba(var(--accent-rgb), 0.7);
}

/* System Status Pill & Pulsing Dot */
.sys-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--accent-ink);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.sys-status-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.34);
  color: #d97706;
}

[data-theme="dark"] .sys-status-pill.warn,
:root:not([data-theme="light"]) .sys-status-pill.warn {
  color: #fcd34d;
}

.sys-status-pill.offline {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.34);
  color: #e11d48;
}

[data-theme="dark"] .sys-status-pill.offline,
:root:not([data-theme="light"]) .sys-status-pill.offline {
  color: #fda4af;
}

.pulse-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.85);
  position: relative;
  flex-shrink: 0;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  opacity: 0;
  animation: pulseRing 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.7);
    opacity: 0.85;
  }
  80%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3.5px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.8);
  flex-shrink: 0;
}

.user-email {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-balance {
  color: var(--emerald-ink);
  background: rgba(0, 220, 130, 0.1);
  border: 1px solid rgba(0, 220, 130, 0.28);
  padding: 2px 7.5px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ========================================================================== */
/* 2. ASYMMETRIC ARCHITECTURAL HERO (.hero-arch) & FLOATING TERMINAL          */
/* ========================================================================== */

.main-content {
  padding-top: 20px;
  padding-bottom: 64px;
}

.section-header-bar {
  margin-bottom: 16px;
}

.section-header-bar h1,
.section-header-bar h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(18.5px, 2.1vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.032em;
  color: var(--text);
}

.hero-arch {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 38px 36px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.hero-grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 86% 84% at 34% 48%, #000 28%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 86% 84% at 34% 48%, #000 28%, transparent 82%);
}

.hero-slash-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 45%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.09) 0%,
    rgba(var(--accent-rgb), 0.04) 52%,
    transparent 100%
  );
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Razor-sharp glowing diagonal accent edge along polygon(14% 0 -> 0% 100%) */
.hero-slash-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--primary) 18%,
    var(--primary) 82%,
    transparent 100%
  );
  clip-path: polygon(14% 0, calc(14% + 1.5px) 0, 1.5px 100%, 0% 100%);
  opacity: 0.85;
}

.hero-slash-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), transparent);
  clip-path: polygon(14% 0, calc(14% + 26px) 0, 26px 100%, 0% 100%);
}

.hero-arch > *:not(.hero-grid-canvas):not(.hero-slash-panel),
.hero-left,
.hero-right {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  padding: 5px 11px;
  border-radius: 6px;
}

.hero-eyebrow span,
.hero-eyebrow .slash {
  color: var(--accent-ink);
}

.hero-display-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 12px 0 16px;
  color: var(--text);
}

.hero-accent-word {
  color: var(--accent-ink);
  text-shadow: 0 0 36px rgba(var(--accent-rgb), 0.28);
}

[data-theme="light"] .hero-accent-word {
  text-shadow: none;
}

@keyframes heroBlurIn {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.blur-reveal {
  opacity: 0;
  animation: heroBlurIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: opacity, filter, transform;
}

/* Legacy .hero-card preserved & upgraded to Obsidian Carbon */
.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  padding: 4px 11px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.hero-card h1 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.12;
  letter-spacing: -0.036em;
  color: var(--text);
}

.hero-desc,
.hero-subtitle {
  color: var(--text-2);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.62;
  max-width: 64ch;
}

.hero-desc code,
.hero-subtitle code {
  font-size: 12px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-ink);
}

.hero-btns,
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-sandbox-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* Live Pulsing Telemetry Strip Inside Hero */
.hero-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.telemetry-stat,
.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.telemetry-stat:first-child,
.telemetry-item:first-child {
  padding-left: 0;
  border-left: none;
}

.telemetry-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.telemetry-lbl,
.telemetry-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Floating Dark Architectural Terminal Card (Always #090b0f Pro Contrast) */
.hero-terminal {
  background: #090b0f;
  border: 1px solid #222833;
  border-radius: 13px;
  overflow: hidden;
  color: #e5e9f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 56px -12px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.hero-term-top,
.hero-term-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #0d1017;
  border-bottom: 1px solid #1e2430;
}

.term-dots,
.hero-term-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c3340;
  display: inline-block;
}

.term-dot.red,
.term-dot:nth-child(1) {
  background: #f43f5e;
}

.term-dot.amber,
.term-dot.yellow,
.term-dot:nth-child(2) {
  background: #f59e0b;
}

.term-dot.green,
.term-dot:nth-child(3) {
  background: #00dc82;
}

.hero-term-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #07090d;
  border: 1px solid #1d232e;
  padding: 2.5px;
  border-radius: 7px;
}

.hero-term-tab,
.term-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #7d899b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}

.hero-term-tab:hover,
.term-tab:hover {
  color: #e5e9f0;
}

.hero-term-tab.active,
.term-tab.active {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--primary);
}

.hero-terminal .hero-term-copy {
  background: #141923;
  border-color: #283040;
  color: #e2e8f0;
  flex-shrink: 0;
}

.hero-terminal .hero-term-copy:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
}

.hero-term-body {
  padding: 16px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
  color: #e2e8f0;
  overflow-x: auto;
  min-height: 190px;
}

.hero-term-body pre {
  margin: 0;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.hero-term-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: #0c0f15;
  border-top: 1px solid #1e2430;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.tok-kw {
  color: var(--primary);
}

.tok-str {
  color: #7dd3fc;
}

.tok-num {
  color: #fcd34d;
}

.tok-cmt {
  color: #64748b;
}

/* ========================================================================== */
/* 3. DUAL INFINITE COUNTER-ROTATING MARQUEES & ECOSYSTEM STRIP               */
/* ========================================================================== */

.marquee-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.marquee-row {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 2px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  will-change: transform;
  animation: marqueeLeft 48s linear infinite;
}

.marquee-track.marquee-reverse {
  animation: marqueeRight 52s linear infinite;
}

.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeLeft {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes marqueeRight {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.marquee-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  padding: 0 8px;
  white-space: nowrap;
}

.marquee-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6.5px 12.5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

.marquee-pill-tool {
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--bg-2);
}

.marquee-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.marquee-pill-dot,
.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
  flex-shrink: 0;
}

.marquee-pill-tag,
.marquee-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.eco-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.eco-strip-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.eco-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

/* ========================================================================== */
/* 4. ARCHITECTURAL BENTO GRID, 4-STEP FLOW & CURSOR SPOTLIGHT CARDS          */
/* ========================================================================== */

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-heading-row h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(20px, 2.3vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: var(--text);
}

/* Cursor-Tracking Radial Spotlight System */
.spotlight-card,
.bento-card,
.kpi-card,
.model-card-item,
.flow-step-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before,
.bento-card::before,
.kpi-card::before,
.model-card-item::before,
.flow-step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.10),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  z-index: 0;
}

.spotlight-card:hover::before,
.bento-card:hover::before,
.kpi-card:hover::before,
.model-card-item:hover::before,
.flow-step-card:hover::before {
  opacity: 1;
}

.spotlight-card > *,
.bento-card > *,
.kpi-card > *,
.model-card-item > *,
.flow-step-card > * {
  position: relative;
  z-index: 1;
}

.arch-section {
  margin-bottom: 4px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.bento-card:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-2px);
}

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

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-ink);
}

.bento-idx {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  padding: 3px 8px;
  border-radius: 5px;
}

.bento-card h3,
.bento-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.25;
  color: var(--text);
}

.bento-card p,
.bento-desc {
  font-size: 13px;
  line-height: 1.58;
  color: var(--text-muted);
}

.bento-desc code,
.step-desc code {
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink);
}

.bento-visual {
  background-color: var(--bg-2);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* 4-Step Execution Flow Grid */
.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.flow-step-card {
  padding: 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color 0.2s var(--ease-out);
}

.flow-step-card:last-child {
  border-right: none;
}

.flow-step-card:hover {
  background-color: var(--bg-hover);
}

.flow-step-num,
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.flow-step-card h3,
.flow-step-card h4,
.flow-step-title,
.step-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.flow-step-card p,
.flow-step-desc,
.step-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ========================================================================== */
/* 5. TRUST RIBBON & MODEL CATALOG EXPLORER                                   */
/* ========================================================================== */

.trust-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 15px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.trust-item:first-child {
  padding-left: 2px;
  border-left: none;
}

.trust-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Catalog Filter Row & View Switcher */
.catalog-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.catalog-filter-row .search-input-wrap {
  flex: 1 1 240px;
  min-width: 200px;
}

.catalog-filter-row > input.input {
  flex: 1 1 240px;
  width: auto;
  min-width: 200px;
}

.catalog-filter-row > select.input {
  width: auto;
  min-width: 155px;
  flex: 0 1 auto;
}

.view-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 8px;
  flex-shrink: 0;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.view-toggle-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.view-toggle-btn.active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.42);
}

/* OpenRouter-Caliber Model Cards Grid */
.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.model-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.model-card-item:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.48);
  box-shadow:
    var(--shadow-card),
    0 0 0 1px rgba(var(--accent-rgb), 0.15);
}

.model-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.model-card-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.28;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.model-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.model-card-rates {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.model-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Inline Copyable ID / Secret Chip */
.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
  transition: all 0.16s var(--ease-out);
}

.copy-chip:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent-ink);
}

.copy-chip:active {
  transform: scale(0.98);
}

/* ========================================================================== */
/* CARDS, GRIDS, PILLS & TOOLBARS                                             */
/* ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.toolbar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-input-wrap {
  flex: 1;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header-row h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.stat-value {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5.5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.cat-pill:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--bg-elevated);
}

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.28);
}

/* ========================================================================== */
/* 6. SIDEBAR CONSOLE LAYOUT & KPI CARDS (DEVELOPER CONSOLE + ADMIN OPS)      */
/* ========================================================================== */

.console-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.console-sidebar {
  position: sticky;
  top: 74px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.console-profile-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.console-sidebar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 4px 8px 2px;
}

.console-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}

.console-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8.5px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.console-nav-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border);
}

.console-nav-btn.active {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: inset 3px 0 0 var(--primary);
}

.console-nav-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}

.console-nav-badge {
  margin-left: auto;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--accent-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6.5px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.console-nav-btn.active .console-nav-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
}

.console-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.console-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
}

.console-header-bar h1,
.console-header-bar h2,
.console-header-bar h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.032em;
  color: var(--text);
}

.subview-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 4-Column Responsive KPI Metric Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

.kpi-card:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-1px);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 1.18;
  font-variant-numeric: tabular-nums;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.11);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.kpi-trend.down,
.kpi-trend.negative {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.26);
  color: var(--red);
}

.kpi-trend.neutral {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--text-muted);
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
}

/* ========================================================================== */
/* 7. PURE CSS INTERACTIVE BAR CHARTS & HORIZONTAL BREAKDOWN BARS             */
/* ========================================================================== */

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 175px;
  padding: 16px 8px 6px;
}

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
  min-width: 0;
}

.chart-bar-track {
  width: 100%;
  height: 125px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  overflow: hidden;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}

.chart-bar-col:hover .chart-bar-track {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--bg-elevated);
}

.chart-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(var(--accent-rgb), 0.55) 100%);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.26);
  transition: height 0.42s var(--ease-out), filter 0.18s var(--ease-out);
}

.chart-bar-col:hover .chart-bar-fill {
  filter: brightness(1.12);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.48);
}

.chart-bar-fill.green,
.chart-bar-fill.emerald {
  background: linear-gradient(180deg, var(--primary) 0%, rgba(var(--accent-rgb), 0.58) 100%);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.28);
}

.chart-bar-fill.purple {
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.28);
}

.chart-bar-val {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.chart-bar-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Horizontal Breakdown Bars */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.breakdown-row:has(> .breakdown-bar-bg:not(:last-child)) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.breakdown-row:has(> .breakdown-bar-bg:not(:last-child)) > .breakdown-bar-bg {
  flex: 1;
}

.breakdown-top,
.breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.breakdown-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.7), var(--primary));
  transition: width 0.4s var(--ease-out);
}

.breakdown-bar-fill.green,
.breakdown-bar-fill.emerald {
  background: linear-gradient(90deg, #00b86b, #00dc82);
}

.breakdown-bar-fill.purple {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.breakdown-bar-fill.amber {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.breakdown-bar-fill.cyan {
  background: linear-gradient(90deg, #0891b2, #22d3ee);
}

.breakdown-bar-fill.red {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}

/* ========================================================================== */
/* 8. API KEYS, QUOTA PROGRESS & PAYMENT GATEWAY CARDS                        */
/* ========================================================================== */

.key-secret-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 4px 7px 4px 10px;
  border-radius: 7px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.16s var(--ease-out);
}

.btn-icon:hover {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent-ink);
}

.quota-progress {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 4px;
}

.quota-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.35s var(--ease-out);
}

.quota-progress-fill.warn,
.quota-progress-fill.amber {
  background: var(--amber);
}

.quota-progress-fill.danger,
.quota-progress-fill.red,
.quota-progress-fill.exceeded {
  background: var(--red);
}

/* Deposit Presets & Payment Gateways */
.deposit-presets-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.deposit-preset-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 6px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: center;
  transition: all 0.16s var(--ease-out);
}

.deposit-preset-btn:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
  color: var(--text);
}

.deposit-preset-btn.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.32), 0 4px 12px rgba(var(--accent-rgb), 0.16);
}

.gateway-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.gateway-option-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.16s var(--ease-out);
}

.gateway-option-card:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.gateway-option-card.active {
  background: rgba(var(--accent-rgb), 0.09);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.32), 0 6px 18px rgba(var(--accent-rgb), 0.14);
}

.gw-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gw-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.gw-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  margin-top: 2px;
}

.gateway-option-card.active .gw-badge {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: var(--accent-ink);
}

/* ========================================================================== */
/* 9. BUTTONS & INPUTS                                                        */
/* ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s var(--ease-out);
  white-space: nowrap;
  user-select: none;
}

.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-lg {
  padding: 10.5px 20px;
  font-size: 13.5px;
  border-radius: 9px;
  gap: 8px;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 7px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
  gap: 4px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 2px 12px rgba(var(--accent-rgb), 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 5px 18px rgba(var(--accent-rgb), 0.38);
  transform: translateY(-0.5px);
}

/* Featured Glow CTA Modifier */
.btn-glow {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(var(--accent-rgb), 0.45),
    0 8px 26px -4px rgba(var(--accent-rgb), 0.42);
}

.btn-glow::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  pointer-events: none;
}

.btn-glow:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 0 1px var(--primary),
    0 14px 34px -4px rgba(var(--accent-rgb), 0.56);
}

.btn-outline {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-hover);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.34);
  color: var(--red);
}

.btn-danger:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.32);
}

.btn-success {
  background: rgba(0, 220, 130, 0.12);
  border-color: rgba(0, 220, 130, 0.34);
  color: var(--emerald-ink);
}

.btn-success:hover:not(:disabled) {
  background: #00b86b;
  border-color: #00b86b;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 220, 130, 0.3);
}

.full-width {
  width: 100%;
}

.input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8.5px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: border-color 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out);
}

.input option {
  background-color: var(--bg-card);
  color: var(--text);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.input-sm {
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 7px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}

.form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ========================================================================== */
/* 10. DATA TABLES                                                            */
/* ========================================================================== */

.table-card {
  padding: 0;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  max-height: 620px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-2);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table tbody tr {
  transition: background-color 0.14s var(--ease-out);
}

.data-table tbody tr:hover td {
  background: var(--bg-hover);
}

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

.right {
  text-align: right !important;
}

.center {
  text-align: center !important;
}

/* ========================================================================== */
/* 11. ALL-IN-ONE AI STUDIO & WORKSPACES                                      */
/* ========================================================================== */

.studio-topbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.studio-topbar-upper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.studio-title-block h1,
.studio-title-block h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.studio-guest-banner,
.studio-auth-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 9px;
}

.studio-mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.studio-mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9.5px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s var(--ease-out);
}

.studio-mode-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-light);
}

.studio-mode-btn.active {
  background: rgba(var(--accent-rgb), 0.11);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.28), 0 4px 14px rgba(var(--accent-rgb), 0.14);
}

.smode-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.smode-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  line-height: 1.2;
}

.smode-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Two-Column Studio Workspace Grid */
.studio-workspace-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.studio-sidebar {
  padding: 16px;
}

.studio-main-canvas {
  min-width: 0;
}

.sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin-bottom: 10px;
}

.studio-price-pill {
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent-ink);
  padding: 7px 11px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Collapsible Studio Advanced Parameters Box */
.studio-advanced-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  transition: border-color 0.16s var(--ease-out);
}

.studio-advanced-box:hover {
  border-color: var(--border-light);
}

.studio-advanced-box summary,
.studio-advanced-toggle {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  list-style: none;
}

.studio-advanced-box summary::-webkit-details-marker {
  display: none;
}

.studio-advanced-box[open] summary {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Reference Image Preview Chip */
.ref-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text);
  max-width: 100%;
}

.ref-preview-chip img {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #07080a;
  flex-shrink: 0;
}

.ref-preview-chip button {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--red);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.16s var(--ease-out);
}

.ref-preview-chip button:hover {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.studio-options-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 10px;
  flex-wrap: wrap;
}

.studio-quick-picks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.qchip {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  padding: 3.5px 9.5px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.qchip:hover,
.qchip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
}

/* Chat Studio Box & Assistant Code Blocks */
.chat-messages-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 16px;
  height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 12px;
  line-height: 1.55;
  font-size: 13.5px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  color: var(--text);
  border-bottom-right-radius: 3px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 3px;
}

.chat-sender {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-ink);
  margin-bottom: 4px;
}

.chat-bubble.user .chat-sender {
  color: var(--accent-ink);
}

.chat-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-text :not(pre) > code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-ink);
}

/* Code blocks stay #090b0f dark even in light mode for pro developer contrast */
.chat-code-block {
  margin: 10px 0;
  background: #090b0f;
  border: 1px solid #222833;
  border-radius: 9px;
  overflow: hidden;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.chat-code-block .code-header,
.chat-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0e1117;
  border-bottom: 1px solid #222833;
  padding: 6px 12px;
  font-size: 11px;
  color: #94a3b8;
}

.chat-code-block pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
  color: #e5e9f0;
  white-space: pre;
}

.chat-code-block code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  color: #e5e9f0;
}

.chat-meta {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--emerald-ink);
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.chat-textarea {
  resize: none;
  font-size: 13.5px;
}

.chat-send-btn {
  min-width: 115px;
  font-size: 13.5px;
}

/* Media Gallery & Players */
.media-gallery-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 16px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.empty-studio-state {
  text-align: center;
  color: var(--text-muted);
  padding: 36px 20px;
}

.generated-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.media-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding: 12px;
}

.media-item-card img,
.media-item-card video {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: #07080a;
}

.media-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.recent-creations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.recent-creation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  transition: border-color 0.16s var(--ease-out);
}

.recent-creation-item:hover {
  border-color: var(--border-light);
}

.expired-media-notice {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 24px 18px;
  text-align: center;
  color: #d97706;
}

[data-theme="dark"] .expired-media-notice,
:root:not([data-theme="light"]) .expired-media-notice {
  color: #fbbf24;
}

/* ========================================================================== */
/* 12. CODE VIEWERS (#090b0f DARK CONTRAST), AUDIT BOXES, BADGES & MODALS     */
/* ========================================================================== */

.code-box {
  background: #090b0f;
  border: 1px solid #222833;
  border-radius: 10px;
  overflow: hidden;
  color: #e5e9f0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d1016;
  padding: 8px 13px;
  font-size: 12px;
  color: #94a3b8;
  border-bottom: 1px solid #1f2530;
  gap: 8px;
}

.code-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0c0f15 !important;
  border-bottom: 1px solid #1f2530 !important;
  padding: 7px 10px;
  flex-wrap: wrap;
}

.code-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #8b96a8;
  padding: 5px 11px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.code-tab-btn:hover {
  color: #f3f5f7;
  background: rgba(255, 255, 255, 0.05);
}

.code-tab-btn.active {
  color: var(--primary);
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.42);
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2c3340;
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.code-tabs-bar .code-copy-btn {
  margin-left: auto;
}

.code-copy-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
}

.code-box pre,
.code-output {
  padding: 13px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.58;
  overflow-x: auto;
  color: #e5e9f0;
  white-space: pre-wrap;
}

.code-output {
  background: #090b0f;
  border: 1px solid #222833;
  border-radius: 8px;
  min-height: 180px;
  max-height: 340px;
  overflow-y: auto;
}

.audit-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12.5px;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.audit-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 4px;
  font-size: 15px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.formula-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px dashed rgba(var(--accent-rgb), 0.34);
  border-radius: 7px;
  font-size: 11.5px;
  word-break: break-all;
}

.highlight-green {
  color: var(--emerald-ink);
}

/* Architectural Hairline Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.badge-green {
  background: rgba(0, 220, 130, 0.13);
  border-color: rgba(0, 220, 130, 0.28);
  color: #00dc82;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
  color: #60a5fa;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.28);
  color: #a78bfa;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.badge-red {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.28);
  color: #fb7185;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.28);
  color: #22d3ee;
}

.badge-outline {
  background: var(--bg-2);
  border-color: var(--border-light);
  color: var(--text-2);
}

/* Light Mode Badge Ink Calibration */
[data-theme="light"] .badge-green {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.28);
  color: #047857;
}

[data-theme="light"] .badge-blue {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.26);
  color: #1d4ed8;
}

[data-theme="light"] .badge-purple {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.26);
  color: #6d28d9;
}

[data-theme="light"] .badge-amber {
  background: rgba(217, 119, 6, 0.11);
  border-color: rgba(217, 119, 6, 0.28);
  color: #b45309;
}

[data-theme="light"] .badge-red {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.26);
  color: #be123c;
}

[data-theme="light"] .badge-cyan {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.26);
  color: #0e7490;
}

/* Keep badges inside always-dark .code-box / .hero-terminal crisp & bright */
[data-theme="light"] .code-box .badge-green,
[data-theme="light"] .hero-terminal .badge-green {
  color: #00dc82;
  background: rgba(0, 220, 130, 0.14);
}

[data-theme="light"] .code-box .badge-blue,
[data-theme="light"] .hero-terminal .badge-blue {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.16);
}

/* Light-Mode Resilience for Any Legacy Inline Dark Styles */
[data-theme="light"] .console-profile-box [style*="color:#fff"],
[data-theme="light"] .site-footer [style*="color:#fff"] {
  color: var(--text) !important;
}

[data-theme="light"] .console-profile-box [style*="background:#070b12"] {
  background: var(--bg-card) !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-xs {
  font-size: 11.5px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

/* ========================================================================== */
/* 13. COMMAND PALETTE MODAL (⌘K), AUTH MODAL & TOASTS                        */
/* ========================================================================== */

/* Auth Modals & Toasts */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 9, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.cmdk-backdrop,
.modal-backdrop.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(4, 6, 9, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 24px;
}

.cmdk-backdrop[aria-hidden="true"] {
  display: none;
}

.cmdk-modal,
.cmdk-dialog {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  width: min(600px, calc(100vw - 24px));
  max-height: 88vh;
  max-height: 90dvh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(var(--accent-rgb), 0.14);
  overflow-x: hidden;
  overflow-y: auto;
  animation: cmdkPop 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmdkPop {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cmdk-input-wrap,
.cmdk-search-bar,
.cmdk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-muted);
}

.cmdk-search-ico {
  color: var(--accent-ink);
  flex-shrink: 0;
}

.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
}

.cmdk-input::placeholder {
  color: var(--text-muted);
}

.cmdk-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmdk-group-label,
.cmdk-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s var(--ease-out), border-color 0.12s var(--ease-out);
}

.cmdk-item:hover,
.cmdk-item.active,
.cmdk-item.selected,
.cmdk-item[aria-selected="true"] {
  background: rgba(var(--accent-rgb), 0.11);
  border-color: rgba(var(--accent-rgb), 0.34);
}

.cmdk-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cmdk-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cmdk-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cmdk-item-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmdk-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cmdk-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cmdk-item-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cmdk-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.cmdk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  width: 100%;
  max-width: min(430px, calc(100vw - 24px));
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  box-shadow: var(--shadow-elevated);
  animation: cmdkPop 0.16s var(--ease-out);
}

.quick-demo-box {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-elevated), 0 0 22px rgba(var(--accent-rgb), 0.2);
  z-index: 300;
  font-weight: 600;
  font-size: 13px;
  max-width: min(420px, calc(100vw - 32px));
}

/* ========================================================================== */
/* 14. SCROLL REVEAL & TAB MOTION CHOREOGRAPHY                                */
/* ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.tab-section:not(.hidden),
.subview-pane:not(.hidden),
.studio-pane:not(.hidden) {
  animation: paneEnter 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================================== */
/* 15. ENTERPRISE FOOTER & RESPONSIVE BREAKPOINTS                             */
/* ========================================================================== */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 32px 0 28px;
  margin-top: 36px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

/* Prevent Navbar Overflow & Sign-Out Clipping at 1280px–1440px */
@media (max-width: 1440px) {
  .nav-inner {
    gap: 7px;
    padding: 6px 14px;
  }

  .brand-sub,
  .user-email,
  .cmdk-label,
  .cmdk-trigger > span {
    display: none;
  }

  .nav-btn {
    padding: 5px 8.5px;
    font-size: 11.5px;
    gap: 4px;
  }

  .sys-status-pill {
    padding: 3px 8px;
    font-size: 10px;
  }

  .cmdk-trigger {
    padding: 0 7px;
    gap: 5px;
  }

  .user-pill {
    gap: 5px;
    padding: 3px 6px;
  }

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

@media (max-width: 1240px) {
  .navbar .sys-status-pill {
    display: none;
  }
}

@media (max-width: 1080px) {
  .console-shell {
    grid-template-columns: 1fr;
  }

  .console-sidebar {
    position: static;
  }

  .console-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .console-nav-btn {
    width: auto;
    flex: 1 1 auto;
  }

  .studio-workspace-grid,
  .hero-arch,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-arch {
    padding: 28px 24px;
    gap: 24px;
  }

  .hero-slash-panel {
    width: 100%;
    height: 46%;
    top: auto;
    bottom: 0;
    clip-path: polygon(0 16%, 100% 0, 100% 100%, 0% 100%);
  }

  .hero-slash-panel::before,
  .hero-slash-panel::after {
    display: none;
  }

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

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

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

  .flow-step-card:nth-child(2) {
    border-right: none;
  }

  .flow-step-card:nth-child(1),
  .flow-step-card:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .kpi-grid,
  .stats-grid,
  .trust-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-item:nth-child(odd) {
    border-left: none;
    padding-left: 2px;
  }

  .studio-mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 14px;
  }

  .hero-arch {
    padding: 22px 18px;
  }

  .console-shell,
  .studio-workspace-grid,
  .kpi-grid,
  .stats-grid,
  .trust-ribbon,
  .hero-card,
  .hero-arch,
  .bento-grid,
  .flow-steps-grid,
  .grid-2,
  .grid-3,
  .gateway-select-grid,
  .studio-mode-tabs {
    grid-template-columns: 1fr;
  }

  .bento-span-2 {
    grid-column: span 1;
  }

  .flow-step-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .flow-step-card:last-child {
    border-bottom: none;
  }

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

  .telemetry-stat:nth-child(odd),
  .telemetry-item:nth-child(odd) {
    border-left: none;
    padding-left: 0;
  }

  .hero-sandbox-links {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    width: 100%;
  }

  .trust-item {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 10px 0 0;
  }

  .trust-item:first-child {
    border-top: none;
    padding-top: 0;
  }

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

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

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  .toolbar-top-row,
  .catalog-filter-row,
  .console-header-bar,
  .chat-input-row,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-filter-row > input.input,
  .catalog-filter-row > select.input {
    width: 100%;
  }

  .chart-bars {
    gap: 6px;
    padding: 12px 2px 4px;
  }

  .chat-bubble {
    max-width: 94%;
  }
}

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

  [data-reveal],
  .blur-reveal {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .ticker-track,
  .marquee-track {
    animation: none !important;
  }
}

/* ========================================================================== */
/* 16. BESPOKE FLAGSHIP #tab-home — SPLIT-COCKPIT HERO, COST SIMULATOR,       */
/*     12-COL BENTO MOSAIC, STUDIO DECK, MODEL SHOWCASE, IDE & HORIZON CTA    */
/* ========================================================================== */

#tab-home {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

@keyframes homePaneFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#tab-home:not(.hidden) {
  animation: homePaneFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#tab-home > :not(.home-parallax-stage) {
  position: relative;
  z-index: 2;
}

/* -------------------------------------------------------------------------- */
/* 16.0 Global Full-Bleed 5-Layer Spatial Parallax Stage (All Pages)          */
/* -------------------------------------------------------------------------- */

main.main-content {
  position: relative;
  z-index: 2;
}

.tab-section {
  position: relative;
  z-index: 2;
}

.tab-section:not(.hidden) {
  animation: homePaneFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-parallax-stage,
.global-parallax-stage,
#tab-home:not(.hidden) > .home-parallax-stage,
#tab-home:not(.hidden) .home-parallax-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  contain: layout paint style;
}

.hp-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Plane 1: Volumetric Aurora Nebulae & Breathing Optical Light Rays */
.hp-layer-aurora {
  inset: -180px -140px -620px -140px;
  z-index: 1;
  will-change: transform;
  transform: translate3d(var(--hp-aurora-x, 0px), var(--hp-aurora-y, 0px), 0);
}

.hp-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hp-orb-1 {
  top: 2%;
  left: 5%;
  width: 860px;
  height: 680px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-rgb), 0.22) 0%,
    rgba(var(--accent-rgb), 0.085) 46%,
    transparent 74%
  );
  filter: blur(68px);
}

.hp-orb-2 {
  top: 26%;
  right: -4%;
  width: 780px;
  height: 640px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.17) 0%,
    rgba(var(--accent-rgb), 0.065) 48%,
    transparent 74%
  );
  filter: blur(72px);
}

.hp-orb-3 {
  bottom: 4%;
  left: 10%;
  width: 820px;
  height: 620px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(var(--accent-rgb), 0.075) 48%,
    transparent 75%
  );
  filter: blur(76px);
}

[data-theme="light"] .hp-orb-1 {
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-rgb), 0.14) 0%,
    rgba(var(--accent-rgb), 0.05) 46%,
    transparent 74%
  );
}

[data-theme="light"] .hp-orb-2 {
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.11) 0%,
    rgba(var(--accent-rgb), 0.04) 48%,
    transparent 74%
  );
}

[data-theme="light"] .hp-orb-3 {
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(99, 102, 241, 0.10) 0%,
    rgba(var(--accent-rgb), 0.045) 48%,
    transparent 75%
  );
}

@keyframes hpBeamPulse {
  0%,
  100% {
    opacity: 0.68;
    transform: rotate(var(--beam-angle, -28deg)) scaleX(0.94) translateY(0px);
  }
  50% {
    opacity: 1;
    transform: rotate(var(--beam-angle, -28deg)) scaleX(1.12) translateY(20px);
  }
}

.hp-beam {
  position: absolute;
  pointer-events: none;
  transform-origin: 50% 0%;
  filter: blur(26px);
  will-change: transform, opacity;
}

.hp-beam-1 {
  --beam-angle: -28deg;
  top: -8%;
  left: 14%;
  width: 340px;
  height: 145vh;
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.15) 0%,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.055) 54%,
    transparent 94%
  );
  animation: hpBeamPulse 9.6s ease-in-out infinite;
}

.hp-beam-2 {
  --beam-angle: 24deg;
  top: -6%;
  right: 15%;
  width: 310px;
  height: 140vh;
  background: linear-gradient(
    180deg,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.13) 0%,
    rgba(99, 102, 241, 0.05) 52%,
    transparent 94%
  );
  animation: hpBeamPulse 11.8s ease-in-out -4.4s infinite;
}

[data-theme="light"] .hp-beam-1 {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.095) 0%,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.038) 54%,
    transparent 94%
  );
}

[data-theme="light"] .hp-beam-2 {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-mid-rgb, 251, 146, 60), 0.085) 0%,
    rgba(99, 102, 241, 0.035) 52%,
    transparent 94%
  );
}

/* Plane 2: SeamlessModulo-Scrolling Architectural Blueprint & Sub-Grid */
.hp-layer-grid {
  inset: -180px;
  z-index: 2;
  background-image:
    linear-gradient(to right, rgba(var(--accent-rgb), 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--accent-rgb), 0.085) 1px, transparent 1px),
    radial-gradient(circle, rgba(148, 163, 184, 0.16) 1px, transparent 1.25px);
  background-size: 64px 64px, 64px 64px, 16px 16px;
  mask-image: radial-gradient(
    ellipse 90% 82% at 50% 50%,
    rgba(0, 0, 0, 0.94) 22%,
    rgba(0, 0, 0, 0.50) 70%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 90% 82% at 50% 50%,
    rgba(0, 0, 0, 0.94) 22%,
    rgba(0, 0, 0, 0.50) 70%,
    transparent 100%
  );
  will-change: transform;
  transform: translate3d(var(--hp-grid-x, 0px), var(--hp-grid-y, 0px), 0);
}

[data-theme="light"] .hp-layer-grid {
  background-image:
    linear-gradient(to right, rgba(var(--accent-rgb), 0.095) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--accent-rgb), 0.095) 1px, transparent 1px),
    radial-gradient(circle, rgba(15, 23, 42, 0.12) 1px, transparent 1.25px);
}

/* Plane 3: Orbital Telemetry Rings & Diagonal Architectural Guide Vectors */
.hp-layer-rings {
  top: -90px;
  left: -60px;
  right: -60px;
  bottom: auto;
  width: calc(100% + 120px);
  height: calc(100vh + 840px);
  z-index: 3;
  opacity: 0.55;
  color: rgba(var(--accent-rgb), 0.62);
  will-change: transform;
  transform: translate3d(var(--hp-rings-x, 0px), var(--hp-rings-y, 0px), 0);
}

[data-theme="light"] .hp-layer-rings {
  opacity: 0.40;
  color: rgba(var(--accent-rgb), 0.54);
}

/* Plane 4: 60fps Constellation, Scroll-Warp Streaks & 3D Wireframe Beacons Canvas */
#homeParallaxCanvas.hp-layer-canvas,
.hp-layer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 4;
  pointer-events: none;
}

/* Plane 5: Soft Optical Edge Vignette for Razor-Sharp Card & Copy Contrast */
.hp-layer-vignette {
  inset: 0;
  z-index: 5;
  background:
    radial-gradient(
      ellipse 88% 82% at 50% 46%,
      transparent 50%,
      rgba(5, 7, 10, 0.54) 86%,
      rgba(5, 7, 10, 0.84) 100%
    ),
    linear-gradient(
      180deg,
      rgba(7, 8, 10, 0.38) 0%,
      transparent 13%,
      transparent 87%,
      rgba(7, 8, 10, 0.58) 100%
    );
}

[data-theme="light"] .hp-layer-vignette {
  background:
    radial-gradient(
      ellipse 90% 84% at 50% 46%,
      transparent 54%,
      rgba(246, 247, 248, 0.52) 86%,
      rgba(246, 247, 248, 0.84) 100%
    ),
    linear-gradient(
      180deg,
      rgba(246, 247, 248, 0.36) 0%,
      transparent 13%,
      transparent 87%,
      rgba(246, 247, 248, 0.58) 100%
    );
}

/* Translucent Frosted Architectural Glass Cards on #tab-home */
#tab-home .hero-cockpit-grid {
  background:
    radial-gradient(110% 90% at 80% 15%, rgba(var(--accent-rgb), 0.12), transparent 55%),
    radial-gradient(80% 80% at 10% 90%, rgba(56, 189, 248, 0.07), transparent 55%),
    rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border-color: rgba(255, 255, 255, 0.095);
}

#tab-home .metric-tile,
#tab-home .hero-metric-tile,
#tab-home .savings-sim-card,
#tab-home .bento-tile,
#tab-home .studio-deck-shell,
#tab-home .home-model-card,
#tab-home .home-mcard,
#tab-home .ide-tool-card:not(.active),
#tab-home .ide-steps-box,
#tab-home .faq-item,
#tab-catalog .toolbar-card,
#tab-catalog .table-card,
#tab-catalog .model-card-item,
#tab-calculator .card,
#tab-playground .studio-topbar-card,
#tab-playground .studio-sidebar,
#tab-playground .studio-pane > .card,
#tab-docs .docs-sidebar,
#tab-docs .docs-article-pane,
#tab-docs .docs-toc-shortcuts,
#tab-dashboard .console-sidebar,
#tab-dashboard .kpi-card,
#tab-dashboard .console-main .card,
#tab-admin .console-sidebar,
#tab-admin .kpi-card,
#tab-admin .console-main .card {
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border-color: rgba(255, 255, 255, 0.09);
}

#tab-docs .docs-hero-banner {
  background:
    radial-gradient(105% 95% at 86% 12%, rgba(var(--accent-rgb), 0.13), transparent 56%),
    radial-gradient(80% 85% at 8% 94%, rgba(56, 189, 248, 0.075), transparent 58%),
    rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
}

#tab-home .horizon-launch-deck {
  background: radial-gradient(
    ellipse 65% 55% at 50% 0%,
    rgba(var(--accent-rgb), 0.17),
    rgba(12, 16, 24, 0.78) 70%
  );
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
}

[data-theme="light"] #tab-home .hero-cockpit-grid {
  background:
    radial-gradient(110% 90% at 80% 15%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    radial-gradient(80% 80% at 10% 90%, rgba(56, 189, 248, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-color: rgba(15, 23, 42, 0.095);
}

[data-theme="light"] #tab-home .metric-tile,
[data-theme="light"] #tab-home .hero-metric-tile,
[data-theme="light"] #tab-home .savings-sim-card,
[data-theme="light"] #tab-home .bento-tile,
[data-theme="light"] #tab-home .studio-deck-shell,
[data-theme="light"] #tab-home .home-model-card,
[data-theme="light"] #tab-home .home-mcard,
[data-theme="light"] #tab-home .ide-tool-card:not(.active),
[data-theme="light"] #tab-home .ide-steps-box,
[data-theme="light"] #tab-home .faq-item,
[data-theme="light"] #tab-catalog .toolbar-card,
[data-theme="light"] #tab-catalog .table-card,
[data-theme="light"] #tab-catalog .model-card-item,
[data-theme="light"] #tab-calculator .card,
[data-theme="light"] #tab-playground .studio-topbar-card,
[data-theme="light"] #tab-playground .studio-sidebar,
[data-theme="light"] #tab-playground .studio-pane > .card,
[data-theme="light"] #tab-docs .docs-sidebar,
[data-theme="light"] #tab-docs .docs-article-pane,
[data-theme="light"] #tab-docs .docs-toc-shortcuts,
[data-theme="light"] #tab-dashboard .console-sidebar,
[data-theme="light"] #tab-dashboard .kpi-card,
[data-theme="light"] #tab-dashboard .console-main .card,
[data-theme="light"] #tab-admin .console-sidebar,
[data-theme="light"] #tab-admin .kpi-card,
[data-theme="light"] #tab-admin .console-main .card {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-color: rgba(15, 23, 42, 0.09);
}

[data-theme="light"] #tab-docs .docs-hero-banner {
  background:
    radial-gradient(105% 95% at 86% 12%, rgba(var(--accent-rgb), 0.10), transparent 56%),
    radial-gradient(80% 85% at 8% 94%, rgba(56, 189, 248, 0.06), transparent 58%),
    rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

[data-theme="light"] #tab-home .horizon-launch-deck {
  background: radial-gradient(
    ellipse 65% 55% at 50% 0%,
    rgba(var(--accent-rgb), 0.14),
    rgba(255, 255, 255, 0.84) 70%
  );
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

/* Shared Architectural Home Section Primitives */
.home-block {
  position: relative;
  margin-bottom: 52px;
}

.home-eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 4px 10.5px;
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  background: rgba(var(--accent-rgb), 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--primary));
  margin-bottom: 8px;
}

.home-block-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 20px;
}

.home-block-header:not(:has(> h2)):not(:has(> .home-block-title)) {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.home-block-header > div {
  min-width: 0;
}

.home-block-header h2,
.home-block-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(23px, 2.5vw, 32px);
  font-weight: 800;
  line-height: 1.11;
  letter-spacing: -0.036em;
  color: var(--text);
  margin: 0;
}

.home-block-header p,
.home-block-sub {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 680px;
  margin: 6px 0 0;
}

.home-block-header code,
.home-block-sub code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

/* -------------------------------------------------------------------------- */
/* 16.1 Panoramic Split-Cockpit Hero & Live Prompt Omnibar                    */
/* -------------------------------------------------------------------------- */

.hero-cockpit-wrap {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-cockpit-grid {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(110% 90% at 80% 15%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    radial-gradient(80% 80% at 10% 90%, rgba(56, 189, 248, 0.06), transparent 55%),
    var(--bg-card);
  padding: 40px 38px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 34px;
  align-items: center;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.hero-cockpit-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.48), transparent);
  pointer-events: none;
  z-index: 2;
}

.hero-blueprint-bg,
.hero-cockpit-grid > .hero-blueprint-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.55), transparent 75%);
  -webkit-mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.55), transparent 75%);
}

[data-theme="light"] .hero-blueprint-bg,
[data-theme="light"] .hero-cockpit-grid > .hero-blueprint-bg {
  background-image: radial-gradient(rgba(15, 23, 42, 0.15) 1px, transparent 1px);
}

.hero-left-col,
.hero-cockpit-grid > .hero-left-col {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.hero-mesh-badge {
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--primary));
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-monument-title {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(36px, 4.3vw, 58px);
  font-weight: 800;
  line-height: 1.01;
  letter-spacing: -0.042em;
  color: var(--text);
  margin: 0;
}

.hero-kinetic-slot {
  display: inline-block;
  color: var(--primary);
  text-shadow: 0 0 32px rgba(var(--accent-rgb), 0.28);
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

[data-theme="light"] .hero-kinetic-slot {
  color: var(--accent-ink, var(--primary));
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.16);
}

.hero-kinetic-slot.slot-out,
.slot-out {
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(5px);
}

.hero-lead-copy {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0;
}

.hero-lead-copy code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

/* Hero Interactive Prompt Omnibar */
.hero-omnibar {
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="light"] .hero-omnibar {
  background: var(--bg-card);
  box-shadow: 0 12px 30px -8px rgba(11, 14, 20, 0.09);
}

.hero-omnibar:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.14),
    0 16px 40px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .hero-omnibar:focus-within {
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.16),
    0 14px 32px -6px rgba(11, 14, 20, 0.12);
}

.omni-mode-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.omni-mode-btn,
.omni-mode-pill,
.omni-pill {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.omni-mode-btn:hover,
.omni-mode-pill:hover,
.omni-pill:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border);
}

.omni-mode-btn.active,
.omni-mode-pill.active,
.omni-pill.active {
  color: var(--accent-ink, var(--primary));
  background: rgba(var(--accent-rgb), 0.13);
  border-color: rgba(var(--accent-rgb), 0.48);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.14);
}

.omni-input-row {
  display: flex;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
}

.omni-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  padding: 8px 10px;
  outline: none;
}

.omni-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.omni-preset-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  gap: 6px;
}

.omni-chip,
.omni-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.16s var(--ease-out);
}

[data-theme="light"] .omni-chip,
[data-theme="light"] .omni-preset-chip {
  background: var(--bg-2);
}

.omni-chip:hover,
.omni-preset-chip:hover {
  color: var(--accent-ink, var(--primary));
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.09);
  transform: translateY(-1px);
}

.hero-sub-actions,
.hero-quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Right Column: Quantum Prism Packet Router Stage (Always Sleek #070a10 Dark) */
.reactor-stage-card,
[data-theme="light"] .reactor-stage-card,
.hero-cockpit-grid > .reactor-stage-card {
  position: relative;
  z-index: 3;
  border-radius: 18px;
  background: #070a10;
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
  min-width: 0;
  isolation: isolate;
}

[data-theme="light"] .reactor-stage-card {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 24px 56px -10px rgba(11, 14, 20, 0.36);
}

.reactor-stage-card h1,
.reactor-stage-card h2,
.reactor-stage-card h3,
.reactor-stage-card h4 {
  color: #f8fafc;
}

.reactor-hud-top,
.reactor-stage-card > .reactor-hud-top {
  position: relative;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 14, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 4;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.reactor-hud-pill,
.reactor-burst-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.13);
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.reactor-burst-btn:hover {
  background: var(--primary);
  color: var(--btn-primary-fg);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45);
}

#gudangQuantumRouterCanvas,
#ray88QuantumRouterCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
  display: block;
}

.reactor-live-receipt,
.reactor-stage-card > .reactor-live-receipt {
  position: relative;
  z-index: 4;
  margin: 12px;
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(9, 13, 21, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

#heroLiveSettlementFeed {
  flex: 1;
  min-width: 0;
}

/* 4-Tile Hero Metrics Bento Strip */
.hero-metrics-bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-tile,
.hero-metric-tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.metric-tile:hover,
.hero-metric-tile:hover {
  border-color: rgba(var(--accent-rgb), 0.40);
  transform: translateY(-1.5px);
}

.metric-tile-val {
  font-family: 'Inter Tight', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-tile-lbl,
.metric-tile-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.metric-tile-sub,
.metric-tile-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-ink, var(--primary));
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------- */
/* 16.2 Section A — Interactive Monthly Cost & Savings Simulator              */
/* -------------------------------------------------------------------------- */

.savings-sim-section {
  margin-bottom: 52px;
}

.savings-sim-card {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  padding: 28px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  align-items: center;
}

.savings-sim-card > div {
  min-width: 0;
}

.workload-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.workload-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}

.workload-pill:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-elevated);
}

.workload-pill.active {
  color: var(--accent-ink, var(--primary));
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.50);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.15);
}

#savingsVolumeSlider {
  accent-color: var(--primary);
  width: 100%;
  height: 6px;
  cursor: pointer;
  margin: 10px 0 6px;
}

.sim-slider-row,
.sim-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-2);
}

.comp-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.comp-bar-row,
.comp-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comp-bar-meta,
.comp-bar-head,
.comp-bar-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.comp-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--border);
}

.comp-bar-fill {
  height: 100%;
  min-width: 6px;
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.comp-bar-fill.muted-red {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.50), rgba(244, 63, 94, 0.86));
}

.comp-bar-fill.muted-amber {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.50), rgba(245, 158, 11, 0.88));
}

.comp-bar-fill.accent-win {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.72), var(--primary));
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.42);
}

.savings-callout-box {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(var(--accent-rgb), 0.09);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] #savingsTotalUsd {
  color: var(--accent-ink, var(--primary)) !important;
}

.savings-callout-box strong {
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}

/* -------------------------------------------------------------------------- */
/* 16.3 Section B — 12-Column Asymmetric Bento Mosaic                         */
/* -------------------------------------------------------------------------- */

.bento-mosaic-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.bento-col-7 {
  grid-column: span 7;
}

.bento-col-5 {
  grid-column: span 5;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-12 {
  grid-column: span 12;
}

.bento-tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.bento-tile:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-2px);
}

.bento-tile h3,
.bento-tile-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.028em;
  color: var(--text);
  margin: 0;
}

.bento-tile p,
.bento-tile-desc {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--text-muted);
  margin: 0;
}

.bento-tile :not(pre) > code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

/* Bento 1: Recessed #080b11 Interactive 2-Phase Ledger Box */
.ledger-sim-box,
[data-theme="light"] .ledger-sim-box {
  background: #080b11;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 13px;
  padding: 14px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.58);
}

[data-theme="light"] .ledger-sim-box {
  border-color: rgba(15, 23, 42, 0.22);
}

.ledger-sim-box :not(pre) > code {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--primary);
}

.ledger-steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.ledger-step-pill {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.18s ease;
}

.ledger-step-pill:hover {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(30, 41, 59, 0.78);
}

.ledger-step-pill.active {
  color: var(--primary);
  background: rgba(var(--accent-rgb), 0.16);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.28);
  font-weight: 700;
}

.ledger-live-readout {
  padding: 11px 13px;
  border-radius: 9px;
  background: rgba(4, 6, 10, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Bento 2: Encrypted Media Vault URL Transformation Box */
.vault-url-box,
[data-theme="light"] .vault-url-box {
  background: #080b11;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 13px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #cbd5e1;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .vault-url-box {
  border-color: rgba(15, 23, 42, 0.22);
}

.vault-raw {
  display: block;
  padding: 7.5px 10px;
  border-radius: 8px;
  background: rgba(244, 63, 94, 0.09);
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #fda4af;
  text-decoration: line-through;
  opacity: 0.84;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-enc {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 220, 130, 0.11);
  border: 1px solid rgba(0, 220, 130, 0.38);
  color: #00dc82;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(0, 220, 130, 0.16);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* 16.4 Section C — Split-Screen Multimodal Studio Deck                       */
/* -------------------------------------------------------------------------- */

.studio-deck-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  align-items: stretch;
}

.studio-deck-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.studio-deck-tab {
  padding: 14px 16px;
  border-radius: 13px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: all 0.18s;
}

.studio-deck-tab:has(> svg:first-child:not(:only-child)) {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.studio-deck-tab:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}

.studio-deck-tab.active {
  background: var(--bg-2);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.studio-deck-stage,
[data-theme="light"] .studio-deck-stage {
  background: #070a10;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  padding: 24px;
  min-height: 340px;
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.42);
}

[data-theme="light"] .studio-deck-stage {
  border-color: rgba(15, 23, 42, 0.22);
}

.studio-deck-stage h1,
.studio-deck-stage h2,
.studio-deck-stage h3,
.studio-deck-stage h4 {
  color: #f8fafc;
}

.studio-deck-stage .text-muted {
  color: #94a3b8;
}

.studio-deck-stage .code-output {
  background: rgba(4, 6, 11, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  color: #cbd5e1;
  overflow-x: auto;
}

.studio-deck-stage .btn-outline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
}

.studio-deck-stage .btn-outline:hover:not(:disabled) {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.50);
  color: #ffffff;
}

.studio-deck-stage :not(pre) > code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--primary);
}

/* Animated CSS Equalizer Bars for Music & Neural Voice Studio Preview */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 38px;
  padding: 4px 0;
}

.eq-bar {
  width: 4.5px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), rgba(var(--accent-rgb), 0.35));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
  transform-origin: bottom;
  animation: eqBounce 1.05s ease-in-out infinite alternate;
}

.eq-bar:nth-child(2n) {
  animation-duration: 0.76s;
  animation-delay: -0.24s;
}

.eq-bar:nth-child(3n) {
  animation-duration: 1.22s;
  animation-delay: -0.52s;
}

.eq-bar:nth-child(4n) {
  animation-duration: 0.88s;
  animation-delay: -0.38s;
}

.eq-bar:nth-child(5n) {
  animation-duration: 0.66s;
  animation-delay: -0.14s;
}

@keyframes eqBounce {
  0% {
    transform: scaleY(0.22);
    opacity: 0.65;
  }
  50% {
    transform: scaleY(0.96);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.40);
    opacity: 0.82;
  }
}

/* -------------------------------------------------------------------------- */
/* 16.5 Section D — Category-Tabbed Live Model Showcase                       */
/* -------------------------------------------------------------------------- */

.home-cat-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.home-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}

.home-cat-tab:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-elevated);
}

.home-cat-tab.active {
  color: var(--btn-primary-fg);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.28);
}

.home-models-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.home-mcard,
.home-model-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease-out), border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.home-mcard:hover,
.home-model-card:hover {
  transform: translateY(-2.5px);
  border-color: rgba(var(--accent-rgb), 0.48);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(var(--accent-rgb), 0.15);
}

.home-mcard-top,
.mcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-mcard-emblem,
.mcard-emblem {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-ink, var(--primary));
}

.home-mcard h3,
.home-mcard h4,
.home-mcard-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.022em;
  color: var(--text);
  margin: 0;
}

.home-mcard-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 3.5px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}

.home-mcard-id:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent-ink, var(--primary));
  background: rgba(var(--accent-rgb), 0.10);
}

.home-mcard-rates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.home-mcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* -------------------------------------------------------------------------- */
/* 16.6 Section E — Split IDE & Coding Agent Workbench                        */
/* -------------------------------------------------------------------------- */

.ide-workbench-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
  align-items: stretch;
}

.ide-workbench-grid > div {
  min-width: 0;
}

.ide-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ide-tool-card {
  padding: 14px 15px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: all 0.18s var(--ease-out);
}

.ide-tool-card:has(> svg:first-child:not(:only-child)) {
  flex-direction: row;
  align-items: center;
  gap: 11px;
}

.ide-tool-card > svg {
  color: var(--accent-ink, var(--primary));
  flex-shrink: 0;
}

.ide-tool-card:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
  transform: translateY(-1.5px);
}

.ide-tool-card.active {
  border-color: var(--primary);
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.30),
    0 10px 26px -6px rgba(var(--accent-rgb), 0.22);
}

.ide-steps-box {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.ide-step-row,
.ide-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.ide-step-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.13);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ide-workbench-grid .code-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}

.ide-workbench-grid .code-box pre {
  flex: 1;
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #e2e8f0;
}

/* -------------------------------------------------------------------------- */
/* 16.7 Section F — Editorial 2-Column FAQ & Horizon Beam Launch Deck         */
/* -------------------------------------------------------------------------- */

.faq-editorial-grid {
  display: grid;
  grid-template-columns: 0.38fr 0.62fr;
  gap: 28px;
  align-items: start;
}

.faq-sticky-side {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-sticky-side h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0;
}

.faq-sticky-side p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.faq-item.open {
  border-color: rgba(var(--accent-rgb), 0.50);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .faq-item.open {
  box-shadow:
    0 10px 28px -6px rgba(11, 14, 20, 0.10),
    0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.faq-trigger,
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.16s ease;
}

.faq-trigger:hover,
.faq-question:hover {
  color: var(--accent-ink, var(--primary));
}

.faq-qnum,
.faq-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink, var(--primary));
  margin-right: 10px;
  flex-shrink: 0;
}

.faq-chevron {
  transition: transform 0.22s ease, color 0.18s ease;
  flex-shrink: 0;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-body {
  display: none;
  padding: 0 20px 18px 20px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.faq-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

.faq-item.open .faq-body {
  display: block;
  animation: faqReveal 0.2s var(--ease-out);
}

@keyframes faqReveal {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Horizon Beam Launch Deck */
.horizon-launch-deck {
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -18px 55px -12px rgba(var(--accent-rgb), 0.32);
  border-radius: 24px;
  padding: 48px 28px;
  text-align: center;
  background: radial-gradient(
    ellipse 65% 55% at 50% 0%,
    rgba(var(--accent-rgb), 0.15),
    var(--bg-card) 70%
  );
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  isolation: isolate;
}

.horizon-launch-deck::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  pointer-events: none;
}

.horizon-beam-glow,
.horizon-launch-deck > .horizon-beam-glow {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 84%);
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.28), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.horizon-launch-deck h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.036em;
  color: var(--text);
  margin: 10px 0;
}

.horizon-launch-deck p {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.horizon-actions,
.horizon-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* -------------------------------------------------------------------------- */
/* 16.8 Flagship Home Responsive Breakpoints & Reduced Motion                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 1140px) {
  .hero-cockpit-grid {
    grid-template-columns: 1fr;
    padding: 30px 24px;
    gap: 26px;
  }

  .reactor-stage-card,
  [data-theme="light"] .reactor-stage-card,
  .hero-cockpit-grid > .reactor-stage-card {
    min-height: 390px;
  }

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

  .savings-sim-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px;
  }

  .bento-col-7,
  .bento-col-5,
  .bento-col-4 {
    grid-column: span 6;
  }

  .studio-deck-shell {
    grid-template-columns: 1fr;
  }

  .studio-deck-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .studio-deck-tab {
    flex: 1 1 180px;
  }

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

  .ide-workbench-grid {
    grid-template-columns: 1fr;
  }

  .faq-editorial-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .faq-sticky-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .home-block,
  .savings-sim-section {
    margin-bottom: 38px;
  }

  .hero-cockpit-grid {
    padding: 22px 16px;
    gap: 20px;
    border-radius: 18px;
  }

  .hero-monument-title {
    font-size: clamp(30px, 8.5vw, 40px);
  }

  .omni-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .omni-input-row .btn {
    width: 100%;
  }

  .reactor-stage-card,
  [data-theme="light"] .reactor-stage-card,
  .hero-cockpit-grid > .reactor-stage-card {
    min-height: 340px;
  }

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

  .savings-sim-card {
    padding: 18px 16px;
  }

  .bento-col-7,
  .bento-col-5,
  .bento-col-4,
  .bento-col-6,
  .bento-col-8 {
    grid-column: span 12;
  }

  .bento-tile {
    padding: 18px;
  }

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

  .studio-deck-shell {
    padding: 14px;
  }

  .studio-deck-tab {
    flex: 1 1 100%;
  }

  .studio-deck-stage,
  [data-theme="light"] .studio-deck-stage {
    padding: 18px;
    min-height: 290px;
  }

  .home-models-grid,
  .ide-tools-grid {
    grid-template-columns: 1fr;
  }

  .faq-trigger,
  .faq-question {
    padding: 14px 16px;
    font-size: 13.5px;
  }

  .faq-body {
    padding: 0 16px 16px;
  }

  .horizon-launch-deck {
    padding: 36px 18px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eq-bar {
    animation: none !important;
    transform: scaleY(0.62) !important;
  }
}


/* ========================================================================== */
/* 17. SPATIAL PARALLAX LAYERS & 3-COLUMN DOCUMENTATION HUB (/docs)           */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 17.1 Scroll Progress Laser Bar & Multi-Plane GPU Parallax Compositing      */
/* -------------------------------------------------------------------------- */

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 1200;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--accent-mid, #fb923c), var(--primary));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.58);
  pointer-events: none;
  will-change: transform;
}

.navbar > .scroll-progress-bar {
  position: absolute;
  top: auto;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 1200;
}

/* Deep-plane blueprint mesh drift inside #tab-home hero */
.hero-blueprint-bg,
.hero-cockpit-grid > .hero-blueprint-bg {
  inset: -44px;
  will-change: transform;
  transform: translate3d(var(--px-bg, 0px), var(--py-bg, 0px), 0);
}

/* Tactile 3D floating cockpit & asymmetric Bento depth planes on #tab-home (>= 960px desktop) */
@media (min-width: 960px) {
  #quantumReactorCard {
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * 12px),
      calc(var(--hero-scroll-shift, 0px) * 0.75 + var(--pointer-ny, 0) * 9px),
      0
    );
  }

  .hero-left-col,
  .hero-cockpit-grid > .hero-left-col {
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * -5px),
      calc(var(--hero-scroll-shift, 0px) * -0.35 + var(--pointer-ny, 0) * -4px),
      0
    );
  }

  #tab-home .bento-mosaic-12 {
    column-gap: 16px;
    row-gap: 22px;
  }

  #tab-home .bento-mosaic-12 > .bento-col-7 {
    --bento-hover-lift: 0px;
    --bento-px: -3.5px;
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * var(--bento-px, 0px)),
      calc(var(--parallax-y, 0px) + var(--bento-hover-lift, 0px)),
      0
    );
  }

  #tab-home .bento-mosaic-12 > .bento-col-5 {
    --bento-hover-lift: 0px;
    --bento-px: 4.5px;
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * var(--bento-px, 0px)),
      calc(var(--parallax-y, 0px) + var(--bento-hover-lift, 0px)),
      0
    );
  }

  #tab-home .bento-mosaic-12 > .bento-col-4:nth-child(3) {
    --bento-hover-lift: 0px;
    --bento-px: -4px;
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * var(--bento-px, 0px)),
      calc(var(--parallax-y, 0px) + var(--bento-hover-lift, 0px)),
      0
    );
  }

  #tab-home .bento-mosaic-12 > .bento-col-4:nth-child(4) {
    --bento-hover-lift: 0px;
    --bento-px: 1.5px;
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * var(--bento-px, 0px)),
      calc(var(--parallax-y, 0px) + var(--bento-hover-lift, 0px)),
      0
    );
  }

  #tab-home .bento-mosaic-12 > .bento-col-4:nth-child(5) {
    --bento-hover-lift: 0px;
    --bento-px: 4px;
    will-change: transform;
    transform: translate3d(
      calc(var(--pointer-nx, 0) * var(--bento-px, 0px)),
      calc(var(--parallax-y, 0px) + var(--bento-hover-lift, 0px)),
      0
    );
  }

  #tab-home .bento-mosaic-12 > .bento-tile:hover {
    --bento-hover-lift: -3px;
  }
}

.hero-metrics-bento .metric-tile,
.hero-metrics-bento .hero-metric-tile {
  --hover-lift: 0px;
  will-change: transform;
  transform: translate3d(
    calc(var(--pointer-nx, 0) * (var(--tile-depth, 0) - 1.5) * 1.6px),
    calc(var(--parallax-y, 0px) + var(--hero-scroll-shift, 0px) * var(--tile-depth, 0) * -0.11 + var(--hover-lift, 0px)),
    0
  );
}

.hero-metrics-bento .metric-tile:hover,
.hero-metrics-bento .hero-metric-tile:hover {
  --hover-lift: -2.5px;
}

/* Below-the-fold & stage depth planes (CLS = 0, reveal-safe) */
.horizon-beam-glow,
.horizon-launch-deck > .horizon-beam-glow {
  will-change: transform;
  transform: translate3d(-50%, var(--parallax-y, 0px), 0);
}

.studio-deck-stage,
.reactor-stage-card:not(#quantumReactorCard),
.docs-hero-grid-bg {
  will-change: transform;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
}

[data-parallax]:not([data-reveal]):not(.hero-blueprint-bg):not(#quantumReactorCard),
[data-parallax][data-reveal].is-visible:not(.hero-blueprint-bg):not(#quantumReactorCard) {
  will-change: transform;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
}

[data-parallax][data-reveal-done="1"] {
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------------------------------------------------------------------------- */
/* 17.2 Documentation Hero Banner & Protocol Endpoint Strip                   */
/* -------------------------------------------------------------------------- */

#tab-docs {
  position: relative;
}

.docs-hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(105% 95% at 86% 12%, rgba(var(--accent-rgb), 0.11), transparent 56%),
    radial-gradient(80% 85% at 8% 94%, rgba(56, 189, 248, 0.065), transparent 58%),
    var(--bg-card);
  padding: 28px 30px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.docs-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    560px circle at var(--mouse-x, 50%) var(--mouse-y, 20%),
    rgba(var(--accent-rgb), 0.075),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.docs-hero-banner:hover::before {
  opacity: 1;
}

.docs-hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.52), transparent);
  pointer-events: none;
  z-index: 2;
}

.docs-hero-grid-bg {
  position: absolute;
  inset: -32px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 20px 20px;
  mask-image: linear-gradient(125deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.26) 58%, transparent 88%);
  -webkit-mask-image: linear-gradient(125deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.26) 58%, transparent 88%);
}

[data-theme="light"] .docs-hero-grid-bg {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    radial-gradient(rgba(15, 23, 42, 0.14) 1px, transparent 1px);
}

.docs-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.docs-hero-top > div {
  min-width: 0;
}

.docs-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10.5px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.09);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink, var(--primary));
  margin-bottom: 8px;
}

.docs-hero-banner h1,
.docs-hero-banner h2,
.docs-hero-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.036em;
  color: var(--text);
  margin: 0 0 6px;
}

.docs-hero-sub,
.docs-hero-desc,
.docs-hero-top p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0;
}

.docs-hero-sub code,
.docs-hero-desc code,
.docs-hero-top p code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

.docs-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

/* 4-Protocol Endpoint Strip (OpenAI /v1, Anthropic Root, MCP /mcp, Public MCP /mcp/public) */
.docs-base-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.docs-proto-pill {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    background-color 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}

[data-theme="light"] .docs-proto-pill {
  background: var(--bg-subtle);
}

.docs-proto-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    240px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--accent-rgb), 0.12),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.docs-proto-pill:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
  transform: translateY(-1.5px);
}

.docs-proto-pill:hover::before {
  opacity: 1;
}

.docs-proto-pill.active {
  border-color: rgba(var(--accent-rgb), 0.62);
  background: rgba(var(--accent-rgb), 0.10);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.22),
    0 10px 24px -8px rgba(var(--accent-rgb), 0.24);
}

.docs-proto-head,
.docs-proto-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.docs-proto-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-proto-pill.active .docs-proto-label {
  color: var(--accent-ink, var(--primary));
}

.docs-proto-url-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.docs-proto-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.docs-proto-copy,
.docs-proto-pill svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.docs-proto-pill:hover .docs-proto-copy,
.docs-proto-pill:hover svg,
.docs-proto-pill.active .docs-proto-copy,
.docs-proto-pill.active svg {
  color: var(--accent-ink, var(--primary));
}

/* -------------------------------------------------------------------------- */
/* 17.3 3-Column Documentation Portal Shell                                   */
/* -------------------------------------------------------------------------- */

.docs-portal-shell {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr) 216px;
  gap: 24px;
  align-items: start;
  position: relative;
}

/* -------------------------------------------------------------------------- */
/* 17.4 Left Sticky Docs Sidebar, Search Filter & Topic Navigation            */
/* -------------------------------------------------------------------------- */

.docs-sidebar {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 98px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}

.docs-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out);
}

.docs-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
  color: var(--accent-ink, var(--primary));
}

.docs-search-box input,
#docsSearchInput {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  height: auto;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

#docsSearchInput::placeholder {
  color: var(--text-muted);
}

.docs-nav-groups,
.docs-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.docs-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.docs-nav-group + .docs-nav-group {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.docs-nav-group-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 10px 5px;
  user-select: none;
}

.docs-nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 8px 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 12.75px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s var(--ease-out),
    color 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out);
}

.docs-nav-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 99px;
  background: var(--primary);
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.docs-nav-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s var(--ease-out);
}

.docs-nav-item-label,
.docs-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.docs-nav-item:hover svg {
  color: var(--text);
}

.docs-nav-item.active {
  background: rgba(var(--accent-rgb), 0.11);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--text);
  font-weight: 600;
}

.docs-nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55);
}

.docs-nav-item.active svg {
  color: var(--accent-ink, var(--primary));
}

.docs-nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6.5px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
}

.docs-nav-item.active .docs-nav-badge,
.docs-nav-badge.badge-accent,
.docs-nav-badge.badge-new,
.docs-nav-badge.badge-live {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: var(--accent-ink, var(--primary));
}

/* -------------------------------------------------------------------------- */
/* 17.5 Center Rich Article Reader & Editorial Prose                          */
/* -------------------------------------------------------------------------- */

.docs-article-pane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.docs-article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.docs-breadcrumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
}

.docs-breadcrumbs strong,
.docs-breadcrumbs .crumb-current,
.docs-breadcrumbs span:last-child {
  color: var(--accent-ink, var(--primary));
  font-weight: 600;
}

.docs-meta-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.docs-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.docs-copy-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6.5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.docs-copy-ai-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.50);
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--accent-ink, var(--primary));
}

/* Rich Article Typography (.docs-prose) */
.docs-prose {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.72;
  min-width: 0;
}

.docs-prose h1,
.docs-article-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.036em;
  color: var(--text);
  margin: 0 0 12px;
}

.docs-prose .docs-lead,
.docs-article-lead {
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--text-muted);
  margin: 0 0 22px;
  max-width: 74ch;
}

.docs-prose h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(20px, 2.1vw, 23.5px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.028em;
  color: var(--text);
  margin: 34px 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 92px;
}

.docs-prose > h2:first-child {
  margin-top: 0;
}

.docs-prose h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 24px 0 10px;
  scroll-margin-top: 92px;
}

.docs-prose h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px;
  scroll-margin-top: 92px;
}

.docs-prose p {
  margin: 0 0 14px;
  color: var(--text-2);
}

.docs-prose strong,
.docs-prose b {
  color: var(--text);
  font-weight: 600;
}

.docs-prose ul,
.docs-prose ol {
  margin: 0 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-prose li {
  line-height: 1.68;
  color: var(--text-2);
}

.docs-prose :not(pre) > code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 12.25px;
  font-weight: 500;
  padding: 2px 6.5px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
  word-break: break-word;
}

.docs-prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* -------------------------------------------------------------------------- */
/* 17.6 Beginner-Friendly Visual Components (Callouts, Steps, Cards, Code)    */
/* -------------------------------------------------------------------------- */

/* Callout Boxes (.docs-callout + tip / info / warn / guard variants) */
.docs-callout {
  --callout-accent: var(--primary);
  --callout-bg: rgba(var(--accent-rgb), 0.075);
  --callout-border: rgba(var(--accent-rgb), 0.26);
  --callout-title: var(--accent-ink, var(--primary));
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--callout-border);
  border-left: 3.5px solid var(--callout-accent);
  background: var(--callout-bg);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.62;
}

.docs-callout:has(> svg:first-child),
.docs-callout:has(> .docs-callout-icon:first-child) {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.docs-callout > svg,
.docs-callout-icon {
  color: var(--callout-title);
  flex-shrink: 0;
  margin-top: 2px;
}

.docs-callout-head,
.docs-callout-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--callout-title);
  margin-bottom: 2px;
}

.docs-callout-body,
.docs-callout p:last-child {
  margin-bottom: 0;
  color: var(--text-2);
}

/* Tip Variant — Emerald */
.docs-callout-tip {
  --callout-accent: #10b981;
  --callout-bg: rgba(16, 185, 129, 0.08);
  --callout-border: rgba(16, 185, 129, 0.28);
  --callout-title: #34d399;
}

[data-theme="light"] .docs-callout-tip {
  --callout-bg: rgba(5, 150, 105, 0.07);
  --callout-border: rgba(5, 150, 105, 0.26);
  --callout-title: #047857;
}

/* Info Variant — Cyan / Cobalt */
.docs-callout-info {
  --callout-accent: #06b6d4;
  --callout-bg: rgba(6, 182, 212, 0.08);
  --callout-border: rgba(6, 182, 212, 0.28);
  --callout-title: #38bdf8;
}

[data-theme="light"] .docs-callout-info {
  --callout-bg: rgba(8, 145, 178, 0.07);
  --callout-border: rgba(8, 145, 178, 0.26);
  --callout-title: #0369a1;
}

/* Warn Variant — Amber */
.docs-callout-warn {
  --callout-accent: #f59e0b;
  --callout-bg: rgba(245, 158, 11, 0.085);
  --callout-border: rgba(245, 158, 11, 0.30);
  --callout-title: #fbbf24;
}

[data-theme="light"] .docs-callout-warn {
  --callout-bg: rgba(217, 119, 6, 0.075);
  --callout-border: rgba(217, 119, 6, 0.28);
  --callout-title: #b45309;
}

/* Guard / Security Variant — Violet / Rose */
.docs-callout-guard {
  --callout-accent: #8b5cf6;
  --callout-bg: rgba(139, 92, 246, 0.085);
  --callout-border: rgba(139, 92, 246, 0.30);
  --callout-title: #c084fc;
}

[data-theme="light"] .docs-callout-guard {
  --callout-bg: rgba(124, 58, 237, 0.07);
  --callout-border: rgba(124, 58, 237, 0.26);
  --callout-title: #6d28d9;
}

/* Numbered Step-by-Step Guides (.docs-steps & .docs-step-card) */
.docs-steps {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 18px 0;
  position: relative;
}

.docs-step-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 0;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}

.docs-step-card:not(:has(> .docs-step-num)) {
  flex-direction: column;
  gap: 8px;
}

[data-theme="light"] .docs-step-card {
  background: var(--bg-subtle);
}

.docs-step-card:hover {
  border-color: var(--border-light);
}

.docs-step-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.12);
}

.docs-step-body,
.docs-step-content,
.docs-step-card > div {
  flex: 1;
  min-width: 0;
}

.docs-step-title,
.docs-step-card h3,
.docs-step-card h4 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin: 2px 0 6px;
  line-height: 1.3;
}

.docs-step-card p:last-child,
.docs-step-card .docs-code-block:last-child {
  margin-bottom: 0;
}

/* 2- or 3-Column Feature & Concept Spotlight Grid (.docs-quick-grid & .docs-quick-card) */
.docs-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

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

.docs-quick-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.docs-quick-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  min-width: 0;
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

button.docs-quick-card,
a.docs-quick-card,
.docs-quick-card[onclick] {
  cursor: pointer;
}

[data-theme="light"] .docs-quick-card {
  background: var(--bg-subtle);
}

.docs-quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    280px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--accent-rgb), 0.11),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.22s ease;
}

.docs-quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.46);
  box-shadow: var(--shadow-card);
}

.docs-quick-card:hover::before {
  opacity: 1;
}

.docs-quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  color: var(--accent-ink, var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.docs-quick-title,
.docs-quick-card h3,
.docs-quick-card h4 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--text);
  margin: 2px 0 0;
}

.docs-quick-desc,
.docs-quick-card p {
  font-size: 12.75px;
  line-height: 1.56;
  color: var(--text-muted);
  margin: 0;
}

/* Always-Dark #080c14 Terminal Code Block (.docs-code-block) */
.docs-code-block {
  margin: 16px 0;
  border-radius: 13px;
  overflow: hidden;
  background: #080c14;
  border: 1px solid #1e2636;
  color: #e2e8f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 38px -12px rgba(0, 0, 0, 0.52);
}

[data-theme="light"] .docs-code-block {
  background: #080c14;
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 16px 36px -10px rgba(11, 14, 20, 0.22);
}

.docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #0c121e;
  border-bottom: 1px solid #1b2333;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #94a3b8;
}

.docs-code-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.docs-code-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4.5px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.docs-code-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.docs-code-tab.active {
  color: var(--primary);
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.42);
}

.docs-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  margin-left: auto;
  padding: 4.5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.docs-code-copy:hover,
.docs-code-copy.copied {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--primary);
}

.docs-code-block pre,
.docs-code-pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.66;
  color: #e2e8f0;
  background: #080c14;
  tab-size: 2;
}

.docs-code-block pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit;
}

/* Parameter, Tool, Header & Error Tables (.docs-table-wrap & .docs-param-table) */
.docs-table-wrap {
  margin: 18px 0;
  border-radius: 13px;
  border: 1px solid var(--border);
  overflow-x: auto;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.docs-param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.docs-param-table thead th {
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.docs-param-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.58;
}

.docs-param-table tbody td:first-child,
.docs-param-table tbody td:first-child code,
#tab-docs .data-table tbody td:first-child,
#tab-docs .data-table tbody td:first-child code {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.docs-param-table tbody tr:last-child td {
  border-bottom: none;
}

.docs-param-table tbody tr:hover td {
  background: var(--bg-hover);
}

.param-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink, var(--primary));
  white-space: nowrap;
}

.param-req,
.docs-badge-req {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.32);
  color: #fb7185;
  margin-left: 6px;
}

[data-theme="light"] .param-req,
[data-theme="light"] .docs-badge-req {
  color: #be123c;
  background: rgba(225, 29, 72, 0.09);
}

.param-opt,
.docs-badge-opt {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-left: 6px;
}

.param-free,
.docs-badge-free {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.13);
  border: 1px solid rgba(16, 185, 129, 0.34);
  color: var(--emerald-ink);
}

/* Interactive In-Docs API & MCP Live Sandbox (.docs-live-tester) */
.docs-live-tester {
  position: relative;
  overflow: hidden;
  margin: 22px 0;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.065) 0%, var(--bg-2) 100%);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

[data-theme="light"] .docs-live-tester {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.055) 0%, var(--bg-subtle) 100%);
}

.docs-tester-head,
.docs-live-tester-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.docs-tester-controls,
.docs-live-tester-controls,
.docs-tester-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.docs-live-tester select,
.docs-live-tester input[type="text"],
.docs-tester-select,
.docs-tester-input {
  flex: 1 1 220px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-live-tester select:focus,
.docs-live-tester input[type="text"]:focus,
.docs-tester-select:focus,
.docs-tester-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.docs-tester-meta,
.docs-tester-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.docs-tester-output,
.docs-tester-response,
.docs-live-tester pre {
  margin: 0;
  padding: 14px 16px;
  max-height: 320px;
  overflow: auto;
  border-radius: 11px;
  background: #080c14;
  border: 1px solid #1e2636;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
}

.docs-live-tester pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
}

/* Previous / Next Topic Pager (.docs-pager & .docs-pager-card) */
.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.docs-pager-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
  transition: all 0.18s var(--ease-out);
}

[data-theme="light"] .docs-pager-card {
  background: var(--bg-subtle);
}

.docs-pager-card.next,
.docs-pager-card.is-next,
.docs-pager-card[data-dir="next"] {
  align-items: flex-end;
  text-align: right;
}

.docs-pager-card:hover {
  border-color: rgba(var(--accent-rgb), 0.50);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-card);
}

.docs-pager-dir,
.docs-pager-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-pager-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s ease;
}

.docs-pager-card:hover .docs-pager-title {
  color: var(--accent-ink, var(--primary));
}

/* -------------------------------------------------------------------------- */
/* 17.7 Right Sticky "On This Page" TOC Rail                                  */
/* -------------------------------------------------------------------------- */

.docs-toc-rail {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 98px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.docs-toc-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 2px 4px;
}

.docs-toc-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-toc-link {
  display: block;
  width: 100%;
  padding: 6px 10px 6px 13px;
  border: none;
  border-left: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12.25px;
  font-weight: 500;
  line-height: 1.42;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.docs-toc-link.toc-h3,
.docs-toc-link[data-level="3"],
.docs-toc-sub {
  padding-left: 23px;
  font-size: 11.75px;
}

.docs-toc-link:hover {
  color: var(--text);
  border-left-color: var(--border-light);
}

.docs-toc-link.active {
  color: var(--accent-ink, var(--primary));
  border-left-color: var(--primary);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.10), transparent);
}

.docs-toc-shortcuts {
  margin-top: 6px;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.docs-toc-shortcuts button,
.docs-toc-shortcuts a,
.docs-toc-shortcut-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 6.5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 11.75px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
}

.docs-toc-shortcuts button:hover,
.docs-toc-shortcuts a:hover,
.docs-toc-shortcut-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.09);
  color: var(--accent-ink, var(--primary));
}

/* -------------------------------------------------------------------------- */
/* 17.8 Responsive Breakpoints & Reduced-Motion Overrides                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .docs-portal-shell {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 20px;
  }

  .docs-toc-rail {
    display: none;
  }

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

@media (max-width: 920px) {
  #quantumReactorCard,
  .hero-left-col,
  .hero-cockpit-grid > .hero-left-col {
    transform: none;
  }

  .docs-portal-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    padding: 12px;
    gap: 10px;
  }

  .docs-sidebar.collapsed .docs-nav-group,
  .docs-sidebar.collapsed .docs-nav-groups,
  .docs-sidebar.collapsed .docs-sidebar-nav {
    display: none;
  }

  .docs-nav-groups,
  .docs-sidebar-nav {
    gap: 8px;
  }

  .docs-nav-group {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .docs-nav-group::-webkit-scrollbar {
    display: none;
  }

  .docs-nav-group + .docs-nav-group {
    padding-top: 8px;
  }

  .docs-nav-group-title {
    flex-shrink: 0;
    padding: 2px 6px 2px 2px;
    white-space: nowrap;
  }

  .docs-nav-item {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 7px 11px;
    border: 1px solid var(--border);
    background: var(--bg-2);
  }

  .docs-nav-item::before {
    display: none;
  }

  .docs-article-pane {
    padding: 20px 18px;
    border-radius: 15px;
  }

  .docs-hero-banner {
    padding: 22px 18px 18px;
    border-radius: 16px;
  }

  .docs-quick-grid.cols-2,
  .docs-quick-grid.cols-3,
  .docs-pager {
    grid-template-columns: 1fr;
  }

  .docs-pager-card.next,
  .docs-pager-card.is-next,
  .docs-pager-card[data-dir="next"] {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .docs-base-strip {
    grid-template-columns: 1fr;
  }

  .docs-prose h1,
  .docs-article-title {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-layer-aurora,
  .hp-layer-grid,
  .hp-layer-rings,
  .hp-beam,
  .hero-blueprint-bg,
  .hero-cockpit-grid > .hero-blueprint-bg,
  #quantumReactorCard,
  .hero-left-col,
  .hero-cockpit-grid > .hero-left-col,
  .hero-metrics-bento .metric-tile,
  .hero-metrics-bento .hero-metric-tile,
  #tab-home .bento-mosaic-12 > .bento-tile,
  .studio-deck-stage,
  .reactor-stage-card:not(#quantumReactorCard),
  .docs-hero-grid-bg,
  [data-parallax]:not([data-reveal]),
  [data-parallax][data-reveal].is-visible {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
  }

  .horizon-beam-glow,
  .horizon-launch-deck > .horizon-beam-glow {
    transform: translateX(-50%) !important;
    will-change: auto !important;
  }
}

/* ========================================================================== */
/* 18. MULTI-DEVICE ERGONOMICS, TOUCH TARGETS & MOBILE COMFORT (360px–1440px) */
/* ========================================================================== */

/* 18.1 Global Flex/Grid Overflow Safety & Long-Token Wrapping */
.card,
.bento-tile,
.kpi-card,
.stat-card,
.toolbar-card,
.console-main,
.console-sidebar,
.subview-pane,
.studio-main-canvas,
.studio-sidebar,
.studio-topbar-card,
.docs-article-pane,
.docs-sidebar,
.audit-box,
.formula-box,
.ledger-sim-box,
.vault-url-box {
  min-width: 0;
  max-width: 100%;
}

.audit-row {
  flex-wrap: wrap;
}

.audit-row > strong,
.audit-row > code,
#calcResModel,
#pgRecId {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comp-bar-head > span:first-child,
.comp-bar-head > strong:first-child {
  min-width: 0;
}

.comp-bar-head > strong:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.ledger-live-readout {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vault-url-box > div {
  min-width: 0;
  max-width: 100%;
}

audio,
video {
  max-width: 100%;
}

/* Crisp Horizontal Touch Scrolling for Terminal & Code Blocks */
.ide-workbench-grid .code-box pre,
.docs-code-block pre,
.docs-code-pre,
.chat-code-block pre,
#pgOutputPre {
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* 18.2 Coarse Pointer (Touchscreen) Range Slider Ergonomics (22px Thumb) */
@media (pointer: coarse) {
  input[type='range'],
  #savingsVolumeSlider,
  #studioTemperature {
    min-height: 32px;
    cursor: pointer;
  }

  #savingsVolumeSlider::-webkit-slider-thumb,
  #studioTemperature::-webkit-slider-thumb,
  input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.48);
  }

  #savingsVolumeSlider::-moz-range-thumb,
  #studioTemperature::-moz-range-thumb,
  input[type='range']::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.48);
  }
}

/* 18.3 Laptop & Compact Desktop Calibration (1024px–1280px) */
@media (max-width: 1280px) {
  .container {
    padding: 0 18px;
  }

  .nav-inner {
    padding: 6px 14px;
    gap: 8px;
  }

  .nav-btn {
    padding: 5px 8px;
    font-size: 11.5px;
  }

  .guest-actions-wrap {
    gap: 5px;
  }

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

/* AI Studio Workspace Stacks Below 980px */
@media (max-width: 980px) {
  .studio-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* 18.4 Tablet & Mobile 2-Row Sticky Navbar + Touch-Scroll Strips (<= 960px) */
@media (max-width: 960px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 8px 14px;
    row-gap: 7px;
    column-gap: 8px;
  }

  .nav-inner > div:first-child {
    order: 1;
    min-width: 0;
  }

  .nav-actions {
    order: 2;
    margin-left: auto;
    gap: 6px;
  }

  .nav-links {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    gap: 4px;
    padding: 4px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    flex: 1 0 auto;
    justify-content: center;
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12.5px;
    scroll-snap-align: center;
  }

  /* Console & Admin Collapsible Horizontal Touch-Scroll Nav Strip */
  .console-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .console-sidebar {
    position: static;
    padding: 12px;
    gap: 10px;
    overflow: hidden;
  }

  .console-sidebar-label {
    display: none;
  }

  .console-nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .console-nav-list::-webkit-scrollbar {
    display: none;
  }

  .console-nav-btn {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 38px;
    padding: 8px 13px;
  }

  .console-nav-btn.active {
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  /* Model Catalog Category Pills — Sleek Horizontal Touch-Scroll Strip */
  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 3px;
    gap: 6px;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .cat-pill {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 38px;
    padding: 6px 13px;
  }

  /* Home Multimodal Studio Deck Nav — Horizontal Touch-Scroll Strip */
  .studio-deck-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 3px;
  }

  .studio-deck-nav::-webkit-scrollbar {
    display: none;
  }

  .studio-deck-tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 9px 14px;
  }
}

/* 18.5 iOS/Android Zero-Auto-Zoom Inputs & Mobile Workspace Comfort (<= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  /* Prevent iOS Safari & Android Chrome Focus Auto-Zoom (16px Minimum) */
  #heroOmniInput,
  #studioChatInput,
  #catalogSearchInput,
  #docsSearchInput,
  #authEmail,
  #authEmailInput,
  #authPassword,
  #authPasswordInput,
  #authNameInput,
  #cmdkInput,
  .input:not([type='file']),
  .input-sm:not([type='file']),
  .omni-input,
  .cmdk-input,
  .docs-search-input,
  .docs-tester-input,
  .docs-tester-select,
  select,
  textarea {
    font-size: 16px !important;
  }

  .input:not(textarea):not([type='file']) {
    min-height: 42px;
  }

  input[type='file'].input,
  input[type='file'].input-sm {
    font-size: 13px;
    max-width: 100%;
  }

  /* Comfortable Touch Targets on Header & Interactive Controls */
  .cmdk-trigger {
    min-width: 38px;
    height: 38px;
    padding: 0 9px;
    justify-content: center;
  }

  .theme-cluster {
    padding: 3px;
  }

  .theme-btn,
  .theme-toggle-btn,
  .accent-swatch-trigger {
    width: 32px;
    height: 32px;
  }

  #navGuestActions .btn {
    min-height: 38px;
  }

  .omni-input-row .btn {
    min-height: 44px;
    font-size: 14px;
  }

  /* Mobile Backdrop GPU Compositor Relief */
  .hp-orb-1,
  .hp-orb-2,
  .hp-orb-3 {
    filter: blur(44px);
  }

  .hp-beam {
    filter: blur(18px);
  }

  /* Home Hero Metrics Bento: 2x2 on Tablet (561px–768px) */
  .hero-metrics-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Home Preset, Workload & Featured Category Strips — Smooth Horizontal Scroll */
  .omni-preset-chips,
  .workload-pills,
  .home-cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
    padding-bottom: 3px;
  }

  .omni-preset-chips::-webkit-scrollbar,
  .workload-pills::-webkit-scrollbar,
  .home-cat-tabs::-webkit-scrollbar {
    display: none;
  }

  .omni-preset-chip,
  .workload-pill,
  .home-cat-tab {
    flex: 0 0 auto;
    min-height: 38px;
  }

  /* Catalog Filter Row — Clean 2-Column Mobile Grid Without Inline Width Traps */
  .catalog-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .catalog-filter-row > .search-input-wrap,
  .catalog-filter-row > input.input {
    grid-column: 1 / -1;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .catalog-filter-row > select.input {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .catalog-filter-row > .view-toggle-group {
    grid-column: 1 / -1;
    width: 100%;
  }

  .catalog-filter-row > .view-toggle-group .view-toggle-btn {
    flex: 1 1 50%;
    min-height: 38px;
  }

  /* Calculator Stacked Grid Comfort */
  #tab-calculator > .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* AI Studio Mode Switcher — Sleek Horizontal Touch-Scroll Ribbon */
  .studio-mode-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 3px;
  }

  .studio-mode-tabs::-webkit-scrollbar {
    display: none;
  }

  .studio-mode-btn {
    flex: 0 0 auto;
    min-width: 148px;
    min-height: 46px;
    padding: 9px 12px;
  }

  /* AI Studio 100dvh-Aware Chat Box & Keyboard-Friendly Composer */
  .chat-messages-box {
    height: clamp(240px, 46vh, 390px);
    height: clamp(220px, 46dvh, 390px);
    max-height: calc(100dvh - 250px);
    padding: 12px;
  }

  .chat-input-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
  }

  .chat-textarea {
    min-height: 46px;
  }

  .chat-send-btn {
    min-width: 84px;
    min-height: 46px;
    padding: 10px 14px;
  }

  /* AI Studio Media Options & Galleries */
  .studio-options-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .studio-options-bar > .form-group {
    width: 100%;
    flex: 1 1 auto !important;
  }

  .studio-options-bar > .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
  }

  .media-item-actions,
  .recent-creation-item {
    flex-wrap: wrap;
  }
}

/* 18.6 Mobile Phones (<= 640px): Popover Bounds, 2x2 Omnibar, Single-Col KPIs & Modals */
@media (max-width: 640px) {
  .cmdk-trigger .cmdk-kbd {
    display: none;
  }

  .cmdk-trigger {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
  }

  /* Strictly Clamp #accentPopover Inside Narrow Mobile Viewport Bounds */
  .theme-cluster,
  .accent-picker-wrap {
    position: static;
  }

  #accentPopover,
  .accent-popover {
    top: 50px;
    right: 12px;
    left: auto;
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    justify-content: center;
    padding: 9px 12px;
    gap: 9px;
  }

  .accent-popover .swatch-dot {
    width: 24px;
    height: 24px;
  }

  /* Hero Mesh & Status Pill Wrapping Safety */
  .hero-mesh-badge,
  main .sys-status-pill,
  #docsActiveKeyBadge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.38;
  }

  /* Hero Omnibar Mode Pills — Crisp 2x2 Touch Grid */
  .omni-mode-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .omni-mode-btn,
  .omni-mode-pill,
  .omni-pill {
    justify-content: center;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 12px;
  }

  /* Quantum Reactor HUD Single-Line & Stage Clearance on Phones */
  .reactor-stage-card,
  [data-theme="light"] .reactor-stage-card,
  .hero-cockpit-grid > .reactor-stage-card {
    min-height: 325px;
  }

  .reactor-hud-top,
  .reactor-stage-card > .reactor-hud-top {
    padding: 8px 11px;
    font-size: 9.5px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .reactor-hud-top > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .reactor-live-receipt,
  .reactor-stage-card > .reactor-live-receipt {
    margin: 8px;
    padding: 8px 10px;
    font-size: 10px;
  }

  /* Bento 2-Phase Atomic Ledger Steps — Crisp 2x2 Matrix */
  .ledger-steps-row,
  .ledger-sim-box > div:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
  }

  /* KPI Grids (4 -> 2 -> 1), Model Grids & Galleries Collapse to 1fr */
  .kpi-grid,
  .console-main .kpi-grid,
  .stats-grid,
  .hero-metrics-bento,
  .model-cards-grid,
  .home-models-grid,
  .generated-images-grid,
  .docs-option-grid {
    grid-template-columns: 1fr !important;
  }

  .metric-tile,
  .hero-metric-tile {
    padding: 13px 15px;
  }

  .metric-tile-val {
    font-size: 20px;
  }

  /* AI Studio Topbar Wallet Banner & Form Inline Controls */
  .studio-wallet-box {
    width: 100%;
  }

  .studio-guest-banner,
  .studio-auth-banner {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .form-inline > .input,
  .form-inline > select,
  #admModelSearch,
  #admInvSearchInput {
    flex: 1 1 100%;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  #dash-view-keys [style*="min-width:240px"] {
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  /* Docs Live Tester Controls */
  .docs-tester-controls > *,
  .docs-live-tester-controls > *,
  .docs-tester-bar > * {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Auth Modal & Command Palette (⌘K) — Safe 360px Padding & 90dvh Scroll */
  .modal-backdrop {
    padding: 12px;
  }

  .cmdk-backdrop,
  .modal-backdrop.cmdk-backdrop {
    padding: max(12px, 4vh) 12px 12px;
    padding: max(12px, 4dvh) 12px 12px;
  }

  .modal-card {
    padding: 18px 16px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 90vh;
    max-height: 90dvh;
  }

  .cmdk-modal,
  .cmdk-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 90vh;
    max-height: 90dvh;
  }

  .cmdk-search-bar,
  .cmdk-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .cmdk-item-right .cmdk-kbd {
    display: none;
  }

  .cmdk-footer {
    flex-wrap: wrap;
    padding: 8px 12px;
    font-size: 10px;
    gap: 6px;
  }
}

/* 18.7 Ultra-Compact Phones (360px–430px): Zero-Wrap Header Row 1 & Micro-Grids */
@media (max-width: 430px) {
  .container {
    padding: 0 12px;
  }

  .nav-inner {
    padding: 6px 10px;
    column-gap: 6px;
    row-gap: 6px;
  }

  .brand {
    gap: 6px;
  }

  .brand-badge {
    display: none;
  }

  .brand-name {
    font-size: 16px;
  }

  .nav-actions {
    gap: 5px;
  }

  .cmdk-trigger {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .theme-cluster {
    padding: 2px;
    gap: 1px;
  }

  .theme-btn,
  .theme-toggle-btn,
  .accent-swatch-trigger {
    width: 30px;
    height: 30px;
  }

  .guest-actions-wrap {
    gap: 5px;
  }

  #navGuestActions .btn {
    padding: 6px 9px;
    font-size: 11.5px;
    min-height: 34px;
  }

  .user-pill {
    gap: 5px;
    padding: 3px 6px;
  }

  .user-pill .pulse-dot {
    display: none;
  }

  .user-balance {
    font-size: 10.5px;
    padding: 2px 5.5px;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-pill .btn {
    padding: 4px 7px;
    font-size: 10.5px;
    min-height: 28px;
  }

  /* Compact Hero, Studio & Modal Grids on 360px Screens */
  .hero-cockpit-grid {
    padding: 18px 14px;
    gap: 16px;
  }

  .hero-monument-title {
    font-size: clamp(26px, 7.6vw, 34px);
  }

  .catalog-filter-row {
    grid-template-columns: 1fr;
  }

  #tab-calculator .grid-2,
  #studio-pane-chat .grid-2,
  .studio-sidebar .grid-2,
  .quick-demo-box .grid-2 {
    grid-template-columns: 1fr;
  }

  #homeStudioDeckStage .studio-deck-inspector [style*="repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  .studio-guest-banner .btn {
    width: 100%;
  }

  .cmdk-price {
    display: none;
  }
}

/* ========================================================================== */
/* 19. MODEL EXPLORER V2, FINOPS COST CALCULATOR V2 & AI STUDIO V2            */
/* ========================================================================== */

/* 19.0 Radial Cursor-Tracking Spotlight on New V2 Interactive Cards */
.models-kpi-pill,
.calc-preset-card,
.studio-starter-card {
  position: relative;
  overflow: hidden;
}

.models-kpi-pill::before,
.calc-preset-card::before,
.studio-starter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    360px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.11),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
  z-index: 0;
}

.models-kpi-pill:hover::before,
.calc-preset-card:hover::before,
.studio-starter-card:hover::before {
  opacity: 1;
}

.models-kpi-pill > *,
.calc-preset-card > *,
.studio-starter-card > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* 19.1 Model Explorer V2 (#tab-catalog)                                      */
/* -------------------------------------------------------------------------- */

.models-hero-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
  max-width: 100%;
}

.models-hero-strip:empty,
.models-usecase-bar:empty {
  display: none;
  margin: 0;
}

.models-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.models-kpi-pill {
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

[data-theme="light"] .models-kpi-pill {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
}

.models-kpi-pill:hover {
  transform: translateY(-1.5px);
  border-color: rgba(var(--accent-rgb), 0.46);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(var(--accent-rgb), 0.14);
}

.models-kpi-label,
.models-kpi-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.models-kpi-val,
.models-kpi-value {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.034em;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.models-kpi-sub,
.models-kpi-note {
  font-size: 11.5px;
  line-height: 1.42;
  color: var(--text-muted);
}

/* 15-Second Plain-English Model Buying Guide Banner */
.models-guide-banner {
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.09) 0%, rgba(12, 16, 24, 0.78) 44%, rgba(12, 16, 24, 0.78) 100%);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-left: 3px solid var(--primary);
  border-radius: 13px;
  padding: 12px 16px;
  color: var(--text-2);
  font-size: 12.75px;
  line-height: 1.58;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
}

[data-theme="light"] .models-guide-banner {
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(255, 255, 255, 0.88) 44%, rgba(255, 255, 255, 0.88) 100%);
}

.models-guide-banner summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.models-guide-banner summary::-webkit-details-marker {
  display: none;
}

.models-guide-banner[open] summary {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.models-guide-banner code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 1.5px 5.5px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

/* 1-Click Smart Use-Case & Capability Filter Bar */
.models-usecase-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
  min-width: 0;
  max-width: 100%;
}

.usecase-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6.5px 12.5px;
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  transition: all 0.16s var(--ease-out);
}

[data-theme="light"] .usecase-chip {
  background: rgba(255, 255, 255, 0.86);
}

.usecase-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  color: var(--text);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.usecase-chip.active,
.usecase-chip[aria-pressed="true"] {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--primary);
  color: var(--accent-ink, var(--primary));
  font-weight: 700;
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.24),
    0 4px 16px -3px rgba(var(--accent-rgb), 0.32);
}

[data-theme="light"] .usecase-chip.active,
[data-theme="light"] .usecase-chip[aria-pressed="true"] {
  background: rgba(var(--accent-rgb), 0.12);
}

/* Human-Readable Everyday Cost Badge & Capability Pills on Model Cards/Rows */
.mcard-human-cost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 3px 8.5px;
  border-radius: 6px;
  background: rgba(0, 220, 130, 0.10);
  border: 1px solid rgba(0, 220, 130, 0.28);
  color: var(--emerald-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-theme="light"] .mcard-human-cost {
  background: rgba(5, 150, 105, 0.09);
  border-color: rgba(5, 150, 105, 0.26);
  color: #047857;
}

.mcard-cap-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.mcard-cap-badge,
.cap-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.mcard-actions-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.compare-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s var(--ease-out);
}

.compare-toggle-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.50);
  color: var(--text);
  background: var(--bg-elevated);
}

.compare-toggle-btn.selected,
.compare-toggle-btn.active,
.compare-toggle-btn[aria-pressed="true"] {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: var(--primary);
  color: var(--accent-ink, var(--primary));
  font-weight: 700;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.24);
}

/* Floating Side-by-Side Model Comparison Tray (z-index: 950) */
@keyframes compareTraySlideUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.compare-tray {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 950;
  width: max-content;
  max-width: min(960px, calc(100vw - 24px));
  background: rgba(10, 13, 20, 0.90);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(var(--accent-rgb), 0.48);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--text);
  box-shadow:
    0 22px 55px -10px rgba(0, 0, 0, 0.80),
    0 0 0 1px rgba(var(--accent-rgb), 0.18),
    0 0 28px -6px rgba(var(--accent-rgb), 0.30);
  animation: compareTraySlideUp 0.2s var(--ease-out);
}

[data-theme="light"] .compare-tray {
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 20px 50px -10px rgba(11, 14, 20, 0.24),
    0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

body:has(.compare-tray:not(.hidden)) main.main-content {
  padding-bottom: 112px;
}

.compare-tray-items,
.compare-tray-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.compare-tray-chip,
.compare-tray-pill,
.compare-model-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  padding: 4.5px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Model Specification Inspector & 3-Model Side-by-Side Comparison Modals */
.model-inspector-dialog,
.model-compare-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 22px 24px;
  color: var(--text);
  box-shadow: var(--shadow-elevated);
  animation: cmdkPop 0.18s var(--ease-out);
}

.model-inspector-dialog {
  max-width: min(780px, calc(100vw - 24px));
}

.model-compare-dialog {
  max-width: min(980px, calc(100vw - 24px));
}

.model-inspector-dialog pre,
.inspector-code-pre {
  background: #080c14;
  border: 1px solid #1e2636;
  border-radius: 11px;
  padding: 14px 16px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.compare-matrix-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.compare-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.75px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.compare-matrix-table th,
.compare-matrix-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-matrix-table thead th {
  background: var(--bg-2);
  color: var(--text);
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
}

.compare-matrix-table tbody th,
.compare-matrix-table tbody td:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.04);
  white-space: nowrap;
}

.compare-matrix-table tbody tr:last-child td,
.compare-matrix-table tbody tr:last-child th {
  border-bottom: none;
}

.compare-matrix-table tbody tr:hover td {
  background: var(--bg-hover);
}

.winner-badge,
.compare-winner-badge,
.badge-winner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: 999px;
  background: rgba(0, 220, 130, 0.14);
  border: 1px solid rgba(0, 220, 130, 0.36);
  color: var(--emerald-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-theme="light"] .winner-badge,
[data-theme="light"] .compare-winner-badge,
[data-theme="light"] .badge-winner {
  background: rgba(5, 150, 105, 0.11);
  border-color: rgba(5, 150, 105, 0.30);
  color: #047857;
}

/* -------------------------------------------------------------------------- */
/* 19.2 FinOps Cost Calculator V2 (#tab-calculator)                           */
/* -------------------------------------------------------------------------- */

#calcScenarioMount:empty,
#calcSimpleModeMount:empty,
#calcRunwayMount:empty,
#calcBenchmarkCompare:empty {
  display: none;
}

.calc-presets-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}

.calc-preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

[data-theme="light"] .calc-preset-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
}

.calc-preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.48);
  background: var(--bg-elevated);
}

.calc-preset-card.active,
.calc-preset-card[aria-pressed="true"] {
  border-color: var(--primary);
  background: rgba(var(--accent-rgb), 0.11);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.28),
    0 10px 26px -8px rgba(var(--accent-rgb), 0.28);
}

[data-theme="light"] .calc-preset-card.active,
[data-theme="light"] .calc-preset-card[aria-pressed="true"] {
  background: rgba(var(--accent-rgb), 0.09);
}

.calc-preset-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--accent-ink, var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-preset-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.calc-preset-sub,
.calc-preset-desc {
  font-size: 11.5px;
  line-height: 1.42;
  color: var(--text-muted);
}

/* Segmented Mode Switch: Everyday Estimator vs Exact Token Engineer */
.calc-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.calc-mode-toggle button,
.calc-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7.5px 10px;
  min-height: 36px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.calc-mode-toggle button:hover,
.calc-mode-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.calc-mode-toggle button.active,
.calc-mode-toggle button[aria-selected="true"],
.calc-mode-toggle button[aria-pressed="true"],
.calc-mode-btn.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.48);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 -1.5px 0 var(--primary);
}

.calc-everyday-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.calc-horizon-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.calc-horizon-pills button,
.calc-horizon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5.5px 11px;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}

.calc-horizon-pills button:hover,
.calc-horizon-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
}

.calc-horizon-pills button.active,
.calc-horizon-pills button[aria-pressed="true"],
.calc-horizon-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.28);
}

/* Stacked Proportional Cost Breakdown Bar & $10 Deposit Runway Card */
.calc-stacked-wrap {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-stacked-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  gap: 1px;
}

.calc-stacked-bar > * {
  height: 100%;
  min-width: 0;
  transition: width 0.32s var(--ease-out);
}

.calc-seg-input {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.78), var(--primary));
}

.calc-seg-output {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.calc-seg-cache {
  background: linear-gradient(90deg, #059669, #00dc82);
}

.calc-seg-media {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.calc-stacked-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.calc-runway-card {
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.10) 0%, rgba(0, 220, 130, 0.06) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

[data-theme="light"] .calc-runway-card {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(5, 150, 105, 0.06) 100%);
}

.calc-runway-card strong {
  color: var(--text);
}

/* Live 5-Model Side-by-Side Benchmark Comparison Chart */
.calc-benchmark-card {
  margin-top: 18px;
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
}

[data-theme="light"] .calc-benchmark-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
}

.calc-bench-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.calc-bench-row {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition:
    border-color 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.calc-bench-row:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
}

.calc-bench-row.is-selected {
  border-color: rgba(var(--accent-rgb), 0.56);
  background: rgba(var(--accent-rgb), 0.085);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.20);
}

.calc-bench-row.is-cheapest {
  border-color: rgba(0, 220, 130, 0.44);
}

.calc-bench-row.is-selected.is-cheapest {
  border-color: var(--primary);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.24),
    0 6px 20px -6px rgba(0, 220, 130, 0.24);
}

.calc-bench-bar-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.calc-bench-bar-fill {
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.65), var(--primary));
  transition: width 0.35s var(--ease-out);
}

.calc-bench-row.is-cheapest .calc-bench-bar-fill {
  background: linear-gradient(90deg, #059669, #00dc82);
}

/* -------------------------------------------------------------------------- */
/* 19.3 AI Studio V2 (#tab-playground)                                        */
/* -------------------------------------------------------------------------- */

/* 3-Step Workflow Onboarding Micro-Stepper Strip */
.studio-workflow-strip,
.studio-onboarding-strip,
.studio-steps-strip,
.studio-micro-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.studio-workflow-step,
.studio-step-pill,
.studio-guide-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.38;
  min-width: 0;
}

.studio-step-badge,
.studio-workflow-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.studio-mode-note,
.studio-exec-helper,
#pgModeHelper {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.075);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.48;
}

/* Chat Welcome 2x2 Starter Prompt Cards */
.studio-starter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}

.studio-starter-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition:
    transform 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    background-color 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}

.studio-starter-card:hover {
  transform: translateY(-1.5px);
  border-color: rgba(var(--accent-rgb), 0.52);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}

.studio-starter-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  color: var(--accent-ink, var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.studio-starter-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--text);
  margin-bottom: 3px;
}

.studio-starter-sub,
.studio-starter-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Live Prompt Token & Cost Estimator Footer Bar */
.studio-prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  padding: 6.5px 11px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

/* Visual Aspect-Ratio Pills (1:1, 16:9, 9:16) & Preset Inspiration Chips */
.studio-ratio-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.studio-ratio-pills button,
.studio-ratio-pill,
.ratio-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12.5px;
  min-height: 36px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.studio-ratio-pills button:hover,
.studio-ratio-pill:hover,
.ratio-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.46);
  color: var(--text);
  background: var(--bg-elevated);
}

.studio-ratio-pills button.active,
.studio-ratio-pills button[aria-pressed="true"],
.studio-ratio-pill.active,
.ratio-pill.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: var(--primary);
  color: var(--accent-ink, var(--primary));
  font-weight: 700;
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.18);
}

.studio-preset-chips,
.studio-style-chips,
.studio-scene-chips,
.studio-inspiration-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-width: 0;
  max-width: 100%;
}

.studio-preset-chip,
.studio-style-chip,
.studio-inspire-chip {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}

.studio-preset-chip:hover,
.studio-style-chip:hover,
.studio-inspire-chip:hover,
.studio-preset-chip.active,
.studio-style-chip.active,
.studio-inspire-chip.active {
  border-color: rgba(var(--accent-rgb), 0.52);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-ink, var(--primary));
  transform: translateY(-1px);
}

#studioVideoEstBadge,
.studio-est-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.11);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.media-gallery-box .empty-studio-state {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  line-height: 1.55;
}

/* -------------------------------------------------------------------------- */
/* 19.4 Multi-Device Responsive Breakpoints for V2 Components (360px–1180px)  */
/* -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .models-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc-presets-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .models-usecase-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 4px;
  }

  .models-usecase-bar::-webkit-scrollbar {
    display: none;
  }

  .usecase-chip {
    min-height: 38px;
    padding: 7px 13px;
  }

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

  .studio-workflow-strip,
  .studio-onboarding-strip,
  .studio-steps-strip,
  .studio-micro-guide {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .models-kpi-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .models-kpi-pill {
    padding: 12px 14px;
  }

  .models-kpi-val,
  .models-kpi-value {
    font-size: 19px;
  }

  /* Floating Compare Dock — Full-Width Safe Bounds on 360px Phones */
  .compare-tray {
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    transform: none;
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
    border-radius: 14px;
    animation: cmdkPop 0.18s var(--ease-out);
  }

  .compare-tray-chip,
  .compare-tray-pill,
  .compare-model-pill {
    max-width: 145px;
    font-size: 10.5px;
  }

  .model-inspector-dialog,
  .model-compare-dialog {
    padding: 16px 14px;
    border-radius: 14px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .compare-matrix-table th,
  .compare-matrix-table td {
    padding: 9px 10px;
    font-size: 12px;
  }

  /* Scenario Preset Cards — Sleek Horizontal Touch-Scroll Strip on Phones */
  .calc-presets-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 9px;
    padding-bottom: 4px;
  }

  .calc-presets-strip::-webkit-scrollbar {
    display: none;
  }

  .calc-preset-card {
    flex: 0 0 224px;
    max-width: 78vw;
  }

  .calc-benchmark-card {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .calc-bench-row {
    padding: 11px 12px;
  }

  /* AI Studio Starter Grid & Inspiration Strips on Phones */
  .studio-starter-grid {
    grid-template-columns: 1fr;
  }

  .studio-preset-chips,
  .studio-style-chips,
  .studio-scene-chips,
  .studio-inspiration-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 3px;
  }

  .studio-preset-chips::-webkit-scrollbar,
  .studio-style-chips::-webkit-scrollbar,
  .studio-scene-chips::-webkit-scrollbar,
  .studio-inspiration-bar::-webkit-scrollbar {
    display: none;
  }

  .studio-preset-chip,
  .studio-style-chip,
  .studio-inspire-chip {
    flex: 0 0 auto;
    min-height: 34px;
  }
}

@media (max-width: 430px) {
  .calc-mode-toggle {
    grid-template-columns: 1fr;
  }

  .studio-ratio-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .studio-ratio-pills button,
  .studio-ratio-pill,
  .ratio-pill {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* ========================================================================== */
/* 20. ENTERPRISE DEVELOPER CONSOLE V3, VISUAL AI MODEL PICKER & GUARDRAILS   */
/* ========================================================================== */

/* 20.0 Radial Cursor-Tracking Spotlight on Console V3 Interactive Cards */
.guardrail-meter-card,
.session-row-card,
.vault-media-card {
  position: relative;
  overflow: hidden;
}

.guardrail-meter-card::before,
.session-row-card::before,
.vault-media-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    360px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.10),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
  z-index: 0;
}

.guardrail-meter-card:hover::before,
.session-row-card:hover::before,
.vault-media-card:hover::before {
  opacity: 1;
}

.guardrail-meter-card > *,
.session-row-card > *,
.vault-media-card > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* 20.1 Upgraded 10-Menu Console Shell (.console-shell & .console-sidebar)    */
/* -------------------------------------------------------------------------- */

.console-sidebar-nav,
.console-nav-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.console-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

@media (min-width: 961px) {
  .console-sidebar {
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
  }

  .console-sidebar::-webkit-scrollbar {
    width: 5px;
  }

  .console-sidebar::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 99px;
  }

  .console-nav-list + .console-sidebar-label,
  .console-nav-group + .console-nav-group > .console-sidebar-label,
  .console-nav-btn + .console-sidebar-label {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
  }
}

.console-sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px 3px;
  user-select: none;
}

.console-nav-btn {
  position: relative;
  min-height: 36px;
}

.console-nav-btn .ico,
.console-nav-icon .ico {
  transition: color 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}

.console-nav-btn:hover .ico,
.console-nav-btn:hover .console-nav-icon {
  color: var(--accent-ink, var(--primary));
}

.console-nav-btn.active {
  color: var(--text);
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.16) 0%,
    rgba(var(--accent-rgb), 0.05) 100%
  );
  border-color: rgba(var(--accent-rgb), 0.44);
  box-shadow:
    inset 3px 0 0 var(--primary),
    0 4px 16px -6px rgba(var(--accent-rgb), 0.28);
}

.console-nav-btn.active .ico,
.console-nav-btn.active .console-nav-icon {
  color: var(--accent-ink, var(--primary));
}

.console-nav-badge.badge-new,
.console-nav-badge.is-new,
.console-nav-badge[data-badge="new"] {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.44);
  color: var(--accent-ink, var(--primary));
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------- */
/* 20.2 Interactive Visual AI Model Picker (.key-model-picker & #editKeyModal)*/
/* -------------------------------------------------------------------------- */

#newKeyModelPickerMount {
  width: 100%;
  min-width: 0;
}

#newKeyModelPickerMount:empty {
  display: none;
}

/* 2-Mode Segmented Scope Switch (All 805+ Models vs Visual Model Picker) */
.kmp-mode-toggle,
.key-scope-toggle,
.kmp-scope-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.kmp-mode-toggle button,
.key-scope-toggle button,
.kmp-scope-switch button,
.kmp-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7.5px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}

.kmp-mode-toggle button:hover,
.key-scope-toggle button:hover,
.kmp-scope-switch button:hover,
.kmp-mode-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.kmp-mode-toggle button.active,
.kmp-mode-toggle button[aria-selected="true"],
.kmp-mode-toggle button[aria-pressed="true"],
.key-scope-toggle button.active,
.kmp-scope-switch button.active,
.kmp-mode-btn.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.48);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 -1.5px 0 var(--primary);
}

/* Visual AI Model Picker Shell */
.key-model-picker {
  background: var(--bg-2);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  border-radius: 14px;
  padding: 14px;
  margin-top: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  max-width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .key-model-picker {
  background: var(--bg-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Picker Search, Category Pills, Creator Filter & 1-Click Bulk Packs */
.kmp-toolbar {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.kmp-search-row,
.kmp-top-row,
.kmp-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.kmp-search-row > input,
.kmp-top-row > input,
.kmp-filter-row > input,
.kmp-search-wrap {
  flex: 1 1 220px;
  min-width: 0;
}

.kmp-search-row > select,
.kmp-top-row > select,
.kmp-filter-row > select {
  flex: 0 1 190px;
  min-width: 145px;
}

.kmp-cat-pills,
.kmp-categories,
.kmp-bulk-bar,
.kmp-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.kmp-cat-pill,
.kmp-bulk-btn,
.kmp-preset-chip,
.kmp-toolbar .cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10.5px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s var(--ease-out);
}

.kmp-cat-pill:hover,
.kmp-bulk-btn:hover,
.kmp-preset-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  color: var(--text);
  background: var(--bg-elevated);
}

.kmp-cat-pill.active,
.kmp-cat-pill[aria-pressed="true"],
.kmp-preset-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.26);
}

/* Scrollable Multi-Select Model Checklist Grid */
.kmp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 3px 4px 3px 1px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
  min-width: 0;
}

.kmp-grid::-webkit-scrollbar {
  width: 5px;
}

.kmp-grid::-webkit-scrollbar-track {
  background: transparent;
}

.kmp-grid::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}

.kmp-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.edit-key-dialog .kmp-grid,
#editKeyModal .kmp-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kmp-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  transition:
    border-color 0.15s var(--ease-out),
    background-color 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out),
    transform 0.15s var(--ease-out);
}

.kmp-item:hover {
  border-color: rgba(var(--accent-rgb), 0.46);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.kmp-item.selected,
.kmp-item.is-selected,
.kmp-item[aria-checked="true"],
.kmp-item:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.24),
    0 6px 16px -6px rgba(var(--accent-rgb), 0.26);
}

[data-theme="light"] .kmp-item.selected,
[data-theme="light"] .kmp-item.is-selected,
[data-theme="light"] .kmp-item[aria-checked="true"],
[data-theme="light"] .kmp-item:has(input[type="checkbox"]:checked) {
  background: rgba(var(--accent-rgb), 0.09);
}

.kmp-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.kmp-check {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-2);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.14s var(--ease-out);
}

.kmp-item.selected .kmp-check,
.kmp-item.is-selected .kmp-check,
.kmp-item[aria-checked="true"] .kmp-check {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-primary-fg);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.35);
}

.kmp-item-body,
.kmp-item-main,
.kmp-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kmp-item-title,
.kmp-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kmp-item-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kmp-item-price,
.kmp-item-rate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--emerald-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Selected Models Summary Bar & Removable Chips */
.kmp-selected-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-width: 0;
}

.kmp-selected-chips,
.kmp-chips-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.kmp-sel-chip,
.kmp-selected-chip,
.kmp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 215px;
  padding: 3px 8.5px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kmp-sel-chip button,
.kmp-selected-chip button,
.kmp-chip button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.78;
  flex-shrink: 0;
}

.kmp-sel-chip button:hover,
.kmp-selected-chip button:hover,
.kmp-chip button:hover {
  opacity: 1;
}

/* Scoped Model Badges, Edit Key Modal (.edit-key-dialog) & Rotated Secret Box */
.key-scope-badge,
.scoped-models-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8.5px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.11);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}

.key-scope-badge:hover,
.scoped-models-badge:hover {
  border-color: var(--primary);
  background: rgba(var(--accent-rgb), 0.18);
}

.key-scope-badge.all-models,
.scoped-models-badge.all-models {
  background: rgba(0, 220, 130, 0.10);
  border-color: rgba(0, 220, 130, 0.28);
  color: var(--emerald-ink);
}

#editKeyModal.modal-backdrop,
#editKeyModal {
  z-index: 1050;
}

.edit-key-dialog,
#editKeyModal .modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  width: 100%;
  max-width: min(780px, calc(100vw - 24px));
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 22px 24px;
  color: var(--text);
  box-shadow: var(--shadow-elevated);
  animation: cmdkPop 0.18s var(--ease-out);
}

.rotated-key-banner,
.rotated-key-box,
.secret-reveal-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 220, 130, 0.10) 0%,
    rgba(var(--accent-rgb), 0.08) 100%
  );
  border: 1px solid rgba(0, 220, 130, 0.38);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  min-width: 0;
}

.rotated-key-banner code,
.rotated-key-box code,
.secret-reveal-box code {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  background: #080c14;
  border: 1px solid #1e2636;
  color: #00dc82;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  word-break: break-all;
}

/* -------------------------------------------------------------------------- */
/* 20.3 Console V3 Subviews: Guardrails, API Sandbox, Media Vault & Sessions  */
/* -------------------------------------------------------------------------- */

/* FinOps Budget Guardrails (.guardrail-meter-card & threshold bars) */
.guardrails-meters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.guardrail-meter-card {
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

[data-theme="light"] .guardrail-meter-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
}

.guardrail-meter-card:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  transform: translateY(-1px);
}

.guardrail-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.guardrail-bar-fill {
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669, #00dc82);
  box-shadow: 0 0 12px rgba(0, 220, 130, 0.28);
  transition: width 0.36s var(--ease-out), background 0.25s ease;
}

.guardrail-bar-fill.warn,
.guardrail-bar-fill.amber,
.guardrail-bar-fill[data-level="warn"] {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.32);
}

.guardrail-bar-fill.danger,
.guardrail-bar-fill.red,
.guardrail-bar-fill.exceeded,
.guardrail-bar-fill[data-level="danger"] {
  background: linear-gradient(90deg, #e11d48, #fb7185);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.38);
}

/* Live API Key Sandbox & Header Inspector (.console-tester-grid) */
.console-tester-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.console-tester-grid > * {
  min-width: 0;
  max-width: 100%;
}

.tester-response-card,
.console-tester-output,
#dash-view-tester pre,
#dash-view-mcp pre {
  background: #080c14;
  border: 1px solid #1e2636;
  border-radius: 12px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  line-height: 1.62;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

#dash-view-tester pre,
#dash-view-mcp pre {
  padding: 14px 16px;
  white-space: pre;
}

.mcp-config-tabs,
.console-mcp-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-width: 0;
}

/* Generated Media Vault Gallery (.vault-gallery-grid) */
.vault-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  min-width: 0;
}

.vault-media-card {
  background: rgba(12, 16, 24, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

[data-theme="light"] .vault-media-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
}

.vault-media-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.45);
}

/* Active Login Device Sessions (.session-row-card) */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.session-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 0;
  transition: border-color 0.16s var(--ease-out), background-color 0.16s var(--ease-out);
}

.session-row-card:hover {
  border-color: var(--border-light);
}

.session-row-card.is-current,
.session-row-card.current {
  border-color: rgba(0, 220, 130, 0.44);
  background: rgba(0, 220, 130, 0.055);
}

[data-theme="light"] .session-row-card.is-current,
[data-theme="light"] .session-row-card.current {
  background: rgba(5, 150, 105, 0.06);
}

/* -------------------------------------------------------------------------- */
/* 20.4 Console V3 Multi-Device Responsive Breakpoints (360px–1180px)         */
/* -------------------------------------------------------------------------- */

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

@media (max-width: 960px) {
  .console-sidebar > .console-sidebar-label,
  .console-nav-list > .console-sidebar-label,
  .console-nav-group > .console-sidebar-label {
    display: none !important;
    margin: 0 !important;
  }

  .console-sidebar-nav,
  .console-nav-groups {
    gap: 6px;
  }

  .console-nav-list,
  .console-nav-group {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .console-nav-list > .console-nav-btn,
  .console-nav-group > .console-nav-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .console-nav-group::-webkit-scrollbar {
    display: none;
  }

  .console-nav-btn.active {
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  .console-tester-grid,
  .guardrails-meters-grid {
    grid-template-columns: 1fr;
  }

  .kmp-cat-pills,
  .kmp-categories,
  .mcp-config-tabs,
  .console-mcp-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 3px;
  }

  .kmp-cat-pills::-webkit-scrollbar,
  .kmp-categories::-webkit-scrollbar,
  .mcp-config-tabs::-webkit-scrollbar,
  .console-mcp-tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .kmp-mode-toggle,
  .key-scope-toggle,
  .kmp-scope-switch,
  .kmp-grid,
  .edit-key-dialog .kmp-grid,
  #editKeyModal .kmp-grid,
  .vault-gallery-grid {
    grid-template-columns: 1fr;
  }

  .kmp-search-row > select,
  .kmp-top-row > select,
  .kmp-filter-row > select {
    flex: 1 1 100%;
    width: 100%;
  }

  .edit-key-dialog,
  #editKeyModal .modal-card {
    padding: 16px 14px;
    border-radius: 14px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .kmp-sel-chip,
  .kmp-selected-chip,
  .kmp-chip {
    max-width: 165px;
  }

  .session-row-card {
    padding: 12px 13px;
  }
}

/* ========================================================================== */
/* 21. ENTERPRISE ADMIN V3, TWO-WAY SUPPORT HELPDESK, BRAND MARK & SYS BANNER */
/* ========================================================================== */

/* 21.0 Radial Cursor-Tracking Spotlight on Admin V3 & Helpdesk Cards */
.gateway-cluster-card,
.ticket-list-card,
.finops-invariant-banner {
  position: relative;
  overflow: hidden;
}

.gateway-cluster-card::before,
.ticket-list-card::before,
.finops-invariant-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    400px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.10),
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
  z-index: 0;
}

.gateway-cluster-card:hover::before,
.ticket-list-card:hover::before,
.finops-invariant-banner:hover::before {
  opacity: 1;
}

.gateway-cluster-card > *,
.ticket-list-card > *,
.finops-invariant-banner > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* 21.1 Bespoke 3D Quantum Hex-Prism Brand Mark & System Notice Banner        */
/* -------------------------------------------------------------------------- */

.brand-mark-svg,
.brand-logo-mark,
.brand-hex-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  vertical-align: middle;
  filter: drop-shadow(0 2px 10px rgba(var(--accent-rgb), 0.34));
  transition:
    transform 0.22s var(--ease-out),
    filter 0.22s var(--ease-out);
}

.brand:hover .brand-mark-svg,
.brand:hover .brand-logo-mark,
.brand:hover .brand-hex-mark {
  transform: translateY(-0.5px) scale(1.035);
  filter: drop-shadow(0 4px 14px rgba(var(--accent-rgb), 0.54));
}

[data-theme="light"] .brand-mark-svg,
[data-theme="light"] .brand-logo-mark,
[data-theme="light"] .brand-hex-mark {
  filter: drop-shadow(0 2px 8px rgba(var(--accent-rgb), 0.24));
}

.site-footer .brand-mark-svg,
.site-footer .brand-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

#authModal .brand-mark-svg,
#authModal .brand-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

/* Dismissible Frosted-Glass Global System Notice Banner */
.sys-notice-banner {
  position: relative;
  z-index: 38;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: min(1320px, calc(100% - 32px));
  margin: 12px auto 2px;
  padding: 10px 15px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.13) 0%,
    rgba(13, 17, 27, 0.86) 55%,
    rgba(13, 17, 27, 0.90) 100%
  );
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.48;
  box-shadow:
    0 10px 26px -12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.subview-pane .sys-notice-banner,
.card .sys-notice-banner,
#adm-view-announcements .sys-notice-banner {
  width: 100%;
  margin: 0;
}

[data-theme="light"] .sys-notice-banner {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.10) 0%,
    rgba(255, 255, 255, 0.92) 60%,
    rgba(255, 255, 255, 0.96) 100%
  );
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 8px 22px -12px rgba(15, 23, 42, 0.12);
}

.sys-notice-banner.level-info,
.sys-notice-banner[data-level="info"] {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.14) 0%,
    rgba(13, 17, 27, 0.88) 62%
  );
  border-color: rgba(59, 130, 246, 0.42);
}

[data-theme="light"] .sys-notice-banner.level-info,
[data-theme="light"] .sys-notice-banner[data-level="info"] {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.09) 0%,
    rgba(255, 255, 255, 0.95) 62%
  );
  border-color: rgba(37, 99, 235, 0.32);
}

.sys-notice-banner.level-promo,
.sys-notice-banner[data-level="promo"] {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.18) 0%,
    rgba(13, 17, 27, 0.88) 65%
  );
  border-color: rgba(var(--accent-rgb), 0.48);
}

[data-theme="light"] .sys-notice-banner.level-promo,
[data-theme="light"] .sys-notice-banner[data-level="promo"] {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.12) 0%,
    rgba(255, 255, 255, 0.95) 65%
  );
  border-color: rgba(var(--accent-rgb), 0.40);
}

.sys-notice-banner.level-warning,
.sys-notice-banner.level-warn,
.sys-notice-banner[data-level="warning"] {
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.16) 0%,
    rgba(13, 17, 27, 0.88) 65%
  );
  border-color: rgba(245, 158, 11, 0.48);
}

[data-theme="light"] .sys-notice-banner.level-warning,
[data-theme="light"] .sys-notice-banner.level-warn,
[data-theme="light"] .sys-notice-banner[data-level="warning"] {
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.12) 0%,
    rgba(255, 255, 255, 0.95) 65%
  );
  border-color: rgba(217, 119, 6, 0.40);
}

.sys-notice-body,
.sys-notice-content,
.sys-notice-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 0;
}

.sys-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent-ink, var(--primary));
  flex-shrink: 0;
}

.sys-notice-banner.level-info .sys-notice-icon {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

[data-theme="light"] .sys-notice-banner.level-info .sys-notice-icon {
  color: #2563eb;
}

.sys-notice-banner.level-warning .sys-notice-icon,
.sys-notice-banner.level-warn .sys-notice-icon {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

[data-theme="light"] .sys-notice-banner.level-warning .sys-notice-icon,
[data-theme="light"] .sys-notice-banner.level-warn .sys-notice-icon {
  color: #d97706;
}

.sys-notice-text,
.sys-notice-msg {
  min-width: 0;
  word-break: break-word;
  color: var(--text);
  font-weight: 500;
}

.sys-notice-actions,
.sys-notice-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sys-notice-close,
.sys-notice-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
}

.sys-notice-close:hover,
.sys-notice-dismiss:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* 21.2 Two-Way Support Tickets Helpdesk (#dash-view-tickets & #adm-view-tickets) */
/* -------------------------------------------------------------------------- */

.ticket-workspace-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.ticket-workspace-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* Ticket Queue / Inbox Card */
.ticket-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.ticket-list-card:has(> .ticket-list-header),
.ticket-list-card:has(> .ticket-queue-header) {
  padding: 0;
}

.ticket-list-header,
.ticket-queue-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-filter-pills,
.ticket-status-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ticket-list-scroll,
.ticket-queue-scroll,
.ticket-rows-scroll {
  display: flex;
  flex-direction: column;
  max-height: 580px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.ticket-list-scroll::-webkit-scrollbar,
.ticket-queue-scroll::-webkit-scrollbar,
.ticket-rows-scroll::-webkit-scrollbar,
.ticket-messages-scroll::-webkit-scrollbar {
  width: 5px;
}

.ticket-list-scroll::-webkit-scrollbar-thumb,
.ticket-queue-scroll::-webkit-scrollbar-thumb,
.ticket-rows-scroll::-webkit-scrollbar-thumb,
.ticket-messages-scroll::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 99px;
}

.ticket-row-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-left: 3px solid transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition:
    background-color 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}

.ticket-row-item:last-child {
  border-bottom: none;
}

.ticket-row-item:hover {
  background: var(--bg-hover);
}

.ticket-row-item.active {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.15) 0%,
    rgba(var(--accent-rgb), 0.04) 100%
  );
  border-left-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.24);
}

[data-theme="light"] .ticket-row-item.active {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.11) 0%,
    rgba(var(--accent-rgb), 0.02) 100%
  );
}

.ticket-row-item.has-unread {
  background: rgba(var(--accent-rgb), 0.055);
}

.ticket-row-item.has-unread.active {
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.17) 0%,
    rgba(var(--accent-rgb), 0.05) 100%
  );
}

@keyframes ticketEmberPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.65);
  }
  50% {
    transform: scale(1.14);
    box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0);
  }
}

#custTicketListMount .ticket-row-item,
#admTicketListMount .ticket-row-item {
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: 10px;
}

.ticket-unread-dot,
.unread-ember-dot,
.unread-dot,
.ticket-row-item .pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  animation: ticketEmberPulse 2s ease-in-out infinite;
}

.ticket-row-item.has-unread:not(:has(.ticket-unread-dot, .unread-ember-dot, .unread-dot, .pulse-dot))::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: ticketEmberPulse 2s ease-in-out infinite;
}

.ticket-row-subject,
.ticket-subject {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Ticket Priority Badges & Lifecycle Status Pills */
.prio-urgent,
.prio-high,
.prio-normal,
.prio-low,
.st-open,
.st-in_progress,
.st-waiting_user,
.st-resolved,
.st-closed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid transparent;
}

.prio-urgent {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.46);
  color: #fb7185;
}

[data-theme="light"] .prio-urgent {
  background: rgba(225, 29, 72, 0.11);
  border-color: rgba(225, 29, 72, 0.34);
  color: #be123c;
}

.prio-high {
  background: rgba(255, 85, 38, 0.16);
  border-color: rgba(255, 85, 38, 0.44);
  color: #ff7a52;
}

[data-theme="light"] .prio-high {
  background: rgba(234, 88, 12, 0.11);
  border-color: rgba(234, 88, 12, 0.34);
  color: #c2410c;
}

.prio-normal {
  background: rgba(59, 130, 246, 0.13);
  border-color: rgba(59, 130, 246, 0.34);
  color: #60a5fa;
}

[data-theme="light"] .prio-normal {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.28);
  color: #1d4ed8;
}

.prio-low {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--text-muted);
}

.st-open {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.40);
  color: #22d3ee;
}

[data-theme="light"] .st-open {
  background: rgba(8, 145, 178, 0.11);
  border-color: rgba(8, 145, 178, 0.32);
  color: #0e7490;
}

.st-in_progress {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.40);
  color: #fbbf24;
}

[data-theme="light"] .st-in_progress {
  background: rgba(217, 119, 6, 0.11);
  border-color: rgba(217, 119, 6, 0.32);
  color: #b45309;
}

.st-waiting_user {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.44);
  color: #c4b5fd;
}

[data-theme="light"] .st-waiting_user {
  background: rgba(124, 58, 237, 0.11);
  border-color: rgba(124, 58, 237, 0.32);
  color: #6d28d9;
}

.st-resolved {
  background: rgba(0, 220, 130, 0.13);
  border-color: rgba(0, 220, 130, 0.38);
  color: var(--emerald-ink);
}

.st-closed {
  background: var(--bg-2);
  border-color: var(--border);
  color: var(--text-muted);
}

/* Right Conversation Thread Pane & Customer Context Header */
.ticket-thread-pane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ticket-context-bar {
  padding: 13px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
}

.ticket-messages-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 240px;
  max-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.ticket-msg-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(88%, 680px);
  padding: 12px 15px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ticket-msg-bubble.from-user {
  align-self: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-top-left-radius: 5px;
}

[data-theme="light"] .ticket-msg-bubble.from-user {
  background: var(--bg-subtle);
  border-color: var(--border);
}

.ticket-msg-bubble.from-admin {
  align-self: flex-end;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.14) 0%,
    rgba(15, 21, 34, 0.92) 100%
  );
  border: 1px solid rgba(var(--accent-rgb), 0.44);
  border-top-right-radius: 5px;
  box-shadow: 0 8px 22px -10px rgba(var(--accent-rgb), 0.28);
}

[data-theme="light"] .ticket-msg-bubble.from-admin {
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.10) 0%,
    rgba(255, 255, 255, 0.97) 100%
  );
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: 0 6px 18px -10px rgba(var(--accent-rgb), 0.18);
}

.support-official-badge,
.ticket-admin-badge,
.gudang-support-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7.5px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18);
  border: 1px solid rgba(var(--accent-rgb), 0.48);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Quick Canned Response Chips & Composer Footer */
.canned-reply-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 2px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-2);
  min-width: 0;
}

.canned-reply-chip,
.canned-chip,
.canned-reply-chips button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10.5px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}

.canned-reply-chip:hover,
.canned-chip:hover,
.canned-reply-chips button:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
  color: var(--text);
  background: var(--bg-elevated);
}

.ticket-composer-box {
  padding: 12px 16px 15px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.canned-reply-chips + .ticket-composer-box {
  border-top: none;
  padding-top: 8px;
}

/* -------------------------------------------------------------------------- */
/* 21.3 Admin V3 Operations Views (FinOps, Gateways, Keys Audit, Sys Banner)  */
/* -------------------------------------------------------------------------- */

#admNavTicketsBadge.has-unread,
#dashNavTicketsBadge.has-unread,
#admNavTicketsBadge.is-alert,
#dashNavTicketsBadge.is-alert {
  background: rgba(var(--accent-rgb), 0.20);
  border-color: rgba(var(--accent-rgb), 0.52);
  color: var(--accent-ink, var(--primary));
  font-weight: 800;
}

/* Global Double-Entry Ledger Mathematical Verification Card */
.finops-invariant-banner {
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 220, 130, 0.10) 0%,
    rgba(var(--accent-rgb), 0.06) 100%
  );
  border: 1px solid rgba(0, 220, 130, 0.40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .finops-invariant-banner {
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.08) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  border-color: rgba(5, 150, 105, 0.34);
}

.finops-invariant-banner.has-drift,
.finops-invariant-banner.warn {
  background: linear-gradient(
    135deg,
    rgba(255, 85, 38, 0.14) 0%,
    rgba(245, 158, 11, 0.08) 100%
  );
  border-color: rgba(255, 85, 38, 0.48);
}

/* Modality Profit Margin Visual Bars */
.modality-margin-bar,
.modality-margin-track {
  position: relative;
  width: 100%;
  min-width: 72px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.modality-margin-bar > span,
.modality-margin-bar > div,
.modality-margin-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #00dc82);
  transition: width 0.35s var(--ease-out);
}

/* Upstream Gateway Cluster Comparison Cards (GW-1 vs GW-2) */
.gateway-cluster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
}

.gateway-cluster-card {
  background: rgba(12, 16, 24, 0.80);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 15px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition:
    border-color 0.18s var(--ease-out),
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

[data-theme="light"] .gateway-cluster-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.10);
}

.gateway-cluster-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(var(--accent-rgb), 0.14);
}

.gateway-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.announcement-editor-grid,
.sys-notice-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* 21.4 Admin V3 & Helpdesk Multi-Device Responsive Breakpoints (360px–980px) */
/* -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .ticket-workspace-grid,
  .gateway-cluster-grid,
  .announcement-editor-grid,
  .sys-notice-editor-grid {
    grid-template-columns: 1fr;
  }

  .ticket-list-scroll,
  .ticket-queue-scroll,
  .ticket-rows-scroll {
    max-height: 290px;
  }
}

@media (max-width: 768px) {
  .canned-reply-chips,
  .ticket-filter-pills,
  .ticket-status-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .canned-reply-chips::-webkit-scrollbar,
  .ticket-filter-pills::-webkit-scrollbar,
  .ticket-status-pills::-webkit-scrollbar {
    display: none;
  }

  .ticket-messages-scroll {
    max-height: 380px;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .sys-notice-banner {
    width: calc(100% - 24px);
    margin: 8px auto 2px;
    padding: 9px 12px;
    gap: 8px 10px;
  }

  .ticket-msg-bubble {
    max-width: 95%;
    padding: 10px 12px;
  }

  .ticket-context-bar,
  .finops-invariant-banner {
    padding: 12px 13px;
  }

  .gateway-cluster-card {
    padding: 14px 15px;
  }

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

@media (max-width: 420px) {
  .navbar .brand-mark-svg,
  .navbar .brand-logo-mark,
  .navbar .brand-hex-mark {
    width: 29px;
    height: 29px;
    border-radius: 7.5px;
  }
}

/* ========================================================================== */
/* 22. VISITOR-EYE ANTI-CLIPPING, NAVBAR HARMONY & 4-DEVICE CALIBRATION       */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 22.1 Zero-Clipped Descenders (g, y, p, q, j), Kinetic Slots & Gradient Ink */
/* -------------------------------------------------------------------------- */

.hero-monument-title,
.hero-display-title {
  line-height: 1.15;
  padding-bottom: 0.04em;
  overflow: visible;
}

.hero-kinetic-slot,
#heroKineticWord,
.slot-word-viewport,
.slot-word {
  display: inline-block;
  line-height: 1.18;
  padding-bottom: 0.08em;
  padding-right: 0.04em;
  overflow: visible;
  vertical-align: baseline;
}

.hero-card h1,
.home-block-header h2,
.home-block-title,
.section-header h2,
.section-title,
.faq-sticky-side h2,
.horizon-launch-deck h2,
.docs-hero-title,
.docs-prose h1,
.docs-topic-h1,
.docs-article-title {
  line-height: 1.2;
  padding-bottom: 0.04em;
}

.gradient-text,
.text-gradient,
[style*="background-clip: text"],
[style*="-webkit-background-clip: text"] {
  line-height: 1.22;
  padding-bottom: 0.08em;
}

.brand-text-wrap {
  line-height: 1.2;
  gap: 1px;
  overflow: visible;
}

.brand-name {
  line-height: 1.2;
  padding-bottom: 0.03em;
  overflow: visible;
}

.brand-sub {
  line-height: 1.32;
  padding-bottom: 0.04em;
  overflow: visible;
}

.telemetry-val,
.metric-tile-val,
.kpi-value,
.stat-value,
.stat-val,
.models-kpi-val,
.calc-big-price {
  line-height: 1.22;
  padding-bottom: 0.03em;
}

.btn,
.nav-btn,
.console-nav-btn,
.badge,
.pill,
.pill-tag,
.cat-pill,
.kmp-cat-pill,
.omni-mode-btn,
.omni-mode-pill,
.omni-pill {
  line-height: 1.32;
}

.nav-btn,
.console-nav-btn {
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* 22.2 Universal Modal Viewport Safety & Admin Security Shield / Key Vault   */
/* -------------------------------------------------------------------------- */

.modal-backdrop {
  padding: 16px 12px;
  overflow-y: auto;
}

.modal-card,
#authModal .modal-card,
.edit-key-dialog,
#editKeyModal .modal-card,
.model-inspector-dialog,
.model-detail-modal,
.cmdk-modal,
.cmdk-dialog {
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Phase 5 Admin Security & Auto-Suspend Shield + Upstream Key Vault Cards */
.security-shield-banner,
.shield-rule-card {
  position: relative;
  overflow: hidden;
}

.security-shield-banner::before,
.shield-rule-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.10),
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
  z-index: 0;
}

.security-shield-banner:hover::before,
.shield-rule-card:hover::before {
  opacity: 1;
}

.security-shield-banner > *,
.shield-rule-card > * {
  position: relative;
  z-index: 1;
}

.security-shield-banner {
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 220, 130, 0.10) 0%,
    rgba(var(--accent-rgb), 0.08) 100%
  );
  border: 1px solid rgba(0, 220, 130, 0.40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .security-shield-banner {
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.08) 0%,
    rgba(255, 255, 255, 0.94) 100%
  );
  border-color: rgba(5, 150, 105, 0.34);
}

.security-shield-banner.is-monitor,
.security-shield-banner.monitor-only {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.14) 0%,
    rgba(13, 17, 27, 0.88) 100%
  );
  border-color: rgba(245, 158, 11, 0.45);
}

[data-theme="light"] .security-shield-banner.is-monitor,
[data-theme="light"] .security-shield-banner.monitor-only {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.10) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
  border-color: rgba(217, 119, 6, 0.38);
}

.shield-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  min-width: 0;
}

.upstream-vault-box,
.gateway-vault-panel {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* 22.3 Navbar Brand Tagline & 7-Tab Collision-Free Responsive Architecture   */
/* -------------------------------------------------------------------------- */

/* Show concise "All-in-One AI Hub & API" tagline across Desktop & Tablet (>= 521px) */
@media (min-width: 521px) {
  .navbar .brand-sub {
    display: block;
    font-size: 9px;
    letter-spacing: 0.035em;
  }
}

/* Desktop Single-Row Precision (1181px–1440px): All 7 Nav Buttons + Brand + User Pill Fit Cleanly */
@media (min-width: 1181px) and (max-width: 1440px) {
  .nav-inner {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px 14px;
  }

  .nav-links {
    gap: 2px;
    padding: 3px;
  }

  .nav-btn {
    padding: 5.5px 9px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .user-email {
    display: none;
  }
}

/* Compact Laptop & Tablet Landscape/Portrait (<= 1180px): Spacious 2-Row Sticky Navbar */
@media (max-width: 1180px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 8px 16px;
    row-gap: 7px;
    column-gap: 10px;
  }

  .nav-inner > div:first-child {
    order: 1;
    min-width: 0;
  }

  .nav-actions {
    order: 2;
    margin-left: auto;
    gap: 7px;
  }

  .nav-links {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    gap: 4px;
    padding: 4px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    flex: 1 0 auto;
    justify-content: center;
    min-height: 36px;
    padding: 6px 11px;
    font-size: 12px;
    white-space: nowrap;
    scroll-snap-align: center;
  }
}

@media (max-width: 520px) {
  .navbar .brand-sub {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* 22.4 Tablet Landscape (1024px) & Tablet Portrait (768px) Grid Calibration  */
/* -------------------------------------------------------------------------- */

/* Unify Console/Admin Horizontal Ribbon & 1024px Grid Breathing Room (<= 1080px) */
@media (max-width: 1080px) {
  .console-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .console-sidebar {
    position: static;
    max-height: none;
    overflow: hidden;
    padding: 12px;
    gap: 10px;
  }

  .console-sidebar-label,
  .console-sidebar > .console-sidebar-label,
  .console-nav-list > .console-sidebar-label,
  .console-nav-group > .console-sidebar-label {
    display: none !important;
    margin: 0 !important;
  }

  .console-nav-list,
  .console-nav-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .console-nav-list::-webkit-scrollbar,
  .console-nav-group::-webkit-scrollbar {
    display: none;
  }

  .console-nav-btn,
  .console-nav-list > .console-nav-btn,
  .console-nav-group > .console-nav-btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    min-height: 38px;
    padding: 7.5px 13px;
  }

  .console-nav-btn.active {
    box-shadow: inset 0 -2px 0 var(--primary);
  }

  .ledger-steps-row,
  .models-kpi-row,
  .docs-base-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-deck-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 3px;
  }

  .studio-deck-nav::-webkit-scrollbar {
    display: none;
  }

  .studio-deck-tab {
    flex: 1 0 auto;
    width: auto;
    white-space: nowrap;
  }
}

/* Tablet Portrait (768px & 820px iPad): Eliminate 3/4-Col & Narrow Half-Width Squish */
@media (max-width: 860px) {
  .bento-col-7,
  .bento-col-5,
  .bento-col-4,
  .bento-col-6,
  .bento-col-8 {
    grid-column: span 12;
  }

  #tab-home .bento-mosaic-12 > .bento-tile {
    transform: none;
  }

  .grid-3,
  #admGatewaysGrid,
  .docs-quick-grid.cols-3,
  .studio-micro-guide,
  .calc-presets-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .grid-3,
  #tab-calculator .grid-2,
  #tab-dashboard .grid-2,
  #tab-admin .grid-2,
  .calc-v2-grid,
  .shield-rules-grid {
    grid-template-columns: 1fr;
  }

  .modal-card,
  #authModal .modal-card,
  .edit-key-dialog,
  #editKeyModal .modal-card,
  .cmdk-modal,
  .cmdk-dialog {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 640px) {
  .grid-3,
  #admGatewaysGrid,
  .docs-quick-grid.cols-3,
  .studio-micro-guide,
  .calc-presets-strip,
  .models-kpi-row,
  .docs-base-strip,
  .shield-rules-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== */
/* 23. DYNAMIC 6-ACCENT .brand-mark-svg VECTOR PALETTE & LEGAL COMPLIANCE     */
/* ========================================================================== */

/* 23.1 Dynamic 3D Hex-Prism [G//AI] Brand Mark SVG Stops & Strokes */
.brand-mark-svg .bm-stop-top-1 {
  stop-color: var(--logo-hi) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-top-2 {
  stop-color: var(--logo-left-hi) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-top-3 {
  stop-color: var(--logo-mid) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-left-1 {
  stop-color: var(--logo-left-hi) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-left-2 {
  stop-color: var(--logo-left-deep) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-right-1 {
  stop-color: var(--logo-right-hi) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-stop-right-2 {
  stop-color: var(--logo-right-deep) !important;
  transition: stop-color 0.22s var(--ease-out);
}

.brand-mark-svg .bm-frame {
  stroke: var(--primary) !important;
  transition: stroke 0.22s var(--ease-out), stroke-opacity 0.22s var(--ease-out);
}

.brand-mark-svg .bm-wire,
.brand-mark-svg .bm-seam {
  stroke: var(--logo-wire) !important;
  transition: stroke 0.22s var(--ease-out);
}

.brand-mark-svg .bm-core {
  fill: var(--logo-core) !important;
}

.brand-mark-svg .bm-plate {
  stroke: var(--primary) !important;
  transition: stroke 0.22s var(--ease-out);
}

.brand-mark-svg .bm-slash-1 {
  stroke: var(--primary) !important;
  transition: stroke 0.22s var(--ease-out);
}

.brand-mark-svg .bm-slash-2 {
  stroke: var(--logo-hi) !important;
  transition: stroke 0.22s var(--ease-out);
}

.brand-mark-svg .bm-dot {
  fill: var(--primary) !important;
  transition: fill 0.22s var(--ease-out);
}

[data-theme="light"] .brand-mark-svg .bm-frame {
  stroke-opacity: 0.86;
}

[data-theme="light"] .brand-mark-svg .bm-plate {
  stroke-opacity: 0.9;
}

/* 23.2 Legal Compliance Views (/terms & /privacy) */
.legal-doc-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.legal-prose-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 34px;
  box-shadow: var(--shadow-card);
  color: var(--text);
  line-height: 1.72;
  font-size: 14px;
  min-width: 0;
}

.legal-prose-card h1 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.036em;
  color: var(--text);
  margin: 6px 0 10px;
  padding-bottom: 0.04em;
}

.legal-prose-card h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 24px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.legal-prose-card h2:first-of-type {
  margin-top: 16px;
}

.legal-prose-card p {
  color: var(--text-2);
  margin: 0 0 12px;
}

.legal-prose-card ul,
.legal-prose-card ol {
  color: var(--text-2);
  padding-left: 20px;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-prose-card li strong {
  color: var(--text);
}

.legal-prose-card code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 1.5px 6px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-ink, var(--primary));
}

@media (max-width: 640px) {
  .legal-prose-card {
    padding: 20px 16px;
    border-radius: 14px;
    font-size: 13.5px;
  }
}

/* ========================================================================== */
/* 24. PUBLIC LIVE SYSTEM STATUS (/status), OTP RECOVERY & ADMIN INTEGRATIONS */
/* ========================================================================== */

/* 24.0 Radial Cursor-Tracking Spotlight on Status & Integration Cards */
.status-overall-banner,
.status-kpi-card,
.integration-card {
  position: relative;
  overflow: hidden;
}

.status-overall-banner::before,
.status-kpi-card::before,
.integration-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(var(--accent-rgb), 0.10),
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
  z-index: 0;
}

.status-overall-banner:hover::before,
.status-kpi-card:hover::before,
.integration-card:hover::before {
  opacity: 1;
}

.status-overall-banner > *,
.status-kpi-card > *,
.integration-card > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* 24.1 Public Live System Status Page (/status — #tab-status)                */
/* -------------------------------------------------------------------------- */

.status-page-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 0 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.status-overall-banner {
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(0, 220, 130, 0.13) 0%,
    rgba(11, 16, 25, 0.90) 100%
  );
  border: 1px solid rgba(0, 220, 130, 0.44);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 0;
  box-shadow:
    0 12px 30px -12px rgba(0, 220, 130, 0.22),
    var(--shadow-card);
}

[data-theme="light"] .status-overall-banner {
  background: linear-gradient(
    135deg,
    rgba(5, 150, 105, 0.10) 0%,
    rgba(255, 255, 255, 0.96) 100%
  );
  border-color: rgba(5, 150, 105, 0.36);
  box-shadow:
    0 10px 26px -12px rgba(5, 150, 105, 0.16),
    var(--shadow-card);
}

.status-overall-banner.is-degraded,
.status-overall-banner.degraded,
.status-overall-banner.level-warning {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.15) 0%,
    rgba(13, 17, 27, 0.92) 100%
  );
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow:
    0 12px 30px -12px rgba(245, 158, 11, 0.24),
    var(--shadow-card);
}

[data-theme="light"] .status-overall-banner.is-degraded,
[data-theme="light"] .status-overall-banner.degraded,
[data-theme="light"] .status-overall-banner.level-warning {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.11) 0%,
    rgba(255, 255, 255, 0.96) 100%
  );
  border-color: rgba(217, 119, 6, 0.40);
}

.status-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.status-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  box-shadow: var(--shadow-card);
}

.status-components-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.status-component-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
  transition: background-color 0.16s var(--ease-out);
}

.status-component-name {
  font-weight: 600;
  color: var(--text);
  margin-right: auto;
  min-width: 0;
}

.status-component-row > .status-component-name + * {
  margin-left: auto;
}

.status-component-row:last-child {
  border-bottom: none;
}

.status-component-row:hover {
  background: var(--bg-hover);
}

.status-component-left,
.status-component-info {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 240px;
  min-width: 0;
}

.status-component-right,
.status-component-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00dc82;
  box-shadow: 0 0 10px rgba(0, 220, 130, 0.65);
  flex-shrink: 0;
}

.status-dot.degraded,
.status-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.65);
}

.status-dot.down,
.status-dot.error {
  background: #f43f5e;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.65);
}

/* -------------------------------------------------------------------------- */
/* 24.2 #authModal Forgot-Password OTP, Turnstile & Console Email Verify      */
/* -------------------------------------------------------------------------- */

.auth-label-row,
.password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.auth-label-row > label,
.password-label-row > label {
  margin-bottom: 0 !important;
}

.auth-forgot-link {
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--accent-ink, var(--primary));
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.auth-forgot-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.otp-code-input {
  font-family: 'JetBrains Mono', Consolas, monospace !important;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-align: center;
  min-height: 46px;
  padding: 9px 14px;
}

.otp-code-input::placeholder {
  letter-spacing: 0.24em;
  font-weight: 500;
  opacity: 0.45;
}

.otp-code-input.otp-inline {
  max-width: 175px;
  font-size: 16px !important;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  min-height: 38px;
  padding: 6px 10px;
}

#authTurnstileMount {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 66px;
  margin: 10px 0 12px;
  overflow: hidden;
}

#authTurnstileMount.hidden {
  display: none !important;
}

.email-verify-banner,
.email-verify-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin-top: 8px;
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* 24.3 Admin Menu #12: Auth, Email & Alerts (#adm-view-integrations)         */
/* -------------------------------------------------------------------------- */

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.integrations-grid > * {
  min-width: 0;
  max-width: 100%;
}

.integration-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s var(--ease-out);
}

.integration-card:hover {
  border-color: var(--border-light);
}

.integration-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* 24.4 Responsive Breakpoints Across Desktop, Tablet & Phone (360px–960px)   */
/* -------------------------------------------------------------------------- */

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

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

@media (max-width: 640px) {
  .status-overall-banner {
    padding: 16px 15px;
    border-radius: 14px;
  }

  .status-component-row {
    padding: 12px 14px;
    gap: 8px 12px;
  }

  .status-component-right,
  .status-component-meta {
    width: 100%;
    justify-content: space-between;
  }

  .integration-card {
    padding: 15px 14px;
  }

  .otp-code-input.otp-inline {
    max-width: 100%;
    width: 100%;
  }
}

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

/* ========================================================================== */
/* 25. GOOGLE / GMAIL 1-CLICK OAUTH SIGN-IN, DIVIDER & ADMIN OAUTH SETUP      */
/* ========================================================================== */

.auth-google-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 2px 0 14px;
  width: 100%;
  min-width: 0;
}

.auth-google-section.hidden {
  display: none !important;
}

/* Automatic divider flip when #authGoogleSection sits below #authSubmitBtn for returning password users */
#authSubmitBtn ~ .auth-google-section,
.auth-google-section.is-below,
.auth-google-section[data-pos="below"] {
  margin: 14px 0 4px;
}

#authSubmitBtn ~ .auth-google-section > .auth-or-divider,
.auth-google-section.is-below > .auth-or-divider,
.auth-google-section[data-pos="below"] > .auth-or-divider {
  order: -1;
}

.google-auth-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 11px;
  background: linear-gradient(180deg, #1b212d 0%, #121720 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px -8px rgba(0, 0, 0, 0.58);
  transition:
    transform 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    background 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}

.google-auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #222938 0%, #171d28 100%);
  border-color: rgba(var(--accent-rgb), 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px -8px rgba(var(--accent-rgb), 0.28),
    0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.google-auth-btn:active:not(:disabled) {
  transform: translateY(0);
}

.google-auth-btn:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.24);
}

[data-theme="light"] .google-auth-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 6px 16px -8px rgba(15, 23, 42, 0.10);
}

[data-theme="light"] .google-auth-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: rgba(var(--accent-rgb), 0.52);
  box-shadow:
    0 10px 22px -8px rgba(var(--accent-rgb), 0.20),
    0 0 0 1px rgba(var(--accent-rgb), 0.14);
}

.google-auth-btn > svg,
.google-auth-btn .google-g-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

#authGoogleBtnLabel,
.google-auth-label {
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.32;
}

.google-auth-pill,
.google-auth-sub,
.google-auth-btn .badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.36);
  color: var(--accent-ink, var(--primary));
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.google-gis-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
}

.google-gis-mount.hidden {
  display: none !important;
}

.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 2px 0;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  user-select: none;
}

.auth-or-divider::before,
.auth-or-divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

.auth-or-divider > span {
  white-space: nowrap;
  padding: 0 2px;
}

/* Admin Google OAuth Quick-Setup Copy Rows (#adm-view-integrations) */
.oauth-setup-box,
.google-oauth-ref-box {
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.oauth-uri-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.oauth-uri-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  word-break: break-all;
  min-width: 0;
}

@media (max-width: 400px) {
  .google-auth-btn {
    padding: 9px 11px;
    gap: 7px;
    font-size: 13px;
  }

  .google-auth-pill,
  .google-auth-sub,
  .google-auth-btn .badge {
    font-size: 8.5px;
    padding: 1.5px 5.5px;
  }

  .auth-or-divider {
    font-size: 9.5px;
    gap: 7px;
  }
}
