/* CyberXYZ — docs pages (docs/cli.html, docs/ci.html, docs/vscode.html)
   The docs use the product-page language from product.css: .phero hero,
   .eyebrow section tags, .section__title headings, .frame + .term code,
   .caplist numbered cards, .cmd__copy buttons, .faq and .cta. This file only
   adds the reference layout (sticky "On this page" rail + wide column),
   reference tables and the prose inside the column. */

.docs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 6vw, 84px);
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(32px, 4.5vw, 72px);
  align-items: start;
}

/* ── On this page ─────────────────────────────────────────────────── */
.docs__toc {
  position: sticky; top: 104px;
  max-height: calc(100vh - 124px); overflow-y: auto;
  padding: 22px 0 12px;
  scrollbar-width: thin;
}
.docs__toc-k {
  display: block;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: lowercase; color: var(--orange); margin: 0 0 10px 10px;
}
.docs__toc ol { list-style: none; margin: 0 0 22px; padding: 0; }
.docs__toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 10px; border-radius: 9px;
  color: var(--ink-3); font-size: 14px; line-height: 1.35; text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.docs__toc a i {
  font-style: normal; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4); min-width: 18px;
}
.docs__toc a:hover { background: var(--bg-2); color: var(--ink); }
.docs__toc a.is-active { background: var(--blue-soft); color: var(--blue); }
.docs__toc a.is-active i { color: var(--blue); }
.docs__toc-docs a { color: var(--ink-2); }
.docs__toc-docs a[aria-current="page"] { color: var(--orange); background: var(--orange-soft); }

@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs__toc {
    position: static; max-height: none; overflow: visible;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 12px 6px;
  }
  .docs__toc ol { columns: 2; column-gap: 12px; }
  .docs__toc li { break-inside: avoid; }
}
@media (max-width: 560px) { .docs__toc ol { columns: 1; } }

/* ── Sections ─────────────────────────────────────────────────────── */
.docs__body { min-width: 0; }
.docsec { padding-top: clamp(48px, 6vw, 84px); }
.docsec:first-child { padding-top: 18px; }
.docsec .section__title { margin: 18px 0 22px; }
.docsec [id], .docs-anchor { scroll-margin-top: 110px; }
.docs-anchor { display: block; height: 0; }

/* ── Prose inside the column ──────────────────────────────────────── */
.docs__body p,
.docs__body ul:not(.caplist),
.docs__body ol:not(.caplist) {
  font-size: 16px; line-height: 1.68; color: var(--ink-3); max-width: 78ch; margin: 0 0 16px;
}
.docs__body ul:not(.caplist), .docs__body ol:not(.caplist) { padding-left: 20px; }
.docs__body li { margin: 0 0 6px; }
.docs__body li::marker { color: var(--orange); }
.docs__body strong, .docs__body b { color: var(--ink); font-weight: 600; }
.docs__body h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: -.015em; color: var(--ink); margin: 38px 0 12px;
}
.docs__body a:not(.btn) { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue-line); }
.docs__body a:not(.btn):hover { border-bottom-color: var(--blue); }
.docs__body :not(pre) > code {
  font-family: var(--font-mono); font-size: .86em; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 6px; overflow-wrap: anywhere;
}
.docs__body .caplist { margin: 10px 0 22px; max-width: 900px; }
.docs__body .caplist span code { font-size: .92em; }

/* ── Code blocks: the product .frame + .term ──────────────────────── */
.docs-code { margin: 18px 0 26px; }
.docs-code:hover { transform: none; }
.docs-code .frame__tab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.docs-code .cmd__copy { margin-left: auto; }
.docs-code pre.term {
  margin: 0; padding: 18px 22px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.75;
  color: var(--ink-2); white-space: pre; overflow-x: auto;
}
.docs-code pre.term code { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.tk-k { color: var(--blue); }
.tk-c { color: var(--ink-4); font-style: italic; }
.tk-s { color: #7a3e00; }
.tk-x { color: var(--orange); font-weight: 700; }
.tk-f { color: var(--ink); font-weight: 600; }
.tk-v { color: var(--ink); font-weight: 700; }

/* job log (docs/ci.html#live): a .frame with the CI annotation strip */
.docs-joblog__ann {
  padding: 10px 18px; font-family: var(--font-mono); font-size: 12px;
  color: #991b1b; background: #fef2f2; border-bottom: 1px solid #fecaca;
}
.docs-joblog__ann b { color: #b91c1c; margin-right: 8px; }
.docs-joblog pre.term { font-size: 12.5px; line-height: 1.55; }
.joblog__block, .joblog__fail { color: #b91c1c; font-weight: 700; }
.docs-joblog__cap {
  padding: 12px 18px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-3);
  border-top: 1px solid var(--line); background: var(--white);
}

/* ── Reference tables ─────────────────────────────────────────────── */
.docs-table {
  display: block; overflow-x: auto; width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 18px 0 28px;
}
.docs-table thead, .docs-table tbody { width: 100%; }
.docs-table th {
  text-align: left; white-space: nowrap;
  font-family: var(--font-mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
  background: var(--bg-2); padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.docs-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.55; color: var(--ink-3); vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td:first-child { color: var(--ink); }

/* one-click "add to GitHub" (docs/ci.html) */
.addto {
  margin: 0 0 30px; padding: 18px 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--blue);
}
.addto__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.addto__head img { width: 26px; height: 26px; flex: none; margin-top: 2px; }
.addto__head b { display: block; font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.addto__head span { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.addto__form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addto__prefix { font-family: var(--font-mono); font-size: 13px; color: var(--ink-4); }
.addto__input {
  flex: 1 1 200px; min-width: 0; font-family: var(--font-mono); font-size: 13px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--ink);
}
.addto__input--branch { flex: 0 0 90px; }
.addto__input:focus { outline: 2px solid var(--blue-line); border-color: var(--blue); }

/* hero art on docs pages: a quick-start stack */
.docs-hero-card { display: flex; flex-direction: column; gap: 10px; }
.phero__copy, .phero__art { min-width: 0; }
