@import url("./public.css");

.docs-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 44px 20px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.docs-toc { min-width: 0; }
.docs-home { display: none; }
.docs-nav { display: grid; gap: 2px; }

.docs-toc__summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.docs-toc__summary::-webkit-details-marker { display: none; }
.docs-toc__summary::after { content: "▾"; font-size: 0.75em; }
.docs-toc__details[open] .docs-toc__summary::after { transform: rotate(180deg); }
.docs-toc__details .docs-nav { margin-top: 12px; }

.docs-nav__group {
  margin: 18px 0 6px;
  color: var(--ink-mute);
  font: 500 11px var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.docs-nav__group:first-child { margin-top: 0; }
.docs-nav a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}
.docs-nav a:hover { background: var(--cream-deep); color: var(--ink); }

.docs-main { min-width: 0; }
.docs-article { width: min(720px, 100%); }
.docs-article > .eyebrow,
.docs-section .eyebrow { margin: 0 0 8px; color: #a96f40; font: 500 13px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.docs-article h1 {
  max-width: 14ch;
  margin: 0 0 18px;
  font: 600 clamp(2.6rem, 7vw, 4.6rem)/0.98 var(--font-display);
  letter-spacing: -0.02em;
}
.docs-lead { margin: 0; color: var(--ink-soft); font-size: 1.18rem; line-height: 1.6; }

.docs-section {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.docs-section h2 { margin: 0 0 14px; font: 600 1.65rem/1.15 var(--font-display); }
.docs-section--lead h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.docs-section h3 { margin: 28px 0 8px; font: 600 1.2rem/1.2 var(--font-display); }
.docs-article p { margin: 0 0 15px; font-size: 1rem; line-height: 1.68; }
.docs-article ul,
.docs-article ol { margin: 0 0 15px; padding-left: 22px; }
.docs-article li { margin: 5px 0; line-height: 1.65; }
.docs-article a { color: var(--accent); font-weight: 700; text-decoration: none; }
.docs-article a:hover { text-decoration: underline; }
.docs-article code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--cream-deep);
  font-family: var(--font-mono);
  font-size: 0.84em;
}
.docs-article pre {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  overflow-x: auto;
}
.docs-article pre code { padding: 0; background: none; color: var(--ink); line-height: 1.55; }
.docs-note {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 13px 13px 0;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.95rem !important;
}
.docs-table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 0.94rem; }
.docs-table th,
.docs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.docs-table thead th { color: var(--ink-soft); font: 500 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.docs-table td:first-child { white-space: nowrap; font-weight: 700; }
.docs-table code { white-space: nowrap; }
.docs-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line-strong); }

@media (min-width: 880px) {
  .docs-shell { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 52px; }
  .docs-toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
  .docs-toc__summary { padding: 0; border: 0; color: var(--ink-mute); font: 500 11px var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; pointer-events: none; }
  .docs-toc__summary::after { content: none; }
  .docs-toc__details > .docs-nav { display: grid; margin-top: 12px; }
}

@media (max-width: 640px) {
  .docs-shell { padding-top: 24px; }
  .docs-table { display: block; overflow-x: auto; }
  .docs-article h1 { font-size: clamp(2.35rem, 13vw, 3.4rem); }
}
