:root {
  --bg-paper: #f0ebe3;
  --bg-card: #faf8f5;
  --bg-muted: #e8e2d8;
  --text: #1a1a1a;
  --text-soft: #5a5a5a;
  --text-muted: #8a8a8a;
  --border: #d4cfc6;
  --border-soft: #e4ded4;
  --accent: #3B9FC0;
  --accent-ink: #2d8aaa;
  --radius: 10px;
  --radius-sm: 5px;
}

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

html, body { background: var(--bg-paper); color: var(--text); }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.55;
  font-size: 17px;
}

code, .mono {
  font-family: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
}

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

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 32px 60px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero-left {
  flex: 1;
  min-width: 0;
}

.hero-right {
  flex-shrink: 0;
  width: 340px;
}

.kicker {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero-stat {
  font-size: 19px;
  color: var(--text-soft);
  margin-bottom: 32px;
}

.hero-stat strong {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-weight: 700;
  color: var(--accent);
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ── Toggle card ──────────────────────────────────────────────────── */
.toggle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-label {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.toggle-switch {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  position: relative;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: #fff;
  top: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch.on {
  background: #34c759;
}

.toggle-switch.on::after {
  right: 2px;
}

.toggle-switch.off {
  background: #ccc;
}

.toggle-switch.off::after {
  left: 2px;
}

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-right {
    width: 100%;
    max-width: 340px;
  }
  .hero-cta {
    justify-content: center;
  }
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms ease;
  border: 1px solid transparent;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text);
}

.btn-large {
  font-size: 18px;
  padding: 16px 32px;
}

.hero-note {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Search bar ───────────────────────────────────────────────────── */
.search-bar {
  position: sticky;
  top: 0;
  background: rgba(240,235,227,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  padding: 16px 32px;
}

.search-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-inner input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-inner input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,159,192,0.15);
}

.search-count {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ── Table of contents ────────────────────────────────────────────── */
.toc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  transition: all 160ms ease;
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.toc-count {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-paper);
  padding: 1px 7px;
  border-radius: 999px;
}

/* ── Catalog ──────────────────────────────────────────────────────── */
.catalog {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.group {
  margin-bottom: 56px;
  scroll-margin-top: 84px;
}

.group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.group-header h2 {
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.group-domain {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.group-count {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.setting {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.setting:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 14px rgba(0,0,0,0.04);
}

.setting header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.setting h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.type {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--text-muted);
  background: var(--bg-paper);
  flex-shrink: 0;
}

.type-bool { color: var(--accent-ink); }
.type-string { color: #8a6d3b; }
.type-int, .type-float { color: #6b4e7a; }
.type-array, .type-dict { color: #4a6b55; }

.desc {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.5;
}

.intent {
  font-family: 'Outfit', sans-serif;
  color: var(--text-soft);
  background: var(--bg-paper);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.55;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.cmds {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-paper);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 7px 10px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
}

.cmd-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 38px;
}

.cmd code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--text);
}

.cmd code::-webkit-scrollbar { display: none; }

.copy {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  cursor: pointer;
}

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

.key-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.key-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-key {
  color: var(--text);
  font-weight: 700;
}

/* ── Download CTA ─────────────────────────────────────────────────── */
.download {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  padding: 80px 32px;
}

.download-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.download h2 {
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 600;
  margin-bottom: 16px;
}

.download p {
  font-size: 19px;
  color: var(--text-soft);
  margin-bottom: 28px;
}

.download-note {
  margin-top: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 32px;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-ego {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 640px) {
  .hero { padding: 60px 20px 40px; }
  .hero-stats { gap: 28px; }
  .hero-stats strong { font-size: 32px; }
  .settings { grid-template-columns: 1fr; }
}
