/* ========================================================================
   OKF Interactive Showcase – Design System
   ======================================================================== */

/* --- 1. Custom Properties --- */
:root {
  /* Colors */
  --bg:            #0a0a0a;
  --bg-alt:        #060606;
  --surface:       #141414;
  --surface-hover: #1a1a1a;
  --surface-glass: rgba(20, 20, 20, 0.72);
  --border:        #262626;
  --border-hover:  #404040;
  --text:          #e5e5e5;
  --text-muted:    #737373;
  --text-dim:      #525252;
  --accent:        #3b82f6;
  --accent-hover:  #60a5fa;
  --accent-glow:   rgba(59, 130, 246, 0.15);
  --accent-subtle: rgba(59, 130, 246, 0.08);
  --success:       #22c55e;
  --error:         #ef4444;
  --warning:       #f59e0b;
  --nav-bg:        rgba(10, 10, 10, 0.88);
  --nav-menu-bg:   rgba(10, 10, 10, 0.96);

  /* Code syntax */
  --syn-key:       #7dd3fc;
  --syn-value:     #86efac;
  --syn-string:    #fbbf24;
  --syn-comment:   #525252;
  --syn-heading:   #c4b5fd;
  --syn-link:      #60a5fa;
  --syn-tag:       #f472b6;
  --code-bg:       #111111;

  /* Typography */
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif: 'DM Serif Display', 'Georgia', serif;

  /* Spacing */
  --section-py:    clamp(4rem, 8vw, 7rem);
  --container-max: 1200px;
  --container-px:  clamp(1rem, 4vw, 2rem);

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration:   0.4s;
  --duration-fast: 0.2s;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg:            #ffffff;
  --bg-alt:        #f4f4f5;
  --surface:       #f9fafb;
  --surface-hover: #f3f4f6;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border:        #e5e7eb;
  --border-hover:  #d1d5db;
  --text:          #111827;
  --text-muted:    #4b5563;
  --text-dim:      #6b7280;
  --accent-glow:   rgba(59, 130, 246, 0.1);
  --accent-subtle: rgba(59, 130, 246, 0.05);
  --nav-bg:        rgba(255, 255, 255, 0.88);
  --nav-menu-bg:   rgba(255, 255, 255, 0.96);
  --syn-key:       #0284c7;
  --syn-value:     #16a34a;
  --syn-string:    #b45309;
  --syn-comment:   #6b7280;
  --syn-heading:   #7c3aed;
  --syn-link:      #2563eb;
  --syn-tag:       #db2777;
  --accent-hover:  #2563eb;
}

/* For code blocks that stay dark, revert syntax colors to light/pastel */
[data-theme="light"] .code-frame,
[data-theme="light"] .explorer__content-body,
[data-theme="light"] .step__code {
  --syn-key:       #7dd3fc;
  --syn-value:     #86efac;
  --syn-string:    #fbbf24;
  --syn-comment:   #525252;
  --syn-heading:   #c4b5fd;
  --syn-link:      #60a5fa;
  --syn-tag:       #f472b6;
}

/* Force code blocks to stay dark even in light mode for better contrast */
[data-theme="light"] .code-frame {
  background: #111111;
  border-color: #262626;
}
[data-theme="light"] .explorer__content-body {
  background: #111111;
}
[data-theme="light"] .code-frame__body, 
[data-theme="light"] .code-frame__title,
[data-theme="light"] .code-frame__lang,
[data-theme="light"] .explorer__content-body,
[data-theme="light"] .playground__textarea {
  color: #e5e5e5;
}
[data-theme="light"] .playground__textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
[data-theme="light"] .code-frame__header,
[data-theme="light"] .explorer__content-header,
[data-theme="light"] .playground__editor-header,
[data-theme="light"] .playground__preview-header {
  border-bottom-color: rgba(255,255,255,0.08);
  background: #161616;
}
[data-theme="light"] .file-tree-mini, [data-theme="light"] .step__code {
  background: #111111;
  color: #a3a3a3;
  border-color: #262626;
}


/* --- 2. Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--border) var(--bg);
}

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

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

::selection {
  background: var(--accent);
  color: #fff;
}


/* --- 3. Typography --- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.headline-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.mono-sm {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

code, pre {
  font-family: var(--font-mono);
}


/* --- 4. Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}


/* --- 5. Components --- */

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge--filled {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.badge--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--text);
  background: var(--surface);
}

