/* ==========================================================================
   NORA 5.0 — LINEAR FLUX DESIGN SYSTEM
   Engineered by Damien Adams (Vaztinix)
   High-precision matte obsidian aesthetic with Electric Iris & Nora Ice accents
   ========================================================================== */

:root {
  /* Base Obsidian Surfaces */
  --nora-bg: #08090a;
  --nora-bg-subtle: #0c0d10;
  --nora-surface: #0f1014;
  --nora-surface-2: #14161c;
  --nora-surface-3: #1b1d25;
  --nora-surface-hover: #1e2029;

  /* Crisp Hairline Borders */
  --nora-border: rgba(255, 255, 255, 0.08);
  --nora-border-strong: rgba(255, 255, 255, 0.14);
  --nora-border-iris: rgba(94, 106, 210, 0.45);
  --nora-border-sky: rgba(56, 189, 248, 0.4);

  /* Typography */
  --nora-text: #f7f8f8;
  --nora-text-secondary: #8a8f98;
  --nora-text-tertiary: #62666d;

  /* Deliberate Theme Accents (Clean, solid precision colors) */
  --nora-iris: #5e6ad2;
  --nora-iris-hover: #6c78e0;
  --nora-iris-soft: rgba(94, 106, 210, 0.14);
  --nora-sky: #38bdf8;
  --nora-sky-soft: rgba(56, 189, 248, 0.12);
  --nora-green: #4cb782;
  --nora-green-soft: rgba(76, 183, 130, 0.12);
  --nora-amber: #f2c94c;
  --nora-amber-soft: rgba(242, 201, 76, 0.12);
  --nora-red: #eb5757;
  --nora-red-soft: rgba(235, 87, 87, 0.12);

  /* Typography Stacks */
  --nora-font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nora-font-display: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --nora-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Geometry & Motion */
  --nora-radius-xs: 6px;
  --nora-radius-sm: 8px;
  --nora-radius-md: 12px;
  --nora-radius-lg: 16px;
  --nora-radius-xl: 20px;
  --nora-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nora-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--nora-bg);
  color: var(--nora-text);
  font-family: var(--nora-font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
  line-height: 1.55;
}

/* Architectural Horizon Wash — Subtle Sky Blue & Deep Cobalt Depth */
.linear-horizon {
  position: fixed;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  max-width: 160vw;
  height: 460px;
  background: radial-gradient(ellipse 68% 52% at 50% 38%, rgba(56, 189, 248, 0.14) 0%, rgba(37, 99, 235, 0.08) 42%, rgba(94, 106, 210, 0.04) 68%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.linear-grid-mask {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 10%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--nora-bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* Focus Ring Accessibility (Keyboard, VR, Switch Control) */
:focus-visible {
  outline: 2px solid var(--nora-iris);
  outline-offset: 2px;
}

/* ===== LINEAR TOP NAVIGATION BAR ===== */
.linear-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 58px;
  background: rgba(8, 9, 10, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--nora-border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.linear-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.linear-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--nora-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.linear-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.25s var(--nora-ease-spring);
}

.linear-brand:hover img {
  transform: scale(1.08) rotate(-4deg);
}

.linear-brand-version {
  font-family: var(--nora-font-mono);
  font-size: 0.68rem;
  color: var(--nora-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nora-border);
  padding: 1px 6px;
  border-radius: 5px;
}

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

.linear-nav-link {
  color: var(--nora-text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 7px;
  transition: color 0.16s ease, background 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.linear-nav-link:hover,
.linear-nav-link.active {
  color: var(--nora-text);
  background: rgba(255, 255, 255, 0.06);
}

.linear-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.linear-cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nora-border);
  color: var(--nora-text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.linear-cmdk-trigger:hover {
  border-color: var(--nora-border-strong);
  color: var(--nora-text);
  background: rgba(255, 255, 255, 0.07);
}

.linear-kbd {
  font-family: var(--nora-font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--nora-text-secondary);
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
}

/* Linear Buttons (Crisp Solid Contrast — No tacky gradient fills) */
.linear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.18s var(--nora-ease);
  white-space: nowrap;
}

.linear-btn-primary {
  background: #f7f8f8;
  color: #08090a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.linear-btn-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.16);
}

.linear-btn-iris {
  background: var(--nora-iris);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 10px rgba(94, 106, 210, 0.35);
}

.linear-btn-iris:hover {
  background: var(--nora-iris-hover);
  transform: translateY(-1px);
}

.linear-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--nora-border);
  color: var(--nora-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.linear-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--nora-border-strong);
}

.linear-mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nora-border);
  color: var(--nora-text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 900px) {
  .linear-nav {
    display: none;
  }
  .linear-mobile-toggle {
    display: inline-flex;
  }
  .linear-cmdk-trigger span.cmdk-label {
    display: none;
  }
}

/* Mobile Nav Drawer */
.linear-mobile-drawer {
  display: none;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  background: rgba(12, 13, 16, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nora-border);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 6px;
  animation: linearDropIn 0.2s var(--nora-ease);
}

.linear-mobile-drawer.open {
  display: flex;
}

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

/* ===== LINEAR SURFACES & POINTER SPOTLIGHT CARDS ===== */
.linear-card {
  position: relative;
  background: var(--nora-glass-bg, var(--nora-surface));
  backdrop-filter: var(--nora-glass-backdrop, none);
  -webkit-backdrop-filter: var(--nora-glass-backdrop, none);
  border: 1px solid var(--nora-border);
  border-radius: var(--nora-radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, transform 0.2s var(--nora-ease), background 0.18s ease;
  overflow: hidden;
}

.linear-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, -20%),
    rgba(56, 189, 248, 0.065),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

.linear-card:hover {
  border-color: rgba(186, 230, 253, 0.18);
  background: var(--nora-surface-2);
}

.linear-card:hover::before {
  opacity: 1;
}

.linear-card > * {
  position: relative;
  z-index: 1;
}

/* Scroll Stagger Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  transition: opacity 0.55s var(--nora-ease), transform 0.55s var(--nora-ease), filter 0.55s var(--nora-ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ===== LINEAR COMMAND PALETTE (⌘K) ===== */
#nora-cmdk-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
}

