/* Self-hosted fonts (latin + latin-ext) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Inter-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/Inter-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/Inter-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/Inter-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/Inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/Inter-700-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/Inter-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/Inter-800-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/Inter-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/JetBrainsMono-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Silkscreen-400-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Silkscreen-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/Silkscreen-700-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Silkscreen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/Silkscreen-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-700-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/SpaceGrotesk-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════════════════════
   CMDBLOCK v3 — "EMERALD GLASS" Design System
   21st.dev-style glass components + React Bits accents (aurora,
   border-beam, shiny text, magic bento) on a Minecraft-terminal soul.
   Class contracts are unchanged from v2 — cmdblock.js binds to the
   same selectors (.reveal, .bento-card, .stat-num, modals, search…).
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #050608;
  --bg-elev: #0B0D12;
  --bg-card: rgba(255,255,255,0.028);
  --bg-card-hover: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #F2F3F5;
  --text-dim: #9EA1A8;
  --text-faint: #5F6269;
  --cmd-green: #55FF55;
  --cmd-green-glow: rgba(85,255,85,0.18);
  --cmd-aqua: #55FFFF;
  --cmd-yellow: #FFE94A;
  --cmd-purple: #B266FF;
  --cmd-red: #FF5C5C;
  --diamond: #4AEDD9;
  --emerald: #50C878;
  --iron: #BDBDC2;
  --netherite: #6E4B40;
  --gold: #FCDB05;
  --grass: #6BC04A;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-card: inset 0 1px 0 rgba(255,255,255,0.05), 0 24px 50px -24px rgba(0,0,0,0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-pixel: 'Silkscreen', monospace;
  --grad-accent: linear-gradient(135deg, #55FF55 0%, #4AEDD9 100%);
  --grad-title: linear-gradient(180deg, #FFFFFF 0%, #B4B7BE 100%);
  --grad-green-text: linear-gradient(180deg, #8CFF8C 0%, #2DBD2D 100%);
  --ring: rgba(85,255,85,0.35);
}

/* Rotating angle for border-beam effects (falls back to static gradient
   in browsers without @property). */
@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

/* ── MPA page transitions (View Transitions API) ────────
   Content slides, the pill nav stays put. Browsers without support
   (Firefox) just navigate normally; both reduce-motion switches kill it. */
@view-transition { navigation: auto; }
.app-nav { view-transition-name: site-nav; }
/* The heavy blurred orbs get their own (identical-across-pages) groups so the
   background stays perfectly still — only the content layer moves. Keeps the
   compositor busy with two small cheap animations instead of sliding two
   full-page rasters over blend-mode gradients. */
.orb-1 { view-transition-name: bg-orb-1; }
.orb-2 { view-transition-name: bg-orb-2; }
.orb-3 { view-transition-name: bg-orb-3; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-fade-out 0.14s ease-out both; }
  ::view-transition-new(root) { animation: vt-slide-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) both; }
  ::view-transition-group(bg-orb-1),
  ::view-transition-group(bg-orb-2),
  ::view-transition-group(bg-orb-3),
  ::view-transition-group(site-nav) { animation-duration: 0.14s; }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-slide-in { from { opacity: 0; transform: translateX(18px); } }
html[data-reduce-motion="1"]::view-transition-old(root),
html[data-reduce-motion="1"]::view-transition-new(root) { animation: none; }
html[data-reduce-motion="1"] .orb-1, html[data-reduce-motion="1"] .orb-2, html[data-reduce-motion="1"] .orb-3 { view-transition-name: none; }

/* ── Layout-shift guards: JS-rendered grids reserve space ── */
#courseGrid { min-height: 320px; align-content: start; }
#libGrid { min-height: 240px; align-content: start; }
#progressRails { min-height: 180px; }
#lessonSidebar { min-height: 200px; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 700px at 75% -10%, rgba(85,255,85,0.07), transparent 60%),
    radial-gradient(900px 640px at -12% 22%, rgba(74,237,217,0.05), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(178,102,255,0.04), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Film grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1; mix-blend-mode: overlay;
}

/* ── Aurora orbs (React Bits Aurora vibe, CSS-only) ──────────
   Same three .orb divs every page already has — restyled into
   saturated conic blooms with slow drift + hue breathing. */
.orb {
  position: fixed; pointer-events: none; z-index: 0;
  filter: blur(90px) saturate(130%);
  opacity: 0.55; border-radius: 50%;
  will-change: transform;
}
.orb-1 {
  width: 620px; height: 620px; top: -220px; left: -180px;
  background: conic-gradient(from 200deg at 50% 50%,
    rgba(85,255,85,0.5), rgba(74,237,217,0.25), rgba(85,255,85,0.05), rgba(85,255,85,0.5));
  animation: orbDrift1 34s var(--ease) infinite alternate, orbHue 26s linear infinite;
}
.orb-2 {
  width: 640px; height: 640px; top: 14%; right: -260px;
  background: conic-gradient(from 40deg at 50% 50%,
    rgba(74,237,217,0.38), rgba(85,255,255,0.14), rgba(74,237,217,0.02), rgba(74,237,217,0.38));
  animation: orbDrift2 40s var(--ease) infinite alternate, orbHue 32s linear infinite reverse;
}
.orb-3 {
  width: 720px; height: 720px; bottom: -320px; left: 26%;
  background: conic-gradient(from 300deg at 50% 50%,
    rgba(178,102,255,0.28), rgba(85,255,85,0.10), rgba(178,102,255,0.02), rgba(178,102,255,0.28));
  animation: orbDrift3 46s var(--ease) infinite alternate, orbHue 38s linear infinite;
}
@keyframes orbHue {
  0%, 100% { filter: blur(90px) saturate(130%) hue-rotate(0deg); }
  50% { filter: blur(96px) saturate(150%) hue-rotate(-14deg); }
}
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0)        scale(1);    opacity: 0.6;  }
  50%  { transform: translate(60px, 40px)  scale(1.08); opacity: 0.72; }
  100% { transform: translate(20px, 80px)  scale(0.96); opacity: 0.62; }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0)         scale(1);    opacity: 0.55; }
  50%  { transform: translate(-50px, 60px)  scale(1.06); opacity: 0.68; }
  100% { transform: translate(-90px, -30px) scale(1);    opacity: 0.58; }
}
@keyframes orbDrift3 {
  0%   { transform: translate(0, 0)         scale(1);    opacity: 0.5;  }
  50%  { transform: translate(80px, -50px)  scale(1.1);  opacity: 0.65; }
  100% { transform: translate(-40px, -90px) scale(0.94); opacity: 0.52; }
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }
html[data-reduce-motion="1"] .orb { animation: none; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* ── Shared effect utilities ─────────────────────────────── */

/* Border beam (React Bits BorderBeam, CSS-only): a bright green→teal
   comet orbiting the element's border. Apply to any rounded, positioned
   box. Don't combine with .bento-card.magic (it owns ::after there). */
.beam-border { position: relative; }
.beam-border::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--beam-angle),
    transparent 0deg, transparent 300deg,
    rgba(85,255,85,0.9) 330deg, rgba(74,237,217,0.95) 345deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
  animation: beamSpin 7s linear infinite;
}
@keyframes beamSpin { to { --beam-angle: 360deg; } }
html[data-reduce-motion="1"] .beam-border::after { animation: none; }

/* Shiny text (React Bits ShinyText): light band sweeping across a
   green gradient word. Use on the accent span inside big headings. */
.shiny-text {
  background: linear-gradient(120deg,
    #55FF55 32%, #D9FFD9 47%, #7CF5E4 53%, #4AEDD9 68%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shineSweep 3.6s linear infinite;
}
@keyframes shineSweep { to { background-position: -220% 0; } }
html[data-reduce-motion="1"] .shiny-text { animation: none; }

/* Gradient title helper */
.grad-text {
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Static gradient border (hover-lit) for glass panels */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── NAV — floating glass pill (21st.dev signature) ─────── */
.app-nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
  padding: 0;
  pointer-events: none;
}
.app-nav .container {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1240px;
  padding: 10px 12px 10px 20px;
  background: linear-gradient(180deg, rgba(13,15,20,0.82), rgba(8,10,13,0.78));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 40px -18px rgba(0,0,0,0.8),
    0 0 60px -30px rgba(85,255,85,0.25);
}
@media (max-width: 1300px) {
  .app-nav .container { margin: 0 20px; }
}
@media (max-width: 720px) {
  .app-nav { top: 10px; }
  .app-nav .container { margin: 0 12px; padding: 8px 10px 8px 16px; }
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.5px;
}
.logo .accent { color: var(--cmd-green); text-shadow: 0 0 18px rgba(85,255,85,0.5); }
.logo-cube { width: 26px; height: 26px; image-rendering: pixelated; object-fit: contain; filter: drop-shadow(0 0 10px rgba(85,255,85,0.35)); }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  position: relative;
  color: var(--text-dim); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 8px 14px; border-radius: 10px;
  transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--cmd-green); background: rgba(85,255,85,0.08); box-shadow: inset 0 0 0 1px rgba(85,255,85,0.16); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s;
}
.nav-icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.nav-icon-btn svg { width: 16px; height: 16px; }
.nav-icon-btn img { width: 20px; height: 20px; image-rendering: pixelated; }
.edition-switcher img { display: block; }
.edition-switcher[data-edition="java"] { border-color: rgba(85,255,85,0.28); background: rgba(85,255,85,0.06); }
.edition-switcher[data-edition="bedrock"] { border-color: rgba(109,179,255,0.25); background: rgba(109,179,255,0.06); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #6DFF6D, #3FE43F);
  color: #06230A;
  font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 700;
  padding: 9px 16px;
  border: none; border-radius: 11px;
  cursor: pointer; text-decoration: none;
  transition: all 0.18s var(--ease);
  box-shadow: 0 0 0 0 var(--cmd-green-glow), inset 0 1px 0 rgba(255,255,255,0.35), 0 6px 18px -6px rgba(85,255,85,0.45);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px var(--cmd-green-glow), inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 22px -6px rgba(85,255,85,0.55);
}
.nav-cta.signed-in {
  background: rgba(85,255,85,0.1);
  color: var(--cmd-green);
  border: 1px solid rgba(85,255,85,0.3);
  box-shadow: none;
}
.nav-cta.signed-in:hover { background: rgba(85,255,85,0.16); }
.nav-cta svg { width: 14px; height: 14px; }

.mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.mobile-toggle svg { width: 18px; height: 18px; }
.mobile-nav {
  display: none;
  position: fixed; top: 74px; left: 12px; right: 12px; z-index: 99;
  background: linear-gradient(180deg, rgba(13,15,20,0.97), rgba(8,10,13,0.97));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 30px 60px -20px rgba(0,0,0,0.8);
  padding: 14px 14px 18px;
  flex-direction: column; gap: 4px;
}
.mobile-nav.open { display: flex; animation: mobileNavIn 0.25s var(--ease); }
@keyframes mobileNavIn { from { opacity: 0; transform: translateY(-8px) scale(0.99); } to { opacity: 1; transform: none; } }
.mobile-nav a {
  display: block; padding: 13px 16px;
  color: var(--text); text-decoration: none;
  font-weight: 500; border-radius: 12px;
  transition: background 0.18s;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.05); }
