/* ==========================================================================
   Neuronix -- design tokens transcribed from src/index.css (self-hosted
   fonts, liquid-glass utility system, grain, cyber-grid, glow tokens),
   plus all component CSS for the vanilla-JS port of the React prototype.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/plusjakartasans-var.woff2') format('woff2-variations'), url('../fonts/plusjakartasans-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/spacegrotesk-var.woff2') format('woff2-variations'), url('../fonts/spacegrotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fira Code';
  src: url('../fonts/firacode-var.woff2') format('woff2-variations'), url('../fonts/firacode-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nx-bg: #0b1226;
  --nx-bg-deep: #070c1a;
  --nx-cyan: #06b6d4;
  --nx-cyan-light: #22d3ee;
  --nx-blue: #38bdf8;
  --nx-violet: #a855f7;
  --nx-violet-light: #c084fc;
  --nx-emerald: #10b981;
  --nx-emerald-light: #34d399;
  --nx-amber: #f59e0b;
  --nx-rose: #f43f5e;
  --nx-text: #e2e8f0;
  --nx-text-dim: #94a3b8;
  --nx-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nx-font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --nx-font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --nx-radius: 16px;
  --nx-radius-lg: 24px;
  --nx-shell-w: 1280px;
}

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

/**
 * CRITICAL: the `hidden` attribute only carries the UA stylesheet's
 * `display:none`, which ANY author `display` declaration silently beats.
 * The three full-viewport overlays below (#nx-mega-menu / .nx-search-modal /
 * #nx-bookmarks-drawer) each ship `display:flex` plus
 * `position:fixed; inset:0; z-index:70; background:rgba(0,0,0,0.8)`, so with
 * `hidden` defeated all three painted at once over the whole site --
 * 1 - 0.2^3 = 99.2% black. The entire page rendered as a black screen on
 * every device while the DOM underneath reported itself perfectly visible.
 * This guard makes `hidden` actually mean hidden, for these and anything added later.
 */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--nx-font-sans);
  background: var(--nx-bg);
  color: var(--nx-text);
  overflow-x: hidden;
  line-height: 1.6;
}
body.nx-scroll-lock { overflow: hidden; }

