/* dessertes.com — direction C «Sous le plateau». BINDING tokens (DESIGN.md §3–§5).
   Copy verbatim to src/styles/tokens.css and import it first from Layout.astro.
   Never redefine a token inside a width media query. Hex colours live ONLY in this file. */

/* 1. Webfonts: 4 static WOFF2 instances, Latin + French subset (220 code points), 41.6 KB total */
@font-face{font-family:"Dessertes Sans";src:url(/fonts/archivo-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Dessertes Display";src:url(/fonts/archivo-800-expanded.woff2) format("woff2");font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:"Dessertes Mono";src:url(/fonts/jetbrainsmono-400.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Dessertes Mono";src:url(/fonts/jetbrainsmono-700.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}

/* 2. Metric-matched fallbacks (measured 2026-11-09 from these exact files; DESIGN.md §3.2) */
@font-face{font-family:"Dessertes Sans Fallback";src:local("Arial"),local("ArialMT"),local("Liberation Sans"),local("Arimo");font-weight:400;size-adjust:98.1%;ascent-override:89.5%;descent-override:21.4%;line-gap-override:0%}
@font-face{font-family:"Dessertes Sans Fallback Android";src:local("Roboto"),local("Roboto-Regular");font-weight:400;size-adjust:99.3%;ascent-override:88.4%;descent-override:21.1%;line-gap-override:0%}
@font-face{font-family:"Dessertes Display Fallback";src:local("Arial Bold"),local("Arial-BoldMT"),local("Liberation Sans Bold"),local("LiberationSans-Bold"),local("Arimo Bold"),local("Arimo-Bold");font-weight:800;size-adjust:128.6%;ascent-override:68.3%;descent-override:16.3%;line-gap-override:0%}
@font-face{font-family:"Dessertes Display Fallback Android";src:local("Roboto Bold"),local("Roboto-Bold");font-weight:800;size-adjust:136.6%;ascent-override:64.3%;descent-override:15.4%;line-gap-override:0%}
@font-face{font-family:"Dessertes Mono Fallback";src:local("Courier New"),local("CourierNewPSMT"),local("Liberation Mono"),local("Cousine");size-adjust:100%;ascent-override:102%;descent-override:30%;line-gap-override:0%}

:root{
  color-scheme:light dark;
  /* 3. Colour, light = drawing paper */
  --ground:#F6F7F8;      /* page */
  --paper:#FFFFFF;       /* cartouche, inputs, plate mount, title block */
  --ink:#23262B;         /* text, lines, borders of controls */
  --meta:#5B6068;        /* captions, labels, excluded rows (AA 5.90 on ground) */
  --grid:#E3E6EA;        /* 8 px drawing grid, decorative */
  --line:#C9CED6;        /* hairlines, decorative only */
  --cote:#F4511A;        /* THE accent: dimension lines, arrowheads, leaders, bars (graphics 3.24:1) */
  --cote-text:#B83A0A;   /* any orange TEXT (5.37:1 on ground) */
  --photo-cote:#FF5B1F;  /* cote lines drawn over the hero photo, both schemes */
  --photo-chip:#23262B;  /* label chip over the photo, both schemes */
  --photo-chip-text:#FFFFFF;
  --focus:#23262B;       /* focus ring */
  --focus-field:#F4511A; /* focus ring around inputs (non-text 3.24:1) */

  /* 4. Families (2 families; Archivo 400 + 800 Expanded, JetBrains Mono 400 + 700) */
  --font-sans:"Dessertes Sans","Dessertes Sans Fallback","Dessertes Sans Fallback Android",Arial,sans-serif;
  --font-display:"Dessertes Display","Dessertes Display Fallback","Dessertes Display Fallback Android",Arial,sans-serif;
  --font-mono:"Dessertes Mono","Dessertes Mono Fallback","Courier New",monospace;

  /* 5. Type scale: base 17 px, ratio √2 (1.414). Display steps fluid 390→1440. UI step 14 px is the only off-ratio size. */
  --fs-meta:0.75rem;     /* 12  labels, captions, table heads, credits (minimum text size) */
  --fs-ui:0.875rem;      /* 14  mono UI, field help, nav cells, cartouche values */
  --fs-body:1.0625rem;   /* 17  prose, inputs' units */
  --fs-h3:1.5rem;        /* 24  legend h3, fiche h3, table passage figure */
  --fs-h2:clamp(2.125rem, 5vw, 4.25rem);       /* 34 (≤680) → 68 (≥1360)  sheet titles, as prototype */
  --fs-h1:clamp(3rem, 9.4vw, 8.5rem);          /* 48 (≤510) → 136 (≥1447)  hero h1, as prototype */
  --fs-result:clamp(4.25rem, 7vw, 6rem);       /* 68 (≤971) → 96 (≥1371)  tester count, as prototype */
  --fs-input:2rem;       /* 32  tester input figures (display face) */
  --lh-tight:0.9; --lh-h2:0.95; --lh-h3:1.1; --lh-ui:1.35; --lh-body:1.6;
  --track-display:-0.02em;

  /* 6. Space: 4/8 system. Margins, paddings and gaps use ONLY these. */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px; --s-6:32px; --s-7:48px; --s-8:64px; --s-9:96px; --s-10:128px;

  /* 7. Layout */
  --max:1376px; --cols:12; --gutter:24px;
  --side:16px;           /* page side margin; 32px from 600px up (set in layout.css media query on .wrap, not here) */
  --target:44px;         /* minimum interactive target */
  --field-h:56px;        /* tester input height */
  --stroke:1.5px;        /* drawing stroke: cartouche frame, cotes, field borders */
  --hair:1px;
  --scale-cm:3.4px;      /* fiche/gabarit scale: 1 cm = 3.4 px ≥600px; 2.6 px below 600px */
}
@media (prefers-color-scheme:dark){
  :root{
    /* graphite workshop, not blueprint */
    --ground:#16181B; --paper:#1D2024; --ink:#E8EAED; --meta:#9AA0A8; --grid:#22262B; --line:#3A3F46;
    --cote:#FF5B1F; --cote-text:#FF7A45; --focus:#E8EAED; --focus-field:#FF5B1F;
  }
}
/* dessertes.com — direction C «Sous le plateau», PR 1: global, cartouche, title block.
   Tokens live in tokens.css. Do not redefine a token inside a width query. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  font-synthesis: none;
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

strong,
b {
  font-weight: inherit;
}

h1,
h2,
h3 {
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

h2 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  margin-top: var(--s-6);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

p,
ul,
ol,
address {
  margin: 0 0 var(--s-4);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

main a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

main a:hover {
  text-decoration-thickness: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding-inline: var(--side);
  min-width: 0;
}

.lbl {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: var(--lh-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meta);
}

.home-link,
.action-link {
  display: inline-flex;
  min-height: var(--target);
  min-width: var(--target);
  align-items: center;
}

@media (min-width: 600px) {
  .wrap {
    padding-inline: var(--s-6);
  }
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -80px;
  z-index: 9;
  min-height: var(--target);
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--ground);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: var(--s-4);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.cart .navcells a:focus-visible,
.cart .mark:focus-visible {
  outline-offset: calc(-1 * var(--s-1));
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a,
  .navcells a,
  .tb nav a,
  .go,
  .field .in {
    transition:
      color 120ms,
      background-color 120ms;
  }
}

/* --- cartouche --- */

.cart {
  padding-top: var(--s-4);
}

.cart .box {
  display: grid;
  grid-template-columns: auto 1fr;
  border: var(--stroke) solid var(--ink);
  background: var(--paper);
  min-width: 0;
}

.cell {
  border-right: var(--hair) solid var(--ink);
  padding: var(--s-2) var(--s-3);
  min-block-size: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cell .lbl,
.tb .lbl {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: var(--lh-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meta);
}

.cell .v {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mark {
  flex-direction: row;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  padding-inline: var(--s-4);
  min-height: 56px;
  min-width: max-content;
}

.mark-d,
.mark-word {
  display: block;
  flex: none;
  color: var(--ink);
}

.mark-d svg {
  display: block;
  height: 24px;
  width: auto;
}

.mark-word svg {
  display: block;
  height: 13px;
  width: auto;
}

.meta-cells {
  display: none;
}

.date {
  display: none;
}

.statut {
  border-right: 0;
}

.navcells {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--hair) solid var(--ink);
  overflow: visible;
}

.navcells a {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-block-size: 48px;
  min-width: 0;
  padding: 0 var(--s-4);
  border-right: 0;
  border-bottom: 0;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  white-space: normal;
}

.navcells a:nth-child(odd) {
  border-right: var(--hair) solid var(--ink);
}

.navcells a:nth-child(-n + 2) {
  border-bottom: var(--hair) solid var(--ink);
}

.navcells a span {
  color: var(--cote-text);
  font-weight: 400;
}

.navcells a:hover,
.navcells a:active {
  background: var(--ground);
}

.navcells a[aria-current="page"] {
  border-bottom: 3px solid var(--ink);
}

@media (min-width: 600px) {
  .cart .box {
    grid-template-columns: auto 1fr auto auto;
  }

  .date {
    display: flex;
    border-right: var(--hair) solid var(--ink);
  }

  .mark-d svg {
    height: 28px;
  }

  .mark-word svg {
    height: 16px;
  }

  .navcells {
    grid-template-columns: repeat(3, 1fr);
  }

  .navcells a,
  .navcells a:nth-child(odd) {
    border-right: var(--hair) solid var(--ink);
    border-bottom: 0;
  }

  .navcells a:last-child {
    border-right: 0;
  }

  .navcells a[aria-current="page"] {
    border-bottom: 3px solid var(--ink);
  }
}

@media (min-width: 1100px) {
  .cart .box {
    /* mark · Feuille(1fr) · Cotes · Date · Statut · nav */
    grid-template-columns: auto 1fr repeat(3, auto) auto;
  }

  .cart .cell {
    min-width: auto;
  }

  .meta-cells {
    display: contents;
  }

  .statut {
    border-right: var(--hair) solid var(--ink);
  }

  .navcells {
    display: flex;
    grid-column: auto;
    border-top: 0;
    justify-content: flex-end;
  }

  .navcells a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0 var(--s-3);
  }

  .cart .mark {
    padding-inline: var(--s-3);
  }
}

@media (max-width: 599px) {
  .mark {
    padding-inline: var(--s-3);
    gap: var(--s-2);
  }

  .navcells a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .field-plan {
    display: none;
  }
}

/* --- title block --- */

.title-block {
  padding-block: var(--s-7) var(--s-6);
}

.tb {
  display: grid;
  border: var(--stroke) solid var(--ink);
  background: var(--paper);
  min-width: 0;
}

.tb > div {
  padding: var(--s-3) var(--s-4);
  border-bottom: var(--hair) solid var(--ink);
  min-width: 0;
}

.tb > div:last-child {
  border-bottom: 0;
}

.tb .lbl {
  display: block;
  margin-bottom: var(--s-2);
}

.tb p,
.tb li {
  font-size: var(--fs-ui);
  line-height: 1.5;
  margin: 0;
}

.tb ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tb nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin-top: var(--s-2);
}

.tb a {
  display: inline-flex;
  min-height: var(--target);
  align-items: center;
}

.tb nav a {
  display: inline-flex;
  min-height: var(--target);
  align-items: center;
  font-size: var(--fs-ui);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.tb nav a:hover,
.tb nav a:active {
  text-decoration-thickness: 2px;
}

.tb nav a[aria-current="page"] {
  font-weight: 700;
  font-family: var(--font-mono);
}

.tb .big {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--track-display);
  margin: 0 0 var(--s-2);
}

.tb .addr {
  font-size: var(--fs-ui);
  margin-top: var(--s-2);
  overflow-wrap: anywhere;
}

@media (min-width: 600px) and (max-width: 1099px) {
  .tb {
    grid-template-columns: 1fr 1fr;
  }

  .tb > div {
    border-right: var(--hair) solid var(--ink);
  }

  .tb > div:nth-child(2n) {
    border-right: 0;
  }

  .tb > div:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }
}

