/* ...existing styles... */
:root {
  --bg: #ffffff;
  --fg: #0b0b0b;
  --muted: #6b7280;
  --card: #f7f7f8;
  --border: #e5e7eb;
  --accent: #111827;
  --accent-2: #1f2937;
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --radius: 14px;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Noto Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
:root.dark {
  --bg: #0b0b0b;
  --fg: #f3f4f6;
  --muted: #9ca3af;
  --card: #141414;
  --border: #232323;
  --accent: #f9fafb;
  --accent-2: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* Header */
.site-header {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px); align-items: center;
  position: sticky; top: 0; background: var(--bg); z-index: 30; border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-family: var(--mono); font-weight: 700;
}
h1 { font-size: clamp(20px, 3.4vw, 34px); margin: 0; letter-spacing: -0.02em; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; }

.actions { display: flex; gap: 10px; align-items: center; }
.search input {
  background: var(--card); border: 1px solid var(--border); color: var(--fg);
  padding: 10px 12px; border-radius: 12px; width: min(56vw, 380px); outline: none;
}
.search input::placeholder { color: var(--muted); }
.icon-btn {
  height: 40px; min-width: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--fg); cursor: pointer; transition: transform .12s ease, background .2s ease;
}
.icon-btn:hover { transform: translateY(-1px); }

/* Sticky nav */
.sticky-nav {
  position: sticky; top: 76px; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sticky-nav ul {
  display: grid; grid-auto-flow: column; gap: 10px; list-style: none; margin: 0;
  padding: 10px clamp(16px, 4vw, 40px);
  overflow: auto; scrollbar-width: thin;
}
.sticky-nav a {
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); white-space: nowrap; transition: color .2s, border-color .2s;
}
.sticky-nav a.active { color: var(--accent); border-color: var(--accent-2); }
.progress { height: 3px; background: transparent; }
.progress .bar { height: 100%; width: 0%; background: var(--accent); transition: width .2s ease; }

/* Content */
.content {
  padding: 24px clamp(16px, 4vw, 40px) 60px;
  display: grid; gap: 20px; grid-template-columns: repeat(12, 1fr);
}
.section-card {
  grid-column: 1 / -1;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: clip; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .4s ease, transform .4s ease;
}
.section-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.section-header {
  display: flex; gap: 16px; align-items: center; padding: 18px 18px 0 18px;
}
.section-header .badge {
  font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px dashed var(--border);
  padding: 6px 8px; border-radius: 8px; background: transparent;
}
.section-body { padding: 8px 18px 18px 18px; display: grid; gap: 14px; }
.section-title { margin: 8px 0 0 0; font-size: clamp(18px, 2.2vw, 24px); }

/* Grids inside */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 8px;
}
.card h4 { margin: 0; font-size: 16px; }
.mono { font-family: var(--mono); font-size: 15px; }
.muted { color: var(--muted); }

/* Playground */
.playground { display: grid; gap: 10px; }
.inputs { display: flex; gap: 8px; }
.inputs input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg);
}
.controls { display: flex; gap: 8px; flex-wrap: wrap; }
.controls button {
  border: 1px solid var(--border); background: var(--bg); color: var(--fg);
  padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: transform .12s ease;
}
.controls button:hover { transform: translateY(-1px); }

/* Quiz */
.quiz { display: grid; gap: 8px; }
.quiz .q { font-weight: 600; }
.quiz .options { display: flex; gap: 8px; flex-wrap: wrap; }
.quiz .options button { border-radius: 999px; padding: 8px 12px; }
.feedback { font-size: 14px; }
.feedback.ok { color: #10b981; }
.feedback.no { color: #ef4444; }

/* Utilities */
.kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
hr.sep { border: none; height: 1px; background: var(--border); margin: 6px 0; }

/* Responsive columns for section-card content (optional) */
.section-card .grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Footer */
.site-footer { padding: 30px clamp(16px, 4vw, 40px); color: var(--muted); border-top: 1px solid var(--border); }
/* ...existing styles... */

