/* VAAS-X site navigation v2: the docs sidebar (same look as the app's sidebar), breadcrumbs, and small header additions.
   Additive: loaded after style.css, uses its variables. Nothing here changes a page that does not use these classes. */

.nav-menu a.nav-ext::after { content: " \2197"; font-size: 0.85em; opacity: 0.8; }

/* ---- docs shell: sidebar + content ---- */
.docs-shell {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 2rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  align-items: start;
}
.docs-side {
  position: sticky;
  top: 5.25rem;
  max-height: calc(100vh - 6.25rem);
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}
.docs-menu > summary {
  display: none;
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--dark-bg-2);
  color: var(--text-primary);
  font-weight: 600;
}
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary::after { content: "\25BE"; float: right; opacity: 0.7; }
.docs-menu[open] > summary::after { content: "\25B4"; }

.side-group h4 {
  margin: 1.15rem 0 0.35rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.side-group:first-child h4 { margin-top: 0.2rem; }
.side-group ul { list-style: none; margin: 0; padding: 0; }
.side-group li { margin: 0.1rem 0; }
.side-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.side-link:hover { background: var(--dark-bg-3); color: var(--text-primary); }
.side-link:focus-visible,
.docs-menu > summary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.side-link[aria-current="page"] {
  color: var(--text-primary);
  border-color: rgba(255, 43, 69, 0.55);
  background: linear-gradient(90deg, rgba(255, 43, 69, 0.16), rgba(255, 43, 69, 0.04));
}
.side-link[aria-current="page"] .nav-ic { color: var(--primary-color); }
.side-link.ext::after { content: "\2197"; margin-left: auto; opacity: 0.7; }
.nav-ic { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.side-sub { margin: 0.1rem 0 0.3rem 1.25rem; padding-left: 0.6rem; border-left: 1px solid var(--border-color); }
.side-sub .side-link { padding: 0.35rem 0.6rem; font-size: 0.85rem; }

/* ---- content column ---- */
.docs-main { min-width: 0; }
.crumbs { margin: 0 0 1rem; font-size: 0.82rem; color: var(--text-secondary); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 0.4rem; opacity: 0.6; }
.docs-main > section:first-of-type.hero { padding-top: 1.5rem; }
.docs-main .container { max-width: none; padding-left: 0; padding-right: 0; }
.docs-main .hero, .docs-main .hero-content, .docs-main .hero-title, .docs-main .hero-subtitle,
.docs-main .section-title, .docs-main .section-subtitle { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
.docs-main .hero-title { font-size: clamp(2rem, 4vw, 2.9rem); }
.docs-main .hero-cta { justify-content: flex-start; }
.docs-main pre, .docs-main table { max-width: 100%; overflow-x: auto; }
.docs-main table { display: block; }

/* ---- hub cards (docs overview) ---- */
.hub-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.9rem; }
.hub-links a { color: var(--primary-color); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.hub-links a:hover { text-decoration: underline; }

/* ---- footer: link groups stay readable at any width ---- */
.footer-grid { gap: 2rem; }

@media (max-width: 900px) {
  .docs-shell { grid-template-columns: minmax(0, 1fr); padding: 1rem 1rem 2.5rem; gap: 1rem; }
  .docs-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .docs-menu > summary { display: block; }
  .docs-menu[open] > summary { margin-bottom: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) { .side-link { transition: none; } }

/* ---- polish: dark scrollbar, tighter hero, readable links in the docs area ---- */
.docs-side { scrollbar-color: #2d2d35 transparent; }
.docs-side::-webkit-scrollbar { width: 8px; }
.docs-side::-webkit-scrollbar-thumb { background: #2d2d35; border-radius: 8px; }
.docs-main .hero { padding-top: 1rem; padding-bottom: 1.25rem; min-height: 0; }
.docs-main a:not([class]) { color: var(--primary-color); }
.docs-main a:not([class]):hover { text-decoration: underline; }

/* ---- the four-ways cards sit 2 x 2, one column on a phone; plain links in section text are readable on dark ---- */
.products-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .products-grid.four { grid-template-columns: minmax(0, 1fr); } }
.section-subtitle a:not([class]) { color: var(--primary-color); }
.section-subtitle a:not([class]):hover { text-decoration: underline; }
.docs-main .products { padding-top: 1.25rem; }