@media (min-width: 1100px) {
  .tb {
    grid-template-columns: 3fr 5fr 4fr;
  }

  .tb > div {
    border-bottom: 0;
    border-right: var(--hair) solid var(--ink);
  }

  .tb > div:last-child {
    border-right: 0;
  }

  .tb .credits {
    grid-row: span 2;
  }

  .tb .row2 {
    border-top: var(--hair) solid var(--ink);
  }

  .tb.no-credits {
    grid-template-columns: 7fr 5fr;
  }

  .tb.no-credits > div:nth-child(2n) {
    border-right: 0;
  }
}

/* --- page content --- */

main {
  min-width: 0;
}

.page-head {
  padding-top: var(--s-7);
}

.page-head .sheet-head {
  margin-bottom: var(--s-4);
}

.page-why {
  margin: 0 0 var(--s-7);
  max-inline-size: 56ch;
  color: var(--meta);
}

.prose-page {
  padding-block: var(--s-7);
}

.prose-page .sheet-head {
  margin-bottom: var(--s-7);
}

.prose-page .measure {
  max-inline-size: 66ch;
}

.prose-page .measure p {
  margin: 0 0 var(--s-4);
}

.prose-page .measure .lbl {
  display: block;
  margin-bottom: var(--s-2);
}

.prose-page .measure :is(ul, ol) {
  margin: 0 0 var(--s-4);
  padding-left: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.prose-block {
  margin: 0 0 var(--s-6);
}

.prose-block .lbl {
  display: block;
  margin-bottom: var(--s-2);
}

.prose-block h2 {
  margin: 0 0 var(--s-4);
}

.prose-action {
  margin: 0;
}

.affiliate-wrap {
  padding-bottom: var(--s-9);
}

@media (min-width: 1100px) {
  .prose-page {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
  }

  .prose-page .sheet-head,
  .prose-page .measure,
  .prose-page .prose-action {
    grid-column: 1 / 9;
  }

  /* Stack title + lede in the 8-col measure so a 7/5 align-end row cannot shift h1. */
  .prose-page .sheet-head {
    grid-template-columns: none;
    align-items: start;
  }
}

.muted {
  color: var(--meta);
}

.address {
  font-style: normal;
  margin: 0 0 var(--s-4);
}

.affiliate-slot {
  border: var(--hair) solid var(--ink);
  padding: var(--s-4);
  margin: 0;
  background: transparent;
}

.affiliate-slot p {
  margin: 0;
  font-size: var(--fs-ui);
  color: var(--meta);
}

.affiliate-slot strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--s-2);
}

