
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600;700&display=swap');

/* ─── Theme variables ─── */
:root {
  --font-mono: 'Fira Code', 'SF Mono', 'JetBrains Mono', 'Cascadia Code', monospace;

  --accent: #a1a1aa;
  --accent-dim: #71717a;
  --accent-subtle: rgba(161, 161, 170, 0.12);

  --bg: #0a0a0b;
  --bg-surface: #141416;
  --bg-elevated: #1a1a1e;
  --bg-hover: #222226;
  --border: #2a2a2e;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-inverse: #161616;
  --code-bg: #1a1a1e;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
      --bg: #ffffff;
      --bg-surface: #ffffff;
      --bg-elevated: #f4f4f5;
      --bg-hover: #ececee;
      --border: #e2e8f0;
      --text: #161616;
      --text-muted: #52525b;
      --text-dim: #71717a;
      --text-inverse: #e4e4e7;
      --code-bg: #f4f4f5;
      --accent: #404040;
      --accent-dim: #000000;
      --accent-subtle: rgba(64, 64, 64, 0.08);
  }
}

[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-surface: #141416;
  --bg-elevated: #1a1a1e;
  --bg-hover: #222226;
  --border: #2a2a2e;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-inverse: #161616;
  --code-bg: #1a1a1e;
  --accent: #a1a1aa;
  --accent-dim: #71717a;
  --accent-subtle: rgba(161, 161, 170, 0.12);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f4f4f5;
  --bg-hover: #ececee;
  --border: #e2e8f0;
  --text: #161616;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --text-inverse: #e4e4e7;
  --code-bg: #f4f4f5;
  --accent: #404040;
  --accent-dim: #000000;
  --accent-subtle: rgba(64, 64, 64, 0.08);
}

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

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-dim); }

/* ─── Logo dark/light switching ─── */
.logo-dark { display: none; }
.logo-light { display: block; }
@media (prefers-color-scheme: dark) {
  .logo-dark { display: block; }
  .logo-light { display: none; }
}
[data-theme="dark"] .logo-dark { display: block; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ─── Theme toggle ─── */
#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: all 0.15s;
}
#theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.site-header .logo img { height: 50px; }

.site-header nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-header nav a {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}
.site-header nav a:hover { color: var(--text); }

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero .logo-main {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}
.hero .logo-main img { width: 420px; height: auto; }

.hero .tagline {
  margin-bottom: 2.5rem;
}

.hero .tagline-main {
  font-size: 1.4rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.hero .tagline-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero .tagline-sub + .tagline-sub {
  margin-top: 0.25rem;
}

.hero .dev-notice {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  line-height: 1.5;
}
.hero .dev-notice .dev-warn {
  margin-right: 0.35rem;
  color: var(--accent);
}
.hero .dev-notice a { color: var(--text-dim); text-decoration: underline; }
.hero .dev-notice a:hover { color: var(--text-muted); }

.hero .install-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.96rem;
  line-height: 1.8;
  overflow: hidden;
}

.hero .install-block .pane { padding: 1rem 1.25rem; }

.hero .install-block .prompt { color: var(--accent); }

.hero .install-block .comment { color: var(--text-dim); font-style: italic; }

.hero .install-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.hero .install-tabs button {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.hero .install-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.hero .install-tabs button:hover { color: var(--text); }

/* ─── Features ─── */
.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.features h2 {
  font-family: var(--font-mono);
  font-size: 1.21rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 2.5rem;
  line-height: 1.6;
}



.feature-item h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── Usage ─── */
.usage {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.usage h2 {
  font-family: var(--font-mono);
  font-size: 1.21rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.usage-example {
  margin-bottom: 2rem;
}

.usage-example h3 {
  font-family: var(--font-mono);
  font-size: 0.99rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.usage-example pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.94rem;
  line-height: 1.8;
  overflow-x: auto;
}

.usage-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: all 0.15s;
  display: inline-block;
}
.usage-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer .links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.site-footer .links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer .footer-bottom {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer .footer-bottom img { height: 36px; width: auto; }

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

/* ─── Docs Layout ─── */
.docs-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  overflow-y: auto;
  background: var(--bg-surface);
}

.docs-sidebar nav { display: flex; flex-direction: column; }

.accordion-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.accordion-toggle:hover {
  color: var(--text);
}
.accordion-toggle::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.6rem;
  transition: transform 0.15s;
}
.accordion-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
.accordion-body {
  display: none;
}

.docs-sidebar a {
  display: block;
  padding: 0.35rem 1.25rem 0.35rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.12s;
}
.docs-sidebar a:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.docs-sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-subtle);
}

.sidebar-sub-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.35rem 1.25rem 0.35rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  transition: all 0.12s;
}
.sidebar-sub-toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.sidebar-sub-toggle::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.6rem;
  transition: transform 0.15s;
}
.sidebar-sub-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.accordion-body .accordion-body a {
  padding-left: 2.5rem;
}

.docs-content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 860px;
}

.docs-content h1 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.docs-content h2 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.docs-content h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.docs-content p { margin-bottom: 1rem; color: var(--text-muted); }

.docs-content a:not(.usage-link), .feature-item a:not(.usage-link), .usage a:not(.usage-link) {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.docs-content li { margin-bottom: 0.35rem; }

.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--accent-subtle);
  color: var(--text);
}

.feature-item code, .usage code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--accent-subtle);
  color: var(--text);
}

.docs-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.docs-content th, .docs-content td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.docs-content th {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
}

.docs-content td { color: var(--text-muted); }

.docs-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--accent-subtle);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.docs-content img { max-width: 100%; border-radius: 8px; }

.docs-content a code { color: var(--accent); }

/* ─── Nav toggle ─── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
    align-items: center;
  }
  .site-header.nav-open nav { display: flex; }
  .hero { padding: 4rem 1rem 3rem; }
  .hero .logo-main img { width: 300px; }
  .hero .tagline-main { font-size: 1.1rem; }
  .hero .tagline-sub { font-size: 0.85rem; }
  .docs-wrapper { flex-direction: column; }
  .docs-sidebar {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid var(--border);
      padding: 0.75rem 0;
      max-height: 200px;
  }
  .docs-content { padding: 1.5rem 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
}