#nora-cmdk-modal.open {
  display: flex;
  animation: cmdkBackdropIn 0.16s ease forwards;
}

@keyframes cmdkBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nora-cmdk-box {
  width: 100%;
  max-width: 660px;
  background: #12141a;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  animation: cmdkScaleIn 0.18s var(--nora-ease) forwards;
}

@keyframes cmdkScaleIn {
  from { opacity: 0; transform: scale(0.97) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.nora-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--nora-border);
}

.nora-cmdk-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--nora-text);
  font-size: 0.94rem;
  font-family: inherit;
  outline: none;
}

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

.nora-cmdk-list {
  max-height: 430px;
  overflow-y: auto;
  padding: 8px;
}

.nora-cmdk-group-label {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--nora-text-tertiary);
  padding: 10px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nora-cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--nora-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nora-cmdk-item.active,
.nora-cmdk-item:hover {
  background: rgba(94, 106, 210, 0.15);
  border-color: rgba(125, 211, 252, 0.22);
  color: var(--nora-text);
}

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

.nora-cmdk-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
}

.nora-cmdk-item.active .nora-cmdk-icon,
.nora-cmdk-item:hover .nora-cmdk-icon {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

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

.nora-cmdk-item-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.nora-cmdk-item-title {
  color: #f7f8f8;
  font-size: 0.86rem;
  font-weight: 550;
  line-height: 1.25;
}

.nora-cmdk-item-badge {
  font-family: var(--nora-font-mono);
  font-size: 0.64rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #9aa5ff;
  letter-spacing: 0.02em;
}

.nora-cmdk-item-badge.on {
  color: #6ee7b7;
  border-color: rgba(76, 183, 130, 0.45);
  background: rgba(76, 183, 130, 0.14);
}

.nora-cmdk-item-desc {
  color: #7e8592;
  font-size: 0.74rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nora-cmdk-item.active .nora-cmdk-item-desc,
.nora-cmdk-item:hover .nora-cmdk-item-desc {
  color: #aeb6c4;
}

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

@media (max-width: 560px) {
  .nora-cmdk-item-desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .nora-cmdk-item-right .linear-kbd {
    display: none;
  }
}

.nora-cmdk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--nora-border);
  font-size: 0.74rem;
  color: var(--nora-text-tertiary);
}

.nora-cmdk-chord-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 14px;
  background: rgba(56, 189, 248, 0.07);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 0.72rem;
  font-family: var(--nora-font-mono);
  color: #cbd5e1;
}

.nora-cmdk-chord-bar a {
  color: #f7f8f8;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nora-cmdk-chord-bar a:hover {
  border-color: #38bdf8;
  color: #ffffff;
}

