/* The two kit pages (src/app/kit/): "Kit média" and the full kit. Its title, one line in the voice, the zip and the
   parts' links; then each part: its drawings on the ground they are made for, the colours with their codes, the faces.
   The full kit adds its rules, its examples, a table of contrast and every icon. The one colour it does not define is the
   ground under a drawing, `--kit-ground`, written on the tile from the palette (src/app/kit/view.ts). After app.css; it
   never redefines a token. */
.kit { max-width: 1040px; margin: 0 auto; padding: var(--sp-6) var(--pad) var(--sp-7); }
.kit-lede { margin-top: 10px; max-width: 34em; font: 400 1.125rem/1.3 var(--voice); color: var(--soft); text-wrap: pretty; letter-spacing: -0.005em; }
.kit-zip { margin-top: var(--sp-5); }
.kit-toc ul { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); padding: 0; list-style: none; }
.kit-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font: 600 0.875rem/1 var(--body); text-decoration: none; }
.kit-toc a:hover { border-color: var(--edge); }
.kit-part { margin-top: var(--sp-7); scroll-margin-top: calc(var(--bar-h) + var(--sp-4)); }
.kit-h { font: 750 1.375rem/1.15 var(--display); letter-spacing: -0.015em; }
.kit-h3 { margin-top: var(--sp-5); font: 700 1.0625rem/1.2 var(--display); letter-spacing: -0.01em; }
.kit-say { margin-top: 8px; max-width: 62ch; font: 400 0.9375rem/1.55 var(--body); color: var(--soft); }
.kit-say a { color: var(--ink); font-weight: 650; }
.kit-rules { max-width: 66ch; margin: 10px 0 0; padding-inline-start: 1.2em; font: 400 0.9375rem/1.55 var(--body); }
.kit-rules li + li { margin-top: 6px; }
.kit-source, .kit-note { font: 400 0.8125rem/1.45 var(--body); color: var(--soft); }
.kit-source { margin-top: 10px; }

/* A drawing on its ground, its name, the ground it is for, and its files. */
.kit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--sp-3); margin-top: var(--sp-5); }
.kit-tile { display: flex; flex-direction: column; margin: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); overflow: hidden; }
.kit-tile.is-wide { grid-column: 1 / -1; }
.kit-ground { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: var(--sp-5); background: var(--kit-ground); border-block-end: 1px solid var(--line); }
.kit-ground img { width: auto; max-width: 100%; height: auto; max-height: 100%; }
.kit-tile:not(.is-wide) .kit-ground img { height: 100%; }
.kit-tile.is-wide .kit-ground { aspect-ratio: auto; padding: var(--sp-6) var(--sp-5); }
.kit-tile.is-wide .kit-ground img { width: min(100%, 520px); }
.kit-tile figcaption { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.kit-name { font: 700 0.9375rem/1.25 var(--display); letter-spacing: -0.005em; }
.kit-where { font: 400 0.8125rem/1.3 var(--body); color: var(--soft); }
.kit-tile .kit-note { margin-top: 4px; }
.kit-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--sp-3); }
.kit-file { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink); font: 600 0.8125rem/1 var(--label); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.kit-file:hover { border-color: var(--edge); background: var(--sunk); }
.kit-file .ic { width: 18px; height: 18px; }
.kit-png { display: inline-flex; align-items: center; margin-inline-start: 4px; font: 650 0.75rem/1 var(--label); letter-spacing: 0.06em; color: var(--soft); }
.kit-head .kit-files { margin-top: var(--sp-5); }

/* A colour: its swatch (the light theme's beside the dark one's where they differ), its name, its codes. */
.kit-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--sp-3); margin-top: var(--sp-5); padding: 0; list-style: none; }
.kit-colour { display: flex; flex-direction: column; gap: 4px; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.kit-chip { display: flex; height: 56px; margin-block-end: 6px; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line); }
.kit-chip span { flex: 1; background: var(--kit-ground); }
.kit-chip span + span { border-inline-start: 1px solid var(--line); }
.kit-colour-name { font: 700 0.9375rem/1.25 var(--display); }
.kit-codes { display: flex; flex-wrap: wrap; gap: 2px 12px; font: 400 0.8125rem/1.4 var(--label); color: var(--soft); }
.kit-codes code, .kit-table code { font: 600 0.8125rem/1.4 var(--label); font-variant-numeric: tabular-nums; color: var(--ink); }

/* The faces: each its sample in itself, its file and its licence. */
.kit-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); padding: 0; list-style: none; }
.kit-face { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.kit-sample { margin-top: var(--sp-3); font: 700 1.625rem/1.25 var(--display); letter-spacing: -0.02em; text-wrap: balance; }

/* The full kit: its copywriting rules with their examples, the contrast table, every icon. */
.kit-copy { display: grid; gap: var(--sp-4); max-width: 880px; margin: var(--sp-5) 0 0; padding: 0; list-style: none; counter-reset: rule; }
.kit-rule { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.kit-rule-say { font: 700 1rem/1.35 var(--display); }
.kit-rule > .kit-note { margin-top: 4px; }
.kit-ex { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
.kit-ex-col { padding-inline-start: var(--sp-3); border-inline-start: 3px solid var(--good); }
.kit-ex-col.is-bad { border-inline-start-color: var(--bad); }
.kit-ex-h { font: 650 0.75rem/1.2 var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.kit-ex ul { margin: 4px 0 0; padding: 0; list-style: none; font: 400 0.9375rem/1.45 var(--body); }
.kit-ex-col.is-bad li { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 1.5px; }
.kit-table-wrap { max-width: 100%; margin-top: var(--sp-3); overflow-x: auto; }
.kit-table { border-collapse: collapse; font: 400 0.875rem/1.4 var(--body); }
.kit-table th, .kit-table td { padding-block: 8px; padding-inline: 0 14px; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.kit-table thead th { font: 650 0.75rem/1.2 var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.kit-table td .kit-note { display: block; }
.kit-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--sp-2); margin-top: var(--sp-4); padding: 0; list-style: none; }
.kit-icons li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-3) 4px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); }
.kit-icons .ic { width: 24px; height: 24px; }
.kit-icons span { max-width: 100%; font: 400 0.75rem/1.2 var(--label); color: var(--soft); overflow-wrap: anywhere; text-align: center; }

@media (min-width: 760px) {
  .kit { padding-top: var(--sp-7); }
  .kit-lede { font-size: 1.25rem; }
  .kit-ex { grid-template-columns: 1fr 1fr; }
  .kit-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
  .kit-colours { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