h1, h2, h3, h4, h5 { font-family: var(--nx-font-display); font-weight: 700; color: #fff; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }
code, pre, .nx-mono { font-family: var(--nx-font-mono); }

.nx-shell { max-width: var(--nx-shell-w); margin: 0 auto; padding: 0 1.25rem; }
.nx-section { padding: 3rem 0; position: relative; z-index: 10; }
.nx-mono-dim { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
.nx-skip-link { position: absolute; left: -9999px; top: 0; background: var(--nx-cyan); color: #000; padding: 0.5rem 1rem; z-index: 999; }
.nx-skip-link:focus { left: 1rem; top: 1rem; }

/* ================= Background / grain ================= */
.nx-bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.grain-overlay {
  position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; opacity: 0.28; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 19 -9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain-overlay-fine {
  position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; opacity: 0.18; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='0.7'/%3E%3C/svg%3E");
}
#nx-main, header, footer { position: relative; z-index: 10; }

/* ================= Liquid glass system ================= */
.nx-panel, .nx-panel-sm, .nx-card, .liquid-glass-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(10,16,38,0.75) 35%, rgba(5,8,20,0.92) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.22);
  border-radius: var(--nx-radius-lg);
  position: relative;
}
.nx-panel { padding: 1.75rem; margin-bottom: 1.5rem; }
.nx-panel-sm { padding: 1.25rem; border-radius: var(--nx-radius); margin-bottom: 1rem; }
.liquid-glass, .nx-badge-pill {
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(14,23,47,0.7) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
}
.nx-badge-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; font-family: var(--nx-font-mono); font-size: 0.68rem; font-weight: 700; color: var(--nx-cyan-light); border-color: rgba(6,182,212,0.35); }
.nx-badge-violet { color: var(--nx-violet-light); border-color: rgba(168,85,247,0.35); }
.nx-badge-emerald { color: var(--nx-emerald-light); border-color: rgba(16,185,129,0.35); }
.nx-badge-blue { color: var(--nx-blue); border-color: rgba(56,189,248,0.35); }
.nx-badge-hot { font-size: 0.6rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(244,63,94,0.2); color: #fda4af; border: 1px solid rgba(244,63,94,0.4); }
.nx-badge-trend { font-size: 0.6rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(168,85,247,0.2); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.4); }
.nx-badge-level { font-size: 0.6rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(255,255,255,0.08); color: #cbd5e1; }

.nx-cyber-grid { background-size: 40px 40px; background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px); }

@keyframes nxLiquidMorph { 0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(0) scale(1); } 50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: rotate(180deg) scale(1.08); } 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(360deg) scale(1); } }
@keyframes nxPulseGlow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
.nx-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--nx-cyan-light); box-shadow: 0 0 8px rgba(34,211,238,0.9); animation: nxPulseGlow 1.6s ease-in-out infinite; }
.nx-dot-pulse { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: var(--nx-emerald-light); margin-right: 0.35rem; animation: nxPulseGlow 1.6s ease-in-out infinite; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--nx-bg-deep); }
::-webkit-scrollbar-thumb { background: #151e36; border-radius: 999px; border: 1px solid rgba(6,182,212,0.25); }
::-webkit-scrollbar-thumb:hover { background: var(--nx-cyan); }

/* ================= Buttons ================= */
.nx-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.5rem; border-radius: 14px; font-family: var(--nx-font-display); font-weight: 700; font-size: 0.82rem;
  color: #fff; background: linear-gradient(90deg, var(--nx-cyan) 0%, #2563eb 55%, #4f46e5 100%);
  box-shadow: 0 0 25px rgba(6,182,212,0.5); border: 1px solid rgba(255,255,255,0.2); transition: box-shadow 0.25s, transform 0.2s;
}
.nx-btn-primary:hover { box-shadow: 0 0 40px rgba(6,182,212,0.8); transform: translateY(-1px); }
.nx-full-width { width: 100%; margin-top: 0.5rem; }
.nx-btn-ghost-sm {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border-radius: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim);
  transition: color 0.2s, border-color 0.2s;
}
.nx-btn-ghost-sm:hover { color: var(--nx-cyan-light); border-color: rgba(6,182,212,0.4); }
.nx-icon-btn, .nx-icon-mini, .nx-tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--nx-text-dim); transition: all 0.2s; cursor: pointer;
}
.nx-icon-btn { width: 36px; height: 36px; }
.nx-icon-mini { width: 28px; height: 28px; background: rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.14); }
.nx-icon-btn:hover, .nx-icon-mini:hover { color: var(--nx-cyan-light); border-color: rgba(6,182,212,0.5); }
.nx-bookmark-btn.is-active { background: var(--nx-amber); color: #000; border-color: #fbbf24; box-shadow: 0 0 12px rgba(245,158,11,0.6); }
.nx-share-btn.is-copied, .nx-copy-btn.is-copied { color: var(--nx-emerald-light); border-color: rgba(16,185,129,0.5); }

/* ================= Navbar ================= */
.nx-navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; padding: 1rem 0; background: linear-gradient(to bottom, rgba(3,6,18,0.9), transparent); border-bottom: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; }
.nx-navbar.is-scrolled { background: rgba(3,6,18,0.82); backdrop-filter: blur(24px); border-bottom-color: rgba(6,182,212,0.2); box-shadow: 0 10px 35px rgba(0,0,0,0.85); padding: 0.7rem 0; }
.nx-navbar-inner { display: flex; align-items: center; gap: 1rem; }
.nx-brand { display: flex; align-items: center; gap: 0.7rem; }
.nx-brand-mark { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #05091b; border: 1px solid rgba(6,182,212,0.4); color: var(--nx-cyan-light); }
.nx-brand-row { display: flex; align-items: center; gap: 0.4rem; }
.nx-brand-name { font-family: var(--nx-font-display); font-weight: 900; font-size: 1.1rem; letter-spacing: 0.05em; background: linear-gradient(90deg, #fff, #cffafe, var(--nx-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-brand-pill { font-family: var(--nx-font-mono); font-size: 0.6rem; padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid rgba(6,182,212,0.4); color: var(--nx-cyan-light); }
.nx-brand-sub { font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); display: flex; align-items: center; }
.nx-directory-trigger { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border-radius: 12px; background: rgba(6,182,212,0.08); border: 1px solid rgba(6,182,212,0.5); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.nx-pill-xs { font-size: 0.58rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: rgba(6,182,212,0.2); }
.nx-pill-violet { background: rgba(168,85,247,0.2); color: #d8b4fe; }
.nx-view-switch { display: none; align-items: center; gap: 0.25rem; padding: 0.25rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); flex: 1; justify-content: center; }
.nx-view-switch a { display: flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border-radius: 9px; font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); white-space: nowrap; }
.nx-view-switch a.is-active { background: linear-gradient(90deg, rgba(6,182,212,0.3), rgba(37,99,235,0.3)); color: var(--nx-cyan-light); border: 1px solid rgba(6,182,212,0.5); }
.nx-navbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nx-search-trigger { display: none; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; }
.nx-search-trigger kbd { font-size: 0.62rem; background: rgba(0,0,0,0.4); padding: 0.1rem 0.35rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); }
.nx-badge-count { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 999px; background: var(--nx-amber); color: #000; font-size: 0.6rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#nx-bookmarks-trigger { position: relative; }
.nx-hud-pill { display: none; align-items: center; gap: 0.5rem; padding-left: 0.6rem; border-left: 1px solid rgba(255,255,255,0.1); font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); }
.nx-icon-btn .icon-off { color: var(--nx-text-dim); }
#nx-sound-toggle[aria-pressed="true"] { border-color: rgba(6,182,212,0.5); color: var(--nx-cyan-light); }
@media (min-width: 1024px) { .nx-view-switch, .nx-search-trigger span, .nx-hud-pill { display: flex; } }

/* Mobile navbar collapse: prevent the desktop-width flex row from
   overflowing narrow viewports (fixed real bug: 961px content in a
   375px viewport). */
@media (max-width: 767px) {
  .nx-navbar-inner { flex-wrap: nowrap; gap: 0.5rem; }
  .nx-brand-sub { display: none; }
  .nx-brand-pill { display: none; }
  .nx-directory-trigger span:not(.nx-pill-xs), .nx-directory-trigger .nx-pill-xs { display: none; }
  .nx-directory-trigger { padding: 0.5rem; }
  .nx-search-trigger span, .nx-search-trigger kbd { display: none; }
  .nx-search-trigger { padding: 0.5rem; }
  .nx-navbar-actions { gap: 0.35rem; }
}
@media (max-width: 400px) {
  .nx-brand-name { font-size: 0.95rem; }
}

/* ================= Ticker ================= */
.nx-ticker { padding-top: 1rem; }
.nx-ticker-inner { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: var(--nx-radius); overflow: hidden; min-width: 0; }
.nx-ticker-pulse { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 10px; background: linear-gradient(90deg, rgba(6,182,212,0.2), rgba(37,99,235,0.2)); border: 1px solid rgba(6,182,212,0.4); font-family: var(--nx-font-mono); font-size: 0.68rem; font-weight: 700; color: var(--nx-cyan-light); white-space: nowrap; flex-shrink: 0; }
.nx-ticker-items { display: flex; gap: 1rem; overflow-x: auto; font-family: var(--nx-font-mono); font-size: 0.7rem; scrollbar-width: none; min-width: 0; flex: 1 1 0%; }
.nx-ticker-items::-webkit-scrollbar { display: none; }
.nx-ticker-item { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 10px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); white-space: nowrap; flex-shrink: 0; }
.nx-ticker-item strong { color: #fff; }
.nx-ticker-item span { color: var(--nx-text-dim); }
.nx-ticker-item em { font-style: normal; font-size: 0.6rem; padding: 0.05rem 0.35rem; border-radius: 999px; background: rgba(6,182,212,0.2); color: var(--nx-cyan-light); font-weight: 700; }

/* ================= Hero ================= */
.nx-hero { position: relative; padding: 6rem 0 3rem; overflow: hidden; }
.nx-hero-orb { position: absolute; border-radius: 999px; filter: blur(120px); pointer-events: none; z-index: -1; }
.nx-hero-orb-1 { top: 30%; left: 50%; width: 800px; height: 400px; transform: translate(-50%,-50%); background: linear-gradient(90deg, rgba(6,182,212,0.2), rgba(147,51,234,0.2), rgba(59,130,246,0.2)); animation: nxLiquidMorph 16s ease-in-out infinite; }
.nx-hero-orb-2 { top: 25%; left: 25%; width: 450px; height: 300px; background: linear-gradient(60deg, rgba(16,185,129,0.15), rgba(6,182,212,0.1)); animation: nxLiquidMorph 26s ease-in-out infinite reverse; }
.nx-hero-kicker { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.72rem; margin-bottom: 1.5rem; }
.nx-hero-kicker span:last-child { color: var(--nx-text); }
.nx-hero-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.nx-hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.nx-hero-left h1 { font-size: 1.9rem; line-height: 1.25; margin-bottom: 1rem; }
.nx-hero-left h1 a:hover { color: var(--nx-cyan-light); }
.nx-arrow { color: var(--nx-cyan-light); margin-left: 0.4rem; }
.nx-hero-subtitle { color: #cbd5e1; font-size: 0.95rem; margin-bottom: 1.5rem; }
.nx-hero-takeaways { padding: 1.1rem; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.3); margin-bottom: 1.5rem; }
.nx-hero-takeaways-head { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-mono); font-size: 0.72rem; font-weight: 700; color: var(--nx-cyan-light); margin-bottom: 0.7rem; }
.nx-hero-takeaways-head em { margin-left: auto; font-style: normal; font-size: 0.62rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(255,255,255,0.06); }
.nx-hero-takeaways ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.nx-hero-takeaways li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; color: #cbd5e1; }
.nx-hero-takeaways li span:first-child { font-family: var(--nx-font-mono); font-weight: 700; color: var(--nx-cyan-light); background: rgba(6,182,212,0.15); border-radius: 6px; padding: 0 0.3rem; flex-shrink: 0; }
.nx-hero-authorbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.5rem; }
.nx-hero-author { display: flex; align-items: center; gap: 0.7rem; }
.nx-author-name { font-weight: 700; font-size: 0.9rem; }
.nx-author-name em { font-style: normal; font-family: var(--nx-font-mono); font-size: 0.6rem; padding: 0.1rem 0.35rem; border-radius: 6px; background: rgba(56,189,248,0.15); color: var(--nx-blue); margin-left: 0.4rem; }
.nx-hero-author p { font-size: 0.75rem; color: var(--nx-text-dim); }
.nx-hero-stats { display: flex; gap: 1rem; font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
.nx-hero-stats span { display: flex; align-items: center; gap: 0.35rem; }
.nx-hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.nx-hero-tags-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nx-hero-tags-inline span { font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); padding: 0.3rem 0.6rem; border-radius: 8px; background: rgba(255,255,255,0.04); }

.nx-avatar-sm { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(6,182,212,0.4); }
.nx-avatar-md { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(6,182,212,0.4); }

