/* ==========================================================================
   Spintax — local edition
   Design language: black gold / trust blue / emerald terminal
   ========================================================================== */

/* === THEME TOKENS === */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0906;
  --bg-elev: #100e09;
  --bg-elev-2: #17130b;
  --fg: #f4ecdc;
  --fg-dim: #cfc4a8;
  --muted: #8f8366;
  --accent: #d4af37;
  --accent-rgb: 212, 175, 55;
  --accent-2: #e9c766;
  --accent-2-rgb: 233, 199, 102;
  --danger: #ff6b5e;
  --warn: #f0b429;
  --ok: #4ade80;
  --border: rgba(244, 236, 220, 0.08);
  --border-strong: rgba(244, 236, 220, 0.2);
  --card: #131007;
  --code-bg: #060503;
  --code-fg: #f4ecdc;
  --glow: rgba(212, 175, 55, 0.16);
  --nav-bg: rgba(10, 9, 6, 0.72);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #fbfdff;
  --fg: #0b2457;
  --fg-dim: #27416e;
  --muted: #3f5170;
  --accent: #2f6bff;
  --accent-rgb: 47, 107, 255;
  --accent-2: #0b2457;
  --accent-2-rgb: 11, 36, 87;
  --danger: #d92d20;
  --warn: #b45309;
  --ok: #067647;
  --border: rgba(11, 36, 87, 0.13);
  --border-strong: rgba(11, 36, 87, 0.3);
  --card: #ffffff;
  --code-bg: #0d1c3e;
  --code-fg: #eaf1ff;
  --glow: rgba(47, 107, 255, 0.14);
  --nav-bg: rgba(244, 247, 251, 0.78);
  --shadow: 0 30px 80px -44px rgba(11, 36, 87, 0.28);
}
:root[data-theme="cyber"] {
  color-scheme: dark;
  --bg: #04120c;
  --bg-elev: #071a12;
  --bg-elev-2: #0a2418;
  --fg: #8dffc2;
  --fg-dim: #b4ffd9;
  --muted: #3f8f6e;
  --accent: #4ade9b;
  --accent-rgb: 74, 222, 155;
  --accent-2: #ffd21f;
  --accent-2-rgb: 255, 210, 31;
  --danger: #ff7a7a;
  --warn: #ffd21f;
  --ok: #8dffc2;
  --border: rgba(141, 255, 194, 0.14);
  --border-strong: rgba(141, 255, 194, 0.32);
  --card: #061b12;
  --code-bg: #010a06;
  --code-fg: #8dffc2;
  --glow: rgba(74, 222, 155, 0.18);
  --nav-bg: rgba(4, 18, 12, 0.75);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

[data-theme="cyber"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(141, 255, 194, 0.03) 2px, rgba(141, 255, 194, 0.03) 3px);
  z-index: 200;
  mix-blend-mode: overlay;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

body.theme-anim,
body.theme-anim *,
body.theme-anim *::before,
body.theme-anim *::after {
  transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              fill 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === LAYOUT === */
.container { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.container--narrow { width: min(900px, calc(100% - 48px)); }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.section--elev { background: var(--bg-elev); border-block: 1px solid var(--border); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.display { font-family: 'Playfair Display', Georgia, serif; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* === BACKGROUND === */
.bg-grid {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center center;
}
.float-dot {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.2;
  animation: drift 18s ease-in-out infinite;
  pointer-events: none;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-30px, 50px) scale(0.95); }
}
[data-theme="light"] .float-dot { opacity: 0.07; filter: blur(90px); }
.mouse-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14) 0%, transparent 62%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(30px);
  z-index: 1;
}

/* === PROGRESS === */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 120;
  box-shadow: 0 0 12px var(--accent);
}

/* === HEADER === */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}
.logo__slash { color: var(--accent); }
.logo__cursor {
  display: inline-block;
  width: 0.48em;
  height: 0.95em;
  margin-left: 3px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
  transform: translateY(0.08em);
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  position: relative;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -7px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover, .nav-link.is-active { color: var(--accent); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  transition: all 0.25s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; }

.theme-toggle {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.theme-btn {
  width: 30px; height: 30px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-btn svg { width: 14px; height: 14px; }
.theme-btn.active {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45);
}
.theme-btn:hover:not(.active) { color: var(--fg); transform: scale(1.08); }

.nav-burger { display: none; }
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 12px 0 20px;
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.7);
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--fg-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--accent); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-110%);
  transition: transform 0.65s ease;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(var(--accent-rgb), 0.6); }
