/* The library pages: a head, then one reading column. Space follows the
   site's scale: 96px between sections (56px on a phone), 32px between blocks
   (24px), 16px from a heading to its content and between paragraphs. */
.lib-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; color: var(--ink-2); margin-bottom: 18px; }
.lib-crumbs a { color: var(--ink-2); text-decoration: none; }
.lib-crumbs a:hover { color: var(--cut); }
.lib-crumbs span + span::before { content: "/"; margin-right: 6px; color: var(--rule); }
.lib-head h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 650; max-width: 18ch; }
.lib-head p { margin-top: 16px; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.lib-body { padding-block: 8px clamp(56px, 6.67vw, 96px); max-width: 920px; }
.lib-body > * { margin-block: 0; }
.lib-body > * + * { margin-top: clamp(24px, 2.22vw, 32px); }
.lib-body > h2 { font-size: var(--step-2); letter-spacing: -0.02em; margin-top: clamp(56px, 6.67vw, 96px); }
.lib-body > h2:first-child { margin-top: 0; }
.lib-body > h2 + *, .lib-body > p + p, .lib-body > .specimen + .specimen, .lib-body > pre + pre { margin-top: 16px; }
.lib-body p, .lib-body li { font-size: 1.0625rem; line-height: 1.6; max-width: 68ch; }
.lib-body ul { padding-left: 1.2rem; display: grid; gap: 8px; }
.lib-body ul.lib-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; }
.lib-body code { font-family: var(--mono); font-size: 0.875em; background: var(--panel); padding: 1px 5px; border-radius: 4px; }
.lib-body .specimen { line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; max-width: none; }
.t-scroll { overflow-x: auto; }
.lib-body table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.lib-body th, .lib-body td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; }
.lib-body th { font-weight: 500; font-size: 0.8125rem; color: var(--ink-2); }
.lib-body tbody tr + tr td { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 7%, transparent); }
.lib-body td:first-child { color: var(--ink-2); }
.lib-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; align-items: start; }
.lib-split th:last-child, .lib-split td:last-child { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.lib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.lib-card { display: grid; gap: 8px; align-content: start; padding: 18px 20px; border-radius: 8px; background: var(--panel); text-decoration: none; color: var(--ink); }
.lib-card:hover { background: color-mix(in srgb, var(--ink) 8%, var(--panel)); color: var(--ink); }
.lib-card b { font-weight: 600; }
.lib-card span { font-size: 0.875rem; color: var(--ink-2); line-height: 1.45; }
.lib-faq { display: grid; gap: 16px; }
.lib-faq details { background: var(--panel); border-radius: 8px; padding: 16px 20px; }
.lib-faq summary { font-weight: 600; cursor: pointer; }
.lib-faq p { margin-top: 8px; color: var(--ink-2); }
.lib-sources { font-size: 0.8125rem; color: var(--ink-2); }
.lib-sources ul { margin: 6px 0 0; }
.lib-sources a { overflow-wrap: anywhere; }
@media (max-width: 900px) { .lib-body ul.lib-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .lib-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 560px) { .lib-body ul.lib-cols { grid-template-columns: 1fr; } }
