/* ==========================================================================================
   BarcoderX website: ZPL documentation layer. Author: P4 Software.
   Pages: hub (/zpl/), guide, command index, command. Loaded after site.css and inner.css.
   Reuses their classes: .p-hero, .kicker, .lede, .jump, .note, .code, .cut, .chips, .chip, .badge, .link, .btn, .mini-h.
   Tokens only: every colour, space, radius and type size comes from /brand/tokens.css through site.css.
   Light theme only. Mobile first. Breakpoints: 40rem (640), 48rem (768), 64rem (1024).
   Reference-page rules: monospace carries the identifiers, one rule above each section, no decoration that slows scanning.
   ========================================================================================== */

/* ============================== PAGE FRAME ============================== */
/* Body band of reference pages: tighter than the marketing sections, so the first reference content starts higher. */
.z-body { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
/* Compact header for reference pages: the command, its name and its syntax must all be on the first screen of a phone. */
.z-hero { padding-block: clamp(1rem, 0.5rem + 2vw, 2rem) clamp(1.75rem, 1.25rem + 2vw, 3rem); }
.z-hero-copy { display: grid; gap: var(--bx-space-5); justify-items: start; min-width: 0; }
.z-hero .lede { max-width: 56ch; }
.z-hero-grid { display: grid; gap: var(--bx-space-10); align-items: start; }
.z-hero-grid > * { min-width: 0; }
@media (min-width: 64rem) { .z-hero-grid.has-aside { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--bx-space-12); } }
.z-h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); max-width: 20ch; overflow-wrap: break-word; }

/* Breadcrumb: a real ordered list. The links are 44px tall; the separators are drawn, not typed. */
.crumbs { max-width: 100%; min-width: 0; }
.crumbs ol { display: flex; flex-wrap: nowrap; align-items: center; font: 500 var(--bx-text-xs)/1.4 var(--bx-font-mono); color: var(--bx-gray-600); }
.crumbs li { display: inline-flex; align-items: center; flex: none; }
/* The last crumb (the page title, long on guide pages) shrinks with an ellipsis, so the trail stays on one line and never starts a line with a separator. */
.crumbs li:last-child { flex: 0 1 auto; min-width: 0; }
.crumbs li + li::before { content: "/"; margin-inline: var(--bx-space-1); color: var(--bx-gray-500); }
.crumbs a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--bx-touch-target); min-height: var(--bx-touch-target); padding-inline: var(--bx-space-2); color: var(--bx-gray-700); text-decoration: none; }
.crumbs a:hover { color: var(--bx-green-600); text-decoration: underline; text-underline-offset: 0.25em; }
.crumbs [aria-current="page"] { display: block; min-width: 0; padding-inline: var(--bx-space-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bx-ink); font-weight: 600; }

/* Prefix character (^ or ~) in the brand green; the code itself in ink. */
.pfx { color: var(--bx-green-600); }

/* Two columns: a sticky side list (contents or groups) and the main text. One column below 64rem. */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bx-space-8); align-items: start; }
.doc > * { min-width: 0; }
.doc-side { display: grid; gap: var(--bx-space-2); align-content: start; }
@media (min-width: 64rem) {
  .doc { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--bx-space-12); }
  .doc-side { position: sticky; top: calc(var(--header-h) + var(--bx-space-6)); max-height: calc(100vh - var(--header-h) - var(--bx-space-12)); overflow-y: auto; padding-right: var(--bx-space-2); }
}

/* Section frame used by every reference section: ink rule on top, one heading, then content. */
.zsec { padding-top: var(--bx-space-5); border-top: var(--rule); display: grid; gap: var(--bx-space-5); min-width: 0; }
.zsec + .zsec, .zstack > .zsec + .zsec { margin-top: var(--bx-space-12); }
.zsec > h2, .zsec-h { font: 700 var(--bx-text-2xl)/1.15 var(--bx-font-display); letter-spacing: -0.02em; max-width: none; }
.zsec > h3, .zsec h3 { font-size: var(--bx-text-xl); }
.zsec-q { font: 500 var(--bx-text-sm)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); max-width: 64ch; }
.zsec-q b { margin-right: var(--bx-space-2); font: 600 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-green-600); }
.zstack { display: grid; min-width: 0; }
.zsec { scroll-margin-top: calc(var(--header-h) + var(--bx-space-4)); }

