/* the documentation page: a contents sidebar beside the text */
.docs-tag { font: 12px var(--mono); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; padding: 2px 10px; margin-left: -12px; }
.links a[aria-current="page"] { color: var(--text); }

.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding: 36px 0 80px; }
.docs-side { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.docs-menu summary { display: none; }
.docs-search { width: 100%; margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border2); background: var(--panel); color: var(--text); font: 14px var(--sans); }
.docs-search:focus { outline: none; border-color: var(--accent); }
#docs-nav { display: flex; flex-direction: column; }
.docs-group { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.docs-group:first-child { margin-top: 0; }
#docs-nav a { color: var(--soft); font-size: 14.5px; padding: 5px 12px; border-left: 2px solid var(--border); }
#docs-nav a:hover { color: var(--text); text-decoration: none; border-left-color: var(--border2); }
#docs-nav a.on { color: var(--accent); border-left-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.docs-none { color: var(--muted); font-size: 14px; }

.docs-main { min-width: 0; max-width: 820px; }
.doc { padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--border); scroll-margin-top: 20px; }
.doc:last-child { border-bottom: 0; }
.doc h1 { font-size: clamp(34px, 5vw, 50px); margin: 0 0 18px; }
.doc h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 18px; }
.doc h3 { margin: 28px 0 10px; color: var(--text); }
.doc p, .doc li, .doc dd { color: var(--soft); }
.doc b, .doc dt { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin: 6px 0; }
.lead { font-size: 20px; color: var(--text) !important; }
.note { padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent); font-size: 15.5px; }
.doc-steps > li { margin: 10px 0; padding-left: 4px; }
.doc-steps pre { margin: 10px 0; }

.doc pre { margin: 0 0 1.2em; padding: 16px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.doc pre code { padding: 0; border: 0; background: none; font-size: inherit; }

.shot { margin: 20px 0 24px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
/* a key combination never breaks across lines */
.keys { white-space: nowrap; }

/* a tall screenshot in its own column, beside the text */
.with-shot { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 8px 36px; align-items: start; }
.with-shot > .shot { grid-column: 2; grid-row: 1 / span 2; margin: 4px 0 0; }
.with-shot > :not(.shot) { grid-column: 1; grid-row: 1; min-width: 0; }
.with-shot .defs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.with-shot .defs dd { margin-bottom: 12px; }

.defs { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 1.2em; }
.defs dt { font: 700 14.5px var(--mono); }
.defs dd { margin: 0; }
.doc-faq dt { font-weight: 700; margin-top: 18px; }
.doc-faq dd { margin: 6px 0 0; }

.tbl { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font: 700 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tbl td { color: var(--soft); }
.tbl td:first-child { color: var(--text); white-space: nowrap; }
.tbl td:last-child { white-space: normal; }
.tbl td code { white-space: nowrap; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
.cols .tbl { table-layout: fixed; }
.cols .tbl td:first-child { width: 42%; white-space: normal; }


@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 16px; }
  .docs-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .docs-menu { border: 1px solid var(--border2); border-radius: 12px; background: var(--panel); padding: 0 14px; }
  .docs-menu summary { display: block; cursor: pointer; padding: 12px 0; font: 700 14px var(--mono); list-style: none; }
  .docs-menu summary::after { content: "▾"; float: right; color: var(--muted); }
  .docs-menu[open] summary::after { content: "▴"; }
  .docs-menu[open] { padding-bottom: 14px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .docs-tag { margin-left: -14px; }
}
@media (max-width: 700px) {
  .with-shot { grid-template-columns: minmax(0, 1fr); }
  .with-shot > .shot { grid-column: 1; grid-row: 1; width: min(250px, 100%); margin: 0 auto 18px; }
  .with-shot > :not(.shot) { grid-row: 2; }
}
@media (max-width: 600px) {
  .defs { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .defs dd { margin-bottom: 10px; }
  /* tables: each row stacked, its name above its description */
  .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl th { display: block; width: auto !important; }
  .tbl tr:has(th + th) { display: none; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .tbl th { padding: 14px 0 4px; border: 0; }
  .tbl td { padding: 2px 0; border: 0; }
  .tbl td:first-child { white-space: normal; font-weight: 600; }
  .tbl td + td { font-size: 15px; }
  .tbl-feat td:last-child::before { content: "default: "; color: var(--muted); }
  .doc pre { font-size: 12.5px; }
}
@media (max-width: 600px) {
  /* shortcuts: what it does on the left, the keys on the right */
  .tbl-keys tr:not(:has(th)) { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .tbl-keys td:first-child { order: 2; flex-shrink: 0; white-space: nowrap; font-weight: 400; }
  .tbl-keys td + td { order: 1; }
}
@media (max-width: 820px) {
  .links { justify-content: flex-start; gap: 12px; }
}
@media (max-width: 600px) {
  /* the agents table, stacked: say which switch is which */
  .tbl-agents td + td { color: var(--muted); font-size: 13px; }
  .tbl-agents td:nth-child(2)::before { content: "starts "; }
  .tbl-agents td:nth-child(3)::before { content: "continue "; }
  .tbl-agents td:nth-child(4)::before { content: "yolo "; }
  .tbl-agents td code { white-space: normal; word-break: break-all; }
}