.btn:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Glass Card */
.card {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--duration) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-bottom: 1rem;
  color: var(--accent);
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Code Block */
.code-frame {
  border: 1px solid var(--border);
  background: var(--code-bg);
  overflow: hidden;
}

.code-frame__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #161616;
}

.code-frame__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-frame__lang {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.code-frame__body {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre;
  tab-size: 2;
}

.code-frame__copy {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.code-frame__copy:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.code-frame__copy--success {
  border-color: var(--success);
  color: var(--success);
}


/* --- 6. Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: var(--bg);
}

.nav__logo-text {
  font-size: 14px;
  font-weight: 700;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text);
}

.nav__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--duration-fast);
  margin-left: 1rem;
}

.nav__theme-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.nav__mobile-btn {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text);
}

.nav__mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--border);
  background: var(--nav-menu-bg);
  backdrop-filter: blur(20px);
  padding: 1rem var(--container-px);
}

.nav__mobile-menu.is-open {
  display: block;
}

.nav__mobile-link {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.nav__mobile-link:hover { color: var(--text); }
.nav__mobile-link:last-child { border-bottom: none; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__mobile-btn { display: none; }
}


/* --- 7. Hero --- */
.hero {
  padding-top: clamp(3rem, 8vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    var(--bg);
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: end;
}

.hero__headline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.hero__headline em {
  font-style: italic;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2rem;
}

.hero__aside {
  max-width: 480px;
}

.hero__description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.75rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  margin-top: 3rem;
}

.hero__stat {
  padding: 1.25rem 0;
}

.hero__stat + .hero__stat {
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.hero__stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

/* Hero Typewriter */
.hero__code-wrapper {
  margin-top: 3rem;
}

.typewriter-block {
  position: relative;
}

.typewriter-block .code-frame__body {
  min-height: 280px;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}


/* --- 8. What is OKF --- */
.features__header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.features__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.features__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.card--feature {
  padding: 2rem;
}

.card--feature:hover .card__icon {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}


/* --- 9. Concept Explorer --- */
.explorer__header {
  max-width: 640px;
  margin-bottom: 2rem;
}

.explorer__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.explorer__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.explorer__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 400px;
}

.explorer__sidebar {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--bg);
}

.explorer__sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.file-tree { font-family: var(--font-mono); font-size: 12px; }

.file-tree__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--duration-fast);
  border-left: 2px solid transparent;
}

.file-tree__item:hover {
  color: var(--text);
  background: var(--surface);
}

.file-tree__item--active {
  color: var(--text);
  background: var(--accent-subtle);
  border-left-color: var(--accent);
}

.file-tree__item--linked {
  color: var(--accent-hover);
}

.file-tree__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

.file-tree__indent { width: 16px; flex-shrink: 0; }

.explorer__content {
  padding: 0;
  overflow: hidden;
}

.explorer__content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #161616;
}

.explorer__content-body {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre;
  min-height: 300px;
  transition: opacity 0.15s;
}

.explorer__content-body.is-switching {
  opacity: 0.3;
}

@media (min-width: 768px) {
  .explorer__panel {
    grid-template-columns: 260px 1fr;
  }

  .explorer__sidebar {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}


/* --- 10. Use Cases --- */
.usecases__header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.usecases__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.usecases__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.usecases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card--usecase {
  padding: 1.5rem;
  cursor: default;
}

.card--usecase:hover {
  border-color: var(--accent);
}

.card--usecase .card__title {
  font-size: 0.875rem;
}

.card--usecase .file-tree-mini {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre;
}

@media (min-width: 640px) {
  .usecases__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .usecases__grid { grid-template-columns: repeat(3, 1fr); }
}


/* --- 11. Playground --- */
.playground__header {
  max-width: 640px;
  margin-bottom: 2rem;
}

.playground__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.playground__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.playground__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.playground__preset {
  padding: 6px 14px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--duration-fast);
  cursor: pointer;
}

.playground__preset:hover,
.playground__preset--active {
  border-color: var(--text);
  color: var(--text);
  background: var(--surface);
}

.playground__panes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 420px;
}

.playground__editor {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.playground__editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #161616;
}

.playground__editor-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}

.playground__textarea {
  flex: 1;
  width: 100%;
  min-height: 300px;
  padding: 20px;
  border: none;
  outline: none;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
  background: var(--code-bg);
  tab-size: 2;
}

