/* =====================================================================
   MARS Keyboard — Product Showcase Stylesheet
   =====================================================================

   TABLE OF CONTENTS
   ─────────────────────────────────────────────────────────────────────
    1.  CSS Custom Properties (Design Tokens)
    2.  Reset & Base
    3.  Layout Utilities
    4.  Fixed Navigation (.site-nav)
    5.  Hero Section (.hero)
    6.  Section Headers (.section-header)
    7.  "Why Analog?" (#why-analog)
    8.  Keyboard Cards (#keyboards)
    9.  Key Modes (#key-modes)
   10.  Display System (#display)
   11.  Software Showcase (#software)
   12.  RGB Lighting (#effects)
   13.  Performance (#performance)
   14.  SOCD (#socd)
   15.  Profile System (#profiles)
   16.  Encoder (#encoder)
   17.  Wireless (#wireless)
   18.  Specifications Table (#specs)
   19.  Roadmap (#roadmap)
   20.  Open Source (#open-source)
   21.  Footer (.site-footer)
   22.  Reveal Animations
   23.  Mini Nova UI (.nova-mini / nm-*)
   24.  Nova Embed — Electron App Preview (.nova-embed)
   25.  Keycode Reference
   26.  Feature Grid
   27.  Responsive (768px breakpoint)
   ===================================================================== */

/* =====================================================================
   1. CSS Custom Properties (Design Tokens)
   ===================================================================== */

:root {
  --bg:            #06060a;
  --bg-card:       #0c0c10;
  --bg-elevated:   #111116;
  --border:        rgba(255, 255, 255, 0.06);
  --text:          #e4e4e7;
  --text-dim:      #71717a;
  --accent:        #7C5CFF;
  --accent-glow:   rgba(124, 92, 255, 0.25);
  --green:         #22c55e;
  --pink:          #EF476F;
  --yellow:        #FFD166;
  --cyan:          #66E3FF;
  --radius:        12px;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =====================================================================
   2. Reset & Base
   ===================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 52px;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* =====================================================================
   3. Layout Utilities
   ===================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* =====================================================================
   4. Fixed Navigation (.site-nav)
   ===================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  position: relative;
}

.site-nav .nav-brand {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.site-nav .nav-brand span {
  color: var(--accent);
}

.site-nav .nav-brand svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.site-nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-nav .nav-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.site-nav .nav-links a.active {
  color: var(--accent);
}

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, background 0.15s;
}

.hamburger:hover span {
  background: var(--text);
}

/* Mobile nav open state */
.site-nav .nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(6, 6, 10, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  gap: 16px;
}

/* =====================================================================
   5. Hero Section (.hero)
   ===================================================================== */

