/* lock-site.css: the shared stylesheet of the Lock sites (locksql, lockmq,
   lockfile, lockhttp, locklog). Identical bytes in every Lock repo.

   The family identity, "a printed ticket that a human signs", on coloured
   stock: lockfamily/docs/identity.md and site-kit/COLOUR.md. Link
   tokens.css first (fonts, colours, space, the accents), then this file,
   and name the product once: <html data-accent="locksql">. No build step,
   no third-party request.

   It styles the shared shell (header, hero, install box, footer, family
   strip) and every content class the Lock sites use, under their old names,
   so a site migrates by swapping the stylesheet and its header, hero and
   footer, not by rewriting its pages. See the kit's KIT.md. */

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  font-kerning: normal;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
[id] { scroll-margin-top: 5rem; }

h1, h2, h3 {
  font-family: var(--font-display); font-weight: 700; line-height: 1.12;
  letter-spacing: -0.005em; text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin: var(--s-7) 0 var(--s-4); max-width: 24ch; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: var(--s-8) 0 var(--s-4); max-width: 30ch; }
h3 { font-size: 1.25rem; margin: var(--s-6) 0 var(--s-2); }
h1 code, h2 code, h3 code { font-size: 0.82em; font-weight: 600; }
p, ul, ol { margin: 0 0 var(--s-4); }
li + li { margin-top: var(--s-1); }
strong { font-weight: 600; }

code, kbd, pre { font-family: var(--font-mono); }
code { font-size: 0.86em; }
:not(pre) > code {
  padding: 0.05em 0.3em; border-radius: 2px;
  background: var(--accent-tint); color: var(--ink);
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block; padding: 0 0.4em; line-height: 1.4; font-size: 0.86em;
  border: 1px solid var(--ink-2); border-bottom-width: 2px; border-radius: var(--radius);
  background: var(--card); color: var(--ink);
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; outline: none; padding-bottom: var(--s-7); counter-reset: clause; }
.prose { max-width: 44rem; }
.prose > :last-child { margin-bottom: 0; }

/* A printed form's label: mono, small, spaced capitals. */
.label, .eyebrow, caption, .site-footer h2 {
  font: 600 0.75rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s-2); top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-3);
  font: 600 0.9rem var(--font-mono);
}
.skip-link:focus { top: var(--s-2); }

/* ---------- header: a ruled band, like a form's letterhead ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--ink); box-shadow: inset 0 4px 0 var(--accent); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 var(--s-5); min-height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px;
  color: var(--ink); text-decoration: none; flex: none;
}
.brand img { width: 32px; height: 32px; }
.wordmark { font: 700 1.35rem/1 var(--font-display); letter-spacing: 0; color: var(--ink); }
.wordmark span { color: inherit; }
.brand:hover .wordmark { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.site-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  font: 600 0.8rem/1.4 var(--font-mono);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.site-nav a:hover { color: var(--accent-ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { border-bottom: 3px solid var(--accent); color: var(--accent-ink); }
.site-nav a[href^="http"]::after { content: " \2197"; color: var(--ink-2); }

/* Phones: the brand on one row, the navigation on a second row that scrolls
   sideways in its own box (a fade on the right edge hints at more links). */
@media (max-width: 47.99rem) {
  .site-header .wrap { padding-top: var(--s-1); }
  .site-nav { width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); border-top: 1px solid var(--rule); }
  .site-nav ul {
    overflow-x: auto; padding: 0 2.5rem 0 calc(var(--gutter) - 10px); scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .site-nav li { flex: none; }
}

/* ---------- page head (h1 of an inner page) ---------- */

main > .wrap > h1:first-child, main > .wrap > .eyebrow:first-child { margin-top: var(--s-7); }
main > .wrap > .eyebrow:first-child + h1 { margin-top: var(--s-2); }
.lead { font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem); line-height: 1.5; max-width: 40rem; color: var(--ink); }
.prose .lead, .lead.prose { margin-bottom: var(--s-4); }

