/* docs/assets/style.css */
:root {
  --bg: #0b0d10;
  --surface: #12151c;
  --surface-2: #1a1e27;
  --border: #232838;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --brand: #4cc38a;
  --brand-2: #2d8af0;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px #00000059;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  position: sticky;
  z-index: 50;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  background: #0b0d10d9;
  top: 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  max-width: 1100px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  color: var(--text);
  display: flex;
  align-items:  center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.logo span {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 6px;
  width: 28px;
  height: 28px;
}

.links {
  display: flex;
  list-style: none;
  align-items:  center;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.links a {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
}

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

.links a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  letter-spacing: -.04em;
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.hero p {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 1.25rem;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  border: 1px solid #0000;
  border-radius: 999px;
  align-items:  center;
  gap: 8px;
  padding: 12px 22px;
  transition: transform .15s, box-shadow .15s;
  font-size: .95rem;
  font-weight: 600;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04120a;
  box-shadow: 0 6px 18px #2d8af040;
}

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

section {
  margin-top: 72px;
}

section h2 {
  margin: 0 0 16px;
  font-size: 1.9rem;
}

section > p {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 28px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.card h3 {
  color: var(--brand);
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: .97rem;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 20px;
  padding: 32px;
}

#counter-root {
  display: flex;
  align-items:  center;
  min-height: 56px;
}

.counter {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  align-items:  center;
  gap: 18px;
  padding: 14px 20px;
}

.counter button {
  cursor: pointer;
  background: var(--brand);
  color: #04120a;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: filter .15s;
  font-size: 1.35rem;
  font-weight: 700;
}

.counter button:hover {
  filter: brightness(1.1);
}

.counter span {
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 48px;
  font-size: 1.5rem;
  font-weight: 700;
}

.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: #0d1117;
  margin: 22px 0;
}

.code-block pre {
  margin: 0;
  padding: 18px 22px;
}

.code-block code {
  white-space: pre;
  tab-size: 2;
  background: none;
  padding: 0;
  font-family: JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.6;
}

.hljs {
  background: none;
}

.note {
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  background: #4cc38a14;
  padding: 14px 18px;
  font-size: .95rem;
}

.api-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items:  start;
  gap: 32px;
}

.toc {
  position: sticky;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  top: 88px;
}

.toc h3 {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 12px;
  font-size: .9rem;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li + li {
  margin-top: 8px;
}

.toc ul ul {
  border-left: 1px solid var(--border);
  margin: 6px 0 2px 14px;
  padding-left: 12px;
}

.toc ul ul li + li {
  margin-top: 6px;
}

.toc ul ul a {
  font-size: .88rem;
}

.toc a {
  color: var(--muted);
  font-size: .92rem;
}

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

.api-section h3 {
  color: var(--brand);
  margin-top: 0;
}

.api-section h4 {
  color: var(--text);
  margin: 24px 0 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: .95rem;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

td code {
  color: var(--brand);
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  padding: 40px 24px;
  font-size: .9rem;
}

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

  .toc {
    position: static;
  }

  .links {
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .links {
    display: none;
  }
}
