/* ============================================================
   NLQueries site — main.css
   Palette: Midnight, from the Theorence Labs homepage set
   (theorence/homepage-palettes/02-midnight.html). The site is dark only.

   Contrast on --bg #0F1520: text 14.6:1, muted 6.4:1, accent 8.1:1,
   accent-2 9.4:1, teal 6.6:1. Every text token clears AA on --bg-2 too,
   and on --term-bg (text 11.7, dim 5.2, accent 6.5, sand 7.5, teal 5.3).
   The brand teal #5F8A8B (4.8:1) stays inside the mark and is not used
   for text.
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg:        #0F1520;   /* page ground                                  */
  --bg-2:      #141C2A;   /* raised panels, inline code, sidebar          */
  --term-bg:   #1E2939;   /* terminals and code blocks: lifted slate      */
  --term-bar:  #253144;
  --text:      #E3E6EB;
  --muted:     #8F99A9;
  --accent:    #93AEDA;   /* links, buttons, checks, focus                */
  --on-accent: #0F1520;
  --accent-2:  #C8B89B;   /* labels, numbering, keys                      */
  --teal:      #6FA59C;   /* the mark's base, used sparingly              */

  --rule:       rgba(227,230,235,.55);   /* structural: header, bands   */
  --rule-soft:  rgba(227,230,235,.2);    /* cells, panels               */
  --rule-faint: rgba(227,230,235,.1);    /* list rows                   */

  --term-text:   #E3E6EB;
  --term-dim:    rgba(227,230,235,.6);
  --term-accent: #93AEDA;
  --term-str:    #C8B89B;

  --honey: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24.25' height='42' viewBox='0 0 24.25 42'%3E%3Cpath d='M12.124 0V14L0 21V35L12.124 42L24.249 35V21L12.124 14' fill='none' stroke='%23E3E6EB' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");

  --cond: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pad:  clamp(18px, 3.2vw, 44px);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--honey);
  background-size: 24.25px 42px;
  color: var(--text);
  font-family: var(--cond);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, pre, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
code, pre { font-family: var(--mono); }
strong { font-weight: 500; color: var(--text); }
a { color: inherit; text-decoration-color: var(--rule-soft); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; font: 500 14px var(--mono); z-index: 60; }
.skip:focus { top: 12px; }