.mobile-nav .nav-cta { margin-top: 8px; justify-content: center; padding: 13px; }

@media (max-width: 880px) {
  .nav-links, .nav-actions .desktop-only { display: none; }
  .mobile-toggle { display: inline-flex; }
}

/* ── PILLS / EYEBROWS ───────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.2s;
}
.pill:hover { border-color: rgba(85,255,85,0.35); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 24px -8px rgba(85,255,85,0.4); }
.pill .pill-badge {
  font-family: var(--font-pixel);
  font-size: 0.62rem; letter-spacing: 1px;
  color: #06230A;
  background: linear-gradient(180deg, #6DFF6D, #3FE43F);
  border: none;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 0 14px -2px rgba(85,255,85,0.5);
}
.pill .arrow { width: 14px; height: 14px; transition: transform 0.2s; }
.pill:hover .arrow { transform: translateX(3px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.68rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--cmd-green);
  padding: 6px 14px;
  background: rgba(85,255,85,0.06);
  border: 1px solid rgba(85,255,85,0.18);
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 30px -12px rgba(85,255,85,0.5);
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(85,255,85,0.8);
}

/* ── HERO (home) ────────────────────────────────────────── */
.hero {
  padding: 170px 24px 60px;
  position: relative;
  text-align: center;
}
/* Dot matrix backdrop with radial falloff */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.4px),
    radial-gradient(rgba(85,255,85,0.12) 1px, transparent 1.6px);
  background-size: 26px 26px, 78px 78px;
  background-position: 0 0, 13px 13px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, black, transparent 75%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 880px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 700; line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 26px 0 22px;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .green {
  font-family: var(--font-pixel);
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 0.85em;
  display: inline-block;
  letter-spacing: 0.02em;
}
/* When the accent word also carries .shiny-text, the sweep wins */
.hero h1 .green.shiny-text,
.page-hero h1 .green.shiny-text {
  background: linear-gradient(120deg, #55FF55 32%, #D9FFD9 47%, #7CF5E4 53%, #4AEDD9 68%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: 1.12rem; color: var(--text-dim);
  max-width: 600px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note {
  margin-top: 24px;
  font-size: 0.82rem; color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-note .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 8px var(--cmd-green);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }

/* ── PAGE HEROES (non-home pages) ───────────────────────── */
.page-hero {
  padding: 160px 24px 60px;
  position: relative;
  text-align: center;
}
.page-hero .hero-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1.4px),
    radial-gradient(rgba(85,255,85,0.10) 1px, transparent 1.6px);
  background-size: 26px 26px, 78px 78px;
  background-position: 0 0, 13px 13px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black, transparent 75%);
  pointer-events: none;
}
.page-hero .hero-content { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero h1 .green {
  font-family: var(--font-pixel);
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 0.85em;
}
.page-hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px; margin: 0 auto;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 600;
  border-radius: 12px; cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  border: none;
  white-space: nowrap;
  overflow: hidden;
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 9px 14px; font-size: 0.85rem; border-radius: 10px; }
.btn-primary {
  background: linear-gradient(180deg, #6DFF6D, #3FE43F);
  color: #06230A;
  font-weight: 700;
  box-shadow: 0 0 0 0 var(--cmd-green-glow), inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 24px -8px rgba(85,255,85,0.5);
}
/* Shine sweep across the primary button on hover */
.btn-primary::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -80%;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s var(--ease);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled)::before { left: 130%; }
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px var(--cmd-green-glow), inset 0 1px 0 rgba(255,255,255,0.4), 0 12px 30px -8px rgba(85,255,85,0.6);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); transform: translateY(-1px); }
.btn-danger {
  background: rgba(255,92,92,0.08);
  color: var(--cmd-red);
  border: 1px solid rgba(255,92,92,0.25);
}
.btn-danger:hover { background: rgba(255,92,92,0.15); }

/* ── SECTION ────────────────────────────────────────────── */
.section { padding: 100px 0; position: relative; z-index: 2; }
.section.tight { padding: 48px 0; }
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section.tight { padding: 32px 0; }
}
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title em, .section-title .green {
  font-style: normal;
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub {
  font-size: 1.02rem; color: var(--text-dim);
  max-width: 580px;
}
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* ── CARDS (universal glass) ────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.28s var(--ease);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.card:hover {
  border-color: rgba(85,255,85,0.28);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 22px 44px -20px rgba(0,0,0,0.7), 0 0 44px -14px rgba(85,255,85,0.18);
}
.card-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(85,255,85,0.12), rgba(85,255,85,0.04));
  border: 1px solid rgba(85,255,85,0.22);
  border-radius: 12px;
  margin-bottom: 18px;
  color: var(--cmd-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 24px -10px rgba(85,255,85,0.5);
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon img { width: 28px; height: 28px; image-rendering: pixelated; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  margin-bottom: 8px; color: var(--text);
  letter-spacing: -0.01em;
}
.card p { font-size: 0.92rem; color: var(--text-dim); line-height: 1.55; }
.card-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.card-meta span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.card-meta svg { width: 12px; height: 12px; }
.card-tag {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-pixel);
  font-size: 0.58rem; letter-spacing: 1.2px;
  padding: 3px 8px;
  border-radius: 5px;
}
.card-tag.new { color: var(--cmd-green); background: rgba(85,255,85,0.1); border: 1px solid rgba(85,255,85,0.25); }
.card-tag.wip { color: var(--gold); background: rgba(252,219,5,0.08); border: 1px solid rgba(252,219,5,0.25); }
.card-tag.completed { color: var(--cmd-aqua); background: rgba(85,255,255,0.08); border: 1px solid rgba(85,255,255,0.25); }