/* --- tester + model table (PR 2) --- */

.tester {
  padding-block: var(--s-9);
  min-width: 0;
}

.sheet-head {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
  border-bottom: var(--stroke) solid var(--ink);
  padding-bottom: var(--s-4);
}

.sheet-head .lbl {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: var(--lh-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meta);
  margin: 0;
}

.sheet-head :is(h1, h2) {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  min-block-size: calc(var(--lh-h2) * 1em);
}

@media (max-width: 599px) {
  .sheet-head h1 {
    min-block-size: calc(2 * var(--lh-h2) * 1em);
  }
}

@media (max-width: 374px) {
  /* Expanded Display wraps «Comparatif des dessertes de cuisine» to 4 lines at 320. */
  .sheet-head h1 {
    min-block-size: calc(4 * var(--lh-h2) * 1em);
  }
}

.sheet-head .lede-box,
.sheet-head .lede {
  margin: 0;
  max-inline-size: 56ch;
  color: var(--meta);
}

@media (max-width: 599px) {
  /* Holds the tester lede at 4 lines so a fallback wrap at 375 cannot shift Feuille A. */
  .sheet-head .lede-box {
    min-block-size: calc(4 * var(--lh-body) * 1em);
  }
}

@media (min-width: 1100px) {
  .sheet-head {
    grid-template-columns: 7fr 5fr;
    align-items: end;
  }

  .sheet-head .lbl {
    grid-column: 1 / -1;
  }
}