.page { max-width: 1440px; margin: 0 auto; padding: 0 clamp(12px, 2.4vw, 32px); }
.lbl { font: 500 12.5px/1.35 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lbl a { text-decoration: none; }
.lbl a:hover { color: var(--accent); }

/* ── Brand lockup ───────────────────────────────────────── */
/* Reproduces brand/svg/nlq-lockup-horizontal in live text. Ratios are the
   lockup's own: the mark is 1.28em of the wordmark size, the gap 0.54em,
   tracking -4%. On the dark ground the mark is the on-dark variant. */
.brand-lockup { display: flex; align-items: center; gap: .54em; text-decoration: none; color: var(--text); }
.brand-lockup:hover { color: var(--text); }
.brand-lockup > img { height: 1.28em; width: auto; flex: none; }
.brand-lockup > .wordmark { font-family: "Archivo", var(--cond); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-size: 1em; }

/* ── Header ─────────────────────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--bg); display: grid; grid-template-columns: auto 1fr auto; border-bottom: 1px solid var(--rule); }
.hdr > * { padding: 16px 22px; display: flex; align-items: center; }
.hdr > * + * { border-left: 1px solid var(--rule-soft); }
.hdr > :first-child { padding-left: var(--pad); }
.hdr > :last-child { padding-right: var(--pad); }
.hdr .brand-lockup { font-size: 24px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.nav a { font: 500 14.5px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 6px 0; display: inline-block; }
.nav a[aria-current] { color: var(--accent-2); }
.hdr__gh { gap: 10px; font: 500 14.5px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.hdr__gh svg { width: 16px; height: 16px; flex: none; }
.hdr__gh .arr { font-family: var(--mono); letter-spacing: 0; color: var(--muted); }
.hdr__gh:hover .arr { color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1.2px solid var(--accent); background: var(--accent); color: var(--on-accent);
  text-decoration: none; font: 500 15px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase;
  padding: 16px 22px; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--plain { background: transparent; color: var(--text); border-color: var(--rule-soft); }
.btn--plain:hover { border-color: var(--accent); color: var(--accent); }
.btn .arr { font-family: var(--mono); letter-spacing: 0; }

/* A copyable one-liner, set as a dashed chip */
.cmd { display: inline-flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; height: 50px; border: 1px dashed var(--rule-soft); font: 400 15px/1 var(--mono); color: var(--text); }
.cmd .p { color: var(--muted); }
.cmd button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.cmd button:hover { color: var(--accent); }
.cmd button.copied { color: var(--teal); }

.tag { display: inline-block; border: 1px solid var(--accent-2); color: var(--accent-2); font: 500 12.5px/1 var(--cond); letter-spacing: .16em; text-transform: uppercase; padding: 6px 9px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--rule); }
.hero__main { padding: clamp(48px, 7vw, 104px) var(--pad) clamp(40px, 5.5vw, 72px); }
.hero h1 { font-weight: 500; font-size: clamp(42px, 6vw, 92px); line-height: .96; letter-spacing: -.015em; margin-top: 26px; max-width: 15em; text-wrap: balance; }
.hero h1 span { display: block; font-weight: 300; color: var(--muted); }
.lede { margin-top: 30px; max-width: 38em; font-size: clamp(19px, 1.75vw, 24px); line-height: 1.45; }
.lede-2 { margin-top: 16px; max-width: 46em; font: 400 16px/1.65 var(--mono); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.hero__term { border-top: 1px solid var(--rule-soft); padding: clamp(24px, 3vw, 40px) var(--pad) clamp(32px, 4vw, 56px); }

/* ── Terminal blocks ────────────────────────────────────── */
.term { background: var(--term-bg); border: 1px solid var(--rule-soft); text-align: left; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; background: var(--term-bar); border-bottom: 1px solid var(--rule-faint); }
.term-dot { width: 10px; height: 10px; border: 1px solid var(--rule); border-radius: 50%; display: block; }
.term-title { margin-left: auto; font: 400 13px var(--mono); color: var(--term-dim); }
.term pre, pre.term { background: var(--term-bg); color: var(--term-text); padding: 22px 26px; font-size: 14.5px; line-height: 1.8; overflow-x: auto; tab-size: 2; }
.term pre { border: 0; }
.t-dim { color: var(--term-dim); }
.t-cmd { color: var(--term-text); font-weight: 500; }
.t-ok  { color: var(--teal); }
.t-kw  { color: var(--term-accent); font-weight: 500; }
.t-str { color: var(--term-str); }
.t-out { color: var(--text); font-weight: 600; }

/* Copy button on every <pre> */
pre { position: relative; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--term-bar); border: 1px solid var(--rule-soft); border-radius: 0;
  color: var(--muted); cursor: pointer; opacity: 0;
  transition: opacity .15s, color .15s, border-color .15s;
}
pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--rule); }
.copy-btn.copied { color: var(--teal); border-color: var(--teal); opacity: 1; }

/* ── Bands and section heads ────────────────────────────── */
.band { border-bottom: 1px solid var(--rule); }
.sh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding: 22px var(--pad) 0; }
.sh__t { font: 500 clamp(18px, 1.9vw, 24px)/1.1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.sh a.lbl:hover { color: var(--accent); }
.body { padding: 26px var(--pad) clamp(40px, 5vw, 64px); }

.big { font-size: clamp(26px, 2.8vw, 40px); line-height: 1.15; font-weight: 400; letter-spacing: -.005em; max-width: 20em; text-wrap: balance; }
.big em { font-style: normal; color: var(--accent); }
.after { margin-top: 20px; max-width: 40em; font: 400 16px/1.7 var(--mono); color: var(--muted); }
.after + .after { margin-top: 14px; }
.after strong { color: var(--text); font-weight: 500; }
.intro { margin-bottom: clamp(28px, 3.5vw, 44px); }

/* Two-column: statement left, ruled list right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px clamp(32px, 5vw, 80px); align-items: start; }

/* Numbered ruled list */
.lst > li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 4px 18px; padding: 20px 0; border-top: 1px solid var(--rule-faint); }
.lst > li:last-child { border-bottom: 1px solid var(--rule-faint); }
.lst .num { font: 500 14.5px/1.7 var(--mono); color: var(--accent-2); }
.lst .num--accent { color: var(--accent); font-size: 17px; line-height: 1.4; }
.lst h3 { font: 500 clamp(19px, 1.6vw, 22px)/1.25 var(--cond); }
.lst p { margin-top: 8px; font: 400 15.5px/1.7 var(--mono); color: var(--muted); }
.lst li.is-next { border-top-color: var(--accent); }
code.ic { font-size: .95em; color: var(--text); }

