/* hise-docs.css — layout, typography, and components for hise-docs.html */

:root {
  --docs-aifi-blue: #003057;
  --docs-text: #1a1a1a;
  --docs-muted: #6c757d;
  --docs-border: #e5e7eb;
  --docs-bg-subtle: #f8f9fa;
  --docs-header-height: 64px;
  --docs-sidebar-left-width: 280px;
  --docs-sidebar-right-width: 240px;
  --docs-content-max-width: 760px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--docs-text);
  margin: 0;
}

code, pre {
  font-family: 'Roboto Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
}

/* Header */
.docs-header {
  position: sticky; top: 0; z-index: 1020;
  background: #fff;
  border-bottom: 1px solid var(--docs-border);
  height: var(--docs-header-height);
}
.docs-header-inner {
  display: flex; align-items: center; gap: 32px;
  height: 100%; padding: 0 24px;
  max-width: 1600px; margin: 0 auto;
}
.docs-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--docs-aifi-blue);
}
.docs-brand-text { font-weight: 600; font-size: 18px; }
.docs-search { position: relative; flex: 0 1 320px; margin-left: auto; }
.docs-search input {
  width: 100%; padding: 8px 12px 8px 36px;
  border: 1px solid var(--docs-border); border-radius: 6px; font: inherit;
}
.docs-search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--docs-muted);
}

/* Three-column shell */
.docs-shell {
  display: grid;
  grid-template-columns: var(--docs-sidebar-left-width) minmax(0, 1fr) var(--docs-sidebar-right-width);
  gap: 32px;
  max-width: 1600px; margin: 0 auto; padding: 0 24px;
}
.docs-sidebar-left, .docs-sidebar-right {
  position: sticky; top: calc(var(--docs-header-height) + 16px);
  height: calc(100vh - var(--docs-header-height) - 32px);
  overflow-y: auto; padding-top: 24px;
}
.docs-main { padding: 24px 0 64px; min-width: 0; }
.docs-content { max-width: var(--docs-content-max-width); }

.docs-content h1 { font-size: 2.25rem; font-weight: 700; margin-top: 0; }
.docs-content h2 { font-size: 1.75rem; font-weight: 600; margin-top: 2.5rem; }
.docs-content h3 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; }
.docs-content p { margin: 0 0 1rem; }
.docs-content a { color: var(--docs-aifi-blue); }
.docs-content pre {
  background: var(--docs-bg-subtle); padding: 16px;
  border-radius: 6px; overflow-x: auto;
}

/* Left sidebar — Docs nav */
.docs-nav-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--docs-muted); margin: 0 0 12px;
}
.docs-nav { list-style: none; padding: 0; margin: 0; }
.docs-nav .docs-nav { padding-left: 16px; }
.docs-nav-link {
  display: block; padding: 6px 8px;
  color: var(--docs-text); text-decoration: none;
  border-radius: 4px; font-size: 14px;
}
.docs-nav-link:hover { background: var(--docs-bg-subtle); }
.docs-nav-item--active > .docs-nav-link {
  background: var(--docs-bg-subtle); color: var(--docs-aifi-blue); font-weight: 500;
}

/* Right sidebar — On this page */
.docs-toc h2 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--docs-muted); margin-bottom: 12px;
}
.docs-toc ul { list-style: none; padding: 0; margin: 0; }
.docs-toc li { margin: 4px 0; }
.docs-toc a {
  color: var(--docs-muted); text-decoration: none; font-size: 14px;
  display: block; padding: 4px 8px; border-left: 2px solid transparent;
}
.docs-toc a.active { color: var(--docs-aifi-blue); border-left-color: var(--docs-aifi-blue); }
.docs-toc--hidden { display: none; }

/* Footer */
.docs-footer {
  background: var(--docs-bg-subtle);
  border-top: 1px solid var(--docs-border);
  padding: 24px; margin-top: 64px;
}
.docs-footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1600px; margin: 0 auto;
  color: var(--docs-muted); font-size: 14px;
}
.docs-footer a { color: var(--docs-aifi-blue); }

/* Prev/Next */
.docs-prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--docs-border);
}
.docs-prevnext a {
  display: block; padding: 16px;
  border: 1px solid var(--docs-border); border-radius: 6px;
  text-decoration: none; color: var(--docs-text);
}
.docs-prevnext a:hover { border-color: var(--docs-aifi-blue); }
.docs-prevnext .label {
  font-size: 12px; text-transform: uppercase;
  color: var(--docs-muted); letter-spacing: 0.05em;
  display: block;
}
.docs-prevnext .docs-prevnext-next { text-align: right; }

/* Breakpoints */
@media (max-width: 1200px) {
  .docs-shell { grid-template-columns: var(--docs-sidebar-left-width) minmax(0, 1fr); }
  .docs-sidebar-right { display: none; }
}
@media (max-width: 992px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar-left { display: none; }
}
