/* docs-site developer documentation layout — sidebar + content */

/* ---------- docs shell ---------- */
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
}
@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; }
}

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--ink);
  padding: 20px 0;
  font-size: 0.8125rem;
  background: var(--paper);
  z-index: 10;
}
/* overlay must not participate in grid flow */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 9;
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px;
    transition: left 220ms ease;
    box-shadow: none;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  }
  .sidebar-overlay.open { display: block; }
}

.sidebar-brand {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  font-family: var(--sans-display);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.1;
  letter-spacing: 0;
}
.sidebar-brand a { text-decoration: none; color: inherit; }
.sidebar-brand .sq {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--accent);
  margin-left: 0.08em;
  vertical-align: 0.15em;
}

/* search */
.sidebar-search {
  padding: 0 16px 14px;
}
.sidebar-search input {
  width: 100%;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.sidebar-search input:focus {
  border-color: var(--ink);
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-results li { padding: 0; }
.search-results a {
  display: block;
  padding: 6px 20px;
  font-size: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.search-results a:hover {
  background: #f1efe9;
  border-left-color: var(--accent);
}
.search-results .match {
  color: var(--accent);
  font-weight: 700;
}
.search-empty {
  padding: 8px 20px;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* nav groups */
.nav-group { margin-bottom: 4px; }
.nav-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  letter-spacing: 0;
}
.nav-group-label:hover { color: var(--ink); }
.nav-group-label .chevron {
  font-size: 0.625rem;
  transition: transform 180ms ease;
}
.nav-group.collapsed .chevron { transform: rotate(-90deg); }
.nav-group.collapsed .nav-items { display: none; }

.nav-items { list-style: none; margin: 0; padding: 0; }
.nav-items a {
  display: block;
  padding: 5px 20px 5px 28px;
  font-size: 0.8125rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.5;
}
.nav-items a:hover {
  background: #f1efe9;
}
.nav-items a.active {
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  background: #f4f2ec;
}

/* mobile hamburger */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
@media (max-width: 860px) {
  .sidebar-toggle { display: block; }
}

/* ---------- content area ---------- */
.docs-content {
  min-width: 0;
}

/* collapsible full spec */
details {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
}
details summary {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  cursor: pointer;
  user-select: none;
  background: #f4f2ec;
  border-bottom: 1px solid var(--line);
}
details summary:hover { background: #eae8e0; }
details[open] summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { padding: 0 16px; }

/* ---------- enhanced skill page components ---------- */
.lede {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
  line-height: 1.6;
}
.evidence {
  margin: 20px 0 28px;
  padding: 16px 20px;
  background: #f4f2ec;
  border-left: 3px solid var(--accent);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.evidence strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--accent);
}
.key { font-weight: 700; white-space: nowrap; }

/* page navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
.page-nav a {
  color: var(--ink);
  text-decoration: none;
}
.page-nav a:hover {
  color: var(--accent);
}

/* problem cards */
.problem-card {
  margin: 12px 0;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.problem-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  color: var(--ink);
}
.problem-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* LLM failure mode analysis */
.llm-analysis {
  margin: 20px 0 28px;
  padding: 16px 20px;
  background: #f9f6f0;
  border-left: 3px solid var(--ink);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.llm-analysis strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink);
}
.llm-analysis p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}
.llm-analysis p:last-child {
  margin-bottom: 0;
}