/* Ruled grid of cells */
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-soft); border-left: 1px solid var(--rule-soft); }
.rules--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rules--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rules > li > h3:first-child { margin-top: 0; }
.rules > li { padding: 24px 26px 28px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); min-width: 0; }
.rules .k { font: 500 12.5px/1.3 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
.rules h3 { margin-top: 16px; font: 500 21px/1.2 var(--cond); letter-spacing: .01em; }
.rules p { margin-top: 10px; font: 400 15px/1.7 var(--mono); color: var(--muted); }
.rules p a { color: var(--text); }
.rules p a:hover { color: var(--accent); }
.rules > li > a.cell { display: block; margin: -24px -26px -28px; padding: 24px 26px 28px; text-decoration: none; height: calc(100% + 52px); transition: background-color .2s; }
.rules > li > a.cell:hover { background: var(--bg-2); color: var(--text); }
.rules > li > a.cell:hover h2 { color: var(--accent); }
.rules a.cell h2 { font: 500 22px/1.2 var(--cond); }
.rules a.cell p { margin-top: 8px; }
.rules a.cell code { display: block; margin-top: 14px; font-size: 13.5px; color: var(--accent-2); }

/* ── Quickstart ─────────────────────────────────────────── */
.qs { border: 1px solid var(--rule-soft); }
.qs > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); }
.qs > li + li { border-top: 1px solid var(--rule-soft); }
.qs__h { padding: 24px 26px; border-right: 1px solid var(--rule-soft); background: var(--bg-2); }
.qs__h h3 { font: 500 26px/1.1 var(--cond); }
.qs__h p { margin-top: 8px; font: 400 15px/1.6 var(--mono); color: var(--muted); }
.qs__h .tag { margin-top: 16px; }
.qs pre.term { border: 0; height: 100%; font-size: 15px; line-height: 2; }

/* ── Comparison table ───────────────────────────────────── */
.cmp { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-soft); }
.cmp th, .cmp td { padding: 15px 18px; border-bottom: 1px solid var(--rule-faint); text-align: left; font-weight: 400; }
.cmp thead th { font: 500 12.5px/1.4 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule-soft); vertical-align: bottom; }
.cmp thead th small { display: block; margin-top: 3px; font: 400 12.5px/1.3 var(--mono); letter-spacing: 0; text-transform: none; color: var(--muted); }
.cmp thead th:first-child { padding-left: 0; }
.cmp tbody th { padding-left: 0; font: 400 19px/1.4 var(--cond); }
.cmp .c { width: 170px; text-align: center; }
.cmp td.y { color: var(--accent); font: 600 18px/1 var(--mono); }
.cmp td.n { color: var(--muted); font: 400 18px/1 var(--mono); opacity: .6; }
.cmp tr.grp th { padding-top: 28px; font: 500 12.5px/1.3 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); border-bottom-color: var(--rule-soft); }
.cmp tr.ent th { color: var(--muted); }
.note { margin-top: 22px; font: 400 15.5px/1.6 var(--mono); color: var(--muted); }
.note a { color: var(--accent); }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { counter-reset: faq; }
.faq > li { padding: 22px 0; border-top: 1px solid var(--rule-faint); counter-increment: faq; }
.faq > li:last-child { border-bottom: 1px solid var(--rule-faint); }
.faq h3 { font: 500 clamp(19px, 1.6vw, 22px)/1.3 var(--cond); }
.faq h3::before { content: "Q." counter(faq, decimal-leading-zero) "\00a0\00a0"; }
.faq p { margin-top: 10px; max-width: 56em; font: 400 15.5px/1.75 var(--mono); color: var(--muted); }
.more { margin-top: 26px; font: 400 15.5px/1.8 var(--mono); color: var(--muted); }
.more a { color: var(--text); }
.more a:hover { color: var(--accent); }