/* Page citation: "p. 201". Small, mono, muted, never a link. Every fact carries one. */
.pg { display: inline-block; margin-left: var(--bx-space-1); font: 500 var(--bx-text-xs)/1.4 var(--bx-font-mono); color: var(--bx-gray-600); white-space: nowrap; vertical-align: baseline; }

/* Side list (contents, groups) */
.side-list { display: grid; }
.side-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--bx-space-3); min-height: var(--bx-touch-target); padding: var(--bx-space-2) var(--bx-space-3); border-left: 2px solid var(--bx-border); color: var(--bx-gray-700); text-decoration: none; font-size: var(--bx-text-sm); line-height: 1.35; }
.side-list a:hover { color: var(--bx-green-600); border-left-color: var(--bx-green-500); background: var(--bx-green-50); }
.side-list .n { font: 500 var(--bx-text-xs)/1 var(--bx-font-mono); color: var(--bx-gray-600); flex: none; }
/* Below 64rem the groups list becomes wrapping pills, so 9 or 25 groups never push the list below the fold. */
@media (max-width: 63.999rem) {
  .side-list.as-pills { display: flex; flex-wrap: wrap; gap: var(--bx-space-2); }
  .side-list.as-pills a { border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-md); background: var(--bx-surface); padding-inline: var(--bx-space-4); }
  .side-list.as-pills a:hover { border-color: var(--bx-ink); background: var(--bx-surface); color: var(--bx-ink); }
}

/* ============================== COMMAND PAGE ============================== */
/* The code is the heading: large mono, with the official name beside it (below on narrow screens). */
.cmd-h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--bx-space-1) var(--bx-space-5); max-width: none; letter-spacing: -0.02em; }
.cmd-code { font: 700 clamp(3.5rem, 2rem + 8vw, 7rem)/0.95 var(--bx-font-mono); letter-spacing: -0.06em; color: var(--bx-ink); }
.cmd-name { font: 650 var(--bx-text-2xl)/1.15 var(--bx-font-display); letter-spacing: -0.02em; color: var(--bx-gray-700); }
.cmd-meta { display: flex; flex-wrap: wrap; gap: var(--bx-space-2); max-width: none; }
/* The family badge is a link: the invisible ::after grows its hit area to 44px tall without changing how the badge looks. */
.cmd-meta a.badge { position: relative; text-decoration: none; }
.cmd-meta a.badge::after { content: ""; position: absolute; inset: -10px 0; }
.cmd-meta a.badge:hover { border-color: var(--bx-ink); color: var(--bx-ink); }

/* Syntax: ink strip, command in lime, parameters in white. A scroll region of its own so a long Format line never widens the page. */
.syn { width: 100%; max-width: 44rem; background: var(--bx-ink); color: var(--bx-white); border-radius: var(--bx-radius-sm); overflow-x: auto; }
.syn:focus-visible { outline-offset: 2px; }
.syn-label { display: block; padding: var(--bx-space-2) var(--bx-space-5) 0; font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-gray-400); }
.syn code { display: block; padding: var(--bx-space-2) var(--bx-space-5) var(--bx-space-4); font: 500 clamp(1.125rem, 1rem + 0.8vw, 1.5rem)/1.4 var(--bx-font-mono); white-space: pre; }
.syn b { color: var(--bx-lime-500); font-weight: 700; }

