:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #21262d;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #7aa2f7;
  --accent2: #9ece6a;
  --accent3: #bb9af7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", "JetBrains Mono", monospace;
  --glow: rgba(122, 162, 247, 0.15);
  --glow-strong: rgba(122, 162, 247, 0.3);
  --gradient-card: linear-gradient(145deg, rgba(122, 162, 247, 0.04) 0%, transparent 60%);
  --blur-bg: rgba(13, 17, 23, 0.82);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blur-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 1px 0 0 rgba(122, 162, 247, 0.12),
    0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  position: relative;
}

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

.nav-logo svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(122, 162, 247, 0.4));
}
.nav-logo-svg {
  fill: none;
  width: 24px;
  height: 24px;
}

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

.nav-links a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition:
    color 0.15s,
    background 0.15s;
  position: relative;
  text-decoration: none;
}

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

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 12px);
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition:
    color 0.15s,
    background 0.15s;
  text-decoration: none;
}

.btn-icon:hover {
  color: var(--text);
  background: var(--bg3);
}

.lang-toggle {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  line-height: 1.4;
}

.lang-toggle:hover {
  border-color: var(--accent);
}

/* ── Mobile nav ── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
  margin-left: auto;
}

.mobile-menu-btn:hover {
  background: var(--bg3);
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: flex;
    align-items: center;
  }
  .nav-right {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    gap: 2px;
    z-index: 200;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
  }

  .nav-links a.active::after {
    display: none;
  }
  .nav-links a.active {
    background: var(--bg3);
    color: var(--accent);
  }
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  z-index: 200;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: var(--bg3);
  color: var(--text);
}

.dropdown-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(122, 162, 247, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-logo-svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 0 14px rgba(122, 162, 247, 0.55));
}

.hero-logo-name {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

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

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Stats strip ── */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    opacity 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(122, 162, 247, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(122, 162, 247, 0.45);
}

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Section ── */
.section {
  padding: 64px 0;
}
.section + .section {
  border-top: none;
  position: relative;
}
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
}

/* ── Cards grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.card {
  background: linear-gradient(145deg, rgba(122, 162, 247, 0.03) 0%, var(--bg2) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition:
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(122, 162, 247, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(122, 162, 247, 0.07);
  text-decoration: none;
}

.card-preview {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg3);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-preview img {
  width: 100%;
  display: block;
}

.card-icon {
  font-size: 24px;
  margin-bottom: 12px;
}
.card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Preview strip ── */
.preview-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-top: 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.preview-strip img {
  height: 140px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.preview-strip img:hover {
  border-color: rgba(122, 162, 247, 0.4);
  box-shadow: 0 0 16px rgba(122, 162, 247, 0.15);
}

/* ── Steps ── */
.steps {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(122, 162, 247, 0.4);
}

.step-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step-body p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Code block ── */
.code-block {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  background: linear-gradient(90deg, var(--bg3) 0%, rgba(122, 162, 247, 0.04) 100%);
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
}

.copy-btn:hover {
  color: var(--text);
}
.copy-btn.copied {
  color: var(--accent2);
  border-color: var(--accent2);
}

/* ── Theme gallery ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.theme-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.theme-card-img img {
  width: 100%;
  display: block;
  transition: opacity 0.2s;
}

.theme-card-footer {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  background: var(--bg2);
}

.theme-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--bg3);
  color: var(--text-muted);
}

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Options table ── */
.options-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}

.options-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.options-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--accent3);
}

/* ── Playground ── */
.playground-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 32px;
}

@media (max-width: 768px) {
  .playground-layout {
    grid-template-columns: 1fr;
  }
}

.playground-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.field select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.playground-preview {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Skeleton loader ── */
.skeleton {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ── Alert boxes ── */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 3px solid;
  margin: 16px 0;
  font-size: 14px;
}

.alert-info {
  background: rgba(122, 162, 247, 0.1);
  border-color: var(--accent);
}
.alert-warn {
  background: rgba(255, 158, 100, 0.1);
  border-color: #ff9e64;
}
.alert-tip {
  background: rgba(158, 206, 106, 0.1);
  border-color: var(--accent2);
}

/* ── Comparison table ── */
.comparison {
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child {
  border-bottom: none;
}
.comparison-row:first-child {
  background: var(--bg3);
  font-weight: 600;
}

.comparison-cell {
  padding: 12px 16px;
  font-size: 14px;
}
.comparison-cell.good {
  color: var(--accent2);
}
.comparison-cell.bad {
  color: #f85149;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  border-top: none;
  padding: 32px 0;
  margin-top: 80px;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(122, 162, 247, 0.02) 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 162, 247, 0.2), transparent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}

.site-footer .footer-inner > span a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.site-footer .footer-inner > span a:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}

/* ── Preview placeholder ── */
.preview-placeholder {
  flex-shrink: 0;
  height: 140px;
  min-width: 260px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.preview-placeholder img {
  height: 140px;
  border-radius: var(--radius);
  display: block;
  width: auto;
  min-width: 260px;
  border: 1px solid var(--border);
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background:
    linear-gradient(var(--bg3), var(--bg3)) padding-box,
    linear-gradient(135deg, rgba(122, 162, 247, 0.4), rgba(187, 154, 247, 0.3)) border-box;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 9999;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s;
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Scroll reveal ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.5s ease,
      transform 0.5s ease;
  }

  .reveal--visible {
    opacity: 1;
    transform: none;
  }
}