#nora-global-chord-hud {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 999998;
  background: #0f1014;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: var(--nora-font-mono);
  font-size: 0.74rem;
  color: #cbd5e1;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

#nora-global-chord-hud.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ===== LINEAR FOOTER ===== */
.linear-footer {
  border-top: 1px solid var(--nora-border);
  background: var(--nora-bg);
  padding: 56px 24px 36px;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.linear-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr);
  gap: 36px;
}

@media (max-width: 900px) {
  .linear-footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

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

.linear-footer-col h5 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nora-text);
  margin: 0 0 12px 0;
}

.linear-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.linear-footer-links a {
  color: var(--nora-text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.linear-footer-links a:hover {
  color: var(--nora-text);
}

.linear-footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--nora-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--nora-text-tertiary);
}

/* Toast Notifications */
#nora-flux-toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.nora-flux-toast {
  background: #14161c;
  border: 1px solid var(--nora-border-strong);
  color: var(--nora-text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideUp 0.25s var(--nora-ease) forwards;
}

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

/* =========================================================================
   MULTI-DROPDOWN TOP NAVIGATION & MONOCHROME WHITE TYPOGRAPHY OVERRIDES
   ========================================================================= */
.linear-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.linear-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.linear-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a1a6b0;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.linear-nav-trigger:hover,
.linear-nav-trigger.active,
.linear-nav-item.open > .linear-nav-trigger {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.linear-nav-chevron {
  width: 11px;
  height: 11px;
  opacity: 0.6;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.linear-nav-item:hover .linear-nav-chevron,
.linear-nav-item.open .linear-nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.linear-nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 248px;
  padding: 6px;
  background: #0f1014;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 200;
}

.linear-nav-item:hover > .linear-nav-dropdown,
.linear-nav-item:focus-within > .linear-nav-dropdown,
.linear-nav-item.open > .linear-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.linear-dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: #f7f8f8;
  transition: background 0.14s ease;
}

.linear-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.linear-dropdown-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.linear-dropdown-desc {
  font-size: 0.72rem;
  color: #8a8f98;
}

/* Monochrome White Overrides replacing excess blue text */
code, pre code, .cmd-card-name, .section-eyebrow, .docs-table td code, .linear-cmdk-row-hint {
  color: #ffffff !important;
}
code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--nora-font-mono);
  font-size: 0.88em;
}
pre code {
  background: transparent;
  padding: 0;
  border: none;
}

.linear-mobile-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 0;
}
.linear-mobile-group-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: #ffffff;
  padding: 4px 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.linear-mobile-sub {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}

/* Strict Desktop/Dropdown Layout Safety Guards (v5.4) */
.linear-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
}
.linear-header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}
.linear-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  flex-wrap: nowrap !important;
}
.linear-nav-item {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}
.linear-nav-trigger {
  white-space: nowrap !important;
  color: #b4b9c4 !important;
  text-decoration: none !important;
}
.linear-nav-trigger:hover,
.linear-nav-trigger.active {
  color: #ffffff !important;
}
.linear-nav-dropdown {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 245px !important;
  padding: 6px !important;
  background: #0f1014 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-4px) !important;
  z-index: 500 !important;
}
.linear-nav-item:hover > .linear-nav-dropdown,
.linear-nav-item:focus-within > .linear-nav-dropdown,
.linear-nav-item.open > .linear-nav-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
.linear-dropdown-link,
.linear-dropdown-link:link,
.linear-dropdown-link:visited {
  color: #ffffff !important;
  text-decoration: none !important;
}
.linear-mobile-drawer {
  display: none !important;
}
.linear-mobile-drawer.open {
  display: flex !important;
}
@media (min-width: 901px) {
  .linear-mobile-drawer,
  .linear-mobile-drawer.open {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .linear-nav {
    display: none !important;
  }
}

/* =========================================================================
   ARCHITECTURAL SKY-BLUE & COBALT ATMOSPHERIC LIGHTING
   ========================================================================= */
.nora-sky-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.nora-sky-orb {
  position: absolute;
  pointer-events: none;
}

.nora-sky-orb-1 {
  width: 1100px;
  height: 520px;
  top: -260px;
  left: 12%;
  background: radial-gradient(ellipse at 50% 40%, rgba(56, 189, 248, 0.09) 0%, transparent 70%);
}

.nora-sky-orb-2 {
  width: 1000px;
  height: 560px;
  top: 8%;
  right: -220px;
  background: radial-gradient(ellipse at 50% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 72%);
}

.nora-sky-orb-3 {
  width: 1200px;
  height: 440px;
  bottom: -240px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(14, 165, 233, 0.065) 0%, transparent 74%);
}