.btn-primary:hover::before { transform: translateX(110%); }
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost { padding: 9px 14px; background: transparent; border-color: var(--border-strong); color: var(--muted); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 11px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* === TAGS / PILLS === */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 2px;
  background: rgba(var(--accent-rgb), 0.07);
  font-weight: 500;
  white-space: nowrap;
}
.tag--muted { color: var(--muted); border-color: var(--border-strong); background: transparent; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg);
  text-decoration: none;
}
.stat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* === TYPE === */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 20px;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
}
.section-title em { font-style: italic; font-weight: 400; }
.section-lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px 0 90px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 220px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; }
.hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero__meta .sep { opacity: 0.45; }
.hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(2rem, 5.6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0 0 28px;
  min-height: 1.15em;
}
.hero h1 .prompt { color: var(--muted); font-weight: 400; }
.hero h1 .cursor::after {
  content: '▌';
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
  font-weight: 400;
}
.hero__display {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3.3vw, 2.6rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  margin: 0 0 18px;
  max-width: 820px;
}
.hero__text {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 36px;
}
.hero__text strong { color: var(--fg); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 760px;
}
.hero__stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--accent);
  line-height: 1;
}
.hero__stat-label {
  margin-top: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

/* === MARQUEE === */
.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  border-block: 1px solid var(--border);
  background: var(--bg-elev);
}
.marquee {
  display: inline-flex;
  gap: 44px;
  padding-right: 44px;
  animation: scroll 48s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee span:nth-child(3n+1) { color: var(--accent); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* === FEATURE GRID === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}
.feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.feature:hover { transform: translateY(-7px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.feature:hover::before { transform: scaleX(1); }
.feature:hover::after { opacity: 1; }
.feature__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.feature__num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.16;
  transition: opacity 0.3s ease;
}
.feature:hover .feature__num { opacity: 0.45; }
.feature__icon { color: var(--accent); opacity: 0.85; }
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.feature p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.feature__syntax {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 3px;
  padding: 3px 8px;
  margin-bottom: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.feature__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.feature__link .arrow { transition: transform 0.25s ease; }
.feature__link:hover .arrow { transform: translateX(5px); }

/* === SECTION SPLIT === */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}
.split__sticky { position: sticky; top: 108px; }
.split .section-title { font-size: clamp(2.1rem, 4vw, 3.5rem); }
.split__list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--fg-dim);
}
.split__list li { display: flex; align-items: flex-start; gap: 12px; }
.split__list .tick { color: var(--accent); flex: 0 0 auto; }