/* ---------- sections: numbered, like the clauses of a document ---------- */

main section > h2:not(.visually-hidden) { padding-top: 0; border-top: 3px solid var(--accent); max-width: none; }
/* The clause number: a tab in the product's colour, hanging from the rule. */
main section > h2:not(.visually-hidden)::before {
  counter-increment: clause; content: counter(clause, decimal-leading-zero);
  display: block; width: max-content; margin-bottom: var(--s-3); padding: 2px 8px 3px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--accent); color: var(--on-accent);
  font: 600 0.75rem/1.4 var(--font-mono); letter-spacing: 0.08em;
}

/* Every second section of a page sits on a band of the product's tint,
   edge to edge (the shadow paints the band, the clip keeps it in its row). */
main > .wrap > section:not(.hero):not(.limits):not(.demo-section):nth-of-type(even) {
  margin: var(--s-8) 0 0; padding: var(--s-7) 0;
  background: var(--accent-tint); box-shadow: 0 0 0 100vmax var(--accent-tint); clip-path: inset(0 -100vmax);
}
main > .wrap > section:not(.hero):not(.limits):not(.demo-section):nth-of-type(even) > h2 { margin-top: 0; }
main > .wrap > section:not(.hero):not(.limits):not(.demo-section):nth-of-type(even) > :last-child { margin-bottom: 0; }
main > .wrap > section:not(.hero):not(.limits):not(.demo-section):nth-of-type(even) :not(pre) > code { background: var(--card); }
main section > h2:not(.visually-hidden) > .heading-anchor { font-family: var(--font-mono); }

/* ---------- hero ---------- */

/* The hero is printed on the product's coloured stock, edge to edge, and
   ends on a perforation. --accent-stock is also its background-color, so a
   contrast check reads a flat colour under the wash. */
.hero {
  display: grid; gap: var(--s-6); align-items: start;
  position: relative; isolation: isolate;
  padding: clamp(var(--s-6), 6vw, var(--s-8)) 0 calc(var(--s-6) + 9px); margin-bottom: var(--s-6);
  background-color: var(--accent-stock);
  --notch: var(--accent-stock-2);
  --rule: color-mix(in srgb, var(--accent) 45%, transparent);
  --perf: 2px dashed var(--rule);
}
.hero::before, .hero::after { content: ""; position: absolute; left: 50%; width: 100vw; transform: translateX(-50%); }
.hero::before {
  z-index: -1; top: 0; bottom: 0;
  background: linear-gradient(180deg, var(--accent-stock) 0 40%, var(--accent-stock-2) 78% 100%);
}
.hero::after {
  bottom: -1px; height: 9px;
  background: radial-gradient(circle at 50% 100%, var(--paper) 5px, transparent 5.6px) 0 0 / 18px 9px repeat-x;
}
@media (min-width: 980px) {
  .hero::before { background: linear-gradient(100deg, var(--accent-stock) 0 36%, var(--accent-stock-2) 60% 100%); }
}
.hero :not(pre) > code { background: var(--card); }
.hero > * { min-width: 0; }
@media (min-width: 980px) {
  .hero:has(> .hero-aside) { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: var(--s-7); }
}
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.04; margin: var(--s-3) 0 var(--s-5); max-width: 16ch; }
.hero h1 .key { color: var(--accent-ink); }
.hero .lead { margin-bottom: var(--s-5); }
.hero .intro { color: var(--ink-2); max-width: 40rem; }
.hero-aside { margin: 0; }
@media (min-width: 980px) { .hero-aside { margin-top: var(--s-7); } }

.eyebrow { margin: 0; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--ink); text-decoration: underline; }
.badge {
  display: inline-block; margin-right: var(--s-2); padding: 2px 7px;
  border-radius: var(--radius);
  color: var(--on-accent); background: var(--accent); letter-spacing: 0.04em;
}