.linear-btn-primary {
  transition: transform 0.15s var(--nora-ease), filter 0.15s ease, box-shadow 0.18s ease !important;
}

.linear-btn-primary:hover {
  filter: brightness(1.06);
}

.linear-btn-primary:active {
  transform: scale(0.985);
}

:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .linear-btn, .linear-btn-primary, .linear-cmdk-trigger { min-height: 40px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .linear-header-inner { padding-left: 16px; padding-right: 16px; }
}

@media (min-width: 2100px) {
  .nora-sky-orb-1 { width: 1500px; }
  .nora-sky-orb-2 { width: 1400px; }
  .nora-sky-orb-3 { width: 1700px; }
}

@media (hover: none) and (pointer: coarse) {
  .linear-nav-link, .linear-dropdown-link, .social-btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none !important; }
}

/* ==========================================================================
   GLOBAL GLASS OPACITY (10-100) & BLUR (0-100) + WINTER FROST EVENT THEME
   ========================================================================== */
:root {
  --nora-ui-opacity: 0.92;
  --nora-ui-blur: 16px;
  --nora-glass-bg: rgba(14, 16, 21, var(--nora-ui-opacity, 0.92));
  --nora-glass-surface: rgba(15, 16, 20, var(--nora-ui-opacity, 0.92));
  --nora-glass-backdrop: blur(var(--nora-ui-blur, 16px)) saturate(150%);
}

html.nora-has-glass-override .linear-card,
html.nora-has-glass-override .panel,
html.nora-has-glass-override .config-card,
html.nora-has-glass-override .server-card,
html.nora-has-glass-override .nora-sm-card,
html.nora-has-glass-override .hero-banner,
html.nora-has-glass-override .modal-box,
html.nora-has-glass-override .linear-nav-dropdown,
html.nora-has-glass-override .linear-cmdk-modal,
html.nora-has-glass-override .status-hero,
html.nora-has-glass-override .component-card,
html.nora-has-glass-override .latency-chart-card,
html.nora-has-glass-override .shard-card,
html.nora-has-glass-override .incident-card,
html.nora-has-glass-override .docs-aside,
html.nora-has-glass-override .legal-aside {
  background: var(--nora-glass-bg) !important;
  backdrop-filter: var(--nora-glass-backdrop) !important;
  -webkit-backdrop-filter: var(--nora-glass-backdrop) !important;
}

/* Reduced Motion Mode (Shared Sitewide) */
html.nora-reduced-motion *,
body.nora-reduced-motion * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

/* Winter Frost & Northern Starlight Theme (Interactive Fun Mode with ON/OFF Switch — Non-Santa) */
@keyframes noraWinterAuroraShift {
  0% { transform: translateX(-50%) translateY(0px) scale(1); opacity: 0.78; filter: hue-rotate(0deg); }
  50% { transform: translateX(-46%) translateY(10px) scale(1.06); opacity: 0.98; filter: hue-rotate(14deg); }
  100% { transform: translateX(-50%) translateY(0px) scale(1); opacity: 0.78; filter: hue-rotate(0deg); }
}

@keyframes noraWinterGarlandTwinkle {
  0%, 100% { opacity: 0.42; transform: scale(0.88) translateY(0px); }
  50% { opacity: 1; transform: scale(1.22) translateY(1px); }
}

@keyframes noraWinterShimmerSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes noraWinterBurstPop {
  0% { transform: translate(-50%, -50%) scale(0.25) rotate(0deg); opacity: 1; }
  70% { opacity: 0.92; }
  100% { transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, -28px))) scale(1.15) rotate(var(--fr, 90deg)); opacity: 0; }
}

@keyframes noraSnowflakeIdleWiggle {
  0%, 82%, 100% { transform: rotate(0deg) scale(1); }
  86% { transform: rotate(-12deg) scale(1.08); }
  91% { transform: rotate(12deg) scale(1.1); }
  96% { transform: rotate(-6deg) scale(1.04); }
}