/* === CODE WINDOW === */
.code-window {
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .code-head { background: rgba(11, 36, 87, 0.03); }
.code-dots { display: flex; gap: 6px; flex: 0 0 auto; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.code-dots i:nth-child(1) { background: #ff5f57; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }
.code-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-body {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--code-fg);
  tab-size: 2;
}
.code-body code { font: inherit; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.copy-btn svg { width: 12px; height: 12px; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.is-copied { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* syntax token colours */
.tk-key, .tk-dir { color: #d4af37; font-weight: 500; }
.tk-str { color: #f6e7b2; }
.tk-fn { color: #e8d9a8; }
.tk-com { color: #7a6f55; font-style: italic; }
.tk-num { color: #f6e7b2; }
.tk-op { color: #e0bf5a; }
.tk-var { color: #fff4cf; }
.tk-verbatim { color: #b9a97e; }
[data-theme="cyber"] .tk-key, [data-theme="cyber"] .tk-dir { color: #ffd21f; }
[data-theme="cyber"] .tk-str { color: #7dffae; }
[data-theme="cyber"] .tk-fn { color: #b4ffd9; }
[data-theme="cyber"] .tk-com { color: #3f8f6e; }
[data-theme="cyber"] .tk-num { color: #ffd21f; }
[data-theme="cyber"] .tk-op { color: #4ade9b; }
[data-theme="cyber"] .tk-var { color: #d8ffe9; }
[data-theme="light"] .tk-key, [data-theme="light"] .tk-dir { color: #ffd479; }
[data-theme="light"] .tk-str { color: #9ff0d3; }
[data-theme="light"] .tk-fn { color: #c7d2fe; }
[data-theme="light"] .tk-com { color: #8ea2c4; }
[data-theme="light"] .tk-num { color: #93c5fd; }
[data-theme="light"] .tk-op { color: #fbbf24; }
[data-theme="light"] .tk-var { color: #ffffff; }

/* === TABS === */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tab {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 3px;
  padding: 7px 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.tab:hover { color: var(--fg); border-color: var(--accent); }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.syntax-panel[hidden] { display: none; }
.syntax-output {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: var(--card);
  padding: 14px 16px;
}
.syntax-output__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.syntax-output__label svg { width: 12px; height: 12px; color: var(--accent); }
.syntax-output pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.syntax-note {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.syntax-caption {
  margin: 12px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* === DEMO / MINI PLAYGROUND === */
.demo-box {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}
.demo-box__left { padding: 26px; border-right: 1px solid var(--border); }
.demo-box__right { padding: 26px; background: var(--bg-elev); }
.demo-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.demo-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  outline: none;
}
.demo-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.demo-output {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.demo-output li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--fg-dim);
  overflow-wrap: anywhere;
}

/* === DOC CARDS === */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}
.doc-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.doc-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.32;
  line-height: 1;
}
.doc-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.25;
}
.doc-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.doc-card__more {
  margin-top: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

/* === STEPS === */
.steps { border-top: 1px solid var(--border); }
.step {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  text-decoration: none;
  transition: padding-left 0.35s ease;
}
.step::before {
  content: '';
  position: absolute;
  left: -14px; top: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  transition: transform 0.25s ease;
}
.step:hover { padding-left: 14px; }
.step:hover::before { transform: translateY(-50%) scale(1); }
.step__num {
  width: 74px;
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  padding-top: 5px;
}
.step__body { flex: 1 1 auto; min-width: 0; }
.step__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin: 0 0 4px;
  transition: color 0.25s ease;
}
.step:hover .step__title { color: var(--accent); }
.step__desc { font-size: 14px; color: var(--muted); }
.step__meta {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  padding-top: 7px;
}

/* === CTA BANNER === */
.cta-banner {
  position: relative;
  padding: 64px 48px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background:
    radial-gradient(800px 300px at 15% 0%, rgba(var(--accent-rgb), 0.14), transparent 70%),
    var(--card);
  overflow: hidden;
}
.cta-banner h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: 720px;
}
.cta-banner p { color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.cta-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-banner__code {
  position: absolute;
  right: 30px; bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 30px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 280px; margin: 16px 0 0; }
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.footer-bottom .ok { color: var(--ok); }

/* ==========================================================================
   PLAYGROUND
   ========================================================================== */
.play-hero {
  padding: 132px 0 34px;
  position: relative;
}
.play-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
.play-hero h1 em { font-style: italic; font-weight: 400; }
.play-hero p { max-width: 680px; color: var(--muted); margin: 0; }
.play-hero__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.play-title-row {
  display: flex;
  align-items: center;
  gap: 30px;
}
.play-title-row > div:last-child { min-width: 0; }
.play-wheel {
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  color: var(--accent);
  opacity: 0.9;
}
.play-wheel svg { width: 100%; height: 100%; overflow: visible; }
.play-wheel__ring {
  transform-origin: 100px 100px;
  animation: wheel-spin 14s linear infinite;
  animation-play-state: paused;
}
.play-wheel__ring--rev { animation-direction: reverse; animation-duration: 9s; }
.play-wheel.is-spinning .play-wheel__ring { animation-play-state: running; }
.play-wheel.is-spinning { filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.35)); }
@keyframes wheel-spin { to { transform: rotate(360deg); } }

.play-actions {
  padding: 16px;
  margin-bottom: 18px;
}
.play-actions__row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-field .input, .tool-field .select { width: 96px; padding: 8px 9px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.tool-field .select { width: 116px; }
.tool-field[data-seed-field] .input { width: 130px; }
.play-actions .hint { margin: 10px 0 0; }

.play-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
  align-items: start;
}
.play-col { min-width: 0; }
.play-col .output-panel { margin-top: 0; }
.play-col--output { position: sticky; top: 92px; }
.play-col--output .variants { grid-template-columns: 1fr; padding: 14px; }

.quickref { margin-top: 18px; }
.quickref__body { padding: 18px 22px 20px; }
.quickref__body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
}
.quickref__body li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.quickref__body li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.quickref__body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: var(--fg);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 3px;
  padding: 1px 4px;
}
.quickref__body > p { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.quickref__body > p a { color: var(--accent); text-decoration: none; }
.quickref__body > p a:hover { text-decoration: underline; }

.variant__text .leftover {
  color: var(--danger);
  text-decoration: underline wavy var(--danger);
  text-decoration-skip-ink: none;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}
.play-layout > aside { position: sticky; top: 92px; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.panel__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel__title svg { width: 13px; height: 13px; color: var(--accent); }
.panel__body { padding: 16px; }
.panel + .panel { margin-top: 16px; }

.editor-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  border-radius: 3px;
  padding: 5px 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}
.mini-btn svg { width: 11px; height: 11px; }
.mini-btn:hover { color: var(--accent); border-color: var(--accent); }
.mini-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.editor-shell {
  display: flex;
  background: var(--code-bg);
  height: 400px;
  position: relative;
  overflow: hidden;
}
.editor-gutter {
  flex: 0 0 44px;
  padding: 16px 8px 16px 0;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--border);
  overflow: hidden;
  user-select: none;
}
.editor-gutter span { display: block; }
.editor-area { position: relative; flex: 1 1 auto; min-width: 0; }
.editor-input,
.editor-highlight {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  padding: 16px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  background: transparent;
}
.editor-input {
  resize: none;
  outline: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--accent);
  z-index: 2;
  overflow: auto;
}
.editor-input::selection { background: rgba(var(--accent-rgb), 0.3); }
.editor-highlight {
  z-index: 1;
  pointer-events: none;
  color: var(--code-fg);
  overflow: hidden;
}
.editor-highlight .err { text-decoration: underline wavy var(--danger); text-decoration-skip-ink: none; background: rgba(255, 95, 87, 0.1); }
.editor-highlight .warn { text-decoration: underline dotted var(--warn); text-decoration-skip-ink: none; }
.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.status { display: inline-flex; align-items: center; gap: 6px; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.status.is-error .dot { background: var(--danger); }
.status.is-warn .dot { background: var(--warn); }

.diagnostics { margin-top: 12px; display: grid; gap: 6px; }
.diag {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--warn);
  background: var(--bg);
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--fg-dim);
  text-align: left;
  width: 100%;
}
.diag.is-error { border-left-color: var(--danger); }
.diag__pos { color: var(--muted); flex: 0 0 auto; }
.diag:hover { border-color: var(--border-strong); }
.diag__badge { flex: 0 0 auto; color: var(--warn); text-transform: uppercase; letter-spacing: 0.06em; }
.diag.is-error .diag__badge { color: var(--danger); }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 95, 87, 0.4);
  background: rgba(255, 95, 87, 0.08);
  border-radius: 3px;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.banner svg { width: 15px; height: 15px; color: var(--danger); flex: 0 0 auto; margin-top: 2px; }
.banner strong { color: var(--danger); }

/* vars */
.vars-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vars-tabs { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 3px; overflow: hidden; }
.vars-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vars-tab.is-active { background: var(--accent); color: var(--bg); }
.vars-rows { display: grid; gap: 7px; }
.vars-row { display: grid; grid-template-columns: 62px minmax(0, 0.8fr) minmax(0, 1.2fr) 26px; gap: 6px; }
.vars-row input, .vars-row select, .vars-row textarea {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg);
  padding: 7px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  outline: none;
}
.vars-row input:focus, .vars-row select:focus, .vars-row textarea:focus { border-color: var(--accent); }
.vars-row select { color: var(--accent); text-transform: lowercase; }
.vars-row .remove {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 3px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.vars-row .remove:hover { color: var(--danger); border-color: var(--danger); }
.vars-row .remove svg { width: 11px; height: 11px; }
.vars-raw { display: none; }
.vars-raw textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg);
  padding: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.65;
  outline: none;
}
.vars-raw textarea:focus { border-color: var(--accent); }
.vars-raw.is-active { display: block; }
.vars-rows.is-hidden { display: none; }
.vars-add { margin-top: 8px; }
.hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
}

/* settings */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field__value { color: var(--accent); }
.input, .select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--fg);
  padding: 9px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented { display: flex; border: 1px solid var(--border-strong); border-radius: 3px; overflow: hidden; }
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.segmented button.is-active { background: var(--accent); color: var(--bg); }
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 34px; height: 18px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  transition: all 0.25s ease;
  flex: 0 0 auto;
}
.switch__track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.25s ease;
}
.switch input:checked + .switch__track { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.15); }
.switch input:checked + .switch__track::after { left: 17px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.share-row { display: flex; gap: 7px; margin-top: 8px; }
.share-row .input { font-size: 10px; }

/* output */
.output-panel { margin-top: 20px; }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.output-actions { display: flex; gap: 6px; flex-wrap: wrap; }.variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  list-style: none;
  margin: 0;
}
.variant {
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 3px;
  padding: 12px;
  position: relative;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.variant__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.variant__num { color: var(--accent); }
.variant__text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--fg-dim);
  flex: 1;
}
.variant__copy {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  border-radius: 2px;
  opacity: 0.5;
}
.variant:hover .variant__copy { opacity: 1; }
.variant__copy:hover { color: var(--accent); }
.variant__copy svg { width: 12px; height: 12px; }
.variants__empty {
  grid-column: 1 / -1;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  border: 1px dashed var(--border-strong);
  border-radius: 3px;
}

.example-menu {
  position: relative;
}
.example-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
}
.example-list.is-open { display: block; }
.example-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--fg-dim);
  padding: 8px 9px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.example-list button:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
.example-list small { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }

.stats-list { display: grid; gap: 9px; }
.stats-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.stats-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.stats-list b { font-size: 13px; color: var(--accent); font-weight: 600; }

/* === EXAMPLES PAGE === */
.examples-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.example-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}
.example-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.example-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.example-card:hover::before { transform: scaleX(1); }
.example-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.example-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.65;
}
.example-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.example-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.example-card__code {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--code-bg);
  overflow: hidden;
}
.example-card__code pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--code-fg);
}
.example-card__code code { font: inherit; }
.example-card__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }

@media (max-width: 860px) {
  .examples-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DOCS
   ========================================================================== */
.docs-main { padding: 124px 0 80px; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { opacity: 0.4; }
.docs-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr) 210px;
  gap: 48px;
  align-items: start;
}
.docs-sidebar { position: sticky; top: 96px; }
.docs-mobile-nav { display: none; }
.docs-sidebar__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.docs-nav { display: grid; gap: 2px; margin-bottom: 24px; }
.docs-nav a {
  display: flex;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  transition: all 0.2s ease;
}
.docs-nav a:hover { background: rgba(var(--accent-rgb), 0.06); color: var(--fg); }
.docs-nav a.is-active { border-left-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); color: var(--accent); }
.docs-nav .num { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--muted); padding-top: 3px; }
.docs-nav a.is-active .num { color: var(--accent); }