.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-5) 0; }
.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--card); color: var(--ink); text-decoration: none;
  font: 600 0.85rem/1.2 var(--font-mono);
}
.button:hover { background: var(--accent-tint); text-decoration: underline; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 3px 3px 0 var(--ink); }
.button.primary:hover { background: var(--accent); color: var(--on-accent); text-decoration: underline; box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }
.button:focus-visible { outline-color: var(--ink); }
.button[href^="http"]::after { content: "\00a0\2197"; }

/* One line under the hero: the family and its one hub. */
.hub-line, .family-line {
  max-width: 44rem; margin: 0; padding: var(--s-3) 0 0; border-top: var(--perf);
  color: var(--ink-2); font-size: 0.95rem;
}
.hub-line a, .family-line a { color: var(--ink); }
.hub-line code { background: var(--card); }

.facts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.facts li {
  margin: 0; padding: 2px 8px; border: 1px solid var(--accent); border-radius: var(--radius);
  font: 0.78rem/1.6 var(--font-mono); color: var(--ink); background: var(--card);
}

/* ---------- install box: a terminal with a Copy button (assets/copy.js) ---------- */

.install { max-width: 40rem; margin: 0 0 var(--s-4); }
.install-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 40px; padding: 0 var(--s-2) 0 var(--s-4);
  background: var(--term-bg); color: var(--term-dim);
  border: 1px solid var(--ink); border-bottom: 1px dashed #5a546c; border-radius: var(--radius) var(--radius) 0 0;
  font: 600 0.72rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.install pre {
  margin: 0; border: 1px solid var(--ink); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.86rem; line-height: 1.75; padding: var(--s-3) var(--s-4);
}
.install .cmd::before { content: "$ "; color: var(--term-dim); user-select: none; -webkit-user-select: none; }
.install-note { margin: var(--s-2) 0 0; font-size: 0.92rem; color: var(--ink-2); }
.copy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  border: 1px solid #575146; border-radius: var(--radius); background: transparent; color: var(--term-text);
  font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.04em; text-transform: none; cursor: pointer;
}
.copy:hover { border-color: var(--term-text); }
.copy:focus-visible { outline: 3px solid #a3bdff; outline-offset: 2px; }
.copy[data-state="done"] { color: #7fcf8a; border-color: #7fcf8a; }
.copy[data-state="fail"] { color: #e8b860; border-color: #e8b860; }

/* ---------- code, terminals, diagrams ---------- */

pre {
  margin: 0 0 var(--s-5); padding: var(--s-3) var(--s-4); max-width: 100%; overflow-x: auto;
  background: var(--term-bg); color: var(--term-text);
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: 0.82rem; line-height: 1.6; tab-size: 4;
}
pre code { font-size: inherit; color: inherit; background: none; padding: 0; }
pre:focus-visible { outline-offset: 3px; }
pre.term { border-color: var(--ink); }
.cmt, .term .c { color: var(--term-dim); }
/* An ASCII diagram is a drawing on paper, not a terminal. */
pre.diagram {
  background: var(--card); color: var(--ink); border: 1px solid var(--ink);
  line-height: 1.2; font-size: 0.8rem;
  /* The family's Latin-subset mono has no box-drawing glyphs: a system mono
     that has them keeps the boxes aligned. */
  font-family: Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", ui-monospace, monospace;
}

figure { margin: 0 0 var(--s-5); }
figcaption { margin-top: var(--s-2); font-size: 0.92rem; color: var(--ink-2); max-width: 44rem; }

blockquote {
  margin: var(--s-5) 0; padding: var(--s-2) 0 var(--s-2) var(--s-4); max-width: 44rem;
  border-left: 4px solid var(--accent);
  font: 400 italic 1.2rem/1.5 var(--font-text); color: var(--ink);
}
blockquote p { margin: 0; }

.notice {
  display: block; max-width: 44rem; margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4);
  background: var(--accent-tint); border: 1px solid var(--accent); border-left-width: 6px; border-radius: var(--radius);
  font-size: 0.98rem;
}
.notice > :last-child { margin-bottom: 0; }

/* ---------- the ticket (optional hero aside), from lockfamily ---------- */

.ticket { margin: 0; position: relative; }
.ticket-face, .ticket-stub { background: var(--card); border: 1px solid var(--ink); position: relative; box-shadow: 7px 7px 0 var(--accent); }
.ticket-face { padding: var(--s-4) var(--s-4) var(--s-5); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.ticket-stub {
  padding: var(--s-4); border-top: var(--perf); border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.92rem; color: var(--ink-2);
}
.ticket-stub p { margin: 0 0 var(--s-2); }
.ticket-stub p:last-child { margin: 0; }
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--notch, var(--paper)); border: 1px solid var(--ink);
}
.ticket-stub::before { left: -11px; clip-path: inset(0 0 0 50%); }
.ticket-stub::after { right: -11px; clip-path: inset(0 50% 0 0); }
.ticket-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-3);
  margin: 0 0 var(--s-3); padding-bottom: var(--s-2); border-bottom: 2px solid var(--ink);
  font: 600 0.8rem/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.ticket-fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