.t-grid {
  display: grid;
  gap: var(--s-7);
}

.t-grid > * {
  min-width: 0;
}

@media (min-width: 1100px) {
  .t-grid {
    grid-template-columns: 4fr 8fr;
    gap: var(--s-8);
  }
}

.field {
  margin-bottom: var(--s-4);
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--s-2);
}

.field label .opt {
  font-size: var(--fs-meta);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meta);
}

.field .in {
  display: flex;
  align-items: stretch;
  border: var(--stroke) solid var(--ink);
  background: var(--paper);
}

.field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: var(--field-h);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-input);
  font-weight: 800;
  line-height: 1;
  padding: 0 var(--s-4);
  font-variant-numeric: tabular-nums;
}

.field .in:focus-within {
  outline: 2px solid var(--focus-field);
  outline-offset: 2px;
}

.field input:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
}

.field .u {
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
  border-left: var(--hair) solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
}

.field small {
  display: block;
  margin-top: var(--s-2);
  color: var(--meta);
  font-size: var(--fs-ui);
}

.field .err {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: var(--lh-ui);
  color: var(--cote-text);
}

.field .err[hidden] {
  display: none;
}

.field input[aria-invalid="true"] {
  text-decoration: underline wavy var(--cote-text) 1px;
}

.field .in:has(input[aria-invalid="true"]) {
  border-color: var(--cote-text);
  border-width: 2px;
}

