/* Docs layout — builds on the landing styles.css design system. */

/* Solid nav (docs pages have no scroll-state JS) */
.docs-body .nav {
  background: rgba(8, 14, 22, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.docs-body .nav-links { margin-left: auto; }
.docs-body .nav-links a.active { color: var(--text); background: var(--panel-2); }

/* Copy buttons (shared markup with the landing brew chip) */
.copy {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.copy:hover { color: var(--text); border-color: var(--border-hi); background: var(--panel-3); }

/* Code blocks (styles.css only ships .code-head; supply the frame + pre) */
.code-block {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(4, 9, 15, 0.7);
  overflow: hidden;
}
.code-block .code-head span { font-size: 0.8rem; color: var(--text-mut); font-weight: 600; }
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cfe0ef;
}

.docs-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: 61px;
  align-self: start;
  height: calc(100vh - 61px);
  overflow-y: auto;
  padding: 30px 18px 60px;
  border-right: 1px solid var(--border);
}
.docs-nav-group { margin-bottom: 22px; }
.docs-nav-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin: 0 10px 8px;
}
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.docs-nav li a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.docs-nav li a.active {
  background: linear-gradient(135deg, rgba(43,108,176,0.16), rgba(246,134,58,0.12));
  color: var(--text);
  font-weight: 600;
}

.docs-content { padding: 40px clamp(20px, 4vw, 56px) 90px; min-width: 0; }
.docs-article { max-width: 760px; }
.docs-article h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin: 0 0 14px; }
.docs-article h2 {
  font-size: 1.4rem;
  margin: 40px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.docs-article h3 { font-size: 1.1rem; margin: 26px 0 8px; }
.docs-article p, .docs-article li { color: var(--text); }
.docs-article .page-lead { font-size: 1.15rem; color: var(--text-dim); margin: 0 0 8px; }
.docs-article ul, .docs-article ol { padding-left: 22px; }
.docs-article li { margin: 6px 0; }
.docs-article a { font-weight: 500; }
.docs-article code {
  background: rgba(255,255,255,0.08);
  padding: 1.5px 6px;
  border-radius: 5px;
  font-size: 0.86em;
  font-family: var(--mono);
}
.docs-article .code-block code { background: none; padding: 0; }
.docs-article .code-block { margin: 16px 0; }

/* Callouts */
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 0.95rem;
}
.callout div { min-width: 0; }
.callout-tag {
  flex: none;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
}
.callout-tip { border-color: rgba(40,170,90,0.35); }
.callout-tip .callout-tag { background: linear-gradient(135deg, #2b9d5a, #1f8f7a); }
.callout-note { border-color: rgba(43,108,176,0.35); }
.callout-note .callout-tag { background: linear-gradient(135deg, var(--steel), var(--navy)); }
.callout-warn { border-color: rgba(246,134,58,0.45); }
.callout-warn .callout-tag { background: linear-gradient(135deg, var(--crane), #d2641f); }

.docs-foot {
  max-width: 760px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.docs-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: fixed;
    top: 61px; left: 0;
    width: 280px;
    max-width: 84vw;
    background: var(--bg);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 40;
    box-shadow: var(--shadow-window);
  }
  .docs-sidebar.open { transform: none; }
  .docs-menu-btn { display: inline-flex; }
  .nav-links { display: none; }
}