@keyframes hero-glow {
  0%, 100% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero {
  text-align: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 8s ease-in-out infinite;
}

.hero-logo {
  width: 80px;
  height: 80px;
  fill: var(--accent);
  margin: 0 auto 28px;
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero h1 span {
  color: var(--accent);
}

.hero .subtitle {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 1;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Hero badges */
.hero-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge .dot.green  { background: var(--green); }
.badge .dot.purple { background: var(--accent); }
.badge .dot.cyan   { background: var(--cyan); }
.badge .dot.yellow { background: var(--yellow); }
.badge .dot.pink   { background: var(--pink); }

/* Hero CTAs */
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #6B4EE0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(124, 92, 255, 0.1);
  transform: translateY(-1px);
}

/* =====================================================================
   6. Section Headers (.section-header)
   ===================================================================== */

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* =====================================================================
   7. "Why Analog?" (#why-analog)
   ===================================================================== */

.why-analog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.why-analog-text h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.why-analog-text p {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Depth demo */
.depth-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 280px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.depth-demo-key {
  width: 40px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: height 0.1s ease, background 0.15s;
}

.depth-demo-key.pressed {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.depth-bar {
  width: 24px;
  height: 140px;
  background: var(--bg-elevated);
  border-radius: 12px;
  position: relative;
  overflow: visible;
}

.depth-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--green), var(--accent));
  border-radius: 12px;
  transition: height 0.08s linear;
}

.depth-threshold {
  position: absolute;
  left: -4px;
  right: -4px;
  height: 2px;
  background: var(--pink);
  border-radius: 1px;
  z-index: 2;
}

.depth-threshold::after {
  content: 'ACT';
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 700;
  color: var(--pink);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.depth-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Analog compare — Traditional vs MARS */
.analog-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.compare-card.highlight {
  border-color: rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.06);
}

.compare-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.compare-card.highlight h4 {
  color: var(--accent);
}

.compare-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-card ul li {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-card ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.compare-card.highlight ul li {
  color: var(--text);
}

.compare-card.highlight ul li::before {
  background: var(--green);
}

/* =====================================================================
   8. Keyboard Cards (#keyboards)
   ===================================================================== */

.keyboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

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

.kb-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.kb-card.flagship {
  border-color: rgba(124, 92, 255, 0.3);
}

.kb-card.flagship:hover {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.kb-card-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0 0 8px 0;
  background: var(--bg-elevated);
  color: var(--text-dim);
}

.kb-card.flagship .kb-card-badge {
  background: var(--accent);
  color: white;
}

.kb-card-body {
  padding: 32px;
  flex: 1;
}

.kb-card-body h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.kb-card-body .kb-layout-tag {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.kb-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kb-spec {
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.kb-spec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.kb-spec-value {
  font-size: 14px;
  font-weight: 600;
}

.kb-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kb-features li {
  padding: 4px 10px;
  background: rgba(124, 92, 255, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: var(--accent);
}

.kb-image-placeholder {
  height: 200px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* =====================================================================
   9. Key Modes (#key-modes)
   ===================================================================== */

.mode-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  margin-bottom: 32px;
}

.mode-tabs::-webkit-scrollbar {
  display: none;
}

.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.mode-tab:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.mode-tab.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 92, 255, 0.06);
}

.mode-tab svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill 0.15s;
}

.mode-tab.active svg {
  fill: var(--accent);
}

/* Mode panels */
.mode-panel {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mode-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  opacity: 1;
  transform: translateY(0);
}

.mode-description {
  padding: 8px 0;
}

.mode-description h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.mode-description p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.mode-description ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-description ul li {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.mode-description ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Mode visuals */
.mode-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mode key demos */
.mode-key-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.demo-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  flex-direction: column;
  gap: 2px;
}

.demo-key.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.demo-key.dim {
  opacity: 0.35;
}

.demo-key .key-label-top {
  font-size: 8px;
  opacity: 0.7;
  line-height: 1;
}

.demo-key .key-label-bot {
  font-size: 11px;
  line-height: 1;
}

/* Depth markers (DKS) */
.depth-markers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 12px;
}

.depth-marker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.depth-marker-line {
  flex: 1;
  height: 2px;
  background: var(--bg-elevated);
  border-radius: 1px;
  position: relative;
}

.depth-marker-line.filled {
  background: var(--accent);
}

.depth-marker-label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-dim);
}

/* SOCD demo */
.socd-demo-keys {
  display: flex;
  align-items: center;
  gap: 12px;
}

.socd-arrow {
  font-size: 18px;
  color: var(--text-dim);
}

/* =====================================================================
   10. Display System (#display)
   ===================================================================== */

#display {
  background: linear-gradient(
    180deg,
    rgba(124, 92, 255, 0.04) 0%,
    transparent 40%
  );
}

.display-hero {
  text-align: center;
  margin-bottom: 56px;
}

.display-hero h2 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.display-hero h2 span {
  color: var(--accent);
}

.display-hero p {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* Carousel */
.display-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.display-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.display-slide.active {
  display: grid;
  opacity: 1;
}

/* Display frame */
.display-frame {
  width: 240px;
  height: 240px;
  background: #000;
  border-radius: 12px;
  border: 3px solid #222;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 16px 48px rgba(0,0,0,0.6);
}

.display-frame-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.display-info h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.display-info p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.display-info .feature-pill {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin: 0 4px 4px 0;
}

/* Dots navigation */
.display-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.display-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.display-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.display-dot:hover {
  background: var(--text-dim);
}

/* Carousel arrows */
.display-prev,
.display-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  z-index: 2;
}

.display-prev { left: -56px; }
.display-next { right: -56px; }

.display-prev:hover,
.display-next:hover {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Display content: GIF playback simulation */
@keyframes gif-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.display-gif {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #7C5CFF 0%,
    #EF476F 25%,
    #FFD166 50%,
    #22c55e 75%,
    #66E3FF 100%
  );
  background-size: 300% 300%;
  animation: gif-shift 4s ease infinite;
}

/* Display content: Spotify */
.display-spotify {
  width: 100%;
  height: 100%;
  background: #0a0a0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 10px;
}

.display-spotify .ds-art {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1DB954 0%, #191414 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.display-spotify .ds-track {
  font-size: 11px;
  font-weight: 700;
  color: #e4e4e7;
  text-align: center;
  line-height: 1.3;
}

.display-spotify .ds-artist {
  font-size: 9px;
  color: #71717a;
  text-align: center;
}