.go {
  display: none;
  width: 100%;
  min-height: var(--field-h);
  margin: var(--s-2) 0 var(--s-5);
  border: var(--stroke) solid var(--ink);
  background: var(--ink);
  color: var(--ground);
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  cursor: pointer;
}

form.is-live .go {
  display: block;
}

.go:hover,
.go:active {
  background: transparent;
  color: var(--ink);
}

.result {
  border-top: var(--stroke) solid var(--cote);
  padding-top: var(--s-4);
  min-block-size: calc(
    var(--fs-result) + var(--s-4) + 2 * 1.15 * var(--fs-h3) + var(--s-2)
  );
}

.result .live {
  margin: 0;
}

.result .n {
  display: block;
  min-block-size: 1em;
  font-family: var(--font-display);
  font-size: var(--fs-result);
  font-weight: 800;
  line-height: 1;
  color: var(--cote-text);
  font-variant-numeric: tabular-nums;
}

.result .n:empty::before {
  content: "—" / "";
  color: var(--meta);
}

.result .t {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.15;
}

.rule {
  margin-top: var(--s-5);
  font-size: var(--fs-ui);
  color: var(--meta);
  max-inline-size: 24rem;
}

.list {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.list caption {
  text-align: left;
  caption-side: bottom;
  padding-top: var(--s-4);
  font-size: var(--fs-ui);
  color: var(--meta);
}

.list th {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--meta);
  text-align: left;
  padding: 0 var(--s-3) var(--s-3) 0;
  border-bottom: var(--stroke) solid var(--ink);
}

.list td {
  padding: var(--s-3) var(--s-3) var(--s-3) 0;
  border-bottom: var(--hair) solid var(--line);
  vertical-align: baseline;
}

.list td.m {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.3;
}

.list td.m small,
.list td.p small {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: 1.4;
}

.list td.m small {
  display: block;
  color: var(--meta);
}

.list td.p {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1;
}

.list td.p small {
  margin-left: var(--s-1);
}

.list td.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  white-space: nowrap;
}

.list .bar {
  display: block;
  height: var(--s-1);
  background: var(--cote);
  width: calc(var(--p) * 1.6px);
  margin-top: var(--s-2);
}