.docs-toc { position: sticky; top: 96px; }
.docs-toc__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.docs-toc a {
  display: block;
  padding: 5px 0 5px 10px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
  transition: all 0.2s ease;
}
.docs-toc a:hover { color: var(--accent); border-left-color: var(--accent); }

.article { min-width: 0; }
.article__head { margin-bottom: 36px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.article__kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.article h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
.article__lead { color: var(--muted); font-size: 17px; line-height: 1.7; margin: 0; }

.prose { font-size: 15.5px; line-height: 1.78; color: var(--fg-dim); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 52px 0 16px;
  scroll-margin-top: 100px;
}
.prose h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  margin: 34px 0 10px;
  scroll-margin-top: 100px;
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--fg); font-weight: 700; }
.prose em { color: var(--fg); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(var(--accent-rgb), 0.35); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin: 0 0 9px; }
.prose li::marker { color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 38px 0; }
.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  border-radius: 0 3px 3px 0;
  color: var(--fg-dim);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--fg);
  white-space: normal;
  overflow-wrap: break-word;
}
.prose pre {
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--code-fg);
  position: relative;
}
.prose .code-block { position: relative; margin: 22px 0; }
.prose .code-block pre { margin: 0; padding-top: 42px; }
.prose .code-block > .copy-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  background: var(--bg-elev);
}
.prose .code-block > .copy-btn:hover { background: var(--bg); }
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  color: inherit;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: 4px; }
.table-wrap table { min-width: 560px; }
.prose td code, .prose th code { white-space: normal; overflow-wrap: anywhere; }
.prose th, .prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--border-strong);
}
.prose tr:hover td { background: rgba(var(--accent-rgb), 0.03); }