/* ── BENTO ─────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(240px, auto);
  gap: 20px;
}
.bento-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.bento-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(85,255,85,0.07), transparent 52%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.bento-card:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 20px 44px -22px rgba(0,0,0,0.7);
}
.bento-card:hover::before { opacity: 1; }
.bento-card h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin-bottom: 8px; color: var(--text); letter-spacing: -0.01em; }
.bento-card p { font-size: 0.92rem; color: var(--text-dim); line-height: 1.55; }
.bento-card.b-1 { grid-column: span 3; grid-row: span 2; }
.bento-card.b-2 { grid-column: span 3; }
.bento-card.b-3 { grid-column: span 3; }
.bento-card.b-4 { grid-column: span 2; }
.bento-card.b-5 { grid-column: span 2; }
.bento-card.b-6 { grid-column: span 2; }

.bento-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(85,255,85,0.12), rgba(85,255,85,0.04));
  border: 1px solid rgba(85,255,85,0.22);
  border-radius: 12px;
  margin-bottom: 18px;
  color: var(--cmd-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 24px -10px rgba(85,255,85,0.5);
}
.bento-icon svg { width: 22px; height: 22px; }
.bento-tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-pixel);
  font-size: 0.58rem; letter-spacing: 1.2px;
  color: var(--gold);
  background: rgba(252,219,5,0.08);
  border: 1px solid rgba(252,219,5,0.2);
  padding: 3px 8px;
  border-radius: 5px;
  margin-left: 8px;
  vertical-align: middle;
}

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.b-1, .bento-card.b-2, .bento-card.b-3,
  .bento-card.b-4, .bento-card.b-5, .bento-card.b-6 { grid-column: span 2; }
  .bento-card.b-1 { grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card { grid-column: span 1 !important; }
}

/* ── GRIDS ─────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── STATS ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  padding: 34px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.25s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.stat:hover {
  border-color: rgba(85,255,85,0.3);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 40px -14px rgba(85,255,85,0.25);
}
.stat-num {
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 4vw, 2.8rem);
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.stat-label { font-size: 0.88rem; color: var(--text-dim); }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── EDITION TOGGLE ────────────────────────────────────── */
.edition-toggle {
  display: inline-flex;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.edition-toggle button {
  background: transparent; border: none;
  font-family: var(--font-pixel);
  font-size: 0.72rem; letter-spacing: 1px;
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.edition-toggle button img { width: 14px; height: 14px; image-rendering: pixelated; }
.edition-toggle button.active {
  background: linear-gradient(180deg, #6DFF6D, #3FE43F);
  color: #06230A;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 4px 14px -4px rgba(85,255,85,0.5);
}

/* ── DIFFICULTY CHIPS ──────────────────────────────────── */
.diff-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
  justify-content: center;
}
.diff-tab {
  padding: 9px 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.diff-tab:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.diff-tab.active {
  background: rgba(85,255,85,0.09);
  border-color: rgba(85,255,85,0.32);
  color: var(--cmd-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 24px -10px rgba(85,255,85,0.45);
}
.diff-tab .count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem; opacity: 0.7;
}

/* ── COURSE CARD ───────────────────────────────────────── */
.course-card {
  position: relative; display: flex; flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.course-card-art {
  height: 148px;
  background: linear-gradient(135deg, rgba(85,255,85,0.06), rgba(74,237,217,0.04));
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.course-card-art::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1.3px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 55% 65% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 50% 50%, black, transparent);
  pointer-events: none;
}
.course-card-art img {
  height: 84px;
  image-rendering: pixelated;
  position: relative; z-index: 1;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5));
  transition: transform 0.4s var(--ease);
}
.course-card:hover .course-card-art img { transform: translateY(-4px) scale(1.04); }
.course-card.iron .course-card-art { background: linear-gradient(135deg, rgba(189,189,194,0.1), rgba(127,127,127,0.04)); }
.course-card.emerald .course-card-art { background: linear-gradient(135deg, rgba(80,200,120,0.1), rgba(46,139,87,0.04)); }
.course-card.diamond .course-card-art { background: linear-gradient(135deg, rgba(74,237,217,0.12), rgba(85,255,255,0.04)); }
.course-card.netherite .course-card-art { background: linear-gradient(135deg, rgba(110,75,64,0.2), rgba(45,30,25,0.08)); }

.course-card.is-complete {
  border-color: rgba(85,255,85,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(85,255,85,0.15), 0 24px 50px -20px rgba(85,255,85,0.2);
}
.course-card.is-complete .course-card-art {
  background: linear-gradient(135deg, rgba(85,255,85,0.16), rgba(85,255,85,0.04)) !important;
}
.course-card.is-complete .course-card-tier { color: var(--cmd-green); }
.course-card.is-complete .lesson-count { color: var(--cmd-green); }
.course-complete-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 2;
}
.course-complete-overlay svg {
  width: 40px; height: 40px;
  color: var(--cmd-green);
  background: rgba(5,6,8,0.85);
  border: 2px solid var(--cmd-green);
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 0 24px rgba(85,255,85,0.5);
  animation: completePop 0.5s var(--ease);
}
@keyframes completePop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.card-tag.completed {
  color: #06230A;
  background: linear-gradient(180deg, #6DFF6D, #3FE43F);
  border: none;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(85,255,85,0.5);
}

.course-card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-tier {
  font-family: var(--font-pixel);
  font-size: 0.62rem; letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.course-card-body h3 {
  font-family: var(--font-pixel);
  font-size: 1rem; letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: var(--text);
}
.course-card.iron .course-card-body h3 { color: var(--iron); }
.course-card.emerald .course-card-body h3 { color: var(--emerald); }
.course-card.diamond .course-card-body h3 { color: var(--diamond); }
.course-card.netherite .course-card-body h3 { color: #C8A287; }
.course-card-body p {
  font-size: 0.9rem; color: var(--text-dim); line-height: 1.55;
  margin-bottom: 18px; flex: 1;
}
.course-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-faint);
}
.course-card-meta .lesson-count { color: var(--cmd-green); }

/* ── PROGRESS RAILS ────────────────────────────────────── */
.progress-rail-card {
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.progress-rail-card .pr-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(85,255,85,0.07);
  border-radius: 12px; flex-shrink: 0;
}
.progress-rail-card .pr-icon img { width: 32px; height: 32px; image-rendering: pixelated; }
.progress-rail-card .pr-info { flex: 1; min-width: 0; }
.progress-rail-card .pr-name {
  font-family: var(--font-pixel);
  font-size: 0.78rem; letter-spacing: 1px;
  color: var(--text); margin-bottom: 4px;
}
.progress-rail-card .pr-text { font-size: 0.82rem; color: var(--text-dim); }
.progress-rail-card .pr-bar {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-rail-card .pr-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 999px;
  transition: width 0.6s var(--ease);
  box-shadow: 0 0 10px rgba(85,255,85,0.5);
}
.progress-rail-card.is-complete {
  border-color: rgba(85,255,85,0.3);
  background: rgba(85,255,85,0.045);
}
.progress-rail-card.is-complete .pr-icon { position: relative; }
.pr-check {
  position: absolute; bottom: -4px; right: -4px;
  width: 22px; height: 22px;
  background: var(--cmd-green);
  border: 2px solid var(--bg);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #06230A;
}
.pr-check svg { width: 12px; height: 12px; }

/* ── COMPLETION CELEBRATION (lesson page) ──────────────── */
.completion-screen {
  text-align: center;
  padding: 40px 20px 60px;
  position: relative;
}
.completion-screen .complete-medal {
  width: 120px; height: 120px;
  margin: 0 auto 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(85,255,85,0.2), rgba(85,255,85,0.04));
  border: 2px solid var(--cmd-green);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 60px rgba(85,255,85,0.35);
  animation: medalIn 0.7s var(--ease);
}
@keyframes medalIn { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.complete-medal svg { width: 64px; height: 64px; color: var(--cmd-green); }
.complete-medal::before, .complete-medal::after {
  content: ''; position: absolute; inset: -20px;
  border-radius: 50%;
  border: 2px solid rgba(85,255,85,0.2);
  animation: ringPulse 2.4s ease-out infinite;
}
.complete-medal::after { animation-delay: 1.2s; }
@keyframes ringPulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

.completion-screen h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.completion-screen h1 .green {
  font-family: var(--font-pixel);
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.completion-screen .complete-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 36px;
}
.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 36px;
}
.completion-stats .cs {
  padding: 18px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.completion-stats .cs-num {
  font-family: var(--font-pixel);
  font-size: 1.6rem;
  background: var(--grad-green-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
  margin-bottom: 6px;
}
.completion-stats .cs-label { font-size: 0.78rem; color: var(--text-dim); }
.completion-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn-finish {
  background: var(--grad-accent) !important;
  color: #06230A !important;
  font-family: var(--font-pixel);
  letter-spacing: 1px;
  font-size: 0.86rem !important;
  box-shadow: 0 0 0 4px rgba(85,255,85,0.15), 0 12px 30px rgba(85,255,85,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
  animation: finishGlow 2s ease-in-out infinite;
}
@keyframes finishGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(85,255,85,0.15), 0 12px 30px rgba(85,255,85,0.25), inset 0 1px 0 rgba(255,255,255,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(85,255,85,0.25), 0 12px 40px rgba(85,255,85,0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
}

/* ── TIP BOX ───────────────────────────────────────────── */
.tip-box {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-left: 3px solid var(--cmd-green);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-dim);
  margin: 14px 0;
  line-height: 1.6;
}
.tip-box.info { border-left-color: var(--cmd-aqua); }
.tip-box.warning { border-left-color: var(--gold); }
.tip-box.tip { border-left-color: var(--cmd-green); }
.tip-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-pixel);
  font-size: 0.66rem; letter-spacing: 1.2px;
  color: var(--cmd-green);
  margin-bottom: 6px;
}
.tip-box.info .tip-title { color: var(--cmd-aqua); }
.tip-box.warning .tip-title { color: var(--gold); }

/* ── CODE & TERMINAL ───────────────────────────────────── */
.terminal {
  background: linear-gradient(180deg, rgba(11,13,18,0.92) 0%, rgba(16,18,24,0.96) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 18px 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 24px 50px -22px rgba(0,0,0,0.6), 0 0 60px -30px rgba(85,255,85,0.12);
}
.terminal-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
}
.t-dots { display: flex; gap: 6px; }
.t-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.t-dot.r { background: #FF5F57; }
.t-dot.y { background: #FEBC2E; }
.t-dot.g { background: #28C840; }
.t-title {
  font-family: var(--font-mono);
  font-size: 0.78rem; color: var(--text-faint);
  flex: 1; text-align: center;
}
.terminal-body {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.7;
}
.terminal-body .line { display: block; }
.terminal-body .prefix { color: var(--cmd-green); margin-right: 6px; }
.terminal-body .cmd .slash, code .slash, .mini-code .slash { color: var(--cmd-green); }
.terminal-body .cmd .arg, code .arg, .mini-code .arg { color: var(--cmd-aqua); }
.terminal-body .cmd .sel, code .sel, .mini-code .sel { color: var(--cmd-yellow); }
.terminal-body .com, .mini-code .com { color: var(--text-faint); }
.terminal-body .out { color: var(--text-dim); }
.mini-code {
  padding: 14px;
  background: rgba(0,0,0,0.32);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text); line-height: 1.7;
  overflow-x: auto;
}
code.inline {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--cmd-green);
  background: rgba(85,255,85,0.07);
  border: 1px solid rgba(85,255,85,0.14);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ── INPUT ─────────────────────────────────────────────── */
.input {
  flex: 1;
  padding: 13px 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.92rem; color: var(--text);
  outline: none;
  font-family: var(--font-body);
  transition: all 0.2s; width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  border-color: var(--ring);
  background: rgba(85,255,85,0.035);
  box-shadow: 0 0 0 3px rgba(85,255,85,0.1), inset 0 1px 0 rgba(255,255,255,0.03);
}
.input-row { display: flex; gap: 10px; }
@media (max-width: 540px) { .input-row { flex-direction: column; } }
.input-mono { font-family: var(--font-mono); font-size: 0.9rem; }

.input.error {
  border-color: rgba(255,92,92,0.5);
  background: rgba(255,92,92,0.04);
}
.field-error {
  font-size: 0.78rem;
  color: var(--cmd-red);
  margin-top: 4px;
  min-height: 1em;
}

/* Toggle switch */
.switch {
  position: relative;
  width: 40px; height: 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.2s var(--ease);
}
.switch.on { background: rgba(85,255,85,0.18); border-color: rgba(85,255,85,0.45); box-shadow: 0 0 14px -4px rgba(85,255,85,0.5); }
.switch.on::after { left: 20px; background: var(--cmd-green); box-shadow: 0 0 8px rgba(85,255,85,0.7); }

/* ── FOOTER ────────────────────────────────────────────── */
footer.app-footer {
  padding: 60px 24px 30px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(85,255,85,0.3), rgba(74,237,217,0.3), transparent) 1;
  position: relative; z-index: 2;
  margin-top: 60px;
  background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 36px;
}
.foot-brand .logo { margin-bottom: 14px; }
.foot-brand p { font-size: 0.88rem; color: var(--text-dim); max-width: 280px; }
.foot-col h5 {
  font-family: var(--font-pixel);
  font-size: 0.7rem; color: var(--text-dim);
  letter-spacing: 1.5px; margin-bottom: 14px;
  text-transform: uppercase;
}
.foot-col a {
  display: block; padding: 4px 0;
  font-size: 0.9rem; color: var(--text);
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}
.foot-col a:hover { color: var(--cmd-green); }
.foot-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem; color: var(--text-faint);
}
.foot-bottom .pixel {
  font-family: var(--font-pixel);
  color: var(--cmd-green);
  font-size: 0.72rem; letter-spacing: 1px;
}
/* Giant ghost wordmark (21st.dev-style footer flourish) */
.foot-mega {
  font-family: var(--font-pixel);
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.95;
  text-align: center;
  letter-spacing: 0.03em;
  user-select: none;
  pointer-events: none;
  margin-top: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.0) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ── REVEAL (JS: .reveal-pending → .visible) ───────────── */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.reveal-pending { opacity: 0; transform: translateY(22px); }
.reveal.reveal-pending.visible { opacity: 1; transform: translateY(0); }

/* ── MODAL ─────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,5,7,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.22s var(--ease);
}
.modal.open { display: flex; }
.modal.closing { animation: fadeOut 0.18s var(--ease) forwards; }
.modal.closing .modal-card { animation: modalOut 0.18s var(--ease) forwards; }
.modal-card {
  background: linear-gradient(180deg, rgba(19,22,28,0.97), rgba(11,13,18,0.99));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%; max-width: 440px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 80px -30px rgba(85,255,85,0.15);
  animation: modalIn 0.28s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.04); }
.modal-card h2 {
  font-family: var(--font-pixel);
  font-size: 1.1rem; letter-spacing: 1px;
  color: var(--text); margin-bottom: 6px;
}
.modal-card .modal-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.modal-card form { display: flex; flex-direction: column; gap: 10px; }
.modal-card .btn-primary { justify-content: center; padding: 13px; margin-top: 6px; }
.modal-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.modal-foot a { color: var(--cmd-green); text-decoration: none; }
.modal-foot a:hover { text-decoration: underline; }
.modal-error {
  color: var(--cmd-red);
  font-size: 0.82rem;
  min-height: 1em;
  text-align: center;
}

/* Loading spinner inside button */
.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.18);
  border-top-color: rgba(0,0,0,0.55);
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
.btn-ghost .btn-spinner { border-color: rgba(255,255,255,0.18); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Role badge */
.role-badge {
  font-family: var(--font-pixel);
  letter-spacing: 1px;
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  display: inline-block;
  color: #fff;
  line-height: 1.4;
}

/* Continue-with-Google (auto-injected when Firebase configured) */
.google-btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.google-btn:hover:not(:disabled) { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.24); }
.google-btn svg { width: 16px; height: 16px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0 2px;
  color: var(--text-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--font-pixel);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* Password reveal (auto-injected) */
.password-wrap {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
}
.password-wrap input.input { width: 100%; padding-right: 44px; }
.password-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.password-reveal:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.password-reveal svg { width: 16px; height: 16px; }

/* ── TOASTS ────────────────────────────────────────────── */
.toast-host {
  position: fixed;
  top: 84px; right: 20px;
  z-index: 400; /* above the search modal (300) — copy feedback must be visible */
  display: flex; flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  min-width: 280px; max-width: 420px;
  background: linear-gradient(180deg, rgba(19,22,28,0.97), rgba(11,13,18,0.99));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 24px 40px -16px rgba(0,0,0,0.6);
  color: var(--text);
  font-size: 0.92rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}
.toast.in { opacity: 1; transform: translateX(0); }
.toast.out { opacity: 0; transform: translateX(20px); }
.toast-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-icon svg { width: 14px; height: 14px; }
.toast-success .toast-icon { background: rgba(85,255,85,0.12); border: 1px solid rgba(85,255,85,0.3); color: var(--cmd-green); }
.toast-error   .toast-icon { background: rgba(255,92,92,0.12); border: 1px solid rgba(255,92,92,0.3); color: var(--cmd-red); }
.toast-warning .toast-icon { background: rgba(252,219,5,0.12); border: 1px solid rgba(252,219,5,0.3); color: var(--gold); }
.toast-info    .toast-icon { background: rgba(74,237,217,0.12); border: 1px solid rgba(74,237,217,0.3); color: var(--diamond); }
.toast-msg { flex: 1; min-width: 0; line-height: 1.45; }
.toast-close {
  width: 22px; height: 22px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-close:hover { color: var(--text); background: rgba(255,255,255,0.04); }
@media (max-width: 540px) {
  .toast-host { top: 74px; right: 10px; left: 10px; max-width: none; }
  .toast { min-width: 0; max-width: none; }
}

/* ── LOCK / MEMBERS-ONLY ───────────────────────────────── */
[data-lock-tier].locked {
  position: relative; cursor: pointer; overflow: hidden;
  border-color: rgba(252,219,5,0.18);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
[data-lock-tier].locked > :not(.lock-badge):not(.lock-cta) {
  opacity: 0.32;
  filter: saturate(0.6);
  transition: opacity 0.2s, filter 0.2s;
  pointer-events: none;
}
[data-lock-tier].locked:hover {
  border-color: rgba(252,219,5,0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.5), 0 0 40px -16px rgba(252,219,5,0.25);
}
[data-lock-tier].locked:hover > :not(.lock-badge):not(.lock-cta) { opacity: 0.38; }
.lock-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(5,6,8,0.92);
  border: 1px solid rgba(252,219,5,0.35);
  border-radius: 999px;
  color: var(--gold, #FCDB05);
  font-family: var(--font-pixel);
  font-size: 0.6rem; letter-spacing: 1.4px;
  text-transform: uppercase;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,0.6);
  pointer-events: none;
}
.lock-badge svg { width: 11px; height: 11px; }
[data-lock-tier].locked:hover .lock-badge { border-color: rgba(252,219,5,0.6); background: rgba(252,219,5,0.06); }

.tool-card[data-lock-tier].locked > :not(.lock-badge):not(.lock-cta) {
  opacity: 0.12;
  filter: blur(2px) saturate(0.4);
}
.lock-cta {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3; text-align: center;
  padding: 24px 32px;
  max-width: 360px; width: calc(100% - 64px);
  background: rgba(5,6,8,0.95);
  border: 1px solid rgba(252,219,5,0.35);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7), 0 0 30px -10px rgba(252,219,5,0.15);
}
.lock-cta .lock-cta-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: rgba(252,219,5,0.08);
  border: 1px solid rgba(252,219,5,0.3);
  border-radius: 12px;
  color: var(--gold);
  margin-bottom: 14px;
}
.lock-cta .lock-cta-icon svg { width: 22px; height: 22px; }
.lock-cta .lock-cta-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem; letter-spacing: 1.4px;
  color: var(--gold);
  margin-bottom: 6px;
}
.lock-cta .lock-cta-sub {
  color: var(--text-dim);
  font-size: 0.88rem; line-height: 1.5;
  margin-bottom: 16px;
}
.lock-cta .btn { width: fit-content; margin: 0 auto; }