.playground__textarea::placeholder {
  color: var(--text-dim);
}

.playground__preview {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playground__preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #161616;
}

.playground__preview-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
}

/* Validation status */
.playground__status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.playground__status--valid {
  color: var(--success);
  background: rgba(34, 197, 94, 0.05);
}

.playground__status--invalid {
  color: var(--error);
  background: rgba(239, 68, 68, 0.05);
}

.playground__status--empty {
  color: var(--text-muted);
  background: transparent;
}

.playground__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Preview rendered content */
.preview-meta {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.preview-meta__table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}

.preview-meta__table td {
  padding: 4px 0;
  vertical-align: top;
}

.preview-meta__table td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--syn-key);
  width: 140px;
  padding-right: 1rem;
}

.preview-meta__table td:last-child {
  color: var(--text-muted);
}

.preview-body h1,
.preview-body h2,
.preview-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.preview-body h1 { font-size: 1.25rem; }
.preview-body h2 { font-size: 1.1rem; }
.preview-body h3 { font-size: 1rem; }

.preview-body p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.preview-body code {
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.85em;
}

.preview-body pre {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 0.75rem;
  font-size: 12px;
  line-height: 1.6;
}

.preview-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preview-body ul, .preview-body ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.preview-body li {
  margin-bottom: 0.25rem;
  list-style: disc;
}

.preview-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.preview-body th, .preview-body td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.preview-body th {
  background: var(--bg);
  font-weight: 600;
}

@media (min-width: 768px) {
  .playground__panes {
    grid-template-columns: 1fr 1fr;
  }

  .playground__editor {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}


/* --- 12. Comparison Matrix --- */
.comparison__header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.comparison__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.comparison__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.comparison__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
}

.comparison__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.comparison__table thead {
  background: #161616;
}

.comparison__table th {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.comparison__table th:first-child {
  text-align: left;
  color: var(--text);
}

.comparison__table td {
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.comparison__table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

.comparison__table tr {
  transition: background var(--duration-fast);
}

.comparison__table tbody tr:hover {
  background: var(--surface);
}

/* OKF column highlight */
.comparison__table th:nth-child(2),
.comparison__table td:nth-child(2) {
  background: var(--accent-subtle);
  color: var(--text);
  font-weight: 600;
}

.comparison__check {
  color: var(--success);
  font-weight: 700;
}

.comparison__partial {
  color: var(--warning);
}

.comparison__no {
  color: var(--text-dim);
}


/* --- 13. Getting Started --- */
.started__header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.started__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-top: 1rem;
}

.started__subtitle {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 1rem;
}

.steps {
  position: relative;
  display: grid;
  gap: 0;
}

.steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.25rem;
  padding-bottom: 2.5rem;
}

.step:last-child { padding-bottom: 0; }

.step__number {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease-out);
}

.step.is-visible .step__number {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.step__content {}

.step__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.step__code {
  padding: 12px 16px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}


/* --- 14. Footer --- */
.footer {
  border-top: 1px solid var(--text);
  background: var(--bg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
}

.footer__brand-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 360px;
}

.footer__updated {
  margin-top: 1rem;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer__link {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--text);
}

.footer__bottom {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}


/* --- 15. Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* Table row reveal */
.comparison__table tbody tr {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.comparison__table tbody tr.is-visible {
  opacity: 1;
  transform: translateX(0);
}


/* --- 16. Syntax Highlighting (inline) --- */
.syn-key     { color: var(--syn-key); }
.syn-value   { color: var(--syn-value); }
.syn-string  { color: var(--syn-string); }
.syn-comment { color: var(--syn-comment); }
.syn-heading { color: var(--syn-heading); }
.syn-link    { color: var(--syn-link); }
.syn-tag     { color: var(--syn-tag); }
.syn-delim   { color: var(--text-dim); }


/* --- 17. Miscellaneous --- */
.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;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* Glow pulse for interactive elements */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50%      { box-shadow: 0 0 24px var(--accent-glow); }
}

/* --- 18. FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color var(--duration-fast);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item summary {
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  transition: transform var(--duration-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item__content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- 19. CTA Section --- */
.cta-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  text-align: center;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--accent-subtle), transparent);
}

.cta-section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.cta-section__subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
