/* styles/kit.css: parts shared by the index page and the reading pages (src/kit/kit.jsx, ui/copy.jsx).
   Same tokens as base.css; nothing here sets a colour of its own. */

/* ── Segmented control (pricing period, rankings window, detail timeframe) ── */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(248,243,234,.7); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 40px; padding: 0 16px; border: 0; background: transparent; border-radius: 999px; font: 500 14px/1 var(--sans); color: var(--ink-3); cursor: pointer; transition: color 200ms ease; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg__thumb { position: absolute; z-index: 0; top: 4px; left: 0; height: 40px; border-radius: 999px; background: var(--porcelain); box-shadow: 0 2px 8px -2px rgba(42,31,25,.25); transition: transform 300ms var(--inout), width 300ms var(--inout); }
.seg--sm button { height: 34px; padding: 0 13px; font-size: 13.5px; }
.seg--sm .seg__thumb { height: 34px; }
@media (hover: hover) and (pointer: fine) { .seg button[aria-checked="false"]:hover { color: var(--ink-2); } }

/* ── Copy chip (base URL) and model-id chip ── */
.copy { justify-self: start; display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 4px 0; cursor: pointer; max-width: 100%; }
.copy code { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.copy__lbl { flex: none; font: 500 12.5px/1 var(--sans); color: var(--ink-2); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-2); transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.copy[data-copied="copied"] .copy__lbl { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.idchip { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 8px; margin: -4px 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.idchip code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idchip svg { flex: none; width: 13px; height: 13px; }
.idchip[data-copied="copied"] { color: var(--umber); }
@media (pointer: coarse) { .copy { padding-block: 9px; } .idchip { height: 40px; } }
@media (hover: hover) and (pointer: fine) {
  .copy:hover .copy__lbl { background: var(--paper-hi); color: var(--ink); }
  .copy[data-copied="copied"]:hover .copy__lbl { background: var(--dark); color: var(--cream); }
  .idchip:hover { background: var(--paper-lo); color: var(--ink); }
}

/* ── Marks: a lab's logo on a small porcelain tile, or its initial in the serif ── */
.mono-mark { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-3); font: 500 10px/1 var(--serif); color: var(--ink-2); }
/* the initial is nudged by transform, which is not snapped to whole pixels the way padding is */
.mono-mark > span { translate: 0 .15em; }
.labmark { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--porcelain); box-shadow: inset 0 0 0 1px var(--line); }
.labmark img { width: 21px; height: 21px; }
.labmark span { font: 400 19px/1 var(--serif); color: var(--ink-2); translate: 0 .07em; }
.labmark--sm { width: 30px; height: 30px; border-radius: 9px; }
.labmark--sm img { width: 16px; height: 16px; }
.labmark--sm span { font-size: 15px; }
.labmark--lg { width: 64px; height: 64px; border-radius: 18px; }
.labmark--lg img { width: 34px; height: 34px; }
.labmark--lg span { font-size: 30px; translate: 0 .105em; }
/* a mark that brings its own ground fills the frame */
.labmark--tile { position: relative; overflow: hidden; background: none; }
.labmark.labmark--tile img { width: 100%; height: 100%; object-fit: cover; }
.labmark--tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(42,33,24,.1); pointer-events: none; }

/* ── Reading pages: the header ── */
.page { min-height: 70svh; }
.phead { position: relative; isolation: isolate; padding: clamp(128px, 12vw, 168px) 0 calc(clamp(20px, 2.4vw, 36px) + 120px); margin-bottom: -24px; }
/* the vellum ground dissolves into the paper through a dithered seam (images/edge-seam.png, 120 px, cut from the Vault's
   edge) that lies inside the header's own bottom padding: no text ever sits on the dither */