/* ── Theme slider ── */
.theme-slider {
  text-align: center;
  margin-top: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.theme-slider img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(122, 162, 247, 0.25);
  display: block;
  margin: 0 auto;
  box-shadow:
    0 0 40px rgba(122, 162, 247, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.theme-slide-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ── Theme dots ── */
.theme-dots {
  display: flex;
  gap: 6px;
  padding: 6px 0 2px;
}
.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* ── Playground — tabs, status, user card ── */
.pg-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.pg-tab {
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  transition: color 0.15s;
}
.pg-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.pg-tab:hover:not(.active) {
  color: var(--text);
}
.pg-code-panel {
  display: none;
}
.pg-code-panel.active {
  display: block;
}
.pg-code-panel pre {
  font-size: 12px;
  word-break: break-all;
  white-space: pre-wrap;
  margin: 0;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 20px;
  font-size: 12px;
}
.user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
}
.user-name {
  color: var(--text-muted);
}
.user-name.found {
  color: var(--accent2);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.status-dot.ok {
  background: #3fb950;
}
.status-dot.err {
  background: #f85149;
}
.status-dot.warn {
  background: #e3b341;
}
.status-dot.loading {
  background: var(--accent);
  animation: pg-pulse 1s infinite;
}
@keyframes pg-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.pg-live-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-left: 6px;
}

.pg-preview-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  min-height: 18px;
}
.pg-preview-mode .status-dot {
  flex-shrink: 0;
}

.pg-user-card {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 14px 16px;
  box-sizing: border-box;
  display: none;
}
.pg-user-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pg-user-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: none;
}
.pg-user-card-name {
  font-weight: 600;
  font-size: 14px;
}
.pg-user-card-bio {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pg-user-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.pg-user-card-stats strong {
  color: var(--text);
}

.pg-copy-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.pg-copy-bar .copy-btn {
  font-size: 12px;
  padding: 3px 10px;
}

.pg-yaml-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg2);
  margin-top: 16px;
}
.pg-yaml-editor .cm-editor {
  background: transparent;
  outline: none;
}
.pg-yaml-editor .cm-focused {
  outline: none;
}
.pg-yaml-editor .cm-gutters {
  background: var(--bg3);
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  min-width: 32px;
}
.pg-yaml-editor .cm-lineNumbers .cm-gutterElement {
  padding: 0 8px;
}
.pg-yaml-editor .cm-content {
  padding: 12px 0;
  color: var(--text);
}
.pg-yaml-editor .cm-line {
  padding: 0 14px;
  line-height: 1.6;
}
.pg-yaml-editor .cm-cursor {
  border-left-color: var(--accent);
}
.pg-yaml-editor .cm-selectionBackground {
  background: rgba(122, 162, 247, 0.15) !important;
}
.pg-yaml-editor .cm-activeLineGutter {
  background: rgba(122, 162, 247, 0.06);
}
.pg-yaml-editor .cm-activeLine {
  background: rgba(122, 162, 247, 0.04);
}

.pg-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pg-data-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
}
.pg-data-badge.demo {
  background: color-mix(in srgb, var(--accent3) 16%, transparent);
  color: var(--accent3);
}
.pg-data-badge.real {
  background: color-mix(in srgb, #3fb950 18%, transparent);
  color: #3fb950;
}
.pg-data-badge.mixed {
  background: color-mix(in srgb, #e3b341 18%, transparent);
  color: #e3b341;
}
.pg-embed-pre {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  white-space: pre-wrap;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  margin-top: 6px;
}
.pg-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ── Playground check-group ── */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.check-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}
.check-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg3);
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.check-group input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-group input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #0d1117;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  padding: 0;
  border: none;
  background: none;
}
.range-value {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ── Playground segmented buttons ── */
.pg-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.pg-seg button {
  flex: 1 1 auto;
  min-width: 44px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pg-seg button:hover:not(.active) {
  border-color: var(--accent);
  color: var(--text);
}
.pg-seg button.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.pg-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.pg-toggle button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pg-toggle button:hover {
  border-color: var(--accent);
  color: var(--text);
}
.pg-toggle button.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.pg-toggle button .pg-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
  position: relative;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.pg-toggle button.active .pg-check {
  opacity: 1;
  background: currentColor;
}
.pg-toggle button.active .pg-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 4px;
  height: 8px;
  border: 2px solid var(--bg3);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── Playground YAML highlighted block ── */
.pg-yaml {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 6px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
  tab-size: 2;
}
.pg-yaml .y-key {
  color: #e3b341;
}
.pg-yaml .y-str {
  color: #9ece6a;
}
.pg-yaml .y-num {
  color: #ff9e64;
}
.pg-yaml .y-bool {
  color: #bb9af7;
}
.pg-yaml .y-dash {
  color: #565f89;
}
.pg-yaml .y-comment {
  color: #565f89;
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero {
    padding: 48px 0 40px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .comparison-row {
    grid-template-columns: 110px 1fr 1fr;
  }
  .stats-strip {
    gap: 24px;
  }
  .section {
    padding: 40px 0;
  }
}