/* ── UNIVERSAL SEARCH (⌘K, injected by cmdblock.js) ────── */
.search-modal {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 90px 20px 20px;
  background: rgba(4,5,7,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.search-modal.open { display: flex; }
.search-modal-card {
  width: 100%; max-width: 640px;
  background: linear-gradient(180deg, rgba(15,17,22,0.98), rgba(9,11,15,0.99));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 100px -40px rgba(85,255,85,0.2);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 130px);
}
.search-modal-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.search-modal-icon { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}
.search-modal-input::placeholder { color: var(--text-faint); }
.search-modal-kbd, .search-modal-foot kbd {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.66rem; color: var(--text-faint);
  padding: 2px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 5px;
  min-width: 20px;
}
.search-modal-results { flex: 1; overflow-y: auto; padding: 8px 0; }
.search-empty { padding: 40px 24px; text-align: center; color: var(--text-faint); font-size: 0.9rem; }
.search-group-label {
  font-family: var(--font-pixel);
  font-size: 0.58rem; letter-spacing: 1.2px;
  color: var(--text-faint);
  padding: 12px 18px 4px;
  text-transform: uppercase;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  margin: 0 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.search-result-item:hover, .search-result-item.active { background: rgba(85,255,85,0.07); }
.search-result-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-dim);
}
.search-result-icon svg { width: 15px; height: 15px; }
.search-result-item.active .search-result-icon {
  background: rgba(85,255,85,0.1);
  border-color: rgba(85,255,85,0.28);
  color: var(--cmd-green);
}
.search-result-body { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 0.92rem; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.search-result-desc { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.search-result-arrow { width: 14px; height: 14px; color: var(--text-faint); opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.search-result-item.active .search-result-arrow { opacity: 1; color: var(--cmd-green); }
.search-modal-foot {
  display: flex; gap: 14px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text-faint);
  background: rgba(0,0,0,0.22);
}
.search-modal-foot span { display: inline-flex; align-items: center; gap: 6px; }
.edition-tag {
  font-family: var(--font-pixel);
  font-size: 0.54rem; letter-spacing: 1px;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.edition-tag.bedrock { background: rgba(109,179,255,0.1); color: #6DB3FF; border: 1px solid rgba(109,179,255,0.25); }
.edition-tag.java { background: rgba(107,192,74,0.1); color: var(--grass); border: 1px solid rgba(107,192,74,0.25); }

/* Highlight pulse for #cmd-<name> hash targets */
.cmd-row-focused {
  animation: cmdRowPulse 1.2s var(--ease) 1;
  position: relative;
}
@keyframes cmdRowPulse {
  0%   { background: rgba(85,255,85,0.0);  box-shadow: 0 0 0 0 rgba(85,255,85,0.0); }
  20%  { background: rgba(85,255,85,0.20); box-shadow: 0 0 0 4px rgba(85,255,85,0.4); }
  100% { background: rgba(85,255,85,0.0);  box-shadow: 0 0 0 0 rgba(85,255,85,0.0); }
}

/* ── EXPANDABLE TABS (21st.dev ExpandableTabs, vanilla) ──
   JS auto-binds via [data-extabs]; fires `extab:change`. */
.extabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 12px -6px rgba(0,0,0,0.3);
}
.extab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    gap 0.6s var(--ease) 0.1s,
    padding 0.6s var(--ease) 0.1s,
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.extab:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.extab.selected {
  gap: 8px;
  padding: 8px 16px;
  background: rgba(85,255,85,0.09);
  color: var(--cmd-green);
  box-shadow: inset 0 0 0 1px rgba(85,255,85,0.18);
}
.extab .extab-icon { width: 18px; height: 18px; flex-shrink: 0; }
.extab .extab-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-width 0.6s var(--ease) 0.1s,
    opacity 0.6s var(--ease) 0.1s;
}
.extab.selected .extab-label { max-width: 220px; opacity: 1; }
.extab-sep {
  width: 1.2px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

/* ── MAGIC BENTO (React Bits MagicBento, vanilla) ────────
   cmdblock.js drives --glow-* vars + .global-spotlight + ripple. */
.global-spotlight {
  position: fixed;
  width: 800px; height: 800px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(85,255,85,0.13) 0%,
    rgba(85,255,85,0.07) 18%,
    rgba(85,255,85,0.03) 32%,
    transparent 65%
  );
  z-index: 5;
  opacity: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  will-change: transform, opacity, left, top;
}
.bento-card.magic {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 280px;
  --glow-color-r: 85;
  --glow-color-g: 255;
  --glow-color-b: 85;
  will-change: transform;
  transform-style: preserve-3d;
}
.bento-card.magic::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(
    var(--glow-radius) circle at var(--glow-x) var(--glow-y),
    rgba(var(--glow-color-r), var(--glow-color-g), var(--glow-color-b), calc(var(--glow-intensity) * 0.7)) 0%,
    rgba(var(--glow-color-r), var(--glow-color-g), var(--glow-color-b), calc(var(--glow-intensity) * 0.3)) 30%,
    transparent 60%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s var(--ease);
}
.bento-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(var(--glow-color-r, 85), var(--glow-color-g, 255), var(--glow-color-b, 85), 0.4) 0%,
    rgba(var(--glow-color-r, 85), var(--glow-color-g, 255), var(--glow-color-b, 85), 0.18) 30%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 3;
  will-change: transform, opacity;
}

/* ── MARQUEE ──────────────────────────────────────────── */
.marquee-wrap {
  padding: 36px 0; position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.005));
}
.marquee-wrap::before,
.marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 140px;
  z-index: 2; pointer-events: none;
}
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee {
  display: flex; gap: 20px; width: fit-content;
  animation: scroll-x 40s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
.marquee-item {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.marquee-item:hover { border-color: rgba(85,255,85,0.3); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 20px -8px rgba(85,255,85,0.4); }
.marquee-item .slash { color: var(--cmd-green); font-weight: 600; }
.marquee-item .arg { color: var(--cmd-aqua); }
.marquee-item .sel { color: var(--cmd-yellow); }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 10px)); }
}