/* Parameter table. Four columns from 64rem; below that each row becomes a labelled card, so nothing scrolls sideways. */
.ptab { width: 100%; table-layout: fixed; border-collapse: collapse; border-top: var(--rule); }
.ptab thead th { padding: var(--bx-space-3) var(--bx-space-4) var(--bx-space-3) 0; text-align: left; font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-600); border-bottom: 1px solid var(--bx-border-strong); }
.ptab tbody tr { border-bottom: var(--hair); }
.ptab tbody th, .ptab tbody td { padding: var(--bx-space-4) var(--bx-space-4) var(--bx-space-4) 0; text-align: left; vertical-align: top; font-size: var(--bx-text-sm); font-weight: 400; color: var(--bx-ink); }
/* Fixed layout, shares set on the header row: the accepted-values column gets the most room, because enumerations (print modes, character sets) are the longest cells. */
.ptab thead th:nth-of-type(1) { width: 9rem; }
.ptab thead th:nth-of-type(2) { width: 28%; }
.ptab thead th:nth-of-type(3) { width: 37%; }
.ptab thead th:nth-of-type(4) { width: 20%; }
.ptab .pn { display: block; font: 700 var(--bx-text-2xl)/1 var(--bx-font-mono); color: var(--bx-ink); }
.pl { display: block; margin-top: var(--bx-space-2); font: 500 var(--bx-text-xs)/1.45 var(--bx-font-sans); color: var(--bx-gray-600); }
.ptab td p { max-width: 54ch; }
.ptab td p + p, .ptab td p + .fw, .ptab td .pnote { margin-top: var(--bx-space-2); }
.pnote { display: block; max-width: 54ch; color: var(--bx-gray-700); font-size: var(--bx-text-xs); line-height: 1.5; }
/* In the stacked card layout (below 64rem) a note is real reading text with room to spare: 12px was too small for a paragraph. */
@media (max-width: 63.999rem) { .pnote { font-size: var(--bx-text-sm); line-height: 1.55; } }
.unit { color: var(--bx-gray-600); font-family: var(--bx-font-mono); font-size: var(--bx-text-xs); }
.ptab code { font-weight: 600; }
/* Accepted values as a two-column list: the value in mono, its meaning beside it. */
.vals { display: grid; gap: var(--bx-space-2); }
.vals li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--bx-space-2); align-items: baseline; }
.vals li.wide { grid-template-columns: minmax(0, 1fr); }
.vals + p, .vals + .pnote { margin-top: var(--bx-space-3); }
/* Firmware limit: dashed, like every "planned" or conditional treatment on the site. */
.fw { display: block; padding: var(--bx-space-2) var(--bx-space-3); border: 1px dashed var(--bx-gray-400); border-radius: var(--bx-radius-sm); font-size: var(--bx-text-xs); line-height: 1.5; color: var(--bx-gray-700); }
.fw b { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-gray-600); margin-right: var(--bx-space-2); }
.dflt-kind { display: block; font: 500 var(--bx-text-xs)/1.4 var(--bx-font-mono); color: var(--bx-gray-600); }
.ptab-none { padding: var(--bx-space-4) var(--bx-space-5); border: 1px dashed var(--bx-gray-400); color: var(--bx-gray-700); font-size: var(--bx-text-sm); max-width: none; }
@media (max-width: 63.999rem) {
  .ptab, .ptab tbody, .ptab tr, .ptab th, .ptab td { display: block; }
  .ptab thead th:nth-of-type(n) { width: auto; }
  .ptab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ptab { border-top: 0; }
  .ptab tbody tr { padding: var(--bx-space-5) 0; border-bottom: var(--hair); }
  .ptab tbody th, .ptab tbody td:nth-of-type(n) { width: auto; padding: 0; }
  .ptab tbody th { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--bx-space-1) var(--bx-space-4); margin-bottom: var(--bx-space-3); }
  .pl { margin-top: 0; }
  .ptab tbody td:nth-of-type(n) { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--bx-space-3); padding: var(--bx-space-3) 0; border-top: 1px dashed var(--bx-border); }
  .ptab tbody td::before { content: attr(data-label); font: 600 var(--bx-text-xs)/1.6 var(--bx-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-gray-600); }
  .ptab tbody td > * { grid-column: 2; }
  .ptab tbody td > :first-child { grid-column: 2; }
}
@media (max-width: 39.999rem) {
  .ptab tbody td:nth-of-type(n) { grid-template-columns: minmax(0, 1fr); gap: var(--bx-space-1); }
  .ptab tbody td > *, .ptab tbody td > :first-child { grid-column: 1; }
}

/* Notes and gotchas: one row each, a short mono label, the text, the page. Colour only where it matters (gotcha, guide issue). */
/* The list box is capped at the width its text needs (label column + a 54ch line + padding), so a note card is not a
   1,100px white strip with half a line of text in it on a wide screen. */
