/* Uptight docs: the site's tokens (../site.css) plus a sidebar layout. */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 36px; padding-bottom: 80px; }
.side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14.5px; }
.side input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font: 14px var(--body); }
.side input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.side h4 { margin: 22px 0 8px; font: 600 11.5px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--muted); }
.side a:hover { color: var(--text); background: var(--panel); }
.side a[aria-current="page"] { color: var(--text); background: var(--accent-soft); font-weight: 600; }
.side .hit small { display: block; font-size: 12px; color: var(--muted); }
.side .none { padding: 6px 10px; color: var(--muted); }
.menu-toggle { display: none; color: var(--text); cursor: pointer; }

.doc { min-width: 0; max-width: 780px; }
.doc .crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.doc .crumbs a:hover { color: var(--text); }
.doc h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 14px; }
.doc .lead { font-size: 18px; color: var(--muted); margin-bottom: 28px; }
.doc h2 { font-size: 25px; margin: 44px 0 14px; padding-top: 6px; max-width: none; }
.doc h3 { font-size: 18px; margin: 28px 0 10px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 6px; }
.doc a { color: var(--accent); }
.doc a:hover { text-decoration: underline; }
.doc code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: .86em; }
.doc pre { position: relative; margin: 0 0 18px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow-x: auto; font: 13.5px/1.65 var(--mono); }
.doc pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.doc pre .copy { position: absolute; top: 8px; right: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border: 1px solid var(--border); vertical-align: top; }
.doc th { background: var(--panel-2); font-weight: 600; }
.note, .warn-box, .tip { border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: 8px; padding: 12px 16px; margin: 0 0 18px; background: var(--panel); font-size: 15px; }
.warn-box { border-left-color: var(--warn); }
.tip { border-left-color: var(--accent); }
.note p:last-child, .warn-box p:last-child, .tip p:last-child { margin: 0; }
.pro { font: 600 11px/1 var(--body); color: var(--info); border: 1px solid currentColor; border-radius: 999px; padding: 2px 7px; vertical-align: 3px; margin-left: 6px; }

/* troubleshooting entries */
details.qa { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); margin: 0 0 10px; }
details.qa summary { cursor: pointer; padding: 13px 16px; font-weight: 600; list-style: none; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before { content: "▸"; color: var(--accent); margin-right: 9px; display: inline-block; transition: transform .12s; }
details.qa[open] summary::before { transform: rotate(90deg); }
details.qa > div { padding: 0 16px 6px; border-top: 1px solid var(--border); padding-top: 12px; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); }
.pager a { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; background: var(--panel); min-width: 0; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: 12.5px; }
.pager .next { margin-left: auto; text-align: right; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 24px; }
.cards a { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--panel); color: var(--text); }
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards b { display: block; font: 600 16.5px/1.3 var(--display); margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .side { position: static; max-height: none; }
  .menu-toggle { display: inline-flex; margin-bottom: 10px; }
  .side.collapsed nav { display: none; }
  .cards { grid-template-columns: 1fr; }
}