.nx-hero-terminal { border-radius: var(--nx-radius-lg); padding: 1rem; position: relative; overflow: hidden; }
.nx-term-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.nx-term-dots { display: flex; gap: 0.35rem; }
.nx-term-dots span { width: 10px; height: 10px; border-radius: 999px; }
.nx-term-dots span:nth-child(1) { background: #f43f5e; }
.nx-term-dots span:nth-child(2) { background: #f59e0b; }
.nx-term-dots span:nth-child(3) { background: #10b981; }
.nx-term-file { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); margin-left: 0.5rem; }
.nx-term-langs { display: flex; gap: 0.15rem; padding: 0.15rem; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.nx-term-langs button, .nx-code-tabs button { padding: 0.2rem 0.5rem; border-radius: 6px; font-family: var(--nx-font-mono); font-size: 0.62rem; color: var(--nx-text-dim); }
.nx-term-langs button.is-active, .nx-code-tabs button.is-active { background: var(--nx-cyan); color: #000; font-weight: 700; }
.nx-term-body { position: relative; background: rgba(3,5,12,0.9); border-radius: 14px; padding: 0.9rem; border: 1px solid rgba(6,182,212,0.2); overflow-x: auto; margin-bottom: 0.75rem; }
.nx-term-live { position: absolute; top: 8px; right: 8px; font-size: 0.58rem; padding: 0.1rem 0.4rem; border-radius: 6px; border: 1px solid rgba(6,182,212,0.3); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); }
.nx-term-code { font-family: var(--nx-font-mono); font-size: 0.68rem; color: #cffafe; white-space: pre-wrap; word-break: break-word; margin: 0; }
.nx-term-metric { padding: 0.7rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.2); }
.nx-term-metric-row { display: flex; align-items: center; gap: 0.4rem; font-family: var(--nx-font-mono); font-size: 0.68rem; color: #cbd5e1; margin-bottom: 0.4rem; }
.nx-term-bar { height: 8px; border-radius: 999px; background: #0f172a; overflow: hidden; }
.nx-term-bar div { height: 100%; background: linear-gradient(90deg, var(--nx-cyan), #3b82f6, var(--nx-emerald-light)); box-shadow: 0 0 10px rgba(6,182,212,0.9); }
.nx-streaming-pill { color: var(--nx-cyan-light); padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid rgba(6,182,212,0.3); }

@media (min-width: 1024px) {
  .nx-hero-grid { grid-template-columns: 7fr 5fr; align-items: stretch; }
  .nx-hero-left h1 { font-size: 2.6rem; }
}

/* ================= Section headers ================= */
.nx-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.nx-section-head-tight { align-items: center; padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.25rem; }
.nx-kicker { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.68rem; margin-bottom: 0.7rem; }
.nx-kicker-violet { background: rgba(168,85,247,0.1); border-color: rgba(168,85,247,0.3); color: var(--nx-violet-light); }
.nx-section-head h2 { font-size: 1.5rem; }
.nx-section-sub { font-family: var(--nx-font-mono); font-size: 0.78rem; color: var(--nx-text-dim); margin-top: 0.35rem; max-width: 640px; }
.nx-search-inline { position: relative; display: flex; align-items: center; }
.nx-search-inline svg { position: absolute; left: 0.75rem; color: var(--nx-cyan-light); }
.nx-search-inline input { width: 100%; min-width: 220px; padding: 0.55rem 0.75rem 0.55rem 2.25rem; border-radius: 12px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: var(--nx-font-mono); font-size: 0.75rem; }
.nx-search-inline input:focus { outline: none; border-color: var(--nx-cyan); }

/* ================= IT Directory ================= */
.nx-domain-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1.5rem; }
.nx-domain-tab { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.9rem 0.5rem; border-radius: 18px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); text-align: center; }
.nx-domain-tab.is-active { border-color: var(--nx-cyan); background: linear-gradient(to bottom, rgba(8,47,73,0.6), rgba(4,8,28,1)); box-shadow: 0 0 25px rgba(6,182,212,0.4); color: var(--nx-cyan-light); }
.nx-domain-icon { width: 34px; height: 34px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); color: var(--nx-cyan-light); }
.nx-domain-tab span { font-family: var(--nx-font-display); font-weight: 700; font-size: 0.72rem; }
.nx-domain-tab em { font-style: normal; font-family: var(--nx-font-mono); font-size: 0.6rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: rgba(255,255,255,0.08); }
.nx-domain-banner { padding: 1.1rem; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.3); margin-bottom: 1.25rem; }
.nx-domain-banner-inner, .nx-domain-banner-left { display: flex; align-items: center; gap: 1rem; }
.nx-domain-banner-icon { width: 46px; height: 46px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(6,182,212,0.15); color: var(--nx-cyan-light); flex-shrink: 0; }
.nx-domain-banner h3 { font-size: 1rem; }
.nx-domain-banner h3 em { font-style: normal; font-family: var(--nx-font-mono); font-size: 0.75rem; color: var(--nx-cyan-light); font-weight: 400; }
.nx-domain-banner p { font-family: var(--nx-font-mono); font-size: 0.75rem; color: #cbd5e1; margin-top: 0.2rem; }
.nx-subcat-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.nx-subcat-card { padding: 1.1rem; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); transition: border-color 0.2s; }
.nx-subcat-card:hover { border-color: rgba(6,182,212,0.5); }
.nx-subcat-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.nx-subcat-head h4 { font-size: 0.85rem; flex: 1; }
.nx-subcat-card p { font-family: var(--nx-font-mono); font-size: 0.75rem; color: #cbd5e1; margin-bottom: 0.7rem; }
.nx-subcat-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 0.7rem; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 0.7rem; font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-cyan-light); }
.nx-tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nx-tag-chip { font-family: var(--nx-font-mono); font-size: 0.65rem; padding: 0.15rem 0.5rem; border-radius: 6px; background: rgba(255,255,255,0.05); color: var(--nx-text-dim); }
@media (min-width: 768px) { .nx-domain-tabs { grid-template-columns: repeat(4, 1fr); } .nx-subcat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .nx-domain-tabs { grid-template-columns: repeat(8, 1fr); } .nx-subcat-grid { grid-template-columns: repeat(3, 1fr); } }

/* ================= System design showcase ================= */
.nx-system-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nx-system-tabs button { padding: 0.55rem 0.9rem; border-radius: 12px; font-family: var(--nx-font-mono); font-size: 0.72rem; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: var(--nx-text-dim); }
.nx-system-tabs button.is-active { background: rgba(6,182,212,0.2); color: var(--nx-cyan-light); border-color: var(--nx-cyan); }
.nx-system-overview { display: grid; grid-template-columns: 1fr; gap: 0.75rem; padding: 1rem; border-radius: 18px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.25rem; }
.nx-system-overview div { display: flex; flex-direction: column; gap: 0.1rem; }
.nx-system-overview span { font-family: var(--nx-font-mono); font-size: 0.62rem; color: var(--nx-text-dim); }
.nx-system-overview b { font-family: var(--nx-font-display); font-size: 0.9rem; }
.nx-system-overview b.ok { color: var(--nx-emerald-light); }
.nx-system-nodes { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.nx-sys-node { padding: 0.9rem; border-radius: 16px; border-left: 3px solid var(--nx-node-color, var(--nx-cyan)); background: rgba(255,255,255,0.03); border-top: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer; }
.nx-sys-node.is-active { background: linear-gradient(to bottom, rgba(8,47,73,0.6), rgba(4,8,28,1)); border-color: var(--nx-cyan); box-shadow: 0 0 20px rgba(6,182,212,0.3); }
.nx-sys-node-top { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.6rem; color: var(--nx-text-dim); margin-bottom: 0.5rem; }
.nx-sys-node h4 { font-size: 0.78rem; }
.nx-sys-node-role { display: block; font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-cyan-light); margin: 0.3rem 0 0.5rem; }
.nx-sys-node-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; border-top: 1px solid rgba(255,255,255,0.08); font-family: var(--nx-font-mono); font-size: 0.6rem; color: var(--nx-text-dim); }
.nx-system-detail-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.nx-system-node-detail, .nx-system-flow { padding: 1rem; border-radius: 18px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); }
.nx-sys-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.nx-sys-detail-head h4 { font-size: 0.85rem; }
.nx-system-node-detail p { font-family: var(--nx-font-mono); font-size: 0.75rem; color: #cbd5e1; }
.nx-sys-detail-foot { display: flex; gap: 0.4rem; padding-top: 0.6rem; margin-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.08); font-family: var(--nx-font-mono); font-size: 0.72rem; }
.nx-sys-detail-foot span { color: var(--nx-text-dim); }
.nx-sys-detail-foot b { color: var(--nx-cyan-light); }
.nx-sys-flow-list { display: flex; flex-direction: column; gap: 0.4rem; }
.nx-sys-flow-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem; border-radius: 10px; cursor: pointer; }
.nx-sys-flow-item span { width: 20px; height: 20px; border-radius: 999px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; flex-shrink: 0; }
.nx-sys-flow-item p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
.nx-sys-flow-item.is-active { background: rgba(88,28,135,0.3); border: 1px solid rgba(168,85,247,0.5); }
.nx-sys-flow-item.is-active span { background: var(--nx-violet); color: #000; }
.nx-sys-flow-item.is-active p { color: #e9d5ff; }
@media (min-width: 768px) { .nx-system-nodes { grid-template-columns: repeat(2, 1fr); } .nx-system-detail-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .nx-system-nodes { grid-template-columns: repeat(4, 1fr); } }

/* ================= Category filter + card grid ================= */
.nx-cat-filter { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.75rem; }
.nx-cat-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-radius: 12px; font-family: var(--nx-font-mono); font-size: 0.72rem; white-space: nowrap; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); color: #cbd5e1; }
.nx-cat-btn em { font-style: normal; font-size: 0.6rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: rgba(255,255,255,0.08); font-weight: 700; }
.nx-cat-btn.is-active { background: linear-gradient(90deg, rgba(6,182,212,0.25), rgba(37,99,235,0.25), rgba(147,51,234,0.25)); color: var(--nx-cyan-light); border-color: var(--nx-cyan); box-shadow: 0 0 20px rgba(6,182,212,0.4); }
.nx-cat-btn.is-active em { background: var(--nx-cyan); color: #000; }
.nx-cat-ribbon { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.3); margin: 0.75rem 0 1.5rem; }
.nx-cat-ribbon p { font-family: var(--nx-font-mono); font-size: 0.75rem; color: #e2e8f0; }
.nx-cat-ribbon strong { color: var(--nx-cyan-light); }

.nx-card-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.nx-card { border-radius: var(--nx-radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.3s, border-color 0.3s; }
.nx-card-glow { position: absolute; inset: 0; z-index: 5; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.nx-card-bar { height: 4px; background: linear-gradient(90deg, var(--nx-cyan), #3b82f6, var(--nx-emerald-light)); }
.nx-accent-purple .nx-card-bar { background: linear-gradient(90deg, var(--nx-violet-light), #ec4899, #818cf8); }
.nx-accent-emerald .nx-card-bar { background: linear-gradient(90deg, var(--nx-emerald-light), #14b8a6, var(--nx-cyan)); }
.nx-accent-amber .nx-card-bar { background: linear-gradient(90deg, #fbbf24, #f97316, #fde047); }
.nx-accent-rose .nx-card-bar { background: linear-gradient(90deg, #fb7185, #ec4899, var(--nx-violet-light)); }
.nx-card-media { position: relative; display: block; height: 200px; overflow: hidden; background: #0b1120; }
.nx-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.nx-card:hover .nx-card-media img { transform: scale(1.06); }
.nx-card-media-fade { position: absolute; inset: 0; background: linear-gradient(to top, #050817, rgba(5,8,23,0.4), transparent); }
.nx-card-badges { position: absolute; top: 0.75rem; left: 0.75rem; right: 0.75rem; display: flex; justify-content: space-between; }
.nx-card-tools { display: flex; gap: 0.3rem; }
.nx-card-meta-row { position: absolute; bottom: 0.65rem; left: 0.75rem; display: flex; gap: 0.4rem; }
.nx-card-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; gap: 1rem; }
.nx-card-title { font-size: 1.05rem; line-height: 1.35; }
.nx-card-title a:hover { color: var(--nx-cyan-light); }
.nx-card-summary { font-size: 0.78rem; color: var(--nx-text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nx-card-code-preview { padding: 0.6rem; border-radius: 12px; background: rgba(3,6,15,0.9); border: 1px solid rgba(6,182,212,0.3); font-family: var(--nx-font-mono); font-size: 0.65rem; }
.nx-code-preview-head { display: flex; justify-content: space-between; color: var(--nx-text-dim); margin-bottom: 0.3rem; padding-bottom: 0.3rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.nx-card-code-preview pre { max-height: 130px; overflow: auto; color: #cbd5e1; margin: 0; }
.nx-card-footer { padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: space-between; }
.nx-card-author { display: flex; align-items: center; gap: 0.5rem; }
.nx-card-author span { display: flex; flex-direction: column; }
.nx-card-author b { font-size: 0.75rem; font-weight: 600; }
.nx-card-author i { font-style: normal; font-family: var(--nx-font-mono); font-size: 0.62rem; color: var(--nx-text-dim); }
.nx-card-actions { display: flex; align-items: center; gap: 0.5rem; }
.nx-code-toggle.is-active { background: rgba(6,182,212,0.2); color: var(--nx-cyan-light); }
@media (min-width: 768px) { .nx-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .nx-card-grid { grid-template-columns: repeat(3, 1fr); } }
.nx-empty-state { text-align: center; padding: 3rem; font-family: var(--nx-font-mono); color: var(--nx-text-dim); }

/* ================= Cheatsheets ================= */
.nx-cheatsheet-head { display: flex; align-items: center; gap: 0.75rem; }
.nx-cheatsheet-icon { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(6,182,212,0.15); color: var(--nx-cyan-light); flex-shrink: 0; }
.nx-cheatsheet-head h2 { font-size: 1.15rem; }
.nx-pill-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.nx-pill-tabs button { padding: 0.5rem 0.85rem; border-radius: 12px; font-family: var(--nx-font-mono); font-size: 0.7rem; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--nx-text-dim); }
.nx-pill-tabs button.is-active { background: var(--nx-cyan); color: #000; font-weight: 700; }
.nx-cheatsheet-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.nx-cheatsheet-card { padding: 1rem; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); }
.nx-cheatsheet-title { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.nx-cheatsheet-title span { font-family: var(--nx-font-display); font-weight: 700; font-size: 0.78rem; }
.nx-cheatsheet-title em { font-style: normal; font-size: 0.62rem; padding: 0.1rem 0.4rem; border-radius: 6px; background: rgba(255,255,255,0.06); color: var(--nx-cyan-light); white-space: nowrap; }
.nx-cheatsheet-cmd { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem; border-radius: 12px; background: rgba(0,0,0,0.8); border: 1px solid rgba(6,182,212,0.2); margin-bottom: 0.6rem; overflow-x: auto; }
.nx-cheatsheet-cmd code { font-size: 0.68rem; color: var(--nx-cyan-light); white-space: nowrap; }
.nx-cheatsheet-card p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
@media (min-width: 768px) { .nx-cheatsheet-grid { grid-template-columns: repeat(2, 1fr); } }

/* ================= Newsletter ================= */
.nx-newsletter-panel { position: relative; border-radius: var(--nx-radius-lg); padding: 2.5rem 2rem; overflow: hidden; background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(10,16,38,0.85)); border: 1px solid rgba(6,182,212,0.4); box-shadow: 0 0 60px rgba(6,182,212,0.25); }
.nx-newsletter-orb { position: absolute; top: 0; right: 0; width: 380px; height: 380px; background: rgba(6,182,212,0.15); border-radius: 999px; filter: blur(90px); pointer-events: none; }
.nx-newsletter-inner { position: relative; z-index: 1; max-width: 640px; }
.nx-newsletter-kicker { margin-bottom: 1rem; }
.nx-newsletter-panel h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.nx-newsletter-panel > .nx-newsletter-inner > p { color: #cbd5e1; font-size: 0.85rem; margin-bottom: 1.5rem; }
.nx-newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; }
.nx-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.nx-newsletter-form input[type="email"] { padding: 0.85rem 1rem; border-radius: 12px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-family: var(--nx-font-mono); font-size: 0.75rem; }
.nx-newsletter-form input:focus { outline: none; border-color: var(--nx-cyan); }
.nx-newsletter-form button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.5rem; border-radius: 12px; background: linear-gradient(90deg, var(--nx-cyan), #2563eb); color: #fff; font-family: var(--nx-font-mono); font-weight: 700; font-size: 0.75rem; box-shadow: 0 0 25px rgba(6,182,212,0.5); }
.nx-newsletter-result { padding: 1rem; border-radius: 12px; font-family: var(--nx-font-mono); font-size: 0.75rem; }
.nx-newsletter-result.is-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.4); color: #6ee7b7; }
.nx-newsletter-result.is-error { background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.4); color: #fda4af; }
@media (min-width: 640px) { .nx-newsletter-form { flex-direction: row; } .nx-newsletter-form input[type="email"] { flex: 1; } }

/* ================= View header (radar / codelab / graph) ================= */
.nx-view-header { padding: 7rem 0 2rem; text-align: center; }
.nx-view-header .nx-shell { max-width: 760px; }
.nx-view-header h1 { font-size: 1.8rem; margin-bottom: 0.9rem; }
.nx-view-header p { font-family: var(--nx-font-mono); font-size: 0.82rem; color: #cbd5e1; }
.nx-view-header .nx-kicker { justify-content: center; }

/* ================= Tech Radar ================= */
.nx-radar-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.nx-radar-svg { width: 100%; height: auto; }
.nx-radar-ring { fill: none; stroke: rgba(6,182,212,0.12); }
.nx-radar-spoke { stroke: rgba(255,255,255,0.08); }
.nx-radar-cat-label { fill: #94a3b8; font-family: 'Fira Code', monospace; font-size: 9px; text-anchor: middle; }
.nx-radar-node { cursor: pointer; }
.nx-radar-node circle { transition: r 0.15s; }
.nx-radar-node:hover circle, .nx-radar-node:focus circle { filter: drop-shadow(0 0 6px currentColor); }
.nx-radar-legend { display: flex; gap: 1rem; justify-content: center; margin-top: 0.75rem; font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); }
.nx-radar-legend span { display: flex; align-items: center; gap: 0.35rem; }
.nx-radar-legend i { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.nx-radar-detail h2 { font-size: 1.3rem; margin: 0.6rem 0; }
.nx-radar-detail p { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 1rem; }
.nx-quadrant-badge { font-family: var(--nx-font-mono); font-size: 0.62rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid; }
.nx-quadrant-adopt { color: var(--nx-emerald-light); border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.1); }
.nx-quadrant-trial { color: var(--nx-cyan-light); border-color: rgba(6,182,212,0.4); background: rgba(6,182,212,0.1); }
.nx-quadrant-assess { color: #fbbf24; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.1); }
.nx-quadrant-hold { color: #fb7185; border-color: rgba(244,63,94,0.4); background: rgba(244,63,94,0.1); }
.nx-maturity-box { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; }
.nx-maturity-row { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.72rem; margin-bottom: 0.5rem; }
.nx-maturity-row b { color: var(--nx-emerald-light); }
.nx-maturity-bar { height: 10px; border-radius: 999px; background: #0f172a; overflow: hidden; }
.nx-maturity-bar div { height: 100%; background: linear-gradient(90deg, var(--nx-cyan), #3b82f6, var(--nx-emerald-light)); box-shadow: 0 0 12px rgba(6,182,212,0.9); transition: width 0.5s; }
.nx-radar-card-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin-top: 1rem; }
.nx-radar-card { padding: 1rem; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); cursor: pointer; }
.nx-radar-card:hover { border-color: rgba(6,182,212,0.5); }
.nx-radar-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.nx-radar-card h3 { font-size: 0.85rem; margin-bottom: 0.4rem; }
.nx-radar-card p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 1024px) { .nx-radar-layout { grid-template-columns: 7fr 5fr; } }
@media (min-width: 640px) { .nx-radar-card-grid { grid-template-columns: repeat(2, 1fr); } }

/* ================= Knowledge Graph ================= */
.nx-graph-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.nx-graph-canvas { width: 100%; height: 540px; border-radius: 16px; background: #03050d; cursor: crosshair; }
.nx-graph-detail h3 { font-size: 1.3rem; margin: 0.6rem 0; }
.nx-graph-detail p { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 1rem; }
.nx-graph-empty { text-align: center; padding: 3rem 1rem; color: #64748b; }
.nx-graph-empty svg { margin: 0 auto 0.75rem; opacity: 0.5; }
.nx-graph-related { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.3); }
.nx-graph-related span { font-family: var(--nx-font-mono); font-size: 0.62rem; color: #fbbf24; font-weight: 700; }
.nx-graph-related h4 { font-size: 0.85rem; margin: 0.4rem 0; }
.nx-graph-related p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); margin-bottom: 0.75rem; }
@media (min-width: 1024px) { .nx-graph-layout { grid-template-columns: 8fr 4fr; } }

/* ================= Code Lab ================= */
.nx-codelab-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.nx-slider-row { margin-bottom: 1.5rem; }
.nx-slider-label { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.75rem; margin-bottom: 0.4rem; }
.nx-slider-label span { color: var(--nx-cyan-light); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--nx-cyan); height: 6px; }
.nx-slider-ticks { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.6rem; color: var(--nx-text-dim); margin-top: 0.2rem; }
.nx-model-class-note { display: flex; gap: 0.6rem; padding: 0.85rem; border-radius: 14px; background: rgba(6,182,212,0.06); border: 1px solid rgba(6,182,212,0.25); margin-bottom: 1.25rem; }
.nx-model-class-note svg { color: var(--nx-cyan-light); flex-shrink: 0; margin-top: 0.15rem; }
.nx-model-class-note p { font-family: var(--nx-font-mono); font-size: 0.68rem; color: #cbd5e1; line-height: 1.6; }
.nx-memory-compare h4 { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); margin-bottom: 0.75rem; }
.nx-mem-row { padding: 0.85rem; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.6rem; }
.nx-mem-row-head { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.72rem; margin-bottom: 0.5rem; }
.nx-mem-mha { border-color: rgba(244,63,94,0.2); }
.nx-mem-mha b { color: #fb7185; }
.nx-mem-gqa { border-color: rgba(245,158,11,0.2); }
.nx-mem-gqa b { color: #fbbf24; }
.nx-mem-mla { border-color: rgba(6,182,212,0.4); box-shadow: 0 0 20px rgba(6,182,212,0.2); }
.nx-mem-mla b { color: var(--nx-emerald-light); }
.nx-mem-bar { height: 8px; border-radius: 999px; background: #0f172a; overflow: hidden; }
.nx-mem-bar div { height: 100%; background: #fb7185; }
.nx-mem-gqa .nx-mem-bar div { background: #fbbf24; }
.nx-mem-bar-mla div { background: linear-gradient(90deg, var(--nx-cyan), var(--nx-emerald-light)); box-shadow: 0 0 10px rgba(6,182,212,0.9); }
.nx-mem-savings { font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-emerald-light); margin-top: 0.6rem; }
.nx-codelab-terminal { display: flex; flex-direction: column; height: 560px; }
.nx-term-console { flex: 1; background: rgba(3,5,12,0.9); border-radius: 12px; padding: 0.9rem; border: 1px solid rgba(6,182,212,0.2); overflow-y: auto; font-family: var(--nx-font-mono); font-size: 0.72rem; color: #cbd5e1; }
.nx-term-console hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 0.6rem 0; }
.nx-term-cmd-line { color: var(--nx-cyan-light); margin-bottom: 0.3rem; }
.nx-term-log-line { color: #a5f3fc; padding: 0.15rem 0; }
.nx-term-placeholder { color: #64748b; text-align: center; margin-top: 3rem; font-style: italic; }
@media (min-width: 1024px) { .nx-codelab-layout { grid-template-columns: 6fr 6fr; align-items: start; } }

/* ================= Article Reader (single-nx_post) ================= */
body.nx-reader-mode { background: #0e1630; }
body.nx-reader-mode .nx-bg-canvas, body.nx-reader-mode .grain-overlay, body.nx-reader-mode .grain-overlay-fine { opacity: 0.5; }
.nx-reader { position: relative; z-index: 10; }
.nx-reader-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #0f172a; z-index: 60; }
#nx-reader-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--nx-cyan-light), #3b82f6, var(--nx-violet-light)); box-shadow: 0 0 12px rgba(6,182,212,0.8); transition: width 0.1s; }
.nx-reader-header { position: sticky; top: 0; z-index: 50; background: rgba(6,9,24,0.92); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(6,182,212,0.2); padding: 0.85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nx-reader-header-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.nx-reader-header-title { font-family: var(--nx-font-mono); font-size: 0.75rem; color: var(--nx-cyan-light); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.nx-reader-header-actions { display: flex; align-items: center; gap: 0.5rem; }
#nx-speech-toggle.is-active { background: var(--nx-cyan); color: #000; border-color: var(--nx-cyan); }
.nx-settings-wrap { position: relative; }
.nx-settings-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 1rem; border-radius: 14px; background: #090e24; border: 1px solid rgba(6,182,212,0.4); box-shadow: 0 20px 50px rgba(0,0,0,0.6); z-index: 60; font-size: 0.75rem; }
.nx-settings-row-head { font-weight: 700; color: var(--nx-cyan-light); padding-bottom: 0.5rem; margin-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nx-settings-menu label { display: block; color: var(--nx-text-dim); margin: 0.6rem 0 0.35rem; font-family: var(--nx-font-mono); font-size: 0.68rem; }
.nx-settings-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; }
.nx-settings-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.25rem; }
.nx-settings-grid4 button, .nx-settings-grid2 button { padding: 0.4rem; border-radius: 8px; background: rgba(255,255,255,0.05); text-align: center; font-family: var(--nx-font-mono); font-size: 0.65rem; }
.nx-settings-grid4 button.is-active, .nx-settings-grid2 button.is-active { background: var(--nx-cyan); color: #000; font-weight: 700; }
.nx-settings-toggle-row { display: flex !important; align-items: center; justify-content: space-between; }

.nx-reader-body { padding: 2rem 0; }
.nx-reader-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.nx-reader-aside { display: none; }
.nx-reader-toc { position: sticky; top: 5.5rem; }
.nx-panel-sm-head { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-mono); font-size: 0.7rem; font-weight: 700; color: var(--nx-cyan-light); padding-bottom: 0.6rem; margin-bottom: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nx-toc-nav { display: flex; flex-direction: column; gap: 0.2rem; font-family: var(--nx-font-mono); font-size: 0.72rem; }
.nx-toc-nav a { padding: 0.4rem 0.6rem; border-radius: 8px; color: var(--nx-text-dim); }
.nx-toc-nav a.is-active { background: rgba(6,182,212,0.15); color: var(--nx-cyan-light); font-weight: 700; border-left: 2px solid var(--nx-cyan); }
.nx-reader-author { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.nx-reader-author h4 { font-size: 0.85rem; }
.nx-reader-author p { font-size: 0.7rem; color: var(--nx-text-dim); }
.nx-reader-author-bio { font-size: 0.72rem; color: var(--nx-text-dim); margin-top: 0.6rem; }
.nx-reader-main { min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.nx-reader-cover { position: relative; border-radius: var(--nx-radius-lg); overflow: hidden; }
.nx-reader-cover img { width: 100%; height: 320px; object-fit: cover; filter: brightness(0.9); }
.nx-reader-cover-fade { position: absolute; inset: 0; background: linear-gradient(to top, #05070f, rgba(5,7,15,0.7), transparent); }
.nx-reader-cover-caption { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.5rem; }
.nx-reader-cover-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.nx-reader-cover-caption h1 { font-size: 1.6rem; line-height: 1.3; margin-bottom: 0.5rem; }
.nx-reader-cover-caption p { color: #cbd5e1; font-size: 0.85rem; }

.nx-callout { padding: 1.25rem; border-radius: var(--nx-radius-lg); }
.nx-callout-ai { background: rgba(255,255,255,0.04); border: 1px solid rgba(6,182,212,0.4); box-shadow: 0 0 30px rgba(6,182,212,0.15); }
.nx-callout-head { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-mono); font-size: 0.82rem; font-weight: 700; color: var(--nx-cyan-light); margin-bottom: 0.75rem; }
.nx-takeaway-list { display: flex; flex-direction: column; gap: 0.6rem; }
.nx-takeaway-list > div { display: flex; align-items: flex-start; gap: 0.6rem; }
.nx-takeaway-list span { width: 20px; height: 20px; border-radius: 999px; background: rgba(6,182,212,0.15); border: 1px solid rgba(6,182,212,0.4); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 0.15rem; }
.nx-takeaway-list p { font-size: 0.85rem; color: #e2e8f0; }

.nx-arch-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.nx-arch-node { padding: 0.7rem; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-left-width: 3px; }
.nx-arch-node h5 { font-size: 0.72rem; margin: 0.2rem 0; }
.nx-arch-tech { font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-cyan-light); }
@media (min-width: 640px) { .nx-arch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .nx-arch-grid { grid-template-columns: repeat(4, 1fr); } }

.nx-bench-list { display: flex; flex-direction: column; gap: 0.75rem; }
.nx-bench-row { display: flex; flex-direction: column; gap: 0.3rem; }
.nx-bench-label { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.72rem; }
.nx-bench-label b { color: var(--nx-cyan-light); }
.nx-bench-bar { height: 10px; border-radius: 999px; background: #0f172a; overflow: hidden; }
.nx-bench-bar div { height: 100%; background: #334155; }
.nx-bench-bar div.is-best { background: linear-gradient(90deg, var(--nx-cyan), var(--nx-emerald-light)); box-shadow: 0 0 10px rgba(6,182,212,0.8); }

.nx-article-body { font-size: 1rem; color: #e2e8f0; }
.nx-article-body.nx-font-sm { font-size: 0.9rem; }
.nx-article-body.nx-font-lg { font-size: 1.1rem; }
.nx-article-body.nx-font-xl { font-size: 1.25rem; }
.nx-article-body.nx-font-mono { font-family: var(--nx-font-mono); }
.nx-article-body p { margin: 0 0 1.1rem; line-height: 1.85; }
.nx-article-heading { display: flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; color: var(--nx-cyan-light); margin: 2rem 0 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.1); scroll-margin-top: 6rem; }
.nx-heading-index { font-family: var(--nx-font-mono); color: var(--nx-cyan); font-size: 0.85rem; }
.nx-article-body h3 { font-size: 1.05rem; color: #f1f5f9; margin: 1.5rem 0 0.75rem; }
.nx-article-body strong { color: #fff; }
.nx-article-body code { background: rgba(6,182,212,0.12); padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.85em; color: #a5f3fc; }
.nx-article-body pre { background: #02040a; border: 1px solid rgba(6,182,212,0.2); border-radius: 12px; padding: 1rem; overflow-x: auto; margin: 0 0 1.25rem; }
.nx-article-body pre code { background: none; padding: 0; color: #cffafe; }
.nx-article-body hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 1.75rem 0; }
.nx-article-body ul, .nx-article-body ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
.nx-article-body li { margin-bottom: 0.4rem; }
.nx-math { font-family: var(--nx-font-mono); background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.25); padding: 0.05rem 0.4rem; border-radius: 6px; color: #e9d5ff; }
.nx-math-block { display: block; font-family: var(--nx-font-mono); background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.25); padding: 0.85rem 1rem; border-radius: 12px; color: #e9d5ff; margin: 1rem 0; text-align: center; overflow-x: auto; }

.nx-code-sandbox { }
.nx-sandbox-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.75rem; }
.nx-code-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.nx-code-block-wrap { position: relative; border-radius: 14px; background: #02040a; border: 1px solid rgba(6,182,212,0.2); padding: 1rem; margin-bottom: 0.75rem; }
.nx-code-copy { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.35rem 0.6rem; display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; }
.nx-code-pane { margin: 0; font-family: var(--nx-font-mono); font-size: 0.75rem; line-height: 1.7; color: #cffafe; overflow-x: auto; }
.nx-code-explain { font-family: var(--nx-font-mono); font-size: 0.72rem; font-style: italic; color: var(--nx-text-dim); margin-bottom: 1rem; }
.nx-sandbox-run-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.nx-sandbox-output { margin-top: 0.9rem; padding: 0.85rem; border-radius: 12px; background: #000; border: 1px solid rgba(16,185,129,0.4); font-family: var(--nx-font-mono); font-size: 0.72rem; color: #6ee7b7; white-space: pre-wrap; }

.nx-claps-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.nx-claps-left { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nx-clap-btn { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1.1rem; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-weight: 700; font-size: 0.85rem; transition: all 0.3s; }
.nx-clap-btn.is-active { background: var(--nx-cyan); color: #000; box-shadow: 0 0 25px rgba(6,182,212,0.8); }
.nx-claps-right { display: flex; gap: 0.5rem; }

.nx-comments-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; }
.nx-comment-form { padding: 1rem; border-radius: var(--nx-radius-lg); margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.nx-comment-form { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.nx-comment-name-field { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
.nx-comment-name-field input { padding: 0.3rem 0.6rem; border-radius: 6px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: var(--nx-cyan-light); }
.nx-comment-form textarea { padding: 0.75rem; border-radius: 12px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: #e2e8f0; font-family: var(--nx-font-mono); font-size: 0.75rem; resize: vertical; }
.nx-comment-form textarea:focus, .nx-comment-name-field input:focus { outline: none; border-color: var(--nx-cyan); }
.nx-comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nx-comment-form-msg { font-family: var(--nx-font-mono); font-size: 0.7rem; color: var(--nx-cyan-light); }
.nx-comment-form-foot button { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; border-radius: 12px; background: var(--nx-cyan); color: #000; font-family: var(--nx-font-mono); font-weight: 700; font-size: 0.72rem; margin-left: auto; }
.nx-comment-list { display: flex; flex-direction: column; gap: 0.75rem; }
.nx-comment { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.nx-comment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.nx-comment-id { display: flex; align-items: center; gap: 0.6rem; }
.nx-comment-avatar { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(6,182,212,0.4); }
.nx-comment-name-row { display: flex; align-items: center; gap: 0.4rem; }
.nx-comment-name { font-size: 0.78rem; font-weight: 600; }
.nx-comment-role { font-family: var(--nx-font-mono); font-size: 0.6rem; padding: 0.05rem 0.35rem; border-radius: 5px; background: #0c1e3a; color: var(--nx-cyan-light); border: 1px solid rgba(6,182,212,0.3); }
.nx-comment-date { font-family: var(--nx-font-mono); font-size: 0.62rem; color: #64748b; }
.nx-comment-like { display: flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.55rem; border-radius: 8px; font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); }
.nx-comment-like.is-liked { color: var(--nx-cyan-light); background: rgba(6,182,212,0.15); }
.nx-comment-body { font-size: 0.78rem; color: #cbd5e1; padding-left: 2.5rem; line-height: 1.7; }

.nx-ai-panel { display: flex; flex-direction: column; height: 640px; }
.nx-online-pill { margin-left: auto; font-style: normal; font-size: 0.6rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: rgba(6,182,212,0.15); color: var(--nx-cyan-light); }
.nx-ai-disclaimer { font-family: var(--nx-font-mono); font-size: 0.62rem; color: #64748b; margin-bottom: 0.75rem; line-height: 1.5; }
.nx-ai-chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }
.nx-ai-msg { padding: 0.6rem 0.75rem; border-radius: 12px; font-size: 0.72rem; }
.nx-ai-msg.is-assistant, .nx-ai-msg.is-thinking { background: rgba(4,6,15,0.8); border: 1px solid rgba(255,255,255,0.1); color: #cbd5e1; margin-right: 0.4rem; }
.nx-ai-msg.is-user { background: rgba(8,47,73,0.8); border: 1px solid rgba(6,182,212,0.4); color: #a5f3fc; margin-left: 1rem; }
.nx-ai-msg span { display: block; font-family: var(--nx-font-mono); font-size: 0.58rem; font-weight: 700; color: #94a3b8; margin-bottom: 0.25rem; }
.nx-ai-msg p { line-height: 1.6; white-space: pre-wrap; }
.nx-ai-jump-link { display: inline-block; margin-top: 0.4rem; color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.68rem; }
.nx-ai-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.6rem; border-top: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.6rem; }
.nx-ai-chip { font-family: var(--nx-font-mono); font-size: 0.62rem; padding: 0.3rem 0.5rem; border-radius: 8px; background: rgba(255,255,255,0.05); color: #cbd5e1; }
.nx-ai-input-row { display: flex; gap: 0.5rem; }
.nx-ai-input-row input { flex: 1; padding: 0.6rem 0.8rem; border-radius: 12px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); color: #e2e8f0; font-family: var(--nx-font-mono); font-size: 0.72rem; }
.nx-ai-input-row button { padding: 0.6rem; border-radius: 12px; background: var(--nx-cyan); color: #000; }

@media (min-width: 1180px) {
  .nx-reader-grid { grid-template-columns: 260px minmax(0,1fr) 300px; }
  .nx-reader-aside { display: block; }
  .nx-reader-ai { position: sticky; top: 5.5rem; }
  .nx-reader-header-title { display: inline-block; }
}
.nx-focus-mode .nx-reader-aside.nx-reader-toc,
.nx-focus-mode .nx-reader-cover-tags,
.nx-focus-mode .nx-callout,
.nx-focus-mode .nx-arch-grid,
.nx-focus-mode .nx-bench-list { opacity: 0.35; transition: opacity 0.3s; }
.nx-focus-mode .nx-reader-aside.nx-reader-toc:hover,
.nx-focus-mode .nx-callout:hover { opacity: 1; }
.nx-ambient-glow .nx-reader-cover { box-shadow: 0 0 80px rgba(6,182,212,0.15); }

/* ================= Modals: search / mega menu / bookmarks ================= */
.nx-search-modal, #nx-mega-menu, #nx-bookmarks-drawer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.8); backdrop-filter: blur(20px); }
.nx-search-modal { display: flex; align-items: flex-start; justify-content: center; padding: 6rem 1rem 1rem; }
.nx-search-panel { width: 100%; max-width: 680px; border-radius: var(--nx-radius-lg); background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(10,16,38,0.92)); border: 1px solid rgba(6,182,212,0.4); box-shadow: 0 0 60px rgba(6,182,212,0.35); overflow: hidden; }
.nx-search-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nx-search-head svg { color: var(--nx-cyan-light); }
#nx-search-input { flex: 1; background: transparent; border: none; color: #fff; font-family: var(--nx-font-mono); font-size: 0.85rem; }
#nx-search-input:focus { outline: none; }
.nx-search-esc { font-family: var(--nx-font-mono); font-size: 0.68rem; padding: 0.25rem 0.6rem; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #cbd5e1; }
.nx-search-cats { display: flex; gap: 0.4rem; padding: 0.6rem 1rem; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); overflow-x: auto; }
.nx-search-cats button { font-family: var(--nx-font-mono); font-size: 0.65rem; padding: 0.25rem 0.65rem; border-radius: 999px; background: rgba(255,255,255,0.04); color: #cbd5e1; white-space: nowrap; }
.nx-search-cats button.is-active { background: var(--nx-cyan); color: #000; font-weight: 700; }
.nx-search-results { max-height: 420px; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.nx-search-result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); }
.nx-search-result:hover { border-color: var(--nx-cyan); background: rgba(8,47,73,0.3); }
.nx-search-result-meta { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-mono); font-size: 0.62rem; color: var(--nx-text-dim); margin-bottom: 0.3rem; }
.nx-search-result h4 { font-size: 0.82rem; margin-bottom: 0.2rem; }
.nx-search-result p { font-family: var(--nx-font-mono); font-size: 0.7rem; color: var(--nx-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-empty-inline { text-align: center; padding: 2.5rem; font-family: var(--nx-font-mono); font-size: 0.75rem; color: var(--nx-text-dim); }
.nx-drawer-loading { text-align: center; padding: 2rem; color: var(--nx-text-dim); }

#nx-bookmarks-drawer { display: flex; justify-content: flex-end; }
.nx-drawer-panel { width: 100%; max-width: 420px; height: 100%; background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(10,16,38,0.95)); border-left: 1px solid rgba(6,182,212,0.3); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: 0 0 60px rgba(6,182,212,0.3); overflow-y: auto; }
.nx-drawer-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem; font-weight: 700; }
.nx-drawer-list { flex: 1; display: flex; flex-direction: column; gap: 0.75rem; }
.nx-drawer-item { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); }
.nx-drawer-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.nx-drawer-remove { color: var(--nx-text-dim); }
.nx-drawer-remove:hover { color: #fb7185; }
.nx-drawer-title { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 0.5rem; }
.nx-drawer-title:hover { color: var(--nx-cyan-light); }
.nx-drawer-foot { display: flex; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); padding-top: 0.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.nx-drawer-foot a { color: var(--nx-cyan-light); font-weight: 700; }
.nx-drawer-foot-note { text-align: center; font-family: var(--nx-font-mono); font-size: 0.65rem; color: var(--nx-text-dim); padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 1rem; }

#nx-mega-menu { display: flex; padding-top: 4rem; }
.nx-mega-panel { width: 100%; max-width: 1280px; margin: 0 auto; height: calc(100% - 4rem); border-radius: var(--nx-radius-lg) var(--nx-radius-lg) 0 0; background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(10,16,38,0.95)); border: 1px solid rgba(6,182,212,0.4); box-shadow: 0 0 60px rgba(6,182,212,0.35); display: flex; flex-direction: column; overflow: hidden; }
.nx-mega-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.nx-mega-head h3 { font-size: 1.05rem; }
.nx-mega-head p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); margin-top: 0.3rem; }
.nx-mega-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.nx-mega-sidebar { padding: 0.75rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.35rem; background: rgba(3,6,18,0.5); border-bottom: 1px solid rgba(255,255,255,0.1); max-height: 240px; }
.nx-mega-domain-item { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem; border-radius: 12px; cursor: pointer; }
.nx-mega-domain-item h4 { font-size: 0.78rem; }
.nx-mega-domain-item span { font-family: var(--nx-font-mono); font-size: 0.62rem; color: var(--nx-text-dim); }
.nx-mega-domain-item em { font-style: normal; font-family: var(--nx-font-mono); font-size: 0.62rem; padding: 0.1rem 0.4rem; border-radius: 999px; background: rgba(255,255,255,0.08); }
.nx-mega-domain-item.is-active { background: linear-gradient(90deg, rgba(8,47,73,0.6), rgba(23,37,84,0.4)); color: var(--nx-cyan-light); }
.nx-mega-content { flex: 1; padding: 1rem; overflow-y: auto; display: grid; grid-template-columns: 1fr; gap: 1rem; align-content: start; }
.nx-mega-subcat { padding: 1rem; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); }
.nx-mega-subcat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.nx-mega-subcat-head h5 { font-size: 0.8rem; }
.nx-mega-subcat p { font-family: var(--nx-font-mono); font-size: 0.72rem; color: var(--nx-text-dim); margin-bottom: 0.6rem; }
@media (min-width: 900px) {
  .nx-mega-body { flex-direction: row; }
  .nx-mega-sidebar { max-height: none; width: 320px; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); }
  .nx-mega-content { grid-template-columns: repeat(2, 1fr); }
}

/* ================= Footer ================= */
.nx-footer { padding: 3rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(3,5,12,0.9); backdrop-filter: blur(20px); margin-top: 4rem; position: relative; z-index: 10; }
.nx-footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.06); font-family: var(--nx-font-mono); font-size: 0.72rem; }
.nx-footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--nx-font-display); font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.nx-footer-col p { color: var(--nx-text-dim); line-height: 1.7; }
.nx-footer-col h4 { font-size: 0.8rem; color: var(--nx-cyan-light); margin-bottom: 0.75rem; }
.nx-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.nx-footer-col ul a, .nx-linklike { color: var(--nx-text-dim); text-align: left; }
.nx-footer-col ul a:hover, .nx-linklike:hover { color: var(--nx-cyan-light); }
.nx-footer-directory-btn { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(6,182,212,0.4); color: var(--nx-cyan-light); font-family: var(--nx-font-mono); font-size: 0.68rem; font-weight: 700; }
.nx-footer-status { padding: 0.75rem; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.65rem; }
.nx-footer-status div { display: flex; justify-content: space-between; }
.nx-footer-status .ok { color: var(--nx-emerald-light); font-weight: 700; }
.nx-footer-status .cyan { color: var(--nx-cyan-light); font-weight: 700; }
.nx-footer-bottom { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; font-family: var(--nx-font-mono); font-size: 0.68rem; color: var(--nx-text-dim); }
.nx-footer-links { display: flex; gap: 1rem; }
.nx-footer-links a:hover { color: var(--nx-cyan-light); }
@media (min-width: 768px) { .nx-footer-grid { grid-template-columns: repeat(4, 1fr); } .nx-footer-bottom { flex-direction: row; } }

/* ================= Confetti ================= */
.nx-confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ================= Misc pages ================= */
.nx-static-content { font-size: 0.9rem; line-height: 1.8; color: #cbd5e1; }
.nx-glow-text { color: var(--nx-cyan-light); text-shadow: 0 0 20px rgba(34,211,238,0.6); }

/* ================= Widgets / footer sidebar ================= */
.nx-widget { margin-bottom: 1rem; }
.nx-widget-title { font-size: 0.85rem; color: var(--nx-cyan-light); }

/* ================= Language switch ================= */
.nx-langsw { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.nx-langsw__item { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 0.28rem 0.5rem; border-radius: 999px; font-family: var(--nx-font-mono); font-size: 0.68rem; letter-spacing: 0.04em; line-height: 1.4; text-decoration: none; color: #94a3b8; transition: color 0.2s, background 0.2s; }
a.nx-langsw__item:hover, a.nx-langsw__item:focus-visible { color: #fff; background: rgba(6,182,212,0.16); }
.nx-langsw__item.is-active { color: #04060f; background: linear-gradient(135deg, var(--nx-cyan-light), var(--nx-blue)); font-weight: 700; box-shadow: 0 0 14px rgba(6,182,212,0.45); }
@media (max-width: 720px) { .nx-langsw { padding: 2px; } .nx-langsw__item { min-width: 30px; padding: 0.22rem 0.4rem; font-size: 0.62rem; } }

/*
 * The self-hosted Latin faces carry no CJK glyphs, so Chinese would fall back
 * to whatever the OS picks -- often a mismatched serif. Naming the common
 * system CJK families keeps the Chinese half of the site on a sane sans stack
 * without shipping a multi-megabyte CJK webfont.
 */
.nx-lang-zh body, body.nx-lang-zh { font-synthesis-weight: none; }
body.nx-lang-zh, body.nx-lang-zh input, body.nx-lang-zh textarea, body.nx-lang-zh select, body.nx-lang-zh button {
  font-family: 'Plus Jakarta Sans', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
}
body.nx-lang-zh h1, body.nx-lang-zh h2, body.nx-lang-zh h3, body.nx-lang-zh h4, body.nx-lang-zh h5 {
  font-family: 'Space Grotesk', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
}