.phead::before { content: ''; position: absolute; z-index: -1; inset: 0; background: var(--vellum);
  -webkit-mask: linear-gradient(#000, #000) 0 0 / 100% calc(100% - 118px) no-repeat, url(../images/edge-seam.png) 0 100% / 576px 120px repeat-x;
  mask: linear-gradient(#000, #000) 0 0 / 100% calc(100% - 118px) no-repeat, url(../images/edge-seam.png) 0 100% / 576px 120px repeat-x; }
.phead__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(28px, 5vw, 72px); align-items: end; }
.phead__copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: start; min-width: 0; }
.phead__h { margin: 0; font: 300 clamp(44px, 5.6vw, 84px)/1 var(--serif); letter-spacing: -0.032em; text-wrap: balance; }
.phead__lede { max-width: 52ch; }
.phead__art { width: 100%; max-width: 440px; justify-self: end; margin-bottom: -12px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 0; list-style: none; font: 400 13px/1.3 var(--sans); color: var(--ink-3); }
.crumbs a { position: relative; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.crumbs a::before { content: ''; position: absolute; inset: -10px -6px; }
.crumbs li + li::before { content: '/'; margin-right: 10px; color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--ink); border-color: var(--ink); } }
@media (max-width: 860px) {
  .phead__grid { grid-template-columns: minmax(0, 1fr); }
  .phead__art { display: none; }
}

/* ── Search field ── */
.search { position: relative; display: flex; align-items: center; width: min(100%, 520px); height: 48px; border-radius: 999px; background: var(--porcelain); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 26px -20px rgba(42,31,25,.5); transition: box-shadow 200ms ease; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--ink-3), 0 12px 30px -18px rgba(42,31,25,.55); }
.search > svg { position: absolute; left: 18px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0 52px 0 46px; border: 0; background: none; font: 400 16px/1 var(--sans); color: var(--ink); outline: none; border-radius: 999px; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search kbd { position: absolute; right: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 12px/1 var(--mono); color: var(--ink-3); }
@media (hover: none), (pointer: coarse) { .search kbd { display: none; } }
.search__clear { position: absolute; right: 6px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.search__clear svg { width: 15px; height: 15px; }
.search--big { height: 56px; }
.search--big input { font-size: 17px; }
html[data-kbd] .search:focus-within { box-shadow: inset 0 0 0 2px var(--umber); }
.search input:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) { .search__clear:hover { background: var(--paper-lo); color: var(--ink); } }

/* ── Listbox ── */
.lbx { position: relative; }
.lbx__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; border: 0; border-radius: 999px; background: rgba(248,243,234,.7); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 14px/1 var(--sans); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background-color 160ms ease; }
.lbx__btn svg { width: 15px; height: 15px; color: var(--ink-3); }
.lbx__btn .lbx__chev { width: 14px; height: 14px; transition: transform 200ms var(--out); }
.lbx__btn[aria-expanded="true"] .lbx__chev { transform: rotate(180deg); }
.lbx__list { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; min-width: 100%; margin: 0; padding: 6px; list-style: none; border-radius: var(--r-md); background: var(--porcelain); box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -24px rgba(42,31,25,.55);
  transform-origin: 90% 0; animation: lbxIn 180ms var(--out); outline: none; }