.nts, .nts-fold { max-width: 42rem; }
.nts { display: grid; gap: var(--bx-space-2); }
.nts li { display: grid; gap: var(--bx-space-1) var(--bx-space-4); padding: var(--bx-space-3) var(--bx-space-5); background: var(--bx-surface); border: 1px solid var(--bx-border); border-left: 4px solid var(--bx-gray-300); min-width: 0; }
.nts p { max-width: 54ch; font-size: var(--bx-text-sm); color: var(--bx-ink); }
.nt-kind { font: 600 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-600); }
.nt-interaction { border-left-color: var(--bx-green-500); }
.nt-interaction .nt-kind { color: var(--bx-green-600); }
.nt-gotcha { background: var(--bx-warning-100); border-color: var(--bx-warning-100); border-left-color: var(--bx-warning-ink); }
.nt-gotcha .nt-kind { color: var(--bx-warning-ink); }
.nt-firmware { border-style: dashed; border-left-style: solid; border-left-color: var(--bx-gray-400); }
.nt-guide-issue { background: var(--bx-gray-50); border-style: dashed; border-color: var(--bx-gray-400); border-left-width: 1px; }
/* Folded guide issues: a closed panel like the pricing page's, with the same square +/- toggle. The summary row is the 44px target; open state turns the toggle ink and rules the row. */
.nts-fold { margin-top: var(--bx-space-3); border-top: 1px dashed var(--bx-gray-400); border-bottom: 1px dashed var(--bx-gray-400); }
.nts-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--bx-space-4); min-height: 3.5rem; padding-block: var(--bx-space-3); cursor: pointer; list-style: none; font: 600 var(--bx-text-sm)/1.35 var(--bx-font-sans); color: var(--bx-gray-700); }
.nts-fold > summary::-webkit-details-marker { display: none; }
.nts-fold > summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-sm); background: var(--bx-surface); color: var(--bx-ink); font: 500 1.25rem/1 var(--bx-font-mono); }
.nts-fold > summary:hover { color: var(--bx-ink); }
.nts-fold > summary:hover::after { border-color: var(--bx-ink); }
.nts-fold > summary:focus-visible { outline-offset: -3px; }
.nts-fold[open] > summary { color: var(--bx-ink); border-bottom: var(--hair); }
.nts-fold[open] > summary::after { content: "\2212"; background: var(--bx-ink); border-color: var(--bx-ink); color: var(--bx-white); }
.nts-fold > .nts { padding-block: var(--bx-space-4); }.nt-fw { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); }
.nts li > div { display: grid; gap: var(--bx-space-1); min-width: 0; }
@media (min-width: 48rem) { .nts li { grid-template-columns: 8.5rem minmax(0, 1fr); } }

/* Example: the site's code panel, followed by what the commands instruct. */
.ex { display: grid; gap: var(--bx-space-4); }
.ex .code { max-width: 52rem; }
.ex-why { color: var(--bx-text-muted); max-width: 54ch; }
.ex .code .k { color: var(--bx-lime-500); }
.ex .code .n { color: var(--bx-green-300); }
.ex .code .s { color: var(--bx-lime-200); }
.ex .code .c { color: var(--bx-gray-400); }