.ticket-fields > div { padding: var(--s-2) 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.ticket-fields .wide { grid-column: 1 / -1; }
.ticket-fields dt { font: 600 0.7rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ticket-fields dd { margin: 2px 0 0; font-size: 0.98rem; }
.ticket-fields code { font-size: 0.82rem; white-space: pre-wrap; background: none; padding: 0; }
.ticket figcaption { margin-top: var(--s-3); }
.masked { color: var(--mask); font-weight: 600; }
.stamp {
  display: inline-block; margin: var(--s-4) 0 0; padding: var(--s-1) var(--s-3);
  border: 3px double var(--sign); color: var(--sign); border-radius: var(--radius);
  font: 600 0.9rem/1.5 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  transform: rotate(-3deg); transform-origin: left center;
  animation: stamp 0.5s cubic-bezier(.2, 1.4, .4, 1) 0.8s both;
}
.stamp.denied { border-color: var(--stamp); color: var(--stamp); }
.stamp kbd { text-transform: none; font-size: 0.85em; border-color: var(--sign); color: var(--sign); }
@keyframes stamp { from { opacity: 0; transform: rotate(-3deg) scale(1.6); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }

/* ---------- demo (video, image, animated SVG) ---------- */

.demo-section { margin-top: var(--s-6); }
/* The demo spans the page column, never taller than the window minus the
   header, so it is seen whole. */
figure.demo {
  width: min(100%, calc((100vh - 7rem) * 1700 / 940));
  width: min(100%, calc((100svh - 7rem) * 1700 / 940));
  margin: 0 auto var(--s-5);
}
figure.demo video, figure.demo img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--ink); border-radius: var(--radius); background: var(--term-bg);
}
figure.demo video { aspect-ratio: 1700 / 940; }
figure.demo figcaption { margin: var(--s-3) auto 0; max-width: 46rem; text-align: center; }
.demo-link { display: block; border-radius: var(--radius); }
.demo-frame { border-radius: var(--radius); background: var(--term-bg); }
.demo-hint { display: none; }
@media (max-width: 40rem) {
  .demo-frame { overflow-x: auto; overscroll-behavior-x: contain; }
  .demo-frame img { width: 56.25rem; max-width: none; }
  .demo-hint { display: block; margin: var(--s-2) 0 0; color: var(--ink-2); font-size: 0.9rem; text-align: center; }
}

/* ---------- lists of things: ledgers (rows between rules), not cards ---------- */

.cards {
  display: grid; gap: 0 var(--s-6); margin: var(--s-5) 0 var(--s-4); padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  border-top: 3px solid var(--accent);
}
.cards.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.cards > li {
  position: relative; margin: 0; padding: var(--s-4) 0 var(--s-4) 2.6rem;
  border-bottom: 1px solid var(--rule);
}
.cards .icon {
  position: absolute; left: 0; top: var(--s-4); width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center; font-size: 1.05rem; line-height: 1;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-stock);
}
.cards > li:not(:has(.icon)) { padding-left: 0; }
.cards h3 { margin: 0 0 var(--s-1); font: 600 1rem/1.4 var(--font-mono); }
.cards h3 a { color: var(--ink); }
.cards p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.cards p + p { margin-top: var(--s-2); }