.display-spotify .ds-progress {
  width: 100%;
  height: 3px;
  background: #1a1a1e;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

@keyframes spotify-progress {
  0%   { width: 0%; }
  100% { width: 100%; }
}

.display-spotify .ds-progress-fill {
  height: 100%;
  width: 40%;
  background: #1DB954;
  border-radius: 2px;
  animation: spotify-progress 30s linear infinite;
}

/* Display content: Notepad */
.display-notepad {
  width: 100%;
  height: 100%;
  background: #0a0a0c;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: #e4e4e7;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.display-notepad .dn-line {
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.display-notepad .dn-cursor {
  display: inline-block;
  width: 6px;
  height: 10px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* Display content: System stats */
.display-stats {
  width: 100%;
  height: 100%;
  background: #0a0a0c;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.display-stats .dstat-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #71717a;
  margin-bottom: 4px;
}

.display-stats .dstat-bar {
  height: 6px;
  background: #1a1a1e;
  border-radius: 3px;
  overflow: hidden;
}

.display-stats .dstat-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.display-stats .dstat-fill.cpu   { background: var(--accent); width: 62%; }
.display-stats .dstat-fill.gpu   { background: var(--cyan);   width: 78%; }
.display-stats .dstat-fill.ram   { background: var(--green);  width: 45%; }
.display-stats .dstat-fill.temp  { background: var(--yellow); width: 55%; }

.display-stats .dstat-val {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Display content: Popup notification */
.display-popup {
  width: 100%;
  height: 100%;
  background: #0a0a0c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.display-popup .dp-card {
  background: #1a1a1e;
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  width: 100%;
}

.display-popup .dp-title {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #71717a;
  margin-bottom: 4px;
}

.display-popup .dp-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.display-popup .dp-sub {
  font-size: 8px;
  color: #71717a;
  margin-top: 2px;
}

/* =====================================================================
   11. Software Showcase (#software)
   ===================================================================== */

/* Tab nav */
.sw-tab-nav {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  overflow: hidden;
}

.sw-tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

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

.sw-tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Tab panels */
.sw-tab-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sw-tab-panel.active {
  display: block;
  opacity: 1;
}

/* Window chrome */
.sw-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}

.sw-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.sw-preview-header .sw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sw-preview-header .sw-dot:nth-child(1) { background: #ff5f57; }
.sw-preview-header .sw-dot:nth-child(2) { background: #febc2e; }
.sw-preview-header .sw-dot:nth-child(3) { background: #28c840; }

.sw-preview-header .sw-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

.sw-preview-body {
  padding: 0;
  overflow: hidden;
}

/* =====================================================================
   12. RGB Lighting (#effects)
   ===================================================================== */

.effects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.startup-effects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.effect-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}

.effect-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.effect-card .effect-preview {
  height: 50px;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
}

.effect-card .effect-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.effect-card .effect-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Per-effect preview animations */
.effect-static {
  background: var(--accent);
}

@keyframes breathing {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

.effect-breathing {
  background: var(--accent);
  animation: breathing 3s ease-in-out infinite;
}

@keyframes wave-slide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.effect-wave {
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--accent));
  background-size: 200% 100%;
  animation: wave-slide 2.5s linear infinite;
}

@keyframes radial-pulse {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.effect-radial {
  position: relative;
  background: #111;
  overflow: hidden;
}

.effect-radial::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  animation: radial-pulse 2s ease-out infinite;
}

.effect-gradient {
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

@keyframes rainbow {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.effect-rainbow {
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  animation: rainbow 3s linear infinite;
}

@keyframes reactive-flash {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 1; }
}

.effect-reactive {
  background: var(--accent);
  animation: reactive-flash 1.5s ease-in-out infinite;
}

.effect-depth {
  background: linear-gradient(
    to right,
    var(--green) 0%,
    var(--accent) 100%
  );
}

/* =====================================================================
   13. Performance (#performance)
   ===================================================================== */

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.perf-stats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.perf-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.perf-stat-row .psr-label {
  font-size: 14px;
  color: var(--text-dim);
}

.perf-stat-row .psr-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   14. SOCD (#socd)
   ===================================================================== */

.socd-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.socd-mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.socd-mode-card.active {
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.1);
}

.socd-mode-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.socd-mode-card p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* SOCD visual */
.socd-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  margin: 14px 0;
}

.socd-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.socd-key.win {
  background: var(--accent);
  border-color: #6B4EE0;
  color: white;
}

.socd-key.lose {
  opacity: 0.3;
}

.socd-arrow {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
}

/* =====================================================================
   15. Profile System (#profiles)
   ===================================================================== */

.profile-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.profile-slot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
  color: var(--text-dim);
  transition: transform 0.15s, border-color 0.15s;
}

.profile-slot.active {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
}

.profile-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.profile-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.profile-feature-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-feature-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* =====================================================================
   16. Encoder (#encoder)
   ===================================================================== */

.encoder-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.encoder-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Larger encoder for showcase */
.encoder-knob-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4a4a4e, #2e2e32);
  border: 3px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 6px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.encoder-knob-large::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  box-shadow: 0 0 8px var(--accent-glow);
}

.encoder-knob-large .encoder-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a3a3e, #2a2a2e);
  border: 2px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.encoder-uses {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.encoder-use {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.encoder-use-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.encoder-use-text {
  font-size: 13px;
  color: var(--text-dim);
}

.encoder-use-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

/* =====================================================================
   17. Wireless (#wireless)
   ===================================================================== */

.wireless-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.wireless-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.wireless-card .wc-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.wireless-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wireless-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* =====================================================================
   18. Specifications Table (#specs)
   ===================================================================== */

.specs-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.specs-table th,
.specs-table td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.specs-table th {
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Sticky first column for mobile scroll */
.specs-table td:first-child,
.specs-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-elevated);
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.specs-table th:first-child {
  z-index: 3;
}

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

.specs-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.specs-table tr:nth-child(even) td:first-child {
  background: var(--bg-elevated);
}

.specs-table .spec-accent {
  color: var(--accent);
  font-weight: 600;
}

.specs-table .spec-green {
  color: var(--green);
  font-weight: 600;
}

/* =====================================================================
   19. Roadmap (#roadmap)
   ===================================================================== */

@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid rgba(124, 92, 255, 0.3);
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(124, 92, 255, 0.4);
  background: var(--bg);
}

.timeline-item.complete::before {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  animation: timeline-pulse 2s ease-in-out infinite;
}

.timeline-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-item h4 .tl-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-item.complete h4 .tl-status {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.timeline-item.current h4 .tl-status {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
}

.timeline-item.pending h4 .tl-status {
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-dim);
}

.timeline-item p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* =====================================================================
   20. Open Source (#open-source)
   ===================================================================== */

.oss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.tech-badge .tb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.code-block-header .cb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block-header .cb-dot:nth-child(1) { background: #ff5f57; }
.code-block-header .cb-dot:nth-child(2) { background: #febc2e; }
.code-block-header .cb-dot:nth-child(3) { background: #28c840; }

.code-block-header .cb-label {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-dim);
  font-family: monospace;
}

.code-block pre {
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre;
}

.code-block pre .cb-dir  { color: var(--accent); }
.code-block pre .cb-file { color: var(--text); }
.code-block pre .cb-note { color: var(--text-dim); }

/* =====================================================================
   21. Footer (.site-footer)
   ===================================================================== */

.site-footer {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer .footer-logo {
  width: 36px;
  height: 36px;
  fill: var(--accent);
  opacity: 0.5;
  margin: 0 auto 16px;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

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

.site-footer .footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
}

/* =====================================================================
   22. Reveal Animations
   ===================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > .reveal {
  transition-delay: calc(var(--reveal-i, 0) * 0.08s);
}

/* =====================================================================
   23. Mini Nova UI (.nova-mini / nm-*)
   Colors sourced from software/themes.css (Nova default theme):
     --bg-primary: #0a0a0c   --bg-secondary: #111114   --key-bg: #1a1a1e
     --key-border: #111114   --accent: #7C5CFF         --text-normal: #e4e4e7
     --text-muted: #71717a   --green: #22c55e
   ===================================================================== */

.nova-mini {
  font-family: 'Inter', sans-serif;
  background: #0a0a0c;
  color: #e4e4e7;
  font-size: 12px;
  overflow: hidden;
}

.nova-mini * {
  box-sizing: border-box;
}

/* Header — bg-primary, drag region */
.nova-mini .nm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0a0a0c;
}

.nova-mini .nm-logo {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nova-mini .nm-logo span   { color: #7C5CFF; }
.nova-mini .nm-logo-icon   { width: 14px; height: 14px; fill: #7C5CFF; }

.nova-mini .nm-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #71717a;
}

.nova-mini .nm-dot   { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }

.nova-mini .nm-controls { display: flex; gap: 4px; }
.nova-mini .nm-ctrl {
  width: 24px; height: 24px; border: none; background: transparent;
  color: #71717a; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 14px; cursor: default;
}

/* Nav tabs — bg-secondary, accent underline */
.nova-mini .nm-tabs {
  display: flex;
  padding: 0 16px;
  background: #111114;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nova-mini .nm-tab {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
  border-bottom: 2px solid transparent;
  cursor: default;
}

.nova-mini .nm-tab.active {
  color: #e4e4e7;
  border-bottom-color: #7C5CFF;
}

/* Content layout — sidebar=bg-secondary, panel=bg-primary */
.nova-mini .nm-content {
  display: flex;
  min-height: 300px;
}

.nova-mini .nm-sidebar {
  width: 180px;
  background: #111114;
  padding: 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.nova-mini .nm-main {
  flex: 1;
  padding: 16px;
  background: #0a0a0c;
  overflow: hidden;
}

/* Keyboard container */
.nm-keyboard {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 8px 0;
  background: #111114;
  border-radius: 8px;
  padding: 10px;
}

.nm-kb-row { display: flex; gap: 3px; }

/* Keys */
.nm-key {
  height: 28px;
  background: #1a1a1e;
  border: 1px solid #111114;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #e4e4e7;
  flex-shrink: 0;
  min-width: 28px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.nm-key.w125  { min-width: 36px; }
.nm-key.w15   { min-width: 43px; }
.nm-key.w175  { min-width: 50px; }
.nm-key.w2    { min-width: 57px; }
.nm-key.w225  { min-width: 65px; }
.nm-key.w625  { min-width: 180px; }
.nm-key.active  { background: #7C5CFF; border-color: #7C5CFF; box-shadow: none; }
.nm-key.painted { border-color: rgba(255, 255, 255, 0.15); }

/* Encoder — metallic gradient, accent dot, shadow */
.nm-encoder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4a4a4e, #3a3a3e);
  border: 2px solid #111114;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.08);
  position: relative;
}

.nm-encoder::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7C5CFF;
  opacity: 0.6;
}

/* Sidebar controls */
.nm-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #71717a;
  margin-bottom: 8px;
  font-weight: 700;
}

.nm-dropdown {
  width: 100%;
  padding: 6px 10px;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #e4e4e7;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: default;
}

.nm-dropdown .arrow { color: #71717a; font-size: 8px; }

/* Sliders — 6px track, 3px radius */
.nm-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.nm-slider-label {
  font-size: 10px;
  color: #71717a;
  white-space: nowrap;
  min-width: 50px;
}

.nm-slider {
  flex: 1;
  height: 6px;
  background: #1a1a1e;
  border-radius: 3px;
  position: relative;
}

.nm-slider-fill {
  height: 100%;
  background: #7C5CFF;
  border-radius: 3px;
}

.nm-slider-value {
  font-size: 10px;
  color: #e4e4e7;
  min-width: 24px;
  text-align: right;
}

/* Toggle switches */
.nm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.nm-toggle-label { font-size: 11px; }

.nm-toggle {
  width: 34px;
  height: 18px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 9px;
  position: relative;
  cursor: default;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nm-toggle.on { background: #7C5CFF; box-shadow: none; }

.nm-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.nm-toggle.on::after {
  transform: translateX(16px);
  background: white;
}

/* Colour picker */
.nm-color-area   { display: flex; gap: 8px; margin-bottom: 12px; }

.nm-sv-canvas {
  width: 100px;
  height: 80px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.nm-sv-canvas .sv-bg { position: absolute; inset: 0; }

.nm-sv-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}

.nm-hue-bar {
  width: 16px;
  height: 80px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  position: relative;
}

.nm-hue-thumb {
  width: 16px;
  height: 6px;
  background: white;
  border-radius: 3px;
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.nm-hex-input {
  width: 100%;
  padding: 5px 8px;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #e4e4e7;
  font-size: 11px;
  font-family: monospace;
  text-align: center;
}

.nm-swatches { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.nm-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: default;
}

/* Performance depth bars */
.nm-depth-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 60px;
  margin: 8px 0;
}

.nm-depth-bar {
  width: 6px;
  background: #1a1a1e;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.nm-depth-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #22c55e, #7C5CFF);
  border-radius: 3px;
}

.nm-threshold {
  position: absolute;
  left: -1px;
  right: -1px;
  height: 2px;
  background: #EF476F;
}

/* GIF slot grid */
.nm-gif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nm-gif-slot {
  aspect-ratio: 1;
  background: #1a1a1e;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #71717a;
}

.nm-gif-slot.active { border-color: #7C5CFF; }

/* Spotify view */
.nm-spotify {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #111114;
  border-radius: 8px;
}

.nm-album-art {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1a1e, #2a2a30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nm-track-info   { flex: 1; }
.nm-track-title  { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.nm-track-artist { font-size: 10px; color: #71717a; margin-bottom: 8px; }

.nm-progress-bar {
  height: 3px;
  background: #1a1a1e;
  border-radius: 2px;
  overflow: hidden;
}

.nm-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
}

/* Settings */
.nm-settings-group     { margin-bottom: 16px; }
.nm-settings-group h4  { font-size: 11px; font-weight: 600; margin-bottom: 8px; color: #e4e4e7; }

.nm-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nm-setting-row:last-child { border: none; }
.nm-setting-label { font-size: 11px; color: #71717a; }

/* =====================================================================
   24. Nova Embed — Real Electron App Preview (Scaled)
   ===================================================================== */

.nova-embed-wrapper {
  overflow: hidden;
  position: relative;
}

.nova-embed {
  /* Theme variables (software/themes.css — Nova default) */
  --bg-primary:           #0a0a0c;
  --bg-secondary:         #111114;
  --bg-tertiary:          hsl(240, 8%, 10%);
  --bg-modifier-hover:    rgba(50, 50, 56, 0.5);
  --bg-modifier-selected: rgba(46, 46, 46, 0.4);
  --text-normal:          #e4e4e7;
  --text-muted:           #71717a;
  --accent:               #7C5CFF;
  --accent-hover:         #6B4EE0;
  --green:                #22c55e;
  --pink:                 #EF476F;
  --yellow:               #FFD166;
  --nova-blue-vibrant:    #338AFF;
  --key-bg:               #1a1a1e;
  --key-bg-hover:         #2a2a30;
  --key-bg-pressed:       #7C5CFF;
  --key-border:           #111114;
  --slider-track:         #1a1a1e;
  --slider-thumb:         #7C5CFF;
  --radius:               8px;
  --radius-sm:            4px;
  --key-size:             60px;
  --knob-surface:         #3a3a3e;
  --knob-surface-light:   #4a4a4e;

  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-normal);
  font-size: 14px;
  width: 1360px;
  transform-origin: top left;
  overflow: hidden;
  line-height: 1.4;
}

.nova-embed * { box-sizing: border-box; margin: 0; padding: 0; }

/* Nav tabs */
.nova-embed .nav-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 0 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nova-embed .nav-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.nova-embed .nav-tab.active {
  color: var(--text-normal);
  border-bottom-color: var(--accent);
}

/* Layout */
.nova-embed .content-wrapper { display: flex; overflow: hidden; }
.nova-embed .main-content     { flex: 1; display: flex; overflow: hidden; }

/* Sidebar */
.nova-embed .sidebar {
  width: 220px;
  background: var(--bg-secondary);
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.nova-embed .sidebar-section { margin-bottom: 20px; }

.nova-embed .sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 8px;
}

.nova-embed .sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
}

.nova-embed .sidebar-item.active {
  background: var(--bg-modifier-selected);
  color: var(--text-normal);
}

/* Profiles */
.nova-embed .profile-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.nova-embed .profile-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
}

.nova-embed .profile-item.active {
  background: var(--bg-modifier-selected);
  color: var(--text-normal);
  border-left: 2px solid var(--accent);
}

.nova-embed .profile-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.nova-embed .profile-name { flex: 1; }

.nova-embed .profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nova-embed .profile-btn {
  padding: 6px 10px;
  font-size: 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: default;
  font-family: inherit;
}

/* Toggle switch */
.nova-embed .toggle-switch {
  position: relative;
  width: 40px;
  height: 24px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nova-embed .toggle-switch.on,
.nova-embed .toggle-switch.active {
  background: var(--accent);
  box-shadow: none;
}

.nova-embed .toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.nova-embed .toggle-switch.on::after,
.nova-embed .toggle-switch.active::after {
  transform: translateX(16px);
  background: white;
}

/* Control rows */
.nova-embed .control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.nova-embed .control-label { font-size: 13px; color: var(--text-muted); }

/* Slider (div-based) */
.nova-embed .slider {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--slider-track);
}

.nova-embed .slider-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* Panel content */
.nova-embed .panel-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.nova-embed .panel         { display: none; flex-direction: column; }
.nova-embed .panel.active  { display: flex; }

/* Keyboard container */
.nova-embed .keyboard-container {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.nova-embed .keyboard-row {
  display: flex;
  gap: 3px;
  margin-bottom: 3px;
}

/* Keys */
.nova-embed .key {
  height: var(--key-size);
  width: var(--key-size);
  background: var(--key-bg);
  border: 1px solid var(--key-border);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-normal);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  padding: 4px;
  flex: 0 0 auto;
  overflow: hidden;
  text-align: center;
  user-select: none;
}

.nova-embed .key.selected { background: var(--accent); border-color: var(--accent); }
.nova-embed .key.remapped { border: 2px solid var(--nova-blue-vibrant); box-shadow: 0 0 8px rgba(0, 81, 187, 0.4); }
.nova-embed .key .top     { font-size: 8px; opacity: 0.7; }
.nova-embed .key .bottom  { font-size: 10px; }

/* Key width classes (exact copy from software/styles.css) */
.nova-embed .key.w-1-25   { width: calc(var(--key-size) * 1.25 + 3px * 0.25); }
.nova-embed .key.w-1-5    { width: calc(var(--key-size) * 1.5  + 3px * 0.5); }
.nova-embed .key.w-1-75   { width: calc(var(--key-size) * 1.75 + 3px * 0.75); }
.nova-embed .key.w-2      { width: calc(var(--key-size) * 2    + 3px); }
.nova-embed .key.w-2-25   { width: calc(var(--key-size) * 2.25 + 3px * 1.25); }
.nova-embed .key.w-2-75   { width: calc(var(--key-size) * 2.75 + 3px * 1.75); }
.nova-embed .key.w-6-25   { width: calc(var(--key-size) * 6.25 + 3px * 5.25); }
.nova-embed .key.gap-left       { margin-left: calc(var(--key-size) * 0.5  + 3px * 0.5); }
.nova-embed .key.gap-quarter    { margin-left: calc(var(--key-size) * 0.25 + 3px * 0.25); }
.nova-embed .encoder-knob.gap-left    { margin-left: calc(var(--key-size) * 0.5  + 3px * 0.5); }
.nova-embed .encoder-knob.gap-quarter { margin-left: calc(var(--key-size) * 0.25 + 3px * 0.25); }

/* Encoder knob */
.nova-embed .encoder-knob {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--knob-surface-light), var(--knob-surface));
  border: 2px solid var(--key-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex: 0 0 auto;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.08);
  position: relative;
}

.nova-embed .encoder-knob::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* Layer buttons */
.nova-embed .layer-btn-wrapper { display: flex; align-items: center; gap: 6px; }

.nova-embed .layer-btn {
  position: relative;
  padding: 8px 30px 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: default;
  font-family: inherit;
}

.nova-embed .layer-btn.active { background: var(--accent); color: white; }

.nova-embed .layer-led-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Keyboard sticky header */
.nova-embed .keyboard-sticky-header { flex-shrink: 0; padding-bottom: 16px; }
.nova-embed .keys-scroll-area       { flex: 1; overflow-y: auto; }

/* Remap section */
.nova-embed .remap-section {
  margin-top: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}

.nova-embed .remap-info h3 { margin-bottom: 8px; font-size: 16px; font-weight: 600; }
.nova-embed .remap-info p  { color: var(--text-muted); font-size: 13px; }

.nova-embed .remap-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.nova-embed .preset-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--key-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  font-family: inherit;
}

.nova-embed .preset-icon { font-size: 18px; }

/* Key picker */
.nova-embed .key-picker-container { display: flex; gap: 20px; }
.nova-embed .key-search-box       { flex: 1; }

.nova-embed .key-search-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--key-border);
  border-radius: var(--radius-sm);
  color: var(--text-normal);
  font-size: 13px;
  margin-bottom: 12px;
  font-family: inherit;
}

.nova-embed .key-category       { margin-bottom: 16px; }
.nova-embed .key-category-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nova-embed .key-grid { display: flex; flex-wrap: wrap; gap: 4px; }

.nova-embed .picker-key {
  min-width: 40px;
  height: 36px;
  padding: 4px 8px;
  background: var(--key-bg);
  border: 1px solid var(--key-border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nova-embed .picker-key.selected { background: var(--accent); border-color: var(--accent); color: white; }

/* Controls panel (right side) */
.nova-embed .controls-panel {
  width: 340px;
  background: var(--bg-secondary);
  padding: 20px;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  flex: 0 0 340px;
}

.nova-embed .control-section { margin-bottom: 16px; }
.nova-embed .control-title   { font-size: 13px; font-weight: 600; color: var(--text-normal); margin-bottom: 12px; }

/* Ambient LEDs (Lighting tab) */
.nova-embed .ambient-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nova-embed .ambient-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }

.nova-embed .ambient-strip { display: flex; gap: 8px; }

.nova-embed .ambient-led {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  border: 2px solid var(--key-border);
}

/* Paint mode bar */
.nova-embed .paint-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-top: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.nova-embed .paint-mode-left  { display: flex; align-items: center; gap: 12px; }
.nova-embed .paint-mode-right { display: flex; align-items: center; gap: 12px; }
.nova-embed .paint-mode-label { font-size: 13px; font-weight: 600; color: var(--text-normal); }

.nova-embed .color-swatch-small {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--key-border);
}

/* Lighting subtabs */
.nova-embed .lighting-subtabs { display: flex; gap: 4px; margin-bottom: 16px; }

.nova-embed .lighting-subtab {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: none;
  cursor: default;
  font-family: inherit;
}

.nova-embed .lighting-subtab.active { background: var(--accent); color: white; }

/* Lighting controls panel (lcp style) */
.nova-embed .lcp {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 14px;
}

.nova-embed .lcp-canvas-row { display: flex; gap: 10px; }

.nova-embed .lcp-sv-wrap {
  position: relative;
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.nova-embed .lcp-sv       { display: block; width: 100%; height: 140px; border-radius: 10px; }
.nova-embed .lcp-sv-thumb {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.nova-embed .lcp-hue-wrap {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
  align-self: stretch;
}

.nova-embed .lcp-hue       { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.nova-embed .lcp-hue-thumb {
  position: absolute;
  left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.nova-embed .lcp-input-row { display: flex; align-items: center; gap: 6px; }

.nova-embed .lcp-hex-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-normal);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: monospace;
}

.nova-embed .lcp-recents-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.nova-embed .lcp-recents { display: flex; flex-wrap: wrap; gap: 6px; }

.nova-embed .lcp-recent {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: 2px solid var(--key-border);
}

/* Performance tab: actuation value overlay on keys */
.nova-embed .key .actuation-value {
  font-size: 8px;
  color: var(--accent);
  opacity: 0.9;
  margin-top: 1px;
}

/* Performance live preview */
.nova-embed .perf-live-section { margin-top: 12px; }

.nova-embed .perf-stat-box {
  background: var(--bg-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nova-embed .perf-stat-label  { font-size: 10px; color: var(--text-muted); }
.nova-embed .perf-stat-value  { font-size: 20px; font-weight: 700; }
.nova-embed .perf-stat-value.accent { color: var(--accent); }

.nova-embed .perf-bar-container {
  position: relative;
  width: 40px;
  height: 180px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.nova-embed .perf-depth-fill {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, var(--green), var(--green));
  transition: height 0.05s linear;
}

.nova-embed .perf-marker {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
}

.nova-embed .perf-marker.actuation  { background: var(--accent); }
.nova-embed .perf-marker.hysteresis { background: var(--yellow); }

/* Wider embed for tabs with controls panel */
.nova-embed.wide { width: 1600px; }

/* Wave animation for lighting showcase */
@keyframes key-color-wave {
  0%, 100% { background: #ff0012; border-color: rgba(255, 0, 18, 0.5); }
  50%       { background: #0010ff; border-color: rgba(0, 16, 255, 0.5); }
}

.nova-embed .keyboard-container.lighting-kb .key {
  animation: key-color-wave 3s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 0.12s);
  color: rgba(255, 255, 255, 0.95);
}

.nova-embed .keyboard-container.lighting-kb .encoder-knob {
  animation: key-color-wave 3s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 0.12s);
}

.nova-embed .keyboard-container.lighting-kb .ambient-led {
  animation: key-color-wave 3s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 0.2s);
}

/* Performance tab: dual actuation/return values */
.nova-embed .keyboard-container.perf-kb .key {
  justify-content: flex-start;
  padding: 3px 2px;
}

.nova-embed .keyboard-container.perf-kb .key .bottom {
  margin-top: auto;
}

.nova-embed .key .perf-values {
  display: flex;
  gap: 3px;
  font-size: 8px;
  line-height: 1;
}

.nova-embed .key .perf-values .act-v { color: var(--accent); }
.nova-embed .key .perf-values .ret-v { color: var(--accent); opacity: 0.7; }

/* =====================================================================
   25. Keycode Reference
   ===================================================================== */

.keycode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.keycode-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.keycode-group h4 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.keycode-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.keycode-item:last-child { border: none; }
.keycode-item .kc-name  { font-family: monospace; color: var(--cyan); }
.keycode-item .kc-desc  { color: var(--text-dim); }

/* =====================================================================
   26. Feature Grid
   ===================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* =====================================================================
   27. Responsive (768px breakpoint)
   ===================================================================== */

@media (max-width: 768px) {

  /* Navigation */
  .hamburger {
    display: flex;
  }

  .site-nav .nav-links {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 100px 0 60px;
  }

  .hero h1 {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .hero .subtitle {
    font-size: 16px;
  }

  .hero-stats {
    gap: 24px;
  }

  /* Section padding */
  section {
    padding: 48px 0;
  }

  /* Why Analog */
  .why-analog-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .analog-compare {
    grid-template-columns: 1fr;
  }

  /* Keyboard grid */
  .keyboard-grid {
    grid-template-columns: 1fr;
  }

  /* Mode panel */
  .mode-panel.active {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Display carousel */
  .display-carousel {
    padding: 0;
  }

  .display-slide.active {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .display-prev,
  .display-next {
    position: static;
    transform: none;
  }

  .display-prev { left: auto; }
  .display-next { right: auto; }

  /* SOCD */
  .socd-modes {
    grid-template-columns: 1fr;
  }

  /* Open source */
  .oss-grid {
    grid-template-columns: 1fr;
  }

  /* Encoder */
  .encoder-showcase {
    grid-template-columns: 1fr;
  }

  /* Performance */
  .perf-grid {
    grid-template-columns: 1fr;
  }

  /* Specs table: sticky first column already handles mobile */
  .specs-table-wrapper {
    border-radius: 8px;
  }

  /* Nova mini */
  .nova-mini .nm-sidebar {
    display: none;
  }

  .nova-mini .nm-content {
    min-height: 220px;
  }

  /* Nova embed */
  .nova-embed .sidebar {
    display: none;
  }

  .nova-embed {
    width: 800px;
  }
}
