/* CarbonFish documentation — two-column layout */
:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8eef5;
  --muted: #9aacbd;
  --accent: #5eb8ff;
  --accent-dim: #3d7ab0;
  --code-bg: #121820;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

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

.doc-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 100vh;
}

.doc-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 1rem 2rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.doc-brand {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.doc-brand img {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
}

.doc-brand h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.doc-brand p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.doc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.doc-nav h2 {
  margin: 1rem 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.doc-nav h2:first-child {
  margin-top: 0;
}

.doc-nav a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}
.doc-nav a:hover {
  background: rgba(94, 184, 255, 0.08);
  text-decoration: none;
  color: var(--accent);
}

.doc-nav a.is-active {
  background: rgba(94, 184, 255, 0.12);
  color: var(--accent);
}

.doc-main {
  padding: 2rem 2.5rem 4rem;
  max-width: 52rem;
}

.doc-main h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.doc-main h2:first-of-type {
  margin-top: 0;
}

.doc-main h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #c5d4e4;
}

.doc-main p {
  margin: 0.65rem 0;
  color: #c8d4e0;
}

.doc-main ul,
.doc-main ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.35rem;
  color: #c8d4e0;
}

.doc-main li {
  margin: 0.35rem 0;
}

.doc-main code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.doc-main pre {
  margin: 0.75rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.doc-ref {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
}

.doc-ref strong {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.doc-ref ul {
  margin: 0.5rem 0 0;
  list-style: none;
  padding: 0;
}

.doc-ref li {
  margin: 0.35rem 0;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: relative;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .doc-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.35rem;
  }

  .doc-nav h2 {
    grid-column: 1 / -1;
  }

  .doc-main {
    padding: 1.5rem 1.25rem 3rem;
  }
}