.article__foot {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.pager a {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.25s ease;
}
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pager span { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--fg); }
.pager a:last-child { text-align: right; }

/* === SEARCH MODAL === */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}
.search-modal.is-open { display: flex; }
.search-dialog {
  width: min(640px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.search-field svg { width: 16px; height: 16px; color: var(--muted); }
.search-field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--fg);
}
.search-field kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 2px 5px;
}
.search-results { max-height: 52vh; overflow: auto; padding: 6px; }
.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 3px;
  text-decoration: none;
  color: var(--fg-dim);
}
.search-result:hover, .search-result.is-active { background: rgba(var(--accent-rgb), 0.1); }
.search-result__title { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--fg); }
.search-result__title span { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--accent); text-transform: uppercase; }
.search-result__excerpt { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 24px; text-align: center; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* === TEMPLATES GENERATOR === */
.templates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.template-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}
.template-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.template-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.template-card:hover::before { transform: scaleX(1); }
.template-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.template-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.65;
}
.template-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.template-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.template-card__code {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--code-bg);
  overflow: hidden;
}
.template-card__code pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--code-fg);
}
.template-card__code code { font: inherit; }
.template-card__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }

/* Generator Panel */
.generator-panel { margin-bottom: 24px; }
.generator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.generator-col { min-width: 0; }
.generator-col--output .output-editor { height: 520px; }

