/* Vireo docs — loaded after style.css on /docs/ pages only.
   Marketing pages never load this file (or any JavaScript). */

/* ---------- docs subheader: breadcrumb + search ---------- */

.docs-subheader {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.docs-subheader .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 52px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.docs-breadcrumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-breadcrumb a { color: var(--text-dim); text-decoration: none; }
.docs-breadcrumb a:hover { color: var(--text); }
.docs-breadcrumb span[aria-current] { color: var(--text); }
.docs-breadcrumb > span { margin: 0 0.35em; }

.docs-search {
  margin-left: auto;
  position: relative;
  flex: 0 1 340px;
}
.docs-search input {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  outline: none;
}
.docs-search input::placeholder { color: var(--text-faint); }
.docs-search input:focus { border-color: var(--blue); }
.docs-search ul {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-height: 60vh;
  overflow-y: auto;
}
.docs-search li { margin: 0; }
.docs-search li a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 5px;
  text-decoration: none;
  color: var(--text-dim);
  line-height: 1.35;
}
.docs-search li a strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.docs-search li a strong em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-left: 0.6em;
}
.docs-search li a span { font-size: 0.85rem; }
.docs-search li a:hover,
.docs-search li.is-active a {
  background: var(--bg-inset);
  color: var(--text-dim);
}
.docs-search li.is-active a { outline: 1px solid var(--border-strong); }
.docs-search .docs-search-empty {
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- code ---------- */

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}
.prose pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  max-width: var(--measure);
  margin: 0 0 1.2em;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* ---------- reference tables ---------- */

.docs-table {
  width: 100%;
  max-width: 46rem;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.92rem;
}
.docs-table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  padding: 0.5rem 0.9rem 0.5rem 0;
  border-bottom: 1px solid var(--border-strong);
}
.docs-table td {
  color: var(--text-dim);
  padding: 0.55rem 0.9rem 0.55rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-table td:first-child { white-space: nowrap; }
.docs-table-scroll { overflow-x: auto; }
.docs-settings-hint {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: -0.6em;
}

/* ---------- landing page ---------- */

.docs-guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}
.docs-guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
}
.docs-guide-card:hover { border-color: var(--border-strong); }
.docs-guide-card strong { color: var(--text); font-weight: 600; }
.docs-guide-card span { color: var(--text-dim); font-size: 0.88rem; line-height: 1.45; }

.docs-cats {
  list-style: none;
  padding: 0;
  margin: 0 0 2.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.5rem;
  max-width: none;
}
.docs-cats li { margin: 0; }
.docs-cats a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  height: 100%;
}
.docs-cats a:hover { border-color: var(--border-strong); background: var(--bg-raised); }
.docs-cats strong { color: var(--text); font-weight: 600; font-size: 0.98rem; }
.docs-cats span { color: var(--text-faint); font-size: 0.82rem; line-height: 1.4; }

/* ---------- node page ---------- */

.docs-kicker { margin: 0; }
.docs-kicker .tag { text-decoration: none; }
.docs-kicker .tag:hover { color: var(--text); }
.docs-related {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.docs-related li { margin: 0; }
.docs-related a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.docs-related a:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- formulas page ---------- */

.docs-fn { margin-bottom: 2.4rem; }
.docs-fn h3 { margin-bottom: 0.5rem; }
.docs-fn h3 a { color: var(--text); text-decoration: none; }
.docs-fn h3 a:hover { color: var(--blue-bright); }
.docs-signature { margin-bottom: 0.9em; }

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .docs-subheader .wrap { flex-wrap: wrap; gap: 0.5rem; }
  .docs-search { flex-basis: 100%; margin-left: 0; }
  .docs-table { display: block; overflow-x: auto; }
}