.list .st {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.list .ht {
  font-size: var(--fs-ui);
  color: var(--meta);
}

.list tr[data-state="no"] td {
  color: var(--meta);
}

.list tr[data-state="no"] .bar {
  background: var(--line);
}

.list tr[data-state="no"] .st {
  color: var(--meta);
  text-decoration: line-through;
}

.list tr[data-state="tight"] .bar {
  background: repeating-linear-gradient(
    90deg,
    var(--cote) 0 6px,
    transparent 6px 10px
  );
}

.list tr[data-state="tight"] .st::before {
  content: "";
  display: inline-block;
  width: var(--s-2);
  height: var(--s-2);
  border: var(--stroke) solid var(--cote);
  margin-right: var(--s-2);
  vertical-align: 1px;
}

@media (max-width: 599px) {
  .list .hide-s {
    display: none;
  }
}

/* --- hero (home) --- */

.hero {
  position: relative;
  margin-top: var(--s-4);
}

.hero-top {
  padding-block: var(--s-8) var(--s-7);
}

.hero h1 {
  margin: 0;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  max-inline-size: 11ch;
  min-block-size: calc(3 * var(--lh-tight) * 1em);
}

@media (max-width: 374px) {
  .hero h1 {
    min-block-size: calc(4 * var(--lh-tight) * 1em);
  }
}

.hero-sub {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.hero-sub p {
  margin: 0;
  max-inline-size: 44ch;
}

.hero-sub .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-variant-numeric: tabular-nums;
  color: var(--meta);
  max-inline-size: 52ch;
}

@media (min-width: 1100px) {
  .hero-sub {
    grid-template-columns: 6fr 6fr;
    align-items: end;
  }

  .hero-sub .mono {
    justify-self: end;
    text-align: right;
  }
}

.gridbg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 8px 8px;
}

.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
  background: var(--photo-chip);
  --wl: 30.9%;
  --wr: 70.2%;
  --wt: 26%;
  --wb: 76%;
  --ax: 46%;
  --pv: 57.8%;
  --pt: 14%;
}

.shot picture,
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 55%;
}

.c {
  position: absolute;
  color: var(--photo-cote);
}

.c b {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 700;
  line-height: 1;
  background: var(--photo-chip);
  color: var(--photo-chip-text);
  padding: var(--s-1) var(--s-2);
  letter-spacing: 0.02em;
}

.c-dia {
  left: calc(var(--wr) + 3%);
  top: var(--wt);
  height: calc(var(--wb) - var(--wt));
  width: 0;
  border-left: var(--stroke) solid var(--photo-cote);
}

.c-dia::before,
.c-dia::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-left: var(--stroke) solid var(--photo-cote);
  border-top: var(--stroke) solid var(--photo-cote);
}

.c-dia::before {
  top: 0;
  transform: rotate(45deg);
  transform-origin: center;
  left: -6.5px;
}

.c-dia::after {
  bottom: 0;
  transform: rotate(225deg);
  left: -6.5px;
}

.c-dia b {
  left: var(--s-3);
  top: 50%;
  transform: translateY(-50%);
}

.ext {
  position: absolute;
  height: 0;
  border-top: var(--hair) dashed rgba(255, 255, 255, 0.55);
}

.ext.t {
  left: calc(var(--wr) - 14%);
  width: calc(17% + var(--s-3));
  top: var(--wt);
}

.ext.b {
  left: calc(var(--wr) - 14%);
  width: calc(17% + var(--s-3));
  top: var(--wb);
}

.c-axis {
  left: var(--pv);
  top: calc(var(--pt) - 2%);
  height: calc(var(--wb) - var(--pt) + 10%);
  border-left: var(--stroke) dashed var(--photo-cote);
}

.c-axis b {
  left: 10px;
  top: 0;
}

.c-off {
  top: calc(var(--wb) + 6%);
  left: var(--ax);
  width: calc(var(--pv) - var(--ax));
  height: 0;
  border-top: var(--stroke) solid var(--photo-cote);
}