/* Related commands: compact cards; the relation is a short tag, the reason one line. */
.rel { display: grid; gap: var(--bx-space-3); grid-template-columns: minmax(0, 1fr); }
.rel a { display: grid; gap: var(--bx-space-1); align-content: start; height: 100%; min-height: var(--bx-touch-target); padding: var(--bx-space-4) var(--bx-space-5); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); color: var(--bx-ink); text-decoration: none; }
.rel a:hover { border-color: var(--bx-ink); }
.rel a:hover .rel-name { text-decoration: underline; text-underline-offset: 0.2em; }
.rel-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--bx-space-3); }
.rel-code { font: 700 var(--bx-text-xl)/1.1 var(--bx-font-mono); letter-spacing: -0.03em; }
.rel-tag { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--bx-green-600); text-align: right; }
.rel-name { font-weight: 600; font-size: var(--bx-text-sm); }
.rel-why { font-size: var(--bx-text-xs); line-height: 1.5; color: var(--bx-gray-600); }
@media (min-width: 40rem) { .rel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .rel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Source line: where every fact on the page comes from. */
.src { display: grid; gap: var(--bx-space-1); padding-top: var(--bx-space-4); border-top: var(--hair); font: 500 var(--bx-text-xs)/1.6 var(--bx-font-mono); color: var(--bx-gray-600); max-width: 72ch; }
.src b { color: var(--bx-gray-700); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.src cite { font-style: normal; color: var(--bx-gray-700); }
.src p { max-width: none; }
/* One neutral line at the foot of a reference page that links to the product page nearest to its topic. */
.zbridge { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--bx-space-2); max-width: none; font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.zbridge a { display: inline-flex; align-items: center; min-height: var(--bx-touch-target); font-weight: 600; }

/* Independent-reference notice on every ZPL page. */
.zlegal { padding-block: var(--bx-space-8); border-top: var(--hair); background: var(--bx-surface); }
.zlegal p { max-width: 58ch; font-size: var(--bx-text-xs); line-height: 1.6; color: var(--bx-gray-600); }

/* ============================== COMMAND INDEX ============================== */
.zgroup { display: grid; gap: var(--bx-space-3); padding-top: var(--bx-space-5); border-top: var(--rule); min-width: 0; scroll-margin-top: calc(var(--header-h) + var(--bx-space-4)); }
.zgroup + .zgroup { margin-top: var(--bx-space-12); }
.zgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--bx-space-2) var(--bx-space-6); }
.zgroup-head h2 { font: 700 var(--bx-text-2xl)/1.15 var(--bx-font-display); letter-spacing: -0.02em; max-width: none; }
.zgroup-head .count { margin-left: var(--bx-space-2); font: 600 var(--bx-text-sm)/1 var(--bx-font-mono); color: var(--bx-gray-600); letter-spacing: 0; }
.to-groups { margin-left: auto; display: inline-flex; align-items: center; min-height: var(--bx-touch-target); min-width: var(--bx-touch-target); font: 600 var(--bx-text-xs)/1.3 var(--bx-font-mono); color: var(--bx-green-600); text-decoration: none; }
/* The arrow says "up": on its own the word "Groups" at the right edge of a heading row read as a stray label. */
.to-groups::before { content: "\2191\00a0"; content: "\2191\00a0" / ""; }   /* second line: empty alt text, so screen readers skip the arrow */
.to-groups:hover { color: var(--bx-green-700); text-decoration: underline; text-underline-offset: 0.25em; }
/* One column on phones; two from 64rem. Each row is one link, at least 44px tall: code, name, one-line summary. */
.cmd-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--bx-space-8); }
.cmd-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--bx-space-1) var(--bx-space-3); align-items: baseline; min-height: var(--bx-touch-target); padding: var(--bx-space-3) var(--bx-space-2) var(--bx-space-3) 0; border-bottom: var(--hair); color: var(--bx-ink); text-decoration: none; }
.cmd-row:hover { background: var(--bx-green-50); }
.cmd-row:hover .cn { text-decoration: underline; text-underline-offset: 0.2em; }
.cc { font: 700 var(--bx-text-lg)/1.2 var(--bx-font-mono); letter-spacing: -0.04em; white-space: nowrap; padding-left: var(--bx-space-2); }
.cn { font-weight: 600; font-size: var(--bx-text-md); line-height: 1.3; }
.cs { grid-column: 2; font-size: var(--bx-text-sm); line-height: 1.45; color: var(--bx-text-muted); max-width: 60ch; }
.alias { margin-left: var(--bx-space-2); font: 500 var(--bx-text-xs)/1 var(--bx-font-mono); color: var(--bx-gray-600); white-space: nowrap; }
@media (min-width: 64rem) { .cmd-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .to-groups { display: none; } }