/* ── LESSON SHELL ─────────────────────────────────────── */
.lesson-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 74px);
  margin-top: 74px;
}
.lesson-sidebar {
  position: sticky; top: 74px;
  height: calc(100vh - 74px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 28px 20px 24px;
  background: rgba(0,0,0,0.22);
}
.lesson-sidebar h3 {
  font-family: var(--font-pixel);
  font-size: 0.78rem; letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.lesson-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lesson-progress-fill {
  height: 100%;
  background: var(--grad-accent);
  transition: width 0.5s var(--ease);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(85,255,85,0.5);
}
.lesson-progress-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.lesson-nav { display: flex; flex-direction: column; gap: 2px; }
.lesson-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  font-size: 0.86rem;
  width: 100%;
  font-family: var(--font-body);
}
.lesson-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.lesson-nav-item.active {
  background: rgba(85,255,85,0.07);
  border-color: rgba(85,255,85,0.22);
  color: var(--cmd-green);
}
.lesson-nav-item.done { color: var(--text); }
.lesson-nav-item .ln-num {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.lesson-nav-item.done .ln-num {
  background: var(--cmd-green);
  border-color: var(--cmd-green);
  color: #06230A;
}
.lesson-nav-item.active .ln-num {
  background: rgba(85,255,85,0.15);
  border-color: var(--cmd-green);
  color: var(--cmd-green);
}
.lesson-nav-item .ln-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-foot {
  padding-top: 18px; margin-top: 18px;
  border-top: 1px solid var(--border);
}

.lesson-main { padding: 40px 40px 80px; max-width: 880px; overflow-x: hidden; }
.lesson-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap; gap: 12px;
}
.breadcrumb { color: var(--text-dim); font-size: 0.86rem; }
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--cmd-green); }
.breadcrumb span.sep { margin: 0 8px; opacity: 0.5; }
.progress-pill {
  padding: 6px 14px;
  background: rgba(85,255,85,0.06);
  border: 1px solid rgba(85,255,85,0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cmd-green);
}
.edition-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 1px;
  white-space: nowrap;
}
.edition-pill img { width: 14px; height: 14px; image-rendering: pixelated; }
.edition-pill.bedrock { color: var(--cmd-green); background: rgba(85,255,85,0.06); border: 1px solid rgba(85,255,85,0.22); }
.edition-pill.java { color: var(--diamond); background: rgba(74,237,217,0.06); border: 1px solid rgba(74,237,217,0.22); }
.lesson-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.lesson-header .lesson-tier {
  font-family: var(--font-pixel);
  font-size: 0.68rem; letter-spacing: 1.5px;
  color: var(--cmd-green); margin-bottom: 10px;
}
.lesson-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.lesson-header p {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 640px;
}
.lesson-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 600;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.lesson-content h3 {
  font-family: var(--font-pixel);
  font-size: 0.85rem; letter-spacing: 1px;
  color: var(--cmd-green);
  margin: 24px 0 12px;
}
.lesson-content p { margin-bottom: 14px; color: var(--text-dim); font-size: 0.95rem; }
.lesson-content ul, .lesson-content ol { padding-left: 24px; color: var(--text-dim); margin: 12px 0 18px; }
.lesson-content li { margin-bottom: 6px; }
.lesson-content strong { color: var(--text); font-weight: 600; }
.lesson-footer {
  margin-top: 60px; padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 880px) {
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-sidebar { position: relative; top: 0; height: auto; }
  .lesson-main { padding: 24px; }
}

/* ── KBD ──────────────────────────────────────────────── */
.kbd-row { display: inline-flex; gap: 4px; }
.kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 3px 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 5px;
}