/* Text links styled as a row of uppercase actions */
.links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font: 500 14.5px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; }
.links a { text-decoration: none; border-bottom: 1px solid var(--rule-soft); padding-bottom: 5px; }
.links a:hover { border-color: var(--accent); }

/* ── Footer: title block ────────────────────────────────── */
.tb { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); font: 400 14.5px/1.6 var(--mono); }
.tb > div { padding: 22px 22px 26px; min-width: 0; }
.tb > div + div { border-left: 1px solid var(--rule-soft); }
.tb > div:first-child { padding-left: var(--pad); }
.tb .k { display: block; font: 500 12px/1.3 var(--cond); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.tb .brand-lockup { font-size: 20px; }
.tb-brand em { display: block; margin-top: 12px; font: italic 300 17px/1.35 var(--cond); color: var(--muted); max-width: 20em; }
.tb-brand p { margin-top: 10px; color: var(--muted); }
.tb ul li { padding: 3px 0; }
.tb ul a { text-decoration: none; border-bottom: 1px solid var(--rule-faint); overflow-wrap: anywhere; }
.tb-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px var(--pad) 22px; border-top: 1px solid var(--rule-soft); font: 400 13.5px/1.5 var(--mono); color: var(--muted); }

/* ── Docs ───────────────────────────────────────────────── */
.docs-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.docs-sidebar { border-right: 1px solid var(--rule-soft); padding: 28px 0 40px; }
.docs-sidebar__in { position: sticky; top: 92px; display: flex; flex-direction: column; }
.docs-sidebar .lbl { padding: 0 22px 12px var(--pad); }
.docs-sidebar .nav-link { display: block; padding: 9px 22px 9px var(--pad); font: 400 17.5px/1.3 var(--cond); color: var(--muted); text-decoration: none; border-left: 2px solid transparent; transition: color .2s, background-color .2s; }
.docs-sidebar .nav-link:hover { color: var(--text); background: var(--bg-2); }
.docs-sidebar .nav-link.active { color: var(--text); background: var(--bg-2); border-left-color: var(--accent-2); }
.docs-version { margin: 22px 22px 0 var(--pad); padding-top: 14px; border-top: 1px solid var(--rule-faint); font: 400 12.5px/1.7 var(--mono); color: var(--muted); }
.docs-version a { color: var(--accent); text-decoration: none; }
.docs-content { min-width: 0; padding: 36px var(--pad) 96px clamp(28px, 4vw, 64px); }