/* The family as cards (older pages): name, line, "you are here". */
.cards.family { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.cards.family > li[aria-current] h3 a { color: var(--ink); }
.here {
  display: inline-block; margin-left: var(--s-2); padding: 0 6px; vertical-align: 1px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  font: 600 0.68rem/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}

/* Numbered steps: a ledger with mono numbers. */
ol.steps { list-style: none; padding: 0; counter-reset: st; border-top: 1px solid var(--rule); }
ol.steps > li {
  counter-increment: st; position: relative; margin: 0;
  padding: var(--s-3) 0 var(--s-3) 2.4rem; border-bottom: 1px solid var(--rule);
}
ol.steps > li::before {
  content: counter(st) "."; position: absolute; left: 0; top: var(--s-3);
  font: 600 0.85rem/1.9 var(--font-mono); color: var(--accent-ink);
}
ol.steps > li > :last-child { margin-bottom: 0; }
ol.steps pre { margin: var(--s-2) 0 0; }

/* Further reading. */
.more { max-width: 44rem; border-top: 3px solid var(--accent); }
.more ul { list-style: none; margin: 0; padding: 0; }
.more li { margin: 0; padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
.more a { font-family: var(--font-mono); font-weight: 600; font-size: 0.92rem; }
.link-line a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- tables ---------- */

.prose + .table-wrap, p + .table-wrap { margin-top: var(--s-5); }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 var(--s-5); border-top: 3px solid var(--accent); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; caption-side: top; padding: var(--s-2) 0; }
th, td { padding: var(--s-2) var(--s-3) var(--s-2) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th {
  font: 600 0.72rem/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  border-bottom: 1px solid var(--ink); vertical-align: bottom;
}
tbody th { font-weight: 600; }
tbody tr:hover { background: var(--accent-tint); }
.table-wrap code { white-space: nowrap; }
td.yes, td.no, td.partial { white-space: nowrap; font: 600 0.85rem/1.6 var(--font-mono); }
td.yes { color: var(--auto); }
td.no { color: var(--stamp); }
td.partial { color: var(--asked); }
td.yes::before { content: "\2713\00a0"; }
td.no::before { content: "\2715\00a0"; }
td.partial::before { content: "~\00a0"; }
.compare td { min-width: 7rem; }
.compare th[scope="row"] { min-width: 11rem; }
.engines td, .engines th { min-width: 9rem; }
.engines td:first-child, .engines th:first-child { min-width: 0; }

/* ---------- known limits: the fine print, kept in view ---------- */

.limits {
  margin: var(--s-8) 0 var(--s-5); padding: 0 var(--s-5) var(--s-5);
  background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius);
}
main .limits > h2:not(.visually-hidden) { margin-top: 0; padding-top: var(--s-4); border-top: 0; }
main .limits > h2:not(.visually-hidden)::before {
  content: counter(clause, decimal-leading-zero) " \00b7  fine print";
  white-space: pre; padding: 0; background: none; color: var(--asked);
}
.limits h3 { font-size: 1.1rem; }
@media (max-width: 40rem) { .limits { padding: 0 var(--s-4) var(--s-4); } }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; border-top: 3px solid var(--accent); }
.faq > section { padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); }
main .faq section > h2:not(.visually-hidden) {
  margin: 0 0 var(--s-2); padding: 0; border: 0; font-size: 1.2rem; line-height: 1.3;
}
main .faq section > h2:not(.visually-hidden)::before {
  display: inline; margin: 0 var(--s-2) 0 0; padding: 0; background: none; color: var(--accent-ink);
  content: "Q" counter(clause, decimal-leading-zero);
  font-size: 0.72rem; vertical-align: 2px;
}
.faq p { margin: 0; }
.faq p + p { margin-top: var(--s-2); }