@keyframes noraSnowflakeShakeHard {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  15% { transform: translate(-3px, -1px) rotate(-18deg) scale(1.22); }
  30% { transform: translate(3px, 1px) rotate(18deg) scale(1.24); }
  45% { transform: translate(-3px, 1px) rotate(-14deg) scale(1.2); }
  60% { transform: translate(3px, -1px) rotate(14deg) scale(1.18); }
  75% { transform: translate(-2px, 0) rotate(-8deg) scale(1.12); }
}

html.nora-winter-mode body {
  background-color: #050a14;
}

html.nora-winter-mode .linear-horizon {
  background: radial-gradient(ellipse 76% 60% at 50% 30%, rgba(125, 211, 252, 0.28) 0%, rgba(52, 211, 153, 0.16) 40%, rgba(167, 139, 250, 0.12) 68%, transparent 86%) !important;
  animation: noraWinterAuroraShift 8s ease-in-out infinite;
}

html.nora-winter-mode.nora-winter-no-aurora .linear-horizon {
  animation: none !important;
}

html.nora-winter-mode .linear-header,
html.nora-winter-mode .topbar {
  border-bottom-color: rgba(125, 211, 252, 0.34) !important;
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.14), inset 0 -1px 0 rgba(186, 230, 253, 0.16) !important;
}

html.nora-winter-mode .linear-card,
html.nora-winter-mode .panel,
html.nora-winter-mode .config-card,
html.nora-winter-mode .nora-sm-card,
html.nora-winter-mode .hero-banner,
html.nora-winter-mode .status-hero,
html.nora-winter-mode .component-card,
html.nora-winter-mode .shard-card,
html.nora-winter-mode .incident-card,
html.nora-winter-mode .docs-aside,
html.nora-winter-mode .legal-aside,
html.nora-winter-mode .nora-cmdk-box,
html.nora-winter-mode .nora-game-card {
  border-color: rgba(125, 211, 252, 0.26) !important;
  box-shadow: 0 14px 36px rgba(2, 12, 27, 0.58), inset 0 1px 0 rgba(224, 242, 254, 0.16) !important;
}

html.nora-winter-mode .linear-btn-primary {
  box-shadow: 0 4px 18px rgba(125, 211, 252, 0.25) !important;
}

html.nora-winter-mode ::selection {
  background: rgba(125, 211, 252, 0.32);
  color: #f0f9ff;
}

#nora-winter-snow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99980;
  opacity: 0.94;
}

#nora-winter-garland-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  pointer-events: none;
  z-index: 99985;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  overflow: hidden;
  border-top: 1px solid rgba(186, 230, 253, 0.18);
}

.nora-winter-bulb {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  animation: noraWinterGarlandTwinkle 2.2s ease-in-out infinite;
}

.nora-winter-frost-spark {
  position: fixed;
  pointer-events: none;
  z-index: 99990;
  font-size: 13px;
  color: #bae6fd;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
  animation: noraWinterBurstPop 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  user-select: none;
}

#nora-winter-floating-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99988;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.38);
  box-shadow: 0 10px 28px rgba(2, 12, 27, 0.65), 0 0 18px rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e0f2fe;
  font-family: var(--nora-font-sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
}

#nora-winter-floating-pill button {
  background: rgba(125, 211, 252, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: #bae6fd;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#nora-winter-floating-pill button:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #ffffff;
  border-color: rgba(186, 230, 253, 0.55);
}

#nora-winter-floating-pill button.winter-off-btn {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

#nora-winter-floating-pill button.winter-off-btn:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #ffffff;
}

@media (max-width: 640px) {
  #nora-winter-floating-pill {
    right: 10px;
    bottom: 10px;
    padding: 5px 8px 5px 10px;
    font-size: 0.71rem;
    gap: 6px;
  }
}

.nora-winter-settings-snowflake {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(125, 211, 252, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: #bae6fd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  z-index: 20;
  user-select: none;
  animation: noraSnowflakeIdleWiggle 4.5s ease-in-out infinite;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nora-winter-settings-snowflake:hover {
  background: rgba(125, 211, 252, 0.22);
  border-color: rgba(186, 230, 253, 0.6);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.4);
  transform: scale(1.06);
}

.nora-winter-settings-snowflake.shaking,
.nora-winter-settings-snowflake.is-shaking {
  animation: noraSnowflakeShakeHard 0.42s ease !important;
}

.nora-winter-settings-snowflake.locked,
.nora-winter-settings-snowflake.is-locked,
.nora-winter-settings-snowflake.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(167, 139, 250, 0.24));
  border-color: rgba(186, 230, 253, 0.72);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.5);
}