/* ============================== GUIDE PAGE ============================== */
.prose { display: grid; gap: var(--bx-space-4); min-width: 0; }
.prose p { max-width: 54ch; }
.prose p.fact, .prose p.expl { color: var(--bx-ink); }
.prose a { text-underline-offset: 0.2em; }
.prose code, .zsec p code, .zsec li code, .zfaq code { padding: 0.05em 0.3em; background: var(--bx-gray-100); border-radius: var(--bx-radius-sm); font-weight: 600; font-size: 0.9em; white-space: nowrap; }
.prose a > code, .zsec a > code { background: var(--bx-green-50); color: var(--bx-green-600); }
.prose a:hover > code, .zsec a:hover > code { background: var(--bx-green-100); }
.note-warn { background: var(--bx-warning-100); border-left-color: var(--bx-warning-ink); color: var(--bx-ink); }
.note-warn b { color: var(--bx-warning-ink); }
.prose .note { max-width: 54ch; }
.gex { display: grid; gap: var(--bx-space-3); margin-top: var(--bx-space-2); }
.gex .code { max-width: 52rem; }
.gex .code .k { color: var(--bx-lime-500); }
.gex .code .n { color: var(--bx-green-300); }
.gex .code .s { color: var(--bx-lime-200); }
.gex .code .c { color: var(--bx-gray-400); }
.gex-why { color: var(--bx-text-muted); max-width: 54ch; font-size: var(--bx-text-sm); }
.zfaq { display: grid; gap: var(--bx-space-6); }
.zfaq h3 { font-size: var(--bx-text-lg); margin-bottom: var(--bx-space-2); max-width: 60ch; }
.zfaq p { max-width: 54ch; color: var(--bx-text-muted); }
.pager { display: grid; gap: var(--bx-space-3); }
.pager a { display: grid; gap: var(--bx-space-1); align-content: start; min-height: var(--bx-touch-target); padding: var(--bx-space-4) var(--bx-space-5); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); border-top: var(--rule); color: var(--bx-ink); text-decoration: none; }
.pager a:hover { border-color: var(--bx-ink); }
.pager a:hover .pager-t { text-decoration: underline; text-underline-offset: 0.2em; }
.pager-l { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-600); }
.pager-t { font: 650 var(--bx-text-lg)/1.25 var(--bx-font-display); letter-spacing: -0.01em; }
.pager .next { text-align: right; }
@media (min-width: 40rem) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips a.chip { text-decoration: none; min-height: var(--bx-touch-target); min-width: var(--bx-touch-target); justify-content: center; }
.chips a.chip:hover { border-color: var(--bx-ink); background: var(--bx-green-50); color: var(--bx-green-600); }
.rel-guides { display: grid; gap: var(--bx-space-3); grid-template-columns: minmax(0, 1fr); }
.rel-guides .mini-h { grid-column: 1 / -1; margin-top: 0; }
.rel-guides a { display: flex; align-items: center; justify-content: space-between; gap: var(--bx-space-4); min-height: var(--bx-touch-target); padding: var(--bx-space-4) var(--bx-space-5); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); color: var(--bx-ink); text-decoration: none; font: 650 var(--bx-text-md)/1.3 var(--bx-font-display); letter-spacing: -0.01em; }
.rel-guides a::after { content: "\2192"; flex: none; color: var(--bx-green-600); font-family: var(--bx-font-mono); }
.rel-guides a:hover { border-color: var(--bx-ink); }
.rel-guides a:hover::after { color: var(--bx-ink); }
@media (min-width: 40rem) { .rel-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .rel-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Sections that are not .zsec (pager, source line) get the same breathing room as the sections around them. */
.zstack > .pager { margin-top: var(--bx-space-10); }
.zstack > .zsec + .pager { margin-top: var(--bx-space-10); }

/* ============================== HUB ============================== */
.guide-list { display: grid; gap: var(--bx-space-4); grid-template-columns: minmax(0, 1fr); counter-reset: g; }
.gcard { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--bx-space-1) var(--bx-space-4); align-content: start; height: 100%; padding: var(--bx-space-5) var(--bx-space-5) var(--bx-space-6); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); border-top: var(--rule); color: var(--bx-ink); text-decoration: none; }
.gcard:hover { border-color: var(--bx-ink); }
.gcard:hover .gt { text-decoration: underline; text-underline-offset: 0.2em; }
.gn { grid-row: 1 / span 4; font: 700 var(--bx-text-2xl)/1 var(--bx-font-mono); letter-spacing: -0.05em; color: var(--bx-green-600); }
.gtag { margin-bottom: var(--bx-space-2); justify-self: start; }
.gt { font: 650 var(--bx-text-xl)/1.2 var(--bx-font-display); letter-spacing: -0.012em; }
.gs { font-size: var(--bx-text-sm); line-height: 1.5; color: var(--bx-text-muted); max-width: 52ch; }
.gcmds { display: flex; flex-wrap: wrap; gap: var(--bx-space-1) var(--bx-space-2); margin-top: var(--bx-space-2); font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); }
@media (min-width: 48rem) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bx-space-5); } }
.entry { --cut: 28px; --cut-edge: var(--bx-border-strong); }
.entry .cut-in { display: grid; gap: var(--bx-space-6); padding: var(--bx-space-6); }
.entry-copy { display: grid; gap: var(--bx-space-4); justify-items: start; align-content: start; }
.entry-copy p { color: var(--bx-text-muted); }
.entry-groups .jump a { padding-block: var(--bx-space-2); line-height: 1.35; }
.entry-groups { grid-column: 1 / -1; display: grid; gap: var(--bx-space-3); padding-top: var(--bx-space-5); border-top: var(--hair); }
.entry-side { display: grid; gap: var(--bx-space-3); align-content: start; }
@media (min-width: 64rem) { .entry .cut-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--bx-space-12); padding: var(--bx-space-10); } }
.hub-cap { margin-top: var(--bx-space-3); font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-600); max-width: 58ch; }
.hub-code .code { max-width: 32rem; }
.hub-code .code .k { color: var(--bx-lime-500); }
.hub-code .code .n { color: var(--bx-green-300); }
.hub-code .code .s { color: var(--bx-lime-200); }
.hub-code .code .c { color: var(--bx-gray-400); }
.about-src { display: grid; gap: var(--bx-space-3); max-width: 54ch; }
.about-src p { color: var(--bx-text-muted); }