/* ---------- section links (assets/anchors.js) ---------- */

.has-anchor { cursor: pointer; }
.heading-anchor {
  padding: 0.75rem 1.1rem; margin-left: calc(0.3em - 1.1rem);
  color: var(--ink-2); font: 600 0.7em var(--font-mono); text-decoration: none;
  opacity: 0; transition: opacity 0.15s ease;
}
.has-anchor:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; color: var(--accent-ink); }
@media (hover: none) { .heading-anchor { opacity: 0.5; } }
.anchor-toast {
  position: fixed; left: 50%; bottom: var(--s-5); z-index: 60; transform: translateX(-50%);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font: 600 0.85rem var(--font-mono);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.anchor-toast:empty { display: none; }
.anchor-toast.is-visible { opacity: 1; }

/* ---------- footer: the family strip, the Lock's links, the licence ---------- */

.site-footer { margin-top: var(--s-7); border-top: 4px solid var(--accent); background: var(--accent-tint); font-size: 0.95rem; }
.site-footer .footer-grid { display: grid; gap: var(--s-6); padding-top: 40px; padding-bottom: var(--s-6); }
@media (min-width: 720px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .site-footer .footer-grid { grid-template-columns: 1.3fr 0.8fr 1.6fr; } .footer-about { grid-column: auto; } }
.footer-about p { margin: var(--s-3) 0 0; color: var(--ink-2); max-width: 26rem; }
.footer-about .family-link a { color: var(--ink); font-weight: 600; }
.site-footer h2 { margin: 0 0 var(--s-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); font: 0.88rem var(--font-mono); }
.family-strip ul { border-top: 1px solid var(--ink); }
.family-strip li {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 var(--s-3); align-items: baseline;
  padding: 2px 0; border-bottom: 1px solid var(--rule);
}
.family-strip li a { font-weight: 600; }
.family-strip li span { color: var(--ink-2); font-size: 0.88rem; }
.family-strip li[aria-current] span::after {
  content: "this site"; margin-left: var(--s-2); padding: 1px 6px; vertical-align: 1px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius);
  font: 600 0.62rem/1.5 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5);
  padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }
/* Older footers: a plain list of links and lines. */
.site-footer > .wrap > ul { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); padding-top: var(--s-5); }
.site-footer > .wrap > p { color: var(--ink-2); }

/* ---------- small screens, motion, print ---------- */

@media (max-width: 40rem) {
  h2 { margin-top: var(--s-7); }
  .hero h1 br { display: none; }
  .ticket-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header { position: static; }
  .site-nav, .skip-link, .actions, .copy { display: none; }
  pre { white-space: pre-wrap; }
}

/* ---------- decision words: approved by a rule, asked, denied ---------- */

.status {
  display: inline-block; padding: 0 6px; border: 1px solid currentColor; border-radius: var(--radius);
  font: 600 0.7rem/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.status.auto { color: var(--auto); }
.status.asked { color: var(--asked); }
.status.denied { color: var(--stamp); }
.status.you { color: var(--sign); }
.ticket-fields dd .status { margin-right: var(--s-2); }
.ticket-fields dd .note { display: block; margin-top: 2px; color: var(--ink-2); font-size: 0.9rem; }
@media (max-width: 40rem) {
  /* Long commands wrap instead of hiding behind a scroll on a phone. */
  .install pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
