/* QUARRY docs: one compact page, sticky contents on the left, dense cards on the right. Builds on style.css tokens. */
.docs-page .nav { margin: 0; }
.docs-tag { font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); border: 1px solid var(--line-2); border-radius: 20px; padding: 3px 10px; margin-left: -18px; }
.nav-menu a[aria-current] { color: var(--text); }

.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding-top: 34px; padding-bottom: 60px; max-width: 1360px; margin: 0 auto; }
.docs-side { position: sticky; top: 96px; align-self: start; display: grid; gap: 22px; }
.toc-k { font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.docs-toc { display: grid; }
.docs-toc a { padding: 5px 0 5px 12px; border-left: 1px solid var(--line); font-size: 13.5px; color: var(--dim); transition: color 0.2s, border-color 0.2s; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.on { color: var(--sand); border-left-color: var(--sand); }
.docs-live { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); font: 400 11.5px var(--mono); }
.docs-live > div:not(.toc-k) { display: flex; justify-content: space-between; gap: 10px; color: var(--faint); }
.docs-live b { color: var(--text); font-weight: 500; }

.docs-body { display: grid; gap: 14px; min-width: 0; }
.docs-head h1 { font: 200 clamp(30px, 3.6vw, 46px)/1.08 var(--serif-ish); letter-spacing: -0.02em; margin: 0 0 10px; }
.docs-head p { margin: 0 0 8px; color: var(--dim); max-width: 64ch; font-size: 15px; }

.d-sec { scroll-margin-top: 92px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(20, 24, 38, 0.55); }
.d-sec h2 { font: 400 12px var(--serif-ish); letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand); margin: 0 0 14px; }
.d-sec h3 { font: 500 14.5px/1.3 var(--serif-ish); margin: 0 0 3px; }
.d-sec p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--dim); }
.d-sec p:first-child { margin-top: 0; }
.d-sec a { color: var(--sand); }
.d-sec code { font: 400 12.5px var(--mono); color: var(--text); }
.hint { font-size: 12.5px !important; color: var(--faint) !important; }

.qs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qs li { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(14, 17, 27, 0.5); }
.qs li > b { font: 500 11px var(--mono); color: var(--sand); }
.qs li > div { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.qs .cmd { margin-top: auto; }
.qs p { margin: 0 0 8px; font-size: 13px; }

.cmd { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8, 10, 16, 0.7); min-width: 0; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmd button { flex: none; font: 500 9.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); background: transparent; border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 7px; cursor: pointer; }
.cmd button:hover { color: var(--sand); border-color: var(--sand); }

.cli-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--dim); }
.kv tr:first-child td { border-top: 0; }
.kv td:first-child { padding-right: 16px; white-space: nowrap; color: var(--text); }
.kv-tight td { padding: 6px 0; }
.kv-mono td:first-child { font: 400 12.5px var(--mono); color: var(--sand); }
#stats .cmd { margin-bottom: 10px; max-width: 360px; }
.out { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 10, 16, 0.8); font: 400 12px/1.6 var(--mono); color: #d7d1c8; overflow-x: auto; }
.o-p { color: var(--sand); } .o-d { color: var(--faint); } .o-ok { color: var(--ok); } .o-g { color: var(--sand); } .o-y { color: var(--sand-2); }
.out b { color: var(--sand); font-weight: 500; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(14, 17, 27, 0.5); }
.facts b { display: block; font: 300 24px/1.1 var(--serif-ish); color: var(--text); }
.facts-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.facts-5 b { font-size: 20px; }
.facts span { font: 400 11px var(--mono); color: var(--faint); }

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: f; }
.flow li { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(14, 17, 27, 0.5); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -15px; top: 50%; translate: 0 -50%; color: var(--sand); font-size: 12px; }
.flow b { font: 500 13px var(--serif-ish); color: var(--text); }
.flow span { font-size: 12px; color: var(--faint); line-height: 1.4; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: rgba(14, 17, 27, 0.5); }
.faq summary { cursor: pointer; font-size: 14px; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sand); font-family: var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 8px; font-size: 13px; }

@media (max-width: 980px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
  .docs-side { position: static; }
  .docs-toc { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-toc .toc-k { width: 100%; }
  .docs-toc a { border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px; font-size: 12.5px; }
  .docs-toc a.on { border-color: var(--sand); }
  .docs-live { display: none; }
  .qs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cli-grid, .faq { grid-template-columns: minmax(0, 1fr); }
  .flow, .facts-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .docs-tag { display: none; }
  .nav-actions { display: none; }
  .qs, .facts { grid-template-columns: minmax(0, 1fr); }
  .facts:not(.facts-5) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts b { font-size: 19px; }
  .d-sec { padding: 16px; }
  .kv td:first-child { white-space: normal; }
}
/* in the quick-start cards the copy button sits in the card corner so the command keeps the full width */
.qs li { position: relative; }
.qs .cmd { padding: 8px 12px; }
.qs .cmd button { position: absolute; top: 12px; right: 12px; }
.facts b span { font: inherit; color: inherit; }
.qs li { padding: 12px; }
.qs .cmd { padding: 8px 10px; }
.qs .cmd code { font-size: 12px; }
@media (max-width: 1399px) and (min-width: 981px) { .qs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