.c-off::before,
.c-off::after {
  content: "";
  position: absolute;
  top: -6.5px;
  width: var(--stroke);
  height: var(--s-3);
  background: var(--photo-cote);
}

.c-off::before {
  left: 0;
}

.c-off::after {
  right: 0;
}

.c-off b {
  right: calc(100% + 10px);
  top: -12px;
}

.axle {
  position: absolute;
  left: var(--ax);
  top: calc(var(--wt) + (var(--wb) - var(--wt)) / 2 - 2%);
  height: calc((var(--wb) - var(--wt)) / 2 + 8%);
  border-left: var(--hair) dashed rgba(255, 255, 255, 0.55);
}

.c-h {
  left: calc(var(--wl) - 5%);
  top: var(--pt);
  height: calc(var(--wb) - var(--pt));
  border-left: var(--stroke) solid var(--photo-cote);
}

.c-h::before,
.c-h::after {
  content: "";
  position: absolute;
  left: -6.5px;
  width: var(--s-3);
  height: var(--stroke);
  background: var(--photo-cote);
}

.c-h::before {
  top: 0;
}

.c-h::after {
  bottom: 0;
}

.c-h b {
  right: var(--s-3);
  top: 50%;
  transform: translateY(-50%);
}

.shot figcaption {
  position: absolute;
  right: var(--side);
  bottom: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: 1.3;
  color: var(--photo-chip-text);
  background: rgba(17, 17, 17, 0.72);
  padding: var(--s-1) var(--s-2);
}

@media (max-width: 599px) {
  .c-off b {
    right: auto;
    left: 0;
    top: var(--s-2);
  }

  .c-h b {
    right: auto;
    left: var(--s-2);
    top: 0;
    transform: none;
  }

  .c-axis b {
    top: auto;
    bottom: 0;
  }

  .shot {
    overflow: visible;
    margin-bottom: calc(var(--s-6) + var(--s-2));
  }

  .shot figcaption {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: var(--side);
    right: auto;
    background: none;
    color: var(--meta);
    padding: var(--s-2) 0;
  }
}

@media (min-width: 1100px) {
  .shot {
    aspect-ratio: 2 / 1;
    --wl: 33.4%;
    --wr: 68%;
    --wt: 16.3%;
    --wb: 83%;
    --ax: 50.6%;
    --pv: 58.7%;
    --pt: 4.3%;
  }
}

/* --- coupe B-B --- */

.coupe {
  padding-block: var(--s-9);
  border-top: var(--hair) solid var(--line);
}

.c-grid {
  display: grid;
  gap: var(--s-7);
}

@media (min-width: 1100px) {
  .c-grid {
    grid-template-columns: 7fr 5fr;
    gap: var(--s-8);
    align-items: center;
  }
}

.section-fig {
  position: relative;
  margin: 0;
  padding: var(--s-7) var(--s-5);
  background: var(--paper);
  border: var(--hair) solid var(--line);
}

.section-fig .obj {
  position: relative;
  width: min(340px, 80%);
  margin-inline: auto;
}

.section-fig svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}

.co {
  position: absolute;
  left: var(--x);
  top: var(--y);
  --k: 1;
}

.co::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cote);
}

.co::after {
  content: "";
  position: absolute;
  top: 0;
  height: var(--stroke);
  background: var(--cote);
  width: calc(var(--len) * var(--k));
  transform-origin: left;
  transform: rotate(var(--rot, 0deg));
}