::selection { background: rgba(85,255,85,0.25); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

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

/* ═══════════════════════════════════════════════════════
   LIGHT MODE — opt-in via <html data-theme="light">.
   Warm off-white canvas; accents drop to readable greens.
   ═══════════════════════════════════════════════════════ */
html[data-theme="light"] {
  --bg: #F7F5EF;
  --bg-elev: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAF7;
  --border: rgba(20,22,28,0.10);
  --border-strong: rgba(20,22,28,0.22);
  --text: #14171C;
  --text-dim: #4F535C;
  --text-faint: #7B7F88;
  --cmd-green: #189428;
  --cmd-green-glow: rgba(24,148,40,0.18);
  --cmd-aqua: #117B91;
  --cmd-yellow: #A06E00;
  --cmd-purple: #5F31B8;
  --cmd-red: #C8362E;
  --diamond: #0C8E81;
  --grass: #3A8A26;
  --gold: #A06E00;
  --iron: #5C626C;
  --emerald: #178A46;
  --shadow-card: 0 1px 2px rgba(20,22,28,0.04), 0 8px 24px -16px rgba(20,22,28,0.12);
  --grad-title: linear-gradient(180deg, #14171C 0%, #3A3E47 100%);
  --grad-green-text: linear-gradient(180deg, #1FA932 0%, #146E20 100%);
  --grad-accent: linear-gradient(135deg, #1FA932 0%, #0C8E81 100%);
  --ring: rgba(24,148,40,0.4);
}
html[data-theme="light"] body {
  background:
    radial-gradient(1100px 700px at 75% -10%, rgba(24,148,40,0.06), transparent 60%),
    radial-gradient(900px 640px at -12% 22%, rgba(12,142,129,0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="light"] .orb { opacity: 0.3; mix-blend-mode: multiply; filter: blur(80px) saturate(110%); }
html[data-theme="light"] .hero-grid,
html[data-theme="light"] .page-hero .hero-grid {
  background-image:
    radial-gradient(rgba(20,22,28,0.16) 1px, transparent 1.4px),
    radial-gradient(rgba(24,148,40,0.14) 1px, transparent 1.6px);
  background-size: 26px 26px, 78px 78px;
  background-position: 0 0, 13px 13px;
}
html[data-theme="light"] .shiny-text,
html[data-theme="light"] .hero h1 .green.shiny-text,
html[data-theme="light"] .page-hero h1 .green.shiny-text {
  background: linear-gradient(120deg, #189428 32%, #63d072 47%, #0C8E81 53%, #146E20 68%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .beam-border::after {
  background: conic-gradient(from var(--beam-angle),
    transparent 0deg, transparent 300deg,
    rgba(24,148,40,0.8) 330deg, rgba(12,142,129,0.85) 345deg,
    transparent 360deg);
}
html[data-theme="light"] .foot-mega {
  background: linear-gradient(180deg, rgba(20,22,28,0.12), rgba(20,22,28,0.0) 88%);
  -webkit-background-clip: text; background-clip: text;
}

/* Solid surfaces */
html[data-theme="light"] .card,
html[data-theme="light"] .bento-card,
html[data-theme="light"] .course-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .tier-card,
html[data-theme="light"] .tool-card,
html[data-theme="light"] .review-card,
html[data-theme="light"] .moderation-card,
html[data-theme="light"] .user-card,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .connect-card,
html[data-theme="light"] .stat,
html[data-theme="light"] .progress-rail-card,
html[data-theme="light"] .completion-stats .cs,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .search-modal-card {
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .card:hover,
html[data-theme="light"] .bento-card:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
html[data-theme="light"] .modal { background: rgba(20,22,28,0.35); }
html[data-theme="light"] .modal-card { background: #FFFFFF; background-image: none; border-color: var(--border-strong); box-shadow: 0 30px 70px -20px rgba(20,22,28,0.35); }
html[data-theme="light"] .stat-num { background: var(--grad-green-text); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .card-icon,
html[data-theme="light"] .bento-icon {
  background: rgba(24,148,40,0.08);
  border-color: rgba(24,148,40,0.22);
  color: var(--cmd-green);
  box-shadow: none;
}
html[data-theme="light"] .bento-card h3 { color: var(--text); }
html[data-theme="light"] .bento-card p { color: var(--text-dim); }

/* Terminal-style mockups stay dark on purpose */
html[data-theme="light"] .palette,
html[data-theme="light"] .chatlog {
  background: #14171C;
  color: #ECECEE;
  border-color: rgba(20,22,28,0.4);
}
html[data-theme="light"] .palette-bar,
html[data-theme="light"] .chat-bar { background: rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.06); }
html[data-theme="light"] .palette-input .typed,
html[data-theme="light"] .chat-body { color: #ECECEE; }
html[data-theme="light"] .palette-result .pr-cmd,
html[data-theme="light"] .palette-result .pr-desc { color: #ECECEE; }
html[data-theme="light"] .palette-title,
html[data-theme="light"] .chat-bar-title,
html[data-theme="light"] .palette-foot { color: rgba(255,255,255,0.5); }
html[data-theme="light"] .palette { box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px -20px rgba(20,22,28,0.25), 0 0 80px -20px rgba(24,148,40,0.15); }
html[data-theme="light"] .chatlog { box-shadow: 0 18px 40px -20px rgba(20,22,28,0.25); }
html[data-theme="light"] .terminal {
  box-shadow: 0 18px 40px -20px rgba(20,22,28,0.25);
  border-color: rgba(20,22,28,0.4);
}

/* Forms */
html[data-theme="light"] .input,
html[data-theme="light"] .review-textarea,
html[data-theme="light"] .search-input,
html[data-theme="light"] .search-modal-input {
  background: rgba(20,22,28,0.04);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
html[data-theme="light"] .input:focus,
html[data-theme="light"] .review-textarea:focus { background: #FFFFFF; border-color: rgba(24,148,40,0.4); }
html[data-theme="light"] .search-modal-input { background: transparent; border: none; }
html[data-theme="light"] .search-modal-input::placeholder { color: var(--text-faint); }
html[data-theme="light"] .search-modal { background: rgba(20,22,28,0.32); }
html[data-theme="light"] .search-modal-card { background: #FFFFFF; box-shadow: 0 30px 60px -20px rgba(20,22,28,0.35); }
html[data-theme="light"] .search-result-item:hover,
html[data-theme="light"] .search-result-item.active { background: rgba(24,148,40,0.07); }
html[data-theme="light"] .search-result-icon { background: rgba(20,22,28,0.04); color: var(--text-dim); }
html[data-theme="light"] .search-result-item.active .search-result-icon { background: rgba(24,148,40,0.1); border-color: rgba(24,148,40,0.3); color: var(--cmd-green); }
html[data-theme="light"] .search-modal-foot { background: rgba(20,22,28,0.03); }

/* Marquee */
html[data-theme="light"] .marquee-wrap {
  background: rgba(20,22,28,0.025);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .marquee-item {
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text-dim);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .marquee-item .slash { color: var(--cmd-green); }

/* Code surfaces */
html[data-theme="light"] .output-box,
html[data-theme="light"] .sandbox-log,
html[data-theme="light"] .checker-result.empty {
  background: #14171C;
  color: #ECECEE;
  border-color: rgba(20,22,28,0.4);
}
html[data-theme="light"] .checker-result.valid { background: rgba(24,148,40,0.08); color: var(--cmd-green); border-color: rgba(24,148,40,0.3); }
html[data-theme="light"] .checker-result.error { background: rgba(200,54,46,0.08); color: var(--cmd-red); border-color: rgba(200,54,46,0.3); }
html[data-theme="light"] .mini-code { background: #14171C; color: #ECECEE; border-color: rgba(20,22,28,0.4); }
html[data-theme="light"] code.inline { background: rgba(24,148,40,0.08); color: var(--cmd-green); border-color: rgba(24,148,40,0.2); }

html[data-theme="light"] .chip { background: rgba(20,22,28,0.04); color: var(--text-dim); }
html[data-theme="light"] .chip:hover { color: var(--text); border-color: var(--border-strong); background: rgba(20,22,28,0.06); }
html[data-theme="light"] .chip.active { background: rgba(24,148,40,0.1); border-color: rgba(24,148,40,0.35); color: var(--cmd-green); }

/* Buttons */
html[data-theme="light"] .btn-primary { background: var(--cmd-green); color: #FFFFFF; box-shadow: 0 8px 20px -8px rgba(24,148,40,0.5); }
html[data-theme="light"] .btn-primary:hover:not(:disabled) { background: #146E20; }
html[data-theme="light"] .btn-ghost { background: rgba(20,22,28,0.04); color: var(--text); border-color: var(--border); box-shadow: none; }
html[data-theme="light"] .btn-ghost:hover { background: rgba(20,22,28,0.08); }
html[data-theme="light"] .btn-finish { color: #FFFFFF !important; }

/* Pills / eyebrows */
html[data-theme="light"] .pill { background: #FFFFFF; border-color: rgba(24,148,40,0.3); color: var(--cmd-green); box-shadow: var(--shadow-card); }
html[data-theme="light"] .pill-badge { background: var(--cmd-green); color: #FFFFFF; box-shadow: none; }
html[data-theme="light"] .eyebrow { color: var(--cmd-green); background: rgba(24,148,40,0.07); border-color: rgba(24,148,40,0.25); box-shadow: none; }

/* Nav pill */
html[data-theme="light"] .app-nav .container {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px -20px rgba(20,22,28,0.25);
}
html[data-theme="light"] .nav-links a { color: var(--text-dim); }
html[data-theme="light"] .nav-links a:hover { color: var(--text); background: rgba(20,22,28,0.05); }
html[data-theme="light"] .nav-links a.active { color: var(--cmd-green); background: rgba(24,148,40,0.08); box-shadow: inset 0 0 0 1px rgba(24,148,40,0.2); }
html[data-theme="light"] .logo .accent { color: var(--cmd-green); text-shadow: none; }
html[data-theme="light"] .logo-cube { filter: none; }
html[data-theme="light"] .nav-icon-btn { background: rgba(20,22,28,0.03); color: var(--text-dim); border-color: var(--border); }
html[data-theme="light"] .nav-icon-btn:hover { color: var(--text); background: rgba(20,22,28,0.06); }
html[data-theme="light"] .nav-cta { background: var(--cmd-green); color: #FFFFFF; border-color: var(--cmd-green); box-shadow: 0 6px 16px -6px rgba(24,148,40,0.5); }
html[data-theme="light"] .nav-cta:hover { background: #146E20; }
html[data-theme="light"] .nav-cta.signed-in { background: rgba(24,148,40,0.1); color: var(--cmd-green); border: 1px solid rgba(24,148,40,0.3); box-shadow: none; }
html[data-theme="light"] [data-account-cta]:not(.signed-in) { background: var(--cmd-green); color: #FFFFFF; border-color: var(--cmd-green); }
html[data-theme="light"] [data-account-cta].signed-in { background: rgba(24,148,40,0.1); color: var(--cmd-green); border-color: rgba(24,148,40,0.3); }

/* Mobile nav */
html[data-theme="light"] .mobile-nav { background: #FFFFFF; border-color: var(--border); box-shadow: 0 30px 60px -20px rgba(20,22,28,0.3); }
html[data-theme="light"] .mobile-nav a { color: var(--text); }
html[data-theme="light"] .mobile-nav a:hover { background: rgba(20,22,28,0.05); }

html[data-theme="light"] h1 .green,
html[data-theme="light"] h2 .green { color: var(--cmd-green); }

/* Lock / members-only */
html[data-theme="light"] .lock-badge {
  background: #FFFFFF;
  border-color: rgba(160,110,0,0.5);
  color: #8A5F00;
  box-shadow: 0 4px 16px -6px rgba(20,22,28,0.18);
}
html[data-theme="light"] .lock-cta {
  background: #FFFFFF;
  border-color: rgba(160,110,0,0.45);
  box-shadow: 0 20px 50px -20px rgba(20,22,28,0.25);
}
html[data-theme="light"] .lock-cta .lock-cta-icon { background: rgba(160,110,0,0.08); border-color: rgba(160,110,0,0.3); color: #8A5F00; }
html[data-theme="light"] .lock-cta .lock-cta-title { color: #8A5F00; }

/* Cmd library rows */
html[data-theme="light"] .cmd-row { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .cmd-row:hover { background: rgba(24,148,40,0.05); border-color: rgba(24,148,40,0.3); }
html[data-theme="light"] .cmd-row .cmd-name { color: var(--text); }
html[data-theme="light"] .cmd-row .cmd-name .slash { color: var(--cmd-green); }
html[data-theme="light"] .cmd-row .cmd-copy { background: rgba(20,22,28,0.03); border-color: var(--border); color: var(--text-dim); }
html[data-theme="light"] .cmd-row .cmd-copy:hover { color: var(--cmd-green); border-color: rgba(24,148,40,0.35); background: rgba(24,148,40,0.06); }
html[data-theme="light"] .lib-tab { background: #FFFFFF; border-color: var(--border); color: var(--text-dim); }
html[data-theme="light"] .lib-tab:hover { color: var(--text); border-color: var(--border-strong); }
html[data-theme="light"] .lib-tab.active { background: rgba(24,148,40,0.08); border-color: rgba(24,148,40,0.35); color: var(--cmd-green); }
html[data-theme="light"] .tip-item { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .tip-num { color: var(--cmd-green); }
html[data-theme="light"] .tip-body code { background: rgba(24,148,40,0.08); color: var(--cmd-green); }

/* Footer */
html[data-theme="light"] .app-footer { border-top: 1px solid var(--border); border-image: none; background: rgba(20,22,28,0.02); }
html[data-theme="light"] .foot-col h5 { color: var(--text); }
html[data-theme="light"] .foot-col a { color: var(--text-dim); }
html[data-theme="light"] .foot-col a:hover { color: var(--cmd-green); }
html[data-theme="light"] .foot-bottom { border-top: 1px solid var(--border); color: var(--text-faint); }

/* Toasts */
html[data-theme="light"] .toast { background: #FFFFFF; background-image: none; color: var(--text); border-color: var(--border-strong); box-shadow: 0 16px 40px -10px rgba(20,22,28,0.25); }
html[data-theme="light"] .toast .toast-icon { color: var(--cmd-green); }
html[data-theme="light"] .toast.error .toast-icon { color: var(--cmd-red); }
html[data-theme="light"] .toast.info .toast-icon { color: var(--cmd-aqua); }
html[data-theme="light"] .toast.success { border-color: rgba(24,148,40,0.4); }
html[data-theme="light"] .toast.error { border-color: rgba(200,54,46,0.4); }
html[data-theme="light"] .toast.info { border-color: rgba(17,123,145,0.4); }

/* Edition toggle / diff tabs / extabs */
html[data-theme="light"] .edition-toggle { background: #FFFFFF; border-color: var(--border-strong); box-shadow: var(--shadow-card); }
html[data-theme="light"] .edition-toggle button { color: var(--text-dim); }
html[data-theme="light"] .edition-toggle button.active { background: var(--cmd-green); color: #FFFFFF; box-shadow: none; }
html[data-theme="light"] .diff-tabs { background: transparent; }
html[data-theme="light"] .diff-tab { background: #FFFFFF; border-color: var(--border); color: var(--text-dim); box-shadow: var(--shadow-card); }
html[data-theme="light"] .diff-tab.active { background: rgba(24,148,40,0.1); color: var(--cmd-green); border-color: rgba(24,148,40,0.35); }
html[data-theme="light"] .extabs { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .extab:hover { background: rgba(20,22,28,0.04); }
html[data-theme="light"] .extab.selected { background: rgba(24,148,40,0.1); color: var(--cmd-green); box-shadow: inset 0 0 0 1px rgba(24,148,40,0.2); }
html[data-theme="light"] .extab-sep { background: var(--border-strong); }

/* Magic bento on light */
html[data-theme="light"] .global-spotlight {
  background: radial-gradient(circle,
    rgba(24,148,40,0.1) 0%,
    rgba(24,148,40,0.05) 18%,
    transparent 60%
  );
  mix-blend-mode: multiply;
}
html[data-theme="light"] .bento-card.magic {
  --glow-color-r: 24;
  --glow-color-g: 148;
  --glow-color-b: 40;
}

/* Switch */
html[data-theme="light"] .switch { background: rgba(20,22,28,0.12); border-color: var(--border-strong); box-shadow: none; }
html[data-theme="light"] .switch.on { background: var(--cmd-green); border-color: var(--cmd-green); }
html[data-theme="light"] .switch::after { background: #FFFFFF; box-shadow: 0 1px 3px rgba(20,22,28,0.25); }

/* Lesson page */
html[data-theme="light"] .lesson-sidebar,
html[data-theme="light"] .lesson-body,
html[data-theme="light"] .lesson-header,
html[data-theme="light"] .lesson-section,
html[data-theme="light"] .lesson-step { background: #FFFFFF; border-color: var(--border); }
html[data-theme="light"] .lesson-link.completed,
html[data-theme="light"] .lesson-link.active { background: rgba(24,148,40,0.08); color: var(--cmd-green); }
html[data-theme="light"] .lesson-link:hover { background: rgba(20,22,28,0.04); }
html[data-theme="light"] pre, html[data-theme="light"] code {
  background: rgba(20,22,28,0.06);
  color: var(--text);
}
html[data-theme="light"] pre code { background: transparent; }
html[data-theme="light"] .lesson-cmd, html[data-theme="light"] .lesson-code-block {
  background: #14171C;
  color: #ECECEE;
  border-color: rgba(20,22,28,0.4);
}

/* Course redirect stubs (hardcode dark inline styles) */
html[data-theme="light"] body[style*="07080B"],
html[data-theme="light"] body[style*="050608"] {
  background: var(--bg) !important;
  color: var(--text-dim) !important;
}
html[data-theme="light"] body[style*="07080B"] a[style*="55FF55"],
html[data-theme="light"] body[style*="050608"] a[style*="55FF55"] {
  color: var(--cmd-green) !important;
}

/* Per-page inline-style rescue (dark rgba fills go invisible on white) */
html[data-theme="light"] .platform-chip { background: #FFFFFF; border-color: var(--border); }
html[data-theme="light"] .platform-chip:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
html[data-theme="light"] .progress-step { background: rgba(20,22,28,0.025); border-color: var(--border); }
html[data-theme="light"] .progress-step .ps-check { background: rgba(20,22,28,0.05); border-color: var(--border-strong); }
html[data-theme="light"] .progress-step.done { background: rgba(24,148,40,0.06); border-color: rgba(24,148,40,0.25); }
html[data-theme="light"] .progress-step.done .ps-check { background: var(--cmd-green); border-color: var(--cmd-green); color: #FFFFFF; }
html[data-theme="light"] .edition-compare .ec-row { background: rgba(20,22,28,0.03); border-color: var(--border); }
html[data-theme="light"] .edition-compare .ec-code { color: var(--text); }
html[data-theme="light"] .connect-card.github .connect-icon {
  background: rgba(20,22,28,0.05);
  border-color: var(--border-strong);
  color: var(--text);
}
html[data-theme="light"] .soon-tag {
  background: rgba(20,22,28,0.04);
  border-color: var(--border);
  color: var(--text-faint);
}
html[data-theme="light"] .tier-banner::before {
  background-image: radial-gradient(rgba(20,22,28,0.08) 1px, transparent 1.3px);
}
html[data-theme="light"] .project-banner {
  background: rgba(20,22,28,0.03);
  border-right-color: var(--border);
}
html[data-theme="light"] .project-card:hover .project-banner { background: rgba(20,22,28,0.06); }
html[data-theme="light"] .wip-mini {
  background: rgba(160,110,0,0.08);
  border-color: rgba(160,110,0,0.3);
  color: #8A5F00;
}
html[data-theme="light"] .profile-stats { border-top-color: var(--border); border-bottom-color: var(--border); }
html[data-theme="light"] .profile-since { color: var(--text-faint); }
html[data-theme="light"] .profile-email button { color: var(--text-faint); }
html[data-theme="light"] .profile-email button:hover { color: var(--text); }
html[data-theme="light"] .aside-tabs { background: #FFFFFF; border-color: var(--border); }
html[data-theme="light"] .aside-tabs button { color: var(--text-dim); }
html[data-theme="light"] .aside-tabs button.active { background: rgba(24,148,40,0.08); color: var(--cmd-green); }
html[data-theme="light"] .settings-card { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .setting-row { border-bottom-color: var(--border); }
html[data-theme="light"] .progress-row .bar { background: rgba(20,22,28,0.06); }
html[data-theme="light"] .empty-state {
  background: #FFFFFF;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .empty-state .empty-icon {
  background: rgba(20,22,28,0.05);
  color: var(--text-dim);
}
html[data-theme="light"] .achievement { background: #FFFFFF; border-color: var(--border); }
html[data-theme="light"] .achievement.unlocked {
  background: rgba(24,148,40,0.06);
  border-color: rgba(24,148,40,0.25);
}
html[data-theme="light"] .achievement.locked { filter: grayscale(1); opacity: 0.55; }
html[data-theme="light"] .review-write {
  background: #FFFFFF;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .review-write .who { color: var(--text-faint); }
html[data-theme="light"] .star-row .star-btn { color: rgba(20,22,28,0.22); }
html[data-theme="light"] .star-row .star-btn.lit { color: #B07900; }
html[data-theme="light"] .review-card { background: #FFFFFF; box-shadow: var(--shadow-card); }
html[data-theme="light"] .review-name { color: var(--cmd-green); }
html[data-theme="light"] .review-name .avatar {
  background: rgba(24,148,40,0.1);
  border-color: rgba(24,148,40,0.25);
  color: var(--cmd-green);
}
html[data-theme="light"] .review-date { color: var(--text-faint); }
html[data-theme="light"] .review-empty .pixel-icon { color: var(--text-faint); }

/* Staff page */
html[data-theme="light"] .staff-tab {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text-dim);
}
html[data-theme="light"] .staff-tab:hover { color: var(--text); border-color: var(--border-strong); }
html[data-theme="light"] .staff-tab.active {
  background: rgba(24,148,40,0.08);
  border-color: rgba(24,148,40,0.35);
  color: var(--cmd-green);
}
html[data-theme="light"] .staff-tab .count {
  background: rgba(20,22,28,0.06);
  color: var(--text-faint);
}
html[data-theme="light"] .staff-tab.active .count { background: rgba(24,148,40,0.15); color: var(--cmd-green); }
html[data-theme="light"] .moderation-card,
html[data-theme="light"] .user-card { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .gate { background: #FFFFFF; border-color: var(--border); box-shadow: var(--shadow-card); }
html[data-theme="light"] .role-pill { background: rgba(24,148,40,0.08); color: var(--cmd-green); border-color: rgba(24,148,40,0.25); }
html[data-theme="light"] .role-pill.staff { background: rgba(160,110,0,0.08); color: #8A5F00; border-color: rgba(160,110,0,0.3); }

/* Misc */
html[data-theme="light"] .section-sub { color: var(--text-dim); }
html[data-theme="light"] .course-card-tier { color: var(--text-dim); }
html[data-theme="light"] .course-card:hover,
html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .tier-card:hover { border-color: var(--border-strong); }
html[data-theme="light"] .pixel, html[data-theme="light"] .silkscreen { color: var(--text); }
html[data-theme="light"] .green, html[data-theme="light"] h1 .green, html[data-theme="light"] h2 .green { color: var(--cmd-green); }
html[data-theme="light"] .modal-close { color: var(--text-dim); }
html[data-theme="light"] .modal-close:hover { color: var(--text); background: rgba(20,22,28,0.06); }
html[data-theme="light"] .modal-sub { color: var(--text-dim); }
html[data-theme="light"] .modal-foot { color: var(--text-dim); border-top-color: var(--border); }
html[data-theme="light"] .modal h2 { color: var(--text); }
html[data-theme="light"] .reveal.reveal-pending { background: transparent; }
html[data-theme="light"] [style*="color:var(--cmd-green)"],
html[data-theme="light"] [style*="color: var(--cmd-green)"] { color: var(--cmd-green) !important; }
html[data-theme="light"] [style*="color:var(--gold)"],
html[data-theme="light"] [style*="color: var(--gold)"] { color: var(--gold) !important; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(20,22,28,0.18); border-color: var(--bg); }
html[data-theme="light"] ::selection { background: rgba(24,148,40,0.2); }

/* ══ CORE-JOBS POLISH (search copy · resume · click-to-copy) ══════════
   Added 2026-07-03: the three things users actually come for — find a
   command, copy it, pick up where they left off — get first-class UI. */

/* Syntax line inside ⌘K results — the answer, right in the row */
.search-result-syntax {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.32);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-result-syntax .slash { color: var(--cmd-green); }
.search-result-item.active .search-result-syntax { border-color: rgba(85,255,85,0.22); }

/* Copy button inside a result row */
.search-copy {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.search-copy svg { width: 14px; height: 14px; }
.search-copy:hover {
  color: var(--cmd-green);
  border-color: rgba(85,255,85,0.3);
  background: rgba(85,255,85,0.08);
  box-shadow: 0 0 14px -6px rgba(85,255,85,0.5);
}
.search-result-item.copied .search-copy {
  color: var(--cmd-green);
  border-color: rgba(85,255,85,0.4);
  background: rgba(85,255,85,0.12);
}
.search-result-item.copied .search-result-syntax { border-color: rgba(85,255,85,0.4); }

/* ── Resume card — hero chip on index, banner on learn ── */
.resume-card {
  display: flex; align-items: center; gap: 14px;
  max-width: 460px;
  margin: 18px auto 0;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 30px -18px rgba(0,0,0,0.6);
  text-decoration: none;
  color: var(--text);
  position: relative; z-index: 2;
  transition: all 0.25s var(--ease);
}
.resume-card:hover {
  transform: translateY(-2px);
  border-color: rgba(85,255,85,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 34px -16px rgba(0,0,0,0.65), 0 0 30px -12px rgba(85,255,85,0.35);
}
.resume-dot {
  flex-shrink: 0;
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--rc, var(--cmd-green));
  box-shadow: 0 0 10px var(--rc, var(--cmd-green));
}
.resume-body { flex: 1; min-width: 0; text-align: left; }
.resume-eyebrow {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.52rem; letter-spacing: 1.2px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.resume-title {
  display: block;
  font-size: 0.86rem; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.resume-bar {
  display: block;
  height: 4px; margin-top: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}
.resume-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cmd-green), var(--diamond));
  border-radius: 99px;
}
.resume-pct {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem; color: var(--cmd-green);
}
.resume-card > svg { width: 15px; height: 15px; color: var(--text-faint); flex-shrink: 0; transition: all 0.2s; }
.resume-card:hover > svg { color: var(--cmd-green); transform: translateX(3px); }
.resume-banner { max-width: none; margin: 0 0 22px; }

/* ── Marquee items are copyable — invite the click ────── */
.marquee-item { cursor: pointer; transition: all 0.2s; }
.marquee-item:hover {
  border-color: rgba(85,255,85,0.35);
  background: rgba(85,255,85,0.06);
  color: var(--text);
}

/* ── Terminal copy button (lesson command preview) ────── */
.t-copy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
}
.t-copy svg { width: 12px; height: 12px; }
.t-copy:hover {
  color: var(--cmd-green);
  border-color: rgba(85,255,85,0.3);
  background: rgba(85,255,85,0.08);
}

/* ── Light mode ─────────────────────────────────────────── */
html[data-theme="light"] .search-result-syntax {
  background: rgba(13,15,20,0.92); /* stays terminal-dark, like all code */
  color: #E8EAEE;
  border-color: rgba(20,22,28,0.4);
}
html[data-theme="light"] .search-copy {
  background: rgba(20,22,28,0.04);
  color: var(--text-dim);
}
html[data-theme="light"] .search-copy:hover,
html[data-theme="light"] .search-result-item.copied .search-copy {
  color: var(--cmd-green);
  border-color: rgba(24,148,40,0.35);
  background: rgba(24,148,40,0.08);
  box-shadow: none;
}
html[data-theme="light"] .resume-card {
  background: #FFFFFF;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
html[data-theme="light"] .resume-card:hover {
  border-color: rgba(24,148,40,0.35);
  box-shadow: 0 14px 34px -18px rgba(20,22,28,0.3);
}
html[data-theme="light"] .resume-bar { background: rgba(20,22,28,0.08); }
html[data-theme="light"] .marquee-item:hover {
  border-color: rgba(24,148,40,0.35);
  background: rgba(24,148,40,0.06);
}

/* ── Core-jobs polish, round 2 (audit follow-ups) ─────── */

/* START HERE scent on the iron course card for first-timers */
.card-tag.start-here {
  color: #06230A;
  background: var(--cmd-green);
  border: 1px solid var(--cmd-green);
  box-shadow: 0 0 18px -4px rgba(85,255,85,0.7);
  animation: startPulse 2.4s ease-in-out infinite;
}
@keyframes startPulse { 50% { box-shadow: 0 0 26px -4px rgba(85,255,85,0.95); } }
html[data-reduce-motion="1"] .card-tag.start-here { animation: none; }

/* Bedrock-vs-Java explainer under the edition toggle */
.edition-hint {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 0.84rem;
  color: var(--text-dim);
}
.edition-hint strong { color: var(--text); }

/* Index "paths" rail — started-but-not-done state */
.progress-step.started { border-color: rgba(85,255,85,0.16); }
.progress-step .ps-mini {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--cmd-green);
}

/* Profile progress rows are links now */
a.progress-row { text-decoration: none; border-radius: 8px; transition: background 0.15s; }
a.progress-row:hover { background: rgba(85,255,85,0.05); }
a.progress-row:hover .name { color: var(--text); }
html[data-theme="light"] a.progress-row:hover { background: rgba(24,148,40,0.06); }

/* Streak chip (lesson sidebar + completion) */
.streak-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold);
  background: rgba(252,219,5,0.08);
  border: 1px solid rgba(252,219,5,0.25);
  border-radius: 999px;
  white-space: nowrap;
}
html[data-theme="light"] .streak-chip { color: #8A5F00; background: rgba(160,110,0,0.08); border-color: rgba(160,110,0,0.3); }

/* Next-course card on the completion screen */
.next-course-card {
  display: block;
  position: relative;
  max-width: 440px;
  margin: 0 auto 26px;
  padding: 18px 52px 18px 22px;
  text-align: left;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(85,255,85,0.07) 0%, rgba(85,255,85,0.02) 100%);
  border: 1px solid rgba(85,255,85,0.25);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 0.25s var(--ease);
}
.next-course-card:hover {
  transform: translateY(-2px);
  border-color: rgba(85,255,85,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 34px -16px rgba(0,0,0,0.6), 0 0 30px -10px rgba(85,255,85,0.4);
}
.next-course-card .ncc-eyebrow {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.52rem; letter-spacing: 1.4px;
  color: var(--cmd-green);
  margin-bottom: 8px;
}
.next-course-card .ncc-tier {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.62rem; letter-spacing: 1.2px;
  margin-bottom: 4px;
}
.next-course-card .ncc-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--text);
}
.next-course-card .ncc-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.next-course-card > svg {
  position: absolute; right: 18px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--cmd-green);
  transition: transform 0.2s;
}
.next-course-card:hover > svg { transform: translateY(-50%) translateX(4px); }
html[data-theme="light"] .next-course-card {
  background: linear-gradient(180deg, rgba(24,148,40,0.07) 0%, rgba(24,148,40,0.02) 100%);
  border-color: rgba(24,148,40,0.3);
}

/* Lesson sidebar: mobile accordion. Desktop unchanged — toggle hidden. */
.lesson-nav-toggle {
  display: none;
  width: 100%;
  align-items: center; justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.lesson-nav-toggle svg { width: 14px; height: 14px; transition: transform 0.2s; }
@media (max-width: 880px) {
  .lesson-nav-toggle { display: flex; }
  .lesson-sidebar .lesson-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .lesson-sidebar.nav-open .lesson-nav { max-height: 1200px; }
  .lesson-sidebar.nav-open .lesson-nav-toggle svg { transform: rotate(180deg); }
  .lesson-sidebar .sidebar-foot { display: none; }
  .lesson-sidebar.nav-open .sidebar-foot { display: block; }
}

/* ── Course entrance — calm, staggered, once ──────────── */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduce-motion="1"]) body.course-entering .lesson-sidebar {
    animation: lesson-aside-in 0.5s var(--ease) both;
  }
  html:not([data-reduce-motion="1"]) body.course-entering .lesson-nav-item {
    opacity: 0;
    animation: lesson-item-in 0.38s var(--ease) forwards;
    animation-delay: calc(0.14s + min(var(--li, 0), 16) * 0.028s);
  }
  html:not([data-reduce-motion="1"]) .lesson-main.lesson-enter > * {
    animation: lesson-main-in 0.34s var(--ease) both;
  }
  html:not([data-reduce-motion="1"]) .lesson-main.lesson-enter > *:nth-child(2) { animation-delay: 0.05s; }
  html:not([data-reduce-motion="1"]) .lesson-main.lesson-enter > *:nth-child(3) { animation-delay: 0.1s; }
  html:not([data-reduce-motion="1"]) .lesson-main.lesson-enter > *:nth-child(n+4) { animation-delay: 0.14s; }
}
@keyframes lesson-aside-in { from { opacity: 0; transform: translateX(-12px); } }
@keyframes lesson-item-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes lesson-main-in { from { opacity: 0; transform: translateY(10px); } }

/* Relaxed lesson rhythm — a little more air, softer edges */
.lesson-content { line-height: 1.75; }
.lesson-content h2 { margin-top: 40px; }
.lesson-content h3 { margin-top: 32px; }
.lesson-content .terminal { margin: 18px 0 26px; }
.lesson-content .tip-box { margin: 18px 0 26px; }
.lesson-nav-item { border-color: transparent; }
.lesson-nav-item:hover { border-color: var(--border); }

/* ── Guided tour ──────────────────────────────────────── */
.tour-overlay { position: fixed; inset: 0; z-index: 600; }
.tour-spot {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(4,5,8,0.72), 0 0 24px -4px rgba(85,255,85,0.5);
  border: 1px solid rgba(85,255,85,0.5);
  pointer-events: none;
  transition: all 0.35s var(--ease);
}
.tour-tip {
  position: fixed;
  background: linear-gradient(180deg, rgba(24,26,34,0.98) 0%, rgba(14,16,22,0.99) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 30px 70px -20px rgba(0,0,0,0.8);
  transition: left 0.35s var(--ease), top 0.35s var(--ease);
}
.tour-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); margin-bottom: 8px; }
.tour-tip h4 { font-family: var(--font-pixel); font-size: 0.78rem; letter-spacing: 1.2px; color: var(--cmd-green); margin: 0 0 8px; }
.tour-tip p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.55; margin: 0 0 14px; }
.tour-actions { display: flex; gap: 8px; align-items: center; }
html[data-theme="light"] .tour-tip { background: #FFFFFF; }
html[data-theme="light"] .tour-spot { box-shadow: 0 0 0 9999px rgba(20,22,28,0.45), 0 0 24px -4px rgba(24,148,40,0.4); border-color: rgba(24,148,40,0.5); }
html[data-reduce-motion="1"] .tour-spot, html[data-reduce-motion="1"] .tour-tip { transition: none; }

/* ── Lesson sidebar: use the dead space at the bottom ─── */
.lesson-sidebar { display: flex; flex-direction: column; }
.lesson-sidebar .lesson-nav { flex-shrink: 0; }
.sidebar-extras {
  margin-top: auto;
  padding-top: 22px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.side-next {
  display: block;
  padding: 13px 15px;
  background: linear-gradient(180deg, rgba(85,255,85,0.06) 0%, rgba(85,255,85,0.015) 100%);
  border: 1px solid rgba(85,255,85,0.18);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}
.side-next:hover {
  transform: translateY(-2px);
  border-color: rgba(85,255,85,0.4);
  box-shadow: 0 10px 26px -14px rgba(0,0,0,0.6), 0 0 22px -10px rgba(85,255,85,0.35);
}
.side-next .sn-eyebrow { display: block; font-family: var(--font-pixel); font-size: 0.5rem; letter-spacing: 1.3px; color: var(--cmd-green); margin-bottom: 5px; }
.side-next .sn-title { display: block; font-family: var(--font-display); font-size: 0.92rem; font-weight: 600; color: var(--text); }
.side-next .sn-meta { display: block; font-family: var(--font-pixel); font-size: 0.52rem; letter-spacing: 1px; margin-top: 5px; }
.side-tip {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.side-tip .st-label { flex-shrink: 0; font-family: var(--font-pixel); font-size: 0.5rem; letter-spacing: 1.2px; color: var(--cmd-aqua); margin-top: 3px; }
html[data-theme="light"] .side-next { background: rgba(24,148,40,0.05); border-color: rgba(24,148,40,0.25); }
html[data-theme="light"] .side-tip { background: #FFFFFF; }
@media (max-width: 880px) {
  .sidebar-extras { display: none; } /* mobile: accordion stays tight */
}

/* ── Sliding nav pill (View Transitions) ──────────────── */
/* The active link is its own transition group, so navigating morphs the
   green pill from the old tab to the new one. Firefox just re-renders. */
.nav-links a.active { view-transition-name: nav-active; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(nav-active) {
    animation-duration: 0.28s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a.active { view-transition-name: none; }
}
html[data-reduce-motion="1"] .nav-links a.active { view-transition-name: none; }

/* ── Per-edition inline text variants ─────────────────────
   Markup carries both forms; the html[data-edition] attribute picks one:
     <span class="ed-b">/effect @a speed</span><span class="ed-j">/effect give @a speed</span> */
html[data-edition="java"] .ed-b { display: none !important; }
html:not([data-edition="java"]) .ed-j { display: none !important; }

/* ── Light-mode round 2 (audit fixes, 2026-07-04) ─────── */
html[data-theme="light"] .card-tag.start-here { color: #FFFFFF; animation: none; box-shadow: 0 6px 16px -6px rgba(24,148,40,0.5); }
html[data-theme="light"] .next-course-card:hover { border-color: rgba(24,148,40,0.5); box-shadow: 0 14px 34px -18px rgba(20,22,28,0.3); }
html[data-theme="light"] .side-next:hover { border-color: rgba(24,148,40,0.45); box-shadow: 0 10px 26px -18px rgba(20,22,28,0.25); }
html[data-theme="light"] .progress-step.started { border-color: rgba(24,148,40,0.3); }
html[data-theme="light"] .tour-tip { box-shadow: 0 30px 70px -20px rgba(20,22,28,0.35); }
html[data-theme="light"] .search-result-item.active .search-result-syntax,
html[data-theme="light"] .search-result-item.copied .search-result-syntax { border-color: rgba(24,148,40,0.45); }
html[data-theme="light"] .kbd,
html[data-theme="light"] .search-modal-kbd,
html[data-theme="light"] .search-modal-foot kbd { background: rgba(20,22,28,0.04); }
html[data-theme="light"] .card-tag.new { background: rgba(24,148,40,0.08); border-color: rgba(24,148,40,0.3); }
html[data-theme="light"] .card-tag.wip { background: rgba(160,110,0,0.08); border-color: rgba(160,110,0,0.3); }
html[data-theme="light"] .card-tag.completed { background: rgba(17,123,145,0.08); border-color: rgba(17,123,145,0.3); }
/* JS-generated inline gold chips (lesson gate badge, WIP tags) */
html[data-theme="light"] [style*="rgba(252,219,5"] {
  background: rgba(160,110,0,0.08) !important;
  border-color: rgba(160,110,0,0.3) !important;
}

/* ── Lesson sidebar header (fills the top-corner space) ── */
.lesson-sidebar { padding-top: 22px; }
.sidebar-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-dim); text-decoration: none;
  padding: 5px 10px; margin: 0 0 16px -4px;
  border-radius: 8px; transition: all 0.15s;
}
.sidebar-back svg { width: 14px; height: 14px; }
.sidebar-back:hover { color: var(--cmd-green); background: rgba(85,255,85,0.06); }
.sidebar-course { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sidebar-course-art { width: 40px; height: 40px; image-rendering: pixelated; flex-shrink: 0; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.4)); }
.sidebar-course-title { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; color: var(--text); line-height: 1.25; }
html[data-theme="light"] .sidebar-back:hover { color: var(--cmd-green); background: rgba(24,148,40,0.06); }

/* ── Nav quick-menu (+) ────────────────────────────────── */
.nav-quick-wrap { position: relative; display: inline-flex; }
.nav-quick-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px;
  display: none; flex-direction: column; gap: 2px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(24,26,34,0.98), rgba(14,16,22,0.99));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.06);
  z-index: 120;
}
.nav-quick-wrap.open .nav-quick-menu { display: flex; animation: navq-in 0.16s var(--ease); }
@keyframes navq-in { from { opacity: 0; transform: translateY(-6px); } }
.nav-quick-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: none; border-radius: 9px;
  background: transparent; color: var(--text-dim);
  font-family: var(--font-body); font-size: 0.86rem; text-align: left;
  cursor: pointer; transition: all 0.14s;
}
.nav-quick-menu button svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-quick-menu button:hover { background: rgba(85,255,85,0.08); color: var(--cmd-green); }
.nav-quick-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.nav-quick-wrap.open > [data-nav-quick] { color: var(--cmd-green); border-color: rgba(85,255,85,0.3); }
html[data-theme="light"] .nav-quick-menu { background: #FFFFFF; box-shadow: 0 24px 60px -18px rgba(20,22,28,0.3); }
html[data-theme="light"] .nav-quick-menu button:hover { background: rgba(24,148,40,0.08); }

/* ── Nav layout settings rows ──────────────────────────── */
.navlayout-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.navlayout-row .nl-name { flex: 1; font-size: 0.9rem; color: var(--text); }
.navlayout-row .nl-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); cursor: pointer; transition: all 0.15s; }
.navlayout-row .nl-btn:hover:not(:disabled) { color: var(--cmd-green); border-color: rgba(85,255,85,0.3); }
.navlayout-row .nl-btn:disabled { opacity: 0.3; cursor: default; }
.navlayout-row.hidden-item .nl-name { color: var(--text-faint); text-decoration: line-through; }
html[data-theme="light"] .navlayout-row .nl-btn { background: rgba(20,22,28,0.04); }