/* Long-form prose: docs and the database pages */
.prose { max-width: 880px; font-family: var(--sans); }
.prose h1 { font: 500 clamp(34px, 3.6vw, 48px)/1.05 var(--cond); letter-spacing: -.01em; margin-bottom: 22px; }
.prose h2 { font: 500 clamp(24px, 2.2vw, 30px)/1.15 var(--cond); margin: 48px 0 16px; padding-top: 20px; border-top: 1px solid var(--rule-soft); }
.prose h1 + h2, .prose h2:first-child { border-top: 0; padding-top: 0; margin-top: 24px; }
.prose h3 { font: 500 20px/1.25 var(--cond); margin: 30px 0 10px; }
.prose h4 { font: 500 17px/1.3 var(--cond); margin: 24px 0 8px; color: var(--accent-2); }
.prose p, .prose li { font-size: 18px; line-height: 1.7; color: var(--text); }
.prose p { margin-bottom: 16px; max-width: 72ch; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent-2); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(147,174,218,.35); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 600; }
.prose code { background: var(--bg-2); border: 1px solid var(--rule-faint); padding: 1px 6px; font-size: .86em; color: var(--text); }
.prose pre { background: var(--term-bg); color: var(--text); border: 1px solid var(--rule-soft); padding: 18px 22px; overflow-x: auto; font-size: 15px; line-height: 1.75; margin: 20px 0; }
.prose p code, .prose li code { overflow-wrap: anywhere; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose pre.term { margin: 20px 0 28px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 17px; }
.prose th, .prose td { border: 0; border-bottom: 1px solid var(--rule-faint); padding: 10px 14px 10px 0; text-align: left; vertical-align: top; }
.prose th { font: 500 12.5px/1.4 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule-soft); }
.prose hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 32px 0; }
/* core's markdown often puts an <hr> before a section; let the hr be the only rule */
.prose hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.prose blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; margin: 16px 0; }
.prose blockquote p { color: var(--muted); }
.prose img { max-width: 100%; height: auto; }
.prose .table-wrap { overflow-x: auto; margin: 20px 0; }
.prose .table-wrap table { margin: 0; }
.prose td { overflow-wrap: break-word; }
.prose td:not(:last-child) code { white-space: nowrap; }
.prose td:last-child code, .prose td code { overflow-wrap: anywhere; }
/* four-column reference tables: only the first column keeps code unbroken */
.prose .cols-4 td:not(:first-child) code { white-space: normal; overflow-wrap: anywhere; }
.prose .cols-4 th:nth-child(2) { width: 11%; }
.prose .cols-4 th:nth-child(3) { width: 17%; }
.prose .cols-4 th:last-child { width: 46%; }
.prose .mermaid { background: var(--bg-2); border: 1px solid var(--rule-soft); padding: 24px; margin: 20px 0; overflow-x: auto; text-align: center; }
.prose .mermaid svg { max-width: 100%; height: auto; }
.arch-figure { margin: 24px 0; }
.arch-figure a { display: block; border: 1px solid var(--rule-soft); overflow: hidden; background: #0B1019; transition: border-color .2s; }
.arch-figure a:hover { border-color: var(--accent); }
.arch-figure img { display: block; width: 100%; height: auto; }
.arch-figure figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 15.5px; }

/* ── Reveal on scroll (home page) ───────────────────────── */
.js .rv { opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
.js .rv.in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb { grid-template-columns: 1fr 1fr 1fr; }
  .tb > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--rule-soft); }
  .tb > div:nth-child(2) { border-left: 0; padding-left: var(--pad); }
  .tb > div:nth-child(5) { border-left: 0; padding-left: var(--pad); border-top: 1px solid var(--rule-soft); }
}
@media (max-width: 1100px) {
  .hdr { grid-template-columns: auto 1fr; }
  .hdr__gh { display: none !important; }
}
@media (max-width: 960px) {
  .qs > li { grid-template-columns: minmax(0, 1fr); }
  .qs__h { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 0; }
  .hdr { grid-template-columns: 1fr; position: static; }
  .hdr > * + * { border-left: 0; border-top: 1px solid var(--rule-soft); }
  .hdr > * { padding-left: var(--pad); padding-right: var(--pad); }
  .nav ul { gap: 2px 20px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .cmp .c { width: 92px; }
  .cmp th, .cmp td { padding-left: 10px; padding-right: 10px; }
  .cmp tbody th { font-size: 17px; }
  .docs-shell { grid-template-columns: minmax(0, 1fr); }
  .docs-sidebar { border-right: 0; border-bottom: 1px solid var(--rule-soft); padding: 18px 0; }
  .docs-sidebar__in { position: static; flex-direction: row; flex-wrap: wrap; padding: 0 var(--pad); }
  .docs-sidebar .lbl { width: 100%; padding-left: 0; }
  .docs-sidebar .nav-link { padding: 6px 12px; border-left: 0; border-bottom: 2px solid transparent; }
  .docs-sidebar .nav-link.active { border-bottom-color: var(--accent-2); }
  .docs-version { width: 100%; margin-left: 0; }
  .docs-content { padding-left: var(--pad); }
}
@media (max-width: 600px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
  .lst > li { grid-template-columns: minmax(0, 1fr); }
  .tb { grid-template-columns: 1fr 1fr; }
  .tb > div { padding-left: var(--pad) !important; }
  .tb > div:nth-child(2n+1):not(:first-child) { border-left: 1px solid var(--rule-soft); padding-left: 22px !important; }
  .tb > div:nth-child(4) { border-left: 0; border-top: 1px solid var(--rule-soft); }
  .tb > div:nth-child(5) { border-top: 1px solid var(--rule-soft); }
  .cmd { max-width: 100%; }
  .cmd code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