.co b {
  position: absolute;
  left: calc(var(--len) * var(--k) * cos(var(--rot, 0deg)));
  top: calc(var(--len) * var(--k) * sin(var(--rot, 0deg)));
  transform: translate(var(--tx, 0), -50%);
  width: var(--s-6);
  height: var(--s-6);
  border-radius: 50%;
  border: var(--stroke) solid var(--cote);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.section-fig figcaption {
  margin-top: var(--s-5);
  text-align: center;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: k;
}

.legend li {
  counter-increment: k;
  display: grid;
  grid-template-columns: calc(var(--s-6) + var(--s-2)) 1fr;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: var(--hair) solid var(--line);
}

.legend li::before {
  content: counter(k);
  width: var(--s-6);
  height: var(--s-6);
  border-radius: 50%;
  border: var(--stroke) solid var(--cote);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
}

.legend h3 {
  margin: 0;
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

.legend p {
  margin: var(--s-2) 0 0;
  max-inline-size: 56ch;
}

@media (max-width: 599px) {
  .co {
    --k: 0.5;
  }
}

/* --- fiches / gabarits --- */

.fiches {
  padding-block: var(--s-9);
}

.f-sheet {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-5);
  border: var(--stroke) solid var(--ink);
}

.fiche {
  position: relative;
  padding: var(--s-5);
  border: var(--hair) solid var(--line);
  background: color-mix(in srgb, var(--ground) 70%, transparent);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fiche .stage {
  height: auto;
  margin-top: auto;
}

.fiche .stage svg {
  display: block;
  max-width: 100%;
  height: auto;
  color: var(--ink);
}

.fiche h3 {
  margin: 0 0 var(--s-5);
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

.fiche h3 small {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: 1.4;
  color: var(--meta);
  letter-spacing: 0;
  margin-top: var(--s-1);
}

.fiche dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: var(--s-1) var(--s-5);
  margin: var(--s-4) 0 0;
}

.fiche dt {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--meta);
}

.fiche dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.3;
}

.f-note {
  margin-top: var(--s-4);
  font-size: var(--fs-ui);
  color: var(--meta);
  max-inline-size: 80ch;
}

@media (min-width: 1100px) {
  .f-sheet {
    grid-template-columns: repeat(12, 1fr);
  }

  .fiche.s6 {
    grid-column: span 6;
  }
}

@media (max-width: 599px) {
  .fiche dl {
    grid-template-columns: repeat(3, minmax(0, auto));
    column-gap: var(--s-3);
  }
}

/* --- plate --- */

.plate {
  background: var(--paper);
  border-block: var(--stroke) solid var(--ink);
  padding-block: var(--s-8);
}

.plate .wrap {
  display: grid;
  gap: var(--s-6);
  align-items: end;
}

.plate img {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  background: white;
}

.plate .cap h2 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

.plate .cap p {
  margin-top: var(--s-4);
  max-inline-size: 44ch;
}

.plate .cap .lbl {
  margin-top: var(--s-5);
  display: block;
}

@media (prefers-color-scheme: dark) {
  .plate img {
    filter: invert(0.92) hue-rotate(180deg);
    background: transparent;
  }
}

@media (min-width: 1100px) {
  .plate .wrap {
    grid-template-columns: 7fr 5fr;
  }
}

/* --- tolérances --- */

.tol {
  padding-block: var(--s-9);
}

.tol .wrap {
  display: grid;
  gap: var(--s-6);
}

.tol h2 {
  margin: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}

.tol .intro {
  margin-top: var(--s-4);
  max-inline-size: 36ch;
  color: var(--meta);
}

.tlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tlist li {
  display: grid;
  grid-template-columns: var(--field-h) 1fr;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-top: var(--hair) solid var(--line);
}

.tlist li:last-child {
  border-bottom: var(--hair) solid var(--line);
}

.tlist .k {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.6;
  color: var(--cote-text);
}

.tlist strong {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.5;
}

.tlist .tv {
  display: inline-block;
  margin-top: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 700;
  line-height: 1.3;
  border: var(--hair) solid var(--ink);
  padding: var(--s-1) var(--s-2);
}

.tlist p {
  margin-top: var(--s-2);
  color: var(--meta);
  max-inline-size: 62ch;
}

@media (min-width: 1100px) {
  .tol .wrap {
    grid-template-columns: 5fr 7fr;
    gap: var(--s-8);
  }
}