/* ============================== GENERATOR ADDITIONS ============================== */
/* Added by tools/zpl/build.py templates; the only rules not in the original design. */
/* A related command that has no page: the same card as .rel a, dashed and not a link. */
.rel .rel-off { display: grid; gap: var(--bx-space-1); align-content: start; height: 100%; min-height: var(--bx-touch-target); padding: var(--bx-space-4) var(--bx-space-5); background: var(--bx-surface); border: 1px dashed var(--bx-border-strong); color: var(--bx-ink); }
/* A pager with only a "next" link keeps it on the right, under the "next" column. */
@media (min-width: 40rem) { .pager .next:first-child { grid-column: 2; } }
/* A long group name (Spanish) in the badge row may wrap instead of widening the page on a phone. */
.cmd-meta .badge { max-width: 100%; white-space: normal; }

/* ============================== PRINT ============================== */
/* A command page or guide printed from the browser: no navigation or jump lists, dark code panels turned into dark-on-white
   with the full line wrapped (nothing scrolls on paper, so nothing may be clipped), parameter cards kept whole, and the
   independent-reference notice and source line kept because they are part of the citation. Shared print rules are in site.css. */
@media print {
  .jump, .doc-side, .to-groups, .pager, .entry-groups, .nts-fold > summary::after { display: none !important; }
  .z-hero { padding-block: 0 var(--bx-space-4); }
  .z-body { padding-block: var(--bx-space-4) var(--bx-space-8); }
  .cmd-code { font-size: 3.5rem; }
  /* Syntax strip and code panels: light surface, ink text, wrapped. The chamfer outline stays as a grey hairline. */
  .syn { background: none; color: var(--bx-ink); border: 1px solid var(--bx-gray-400); overflow: visible; }
  .syn-label { color: var(--bx-gray-700); }
  .syn b { color: var(--bx-ink); }
  .syn code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .code { --cut-edge: var(--bx-gray-400); --cut-fill: var(--bx-white); }
  .code .cut-in { color: var(--bx-ink); }
  .code-bar { color: var(--bx-gray-700); border-bottom-color: var(--bx-gray-300); }
  .code pre { overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.75rem; }
  /* !important: the token colours are set with higher specificity per page type (.ex .code .k, .gex .code .k, ...). */
  .code .k, .code .t, .code .s, .code .n, .code .m { color: var(--bx-ink) !important; }
  .code .k { font-weight: 700; }
  .code .c { color: var(--bx-gray-700) !important; font-style: italic; }
  /* Guide issues are folded on screen; on paper they are shown, because a reader cannot click. */
  .nts-fold::details-content { content-visibility: visible; display: block; }
  .nts-fold > summary { min-height: 0; }
  .ptab tbody tr, .nts li, .rel a, .rel .rel-off, .gcard, .cmd-row { break-inside: avoid; }
  .zsec + .zsec, .zstack > .zsec + .zsec { margin-top: var(--bx-space-8); }
}