@keyframes lbxIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.lbx__list li { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 10px; border-radius: 10px; font: 400 14px/1 var(--sans); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.lbx__list li svg { width: 14px; height: 14px; color: var(--umber); opacity: 0; }
.lbx__list li[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.lbx__list li[aria-selected="true"] svg { opacity: 1; }
.lbx__list li[data-hi] { background: var(--paper-lo); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .lbx__btn:hover { background: var(--porcelain); } }
@media (pointer: coarse) { .lbx__btn { height: 44px; } .lbx__list li { height: 44px; } }

/* ── States ── */
/* Skeletons are set in the print's own raster: a dot screen on the paper, with one band of light passing over every
   block at once (fixed attachment), like a plate being inked. Still under reduced motion. */
.skel { display: grid; }
.skel__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px; gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.skel__row i, .skel__row b, .skel__row em, .skel__row u { display: block; border-radius: 6px;
  background-color: var(--paper-lo);
  background-image: linear-gradient(100deg, rgba(251,247,240,0) 40%, rgba(251,247,240,.85) 50%, rgba(251,247,240,0) 60%), radial-gradient(circle, rgba(74,48,26,.2) .75px, transparent 1px);
  background-size: 250vw 100%, 4px 4px; background-attachment: fixed, scroll; background-repeat: no-repeat, repeat;
  animation: skelInk 1.8s var(--inout) infinite; }
.skel__row i { width: 40px; height: 40px; border-radius: 11px; }
.skel__row span { display: grid; gap: 10px; }
.skel__row b { width: 38%; height: 16px; }
.skel__row em { width: 72%; height: 11px; }
.skel__row u { height: 14px; }
@keyframes skelInk { from { background-position: 125vw 0, 0 0; } to { background-position: -125vw 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .skel__row i, .skel__row b, .skel__row em, .skel__row u { animation: none; } }
.empty { display: grid; justify-items: center; gap: 12px; padding: 64px 0 80px; text-align: center; }
.empty__art { width: 220px; opacity: .8; image-rendering: pixelated; }
.empty__t { margin: 0; font: 300 30px/1.1 var(--serif); letter-spacing: -0.02em; }
.failed { margin: 24px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 15px; color: var(--ink-2); }
.failed .tlink { border: 0; border-bottom: 1px solid var(--line-2); background: none; cursor: pointer; padding: 0 0 3px; }
.snapnote { margin: 0; font-size: 13px; color: var(--ink-3); }
.tag { font: 500 12.5px/1 var(--sans); color: var(--umber); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── Hit rows: a row whose name link covers the whole row (one tab stop, a big target). Controls inside sit above it
   with z-index 2. A card (.hit) shades itself; a list row (.hit--row) shades a pill that reaches 12px past its text
   on each side, so the hover never presses the words against an edge and the rules between rows stay aligned. ── */
.hit { position: relative; transition: background-color 160ms var(--out); }
.hit__a { color: var(--ink); text-decoration: none; }
.hit__a::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-md); }
.hit--row { isolation: isolate; }
.hit--row::before { content: ''; position: absolute; z-index: -1; inset: 3px -12px; border-radius: 10px; background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity 160ms var(--out); }
.hit--row .hit__a::after { inset: 3px -12px; border-radius: 10px; }
html[data-kbd] .hit:not(.hit--row):focus-within { background: var(--paper-hi); }
html[data-kbd] .hit--row:focus-within::before { opacity: 1; }
html[data-kbd] .hit__a:focus-visible { outline: none; }
html[data-kbd] .hit__a:focus-visible::after { outline: 2px solid var(--umber); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) {
  .hit:not(.hit--row):hover { background: var(--paper-hi); }
  .hit--row:hover::before { opacity: 1; }
  .hit:hover .hit__a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
}

.mcards__more { display: flex; justify-content: center; padding: 32px 0 0; }

/* ── Charts (kit/charts.jsx): ink on paper ── */
.chart { position: relative; margin: 0; min-width: 0; }
.chart svg { display: block; overflow: visible; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__y, .chart__x { font: 400 12px/1 var(--mono); fill: var(--ink-3); }
.chart__x2 { font-size: 11px; fill: var(--umber); }
.chart__line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--ink); }
.chart__cursor { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart__hit { fill: transparent; }
.chart__col { transition: opacity 160ms ease; }
.chart__col.is-dim { opacity: .4; }
.chart__tip { position: absolute; top: 0; z-index: 3; display: grid; gap: 2px; min-width: 140px; padding: 8px 12px; border-radius: 10px; background: var(--porcelain); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -18px rgba(42,31,25,.5); pointer-events: none; font-size: 12.5px; color: var(--ink-3); }
.chart__tip b { font-size: 14px; font-weight: 500; color: var(--ink); }
.chart__tip--wide { min-width: 220px; gap: 5px; }
.chart__tiph { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.chart__tipr { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--ink-2); }
.chart__tipr b { font-size: 12.5px; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.chart__legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart--empty { display: grid; place-items: center; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.chart--empty p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: currentColor; flex: none; }
.swatch--lbh1 { background: repeating-linear-gradient(45deg, currentColor 0 2px, var(--paper) 2px 4px); box-shadow: inset 0 0 0 1px currentColor; }
.swatch--lbh2 { background: radial-gradient(currentColor 30%, var(--paper) 34%) 0 0 / 4px 4px; box-shadow: inset 0 0 0 1px currentColor; }

/* ── Ruled tables and figure tiles ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.tbl thead th { padding-top: 0; font: 500 12.5px/1.2 var(--sans); color: var(--ink-3); border-bottom: 1px solid var(--ink); }
.tbl tbody th { font-weight: 500; color: var(--ink); }
.tbl td.num, .tbl th.num { text-align: right; padding-right: 0; padding-left: 12px; }
.tiles { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.tiles > div { display: grid; gap: 8px; align-content: start; padding: 18px 20px 20px 0; }
.tiles > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.tiles dt { font: 500 12.5px/1.2 var(--sans); color: var(--ink-3); }
.tiles dd { margin: 0; display: grid; gap: 4px; }
.tiles b { font: 300 34px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tiles small { font-size: 12.5px; color: var(--ink-3); }
.skel--tiles { grid-template-columns: repeat(4, 1fr); }
.skel--tiles .skel__row { grid-template-columns: 1fr; border: 0; }
.skel--tiles .skel__row i, .skel--tiles .skel__row u { display: none; }
.skel--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.skel--cards .skel__row { height: 168px; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; padding: 18px; border: 0; border-radius: var(--r-md); background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--line); }
.skel--cards .skel__row u { grid-column: 1 / -1; align-self: end; height: 30px; border-radius: 8px; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .tiles > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ── Model cards (kit ModelCard): catalog grid, related models ── */
.mcards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.mcards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.mcard { display: grid; align-content: start; gap: 14px; padding: 18px 18px 16px; border-radius: var(--r-md); background: var(--linen);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 26px -24px rgba(74,48,26,.5); transition: box-shadow 200ms ease, transform 200ms var(--out), background-color 200ms ease; min-width: 0; }
.mcard--media { padding-top: 0; overflow: hidden; }
.mcard__bn { position: relative; display: block; margin: 0 -18px; height: 104px; overflow: hidden; border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0;
  background: radial-gradient(rgba(74,52,33,.16) 1px, transparent 1.4px) 0 0 / 4px 4px, var(--paper-lo); }
/* the plate is set wider than its window and slid by the card's own hash, so two cards rarely frame the same scene */
.mcard__bn img { display: block; width: 140%; max-width: none; height: 100%; margin-left: calc(var(--at, 50) * -0.4%); object-fit: cover; object-position: 50% calc(var(--at, 50) * 1%); image-rendering: pixelated; opacity: 0; transition: opacity 260ms ease, transform 400ms var(--out); }
.mcard__bn img.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .mcard__bn img { transition: none; } }
.mcard__bn em { position: absolute; left: 12px; bottom: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(251,247,240,.92); font: 500 12px/1 var(--sans); font-style: normal; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.mcard__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.mcard__names { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; justify-items: start; min-width: 0; }
.mcard__name { margin: 0; font: 400 20px/1.15 var(--serif); letter-spacing: -0.01em; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.mcard .idchip { margin: -3px 0 0 -8px; height: 24px; max-width: calc(100% + 8px); }
.mcard .idchip code { font-size: 12px; }
.mcard__specs { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.mcard__specs div { display: grid; gap: 3px; }
.mcard__specs dt { font: 500 12px/1 var(--sans); color: var(--ink-3); }
.mcard__specs dd { margin: 0; font-size: 14px; color: var(--ink); }
.mcard__can { margin: -4px 0 0; font: 400 13.5px/1.4 var(--serif); color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .mcard:hover { transform: translateY(-2px); background: var(--porcelain); box-shadow: inset 0 0 0 1px var(--line-2), 0 26px 34px -26px rgba(74,48,26,.6); }
  .mcard:hover .mcard__bn img { transform: scale(1.04); }
}
html[data-kbd] .mcard:focus-within { background: var(--porcelain); }
/* access, as a word in small capitals */
.acc { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 600 12px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; box-shadow: inset 0 0 0 1px currentColor; }
.acc--pro { color: var(--umber); }
.acc--dev { color: var(--ink); background: var(--gold); box-shadow: none; }
.acc--free { color: var(--ink-3); }

/* charts: the second axis, failed probes, bars and hatched areas */
.chart__line--b { stroke: var(--umber); stroke-dasharray: 5 3; }
.chart__dot--b { fill: var(--umber); }
.chart__y--b { fill: var(--umber); }
.chart__fail { fill: var(--rust); }
.chart__bar { fill: var(--ink-3); transition: fill 140ms ease; }
.chart__bar.is-on { fill: var(--umber); }
.chart__hatch { stroke: var(--ink-3); opacity: .55; }
.chart__tipr--bad { color: var(--rust); }
.key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink); }
.key--b { border-top: 2px dashed var(--umber); }
.key--bad { width: 0; height: 0; border: 5px solid transparent; border-bottom: 8px solid var(--rust); border-top: 0; }
.spark { display: block; width: 100%; height: 26px; }
.spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; }

/* ── Census: a few figures in a ruled band, like the head of a ledger (catalog, rankings) ── */
.census { margin: clamp(28px, 3vw, 44px) auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-2); }
.census > div { display: grid; gap: 6px; padding: 16px 22px 18px; border-left: 1px solid var(--line); }
.census > div:first-child { border-left: 0; padding-left: 0; }
.census dt { font: 500 12.5px/1.2 var(--sans); color: var(--ink-3); }
.census dd { margin: 0; font: 300 clamp(34px, 3.4vw, 48px)/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }

/* ── Questions (kit QA): an answer row that opens on the grid, then its words settle in ── */
.qa { border-top: 1px solid var(--line-2); }
.qa__item { position: relative; border-bottom: 1px solid var(--line-2); }
.qa__item::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--out); }
.qa__item.is-open::after { transform: scaleX(1); }
.qa h3 { margin: 0; font: inherit; }
.qa__btn { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 14px; padding: 24px 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.qa__q { font: 300 clamp(21px, 2.2vw, 29px)/1.2 var(--serif); letter-spacing: -0.015em; transition: color 200ms ease; }
.qa__icon { position: relative; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 240ms ease, box-shadow 240ms ease, transform 160ms var(--out); }
.qa__icon i { position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; border-radius: 1px; background: var(--ink-2); transition: transform 240ms var(--out), opacity 200ms ease, background-color 200ms ease; }
.qa__icon i + i { transform: rotate(90deg); }
.qa__btn:active .qa__icon { transform: scale(.97); }
.qa__item.is-open .qa__icon { background: var(--dark); box-shadow: none; }
.qa__item.is-open .qa__icon i { background: var(--cream); }
.qa__item.is-open .qa__icon i + i { transform: rotate(180deg); opacity: 0; }
.qa__btn:focus-visible { outline: none; }
html[data-kbd] .qa__btn:focus-visible .qa__icon { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--umber); }
@media (hover: hover) and (pointer: fine) {
  .qa__btn:hover .qa__icon { box-shadow: inset 0 0 0 1px var(--ink-3); }
  .qa__item:not(.is-open) .qa__btn:hover .qa__q { color: var(--ink-2); }
}
/* Height opens on the grid row; the words follow a beat later and settle upward. Closing is quicker. */
.qa__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms var(--out); }
.qa__item.is-open .qa__panel { grid-template-rows: 1fr; transition-duration: 300ms; transition-timing-function: var(--drawer); }
.qa__inner { overflow: hidden; min-height: 0; }
.qa__inner p { margin: 0; padding: 0 50px 28px 0; max-width: 66ch; color: var(--ink-2); font-size: 16px; line-height: 1.65; opacity: 0; transform: translateY(-6px); transition: opacity 120ms ease, transform 160ms ease; }
.qa__item.is-open .qa__inner p { opacity: 1; transform: none; transition: opacity 240ms var(--out) 60ms, transform 280ms var(--out) 40ms; }
.qa__inner p a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 640px) {
  .qa__inner p { padding: 0 0 24px; }
}