.generator-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.generator-label .hint {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  opacity: 0.8;
}

.generator-editor .editor-shell { height: 480px; }
.generator-editor .editor-input { caret-color: var(--accent); }
.output-editor .editor-input { caret-color: transparent; }

.generator-controls { margin-top: 16px; }
.control-group { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; align-items: flex-end; }
.control-group:last-child { margin-bottom: 0; }
.control-group .tool-field { flex: 1 1 200px; }
.control-group .tool-field .select { width: 100%; min-width: 200px; }

.generator-output-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.generator-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.generator-stats .stat { display: flex; align-items: center; gap: 6px; }
.generator-stats .stat .mono { color: var(--accent); font-weight: 600; }

/* generated templates */
.gen-results { display: grid; gap: 14px; }
.gen-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  padding: 26px 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  background: var(--bg-elev);
}
.gen-empty p { margin: 0 0 8px; }
.gen-empty p:last-child { margin-bottom: 0; }
.gen-empty strong { color: var(--fg); }
.gen-result {
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--card);
  overflow: hidden;
}
.gen-result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.gen-result__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fg);
  font-weight: 600;
}
.gen-result__num { color: var(--accent); opacity: 0.7; }
.gen-result__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gen-result__note {
  margin: 0;
  padding: 9px 14px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.gen-result__code {
  margin: 0;
  padding: 12px 14px;
  max-height: 320px;
  overflow: auto;
  background: var(--code-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--code-fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gen-result__code code { font: inherit; }
.gen-result__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: var(--muted);
}
.gen-result__meta b { color: var(--accent); font-weight: 600; }

/* Toast enhancement for templates page */
.toast { z-index: 500; }

/* Mobile responsive for templates */
@media (max-width: 1024px) {
  .generator-grid { grid-template-columns: 1fr; }
  .generator-col--output .output-editor { height: 400px; }
}
@media (max-width: 860px) {
  .templates-grid { grid-template-columns: 1fr; }
  .control-group { flex-direction: column; align-items: stretch; }
  .control-group .tool-field { width: 100%; }
  .control-group .tool-field .select { width: 100%; }
  .generator-output-actions { flex-direction: column; }
  .generator-output-actions .btn { width: 100%; }
}

/* === REVEAL === */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px -8px rgba(var(--accent-rgb), 0.6);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* === RESPONSIVE === */
@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split__sticky { position: static; }
  .play-main-grid { grid-template-columns: 1fr; }
  .play-col--output { position: static; }
  .hero { padding-top: 130px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-actions .btn-secondary { display: none; }
  .docs-layout { grid-template-columns: 1fr; gap: 28px; }
  .docs-sidebar { display: none; }
  .docs-mobile-nav {
    display: block;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card);
    overflow: hidden;
  }
  .docs-mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    list-style: none;
  }
  .docs-mobile-nav summary::-webkit-details-marker { display: none; }
  .docs-mobile-nav summary span { color: var(--muted); }
  .docs-mobile-nav__body { padding: 0 12px 14px; }
  .docs-mobile-nav .docs-sidebar__title:first-child { margin-top: 10px; }
  .docs-nav { grid-template-columns: 1fr 1fr; }
  .demo-box { grid-template-columns: 1fr; }
  .demo-box__left { border-right: 0; border-bottom: 1px solid var(--border); }
  .variants { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .container, .container--narrow { width: calc(100% - 32px); }
  .nav { gap: 10px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-primary { display: none; }
  .section { padding: 68px 0; }
  .play-title-row { align-items: flex-start; gap: 16px; }
  .play-wheel { width: 72px; height: 72px; margin-top: 4px; }
  .play-actions__row { gap: 10px; }
  .play-actions__row > .btn-primary { width: 100%; order: -1; }
  .tool-field { flex: 1 1 120px; }
  .tool-field .input, .tool-field .select { width: 100%; }
  .play-actions__row > .btn-secondary, .play-actions__row > .btn-ghost { flex: 1 1 auto; }
  .quickref__body ul { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 116px 0 70px; }
  .hero__cta { margin-bottom: 44px; }
  .hero__scroll { display: none; }
  .feature-grid, .doc-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; }
  .cta-banner { padding: 40px 26px; }
  .cta-banner__code { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-footer { padding-top: 44px; }
  .step { gap: 14px; }
  .step__num { width: 54px; }
  .step__meta { display: none; }
  .play-hero { padding-top: 112px; }
  .editor-shell { height: 340px; }
  .editor-gutter { flex-basis: 36px; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .hero__display { font-size: 1.35rem; }
  .btn { padding: 12px 16px; font-size: 11px; }
  .hero__bg-text { display: none; }
  .nav { height: 64px; }
  .nav-actions { gap: 6px; }
  .nav-actions .stat-pill { display: none; }
  .theme-btn { width: 27px; height: 27px; }
  .footer-grid { grid-template-columns: 1fr; }
  .docs-nav { grid-template-columns: 1fr; }
  .play-wheel { display: none; }
  .vars-row { grid-template-columns: 58px minmax(0, 1fr) 26px; }
  .vars-row [data-var-dir] { grid-column: 1; grid-row: 1; }
  .vars-row [data-var-name] { grid-column: 2; grid-row: 1; }
  .vars-row [data-var-remove] { grid-column: 3; grid-row: 1; align-self: stretch; }
  .vars-row [data-var-value] { grid-column: 1 / -1; grid-row: 2; }
}

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

/* === FREE AI CATALOG (страница /ai/) === */
.ai-section { padding-top: 56px; }
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.ai-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.35s ease;
}
.ai-card:hover,
.ai-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.ai-card__cover {
  display: block;
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.ai-card__art {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ai-card:hover .ai-card__art { transform: scale(1.05); }
.ai-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}
.ai-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-card__top .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.ai-card:hover .ai-card__top .icon { transform: translate(2px, -2px); }
.ai-card__title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.ai-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  flex: 1;
}

/* тизер категории на главной */
.ai-teaser {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.ai-teaser:hover { border-color: var(--accent); background: var(--bg-elev); }
.ai-teaser__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.ai-teaser__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.ai-teaser__text { flex: 1; min-width: 240px; color: var(--muted); font-size: 0.88rem; }
.ai-teaser__go {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .ai-grid { grid-template-columns: 1fr; gap: 16px; }
  .ai-teaser { padding: 16px 18px; }
  .ai-teaser__text { min-width: 0; }
}
.nav-ext { margin-left: 4px; font-size: 0.9em; opacity: 0.6; }

/* Навигация: седьмой пункт требует больше места на средних экранах */
@media (max-width: 1220px) {
  .nav-links { gap: 16px; font-size: 12px; }
  .nav-ext { display: none; }
}
@media (max-width: 1020px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}