/* ── Ink pass: content that replaces content (a pricing tab, an integration guide) is printed onto the page, top to
   bottom, behind the site's dithered edge, like a sheet coming off the press. The edge travels through @property;
   browsers without it show the content at once. Off under reduced motion. ── */
@property --press { syntax: '<length-percentage>'; inherits: false; initial-value: 100%; }
.ink-in { animation: inkPass 560ms var(--out) backwards; }
@keyframes inkPass {
  from { --press: -288px; }
  to { --press: 100%; }
}
.ink-in {
  -webkit-mask: linear-gradient(#000, #000) 0 0 / 100% max(0px, var(--press)) no-repeat, url(../images/edge-out.png) 0 var(--press) / 576px 288px repeat-x;
  mask: linear-gradient(#000, #000) 0 0 / 100% max(0px, var(--press)) no-repeat, url(../images/edge-out.png) 0 var(--press) / 576px 288px repeat-x;
}
@media (prefers-reduced-motion: reduce) { .ink-in { animation: none; -webkit-mask: none; mask: none; } }

/* a figure still on its way: a raster bar the height of the digits */
.tally__skel { display: inline-block; width: 2.6em; height: .72em; border-radius: 4px; vertical-align: baseline;
  background-color: var(--paper-lo); background-image: linear-gradient(100deg, rgba(251,247,240,0) 40%, rgba(251,247,240,.85) 50%, rgba(251,247,240,0) 60%), radial-gradient(circle, rgba(74,48,26,.2) .75px, transparent 1px);
  background-size: 250vw 100%, 4px 4px; background-attachment: fixed, scroll; background-repeat: no-repeat, repeat; animation: skelInk 1.8s var(--inout) infinite; }
@media (prefers-reduced-motion: reduce) { .tally__skel { animation: none; } }
.tally--na { color: var(--ink-3); }
.lede__skel { width: 2.2em; height: .62em; }

/* charts arrive drawn: the line is inked left to right, the dashed twin and the hatched fill fade in after it, bars
   grow from the floor one after another. Everything is in place at once under reduced motion. */
.chart__line--draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.chart__line--b, .chart__fill { opacity: 0; }
.chart__bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
.is-seen .chart__line--draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms var(--out); }
.is-seen .chart__line--b, .is-seen .chart__fill { opacity: 1; transition: opacity 500ms ease 500ms; }
.is-seen .chart__bar { transform: none; transition: transform 520ms var(--out) calc(var(--i, 0) * 22ms), fill 140ms ease; }
@media (prefers-reduced-motion: reduce) {
  .chart__line--draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .chart__line--b, .chart__fill { opacity: 1; }
  .chart__bar { transform: none; }
}

/* on a phone the trade plates of text models step aside, so a long list stays quick to scan; media keep theirs */
@media (max-width: 640px) { .mcard--trade { padding-top: 18px; } .mcard--trade .mcard__bn { display: none; } }
