/* ============================================================
   LGFL figures — image standard "Platinum + Graphite" (user choice 5B, locked 2026-10-23)
   Tokens only (tokens.css --fig-*). No hex here. Spec: _workspace/notes/IMAGE_STANDARD.md
   HOLY RULE: one idea per figure, short labels, labels NEVER wrap or break at any viewport
   (the layout switches instead), >= 12px labels, contrast >= 4.5:1, >= 8px free space inside boxes.
   Panel = platinum paper + graphite ink + subtle guilloche (mask; corner motif on phones).
   All component selectors are scoped under .fig-panel so article-level p/ol/li rules never win.
   ============================================================ */
.fig { margin: var(--space-4) 0 0; padding: 0; }
.fig-panel {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--fig-paper); color: var(--fig-ink);
  border: 1px solid var(--fig-frame); padding: 24px 20px 22px;
}
.fig-panel::before { /* guilloche: one shared SVG used as a mask, tinted with a token */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--fig-guil); opacity: var(--fig-guil-op, 0.09);
  -webkit-mask: url(/guilloche-panel.svg) right center / cover no-repeat;
          mask: url(/guilloche-panel.svg) right center / cover no-repeat;
}
.fig-panel::after { /* hairline inner frame */
  content: ""; position: absolute; inset: 6px; z-index: -1; pointer-events: none;
  border: 1px solid var(--fig-frame);
}
.fig-panel .fig-kicker {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-bold);
  letter-spacing: .14em; text-transform: uppercase; color: var(--fig-ink-2);
  margin: 0 0 18px; white-space: nowrap;
}
/* chain: role cards left to right; below 860px the layout switches to a vertical stack */
.fig-panel ol.fig-chain {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: minmax(0,1.3fr) minmax(0,.95fr) minmax(0,1.38fr) minmax(0,1fr) minmax(0,.95fr);
}
.fig-panel ol.fig-chain > li {
  position: relative; margin: 0; padding: 12px 6px; min-width: 0; text-align: center;
  background: var(--fig-card); border: 1px solid var(--fig-rule);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fig-panel ol.fig-chain > li:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  width: 14px; text-align: center; font-size: 16px; line-height: 1; color: var(--fig-ink);
}
.fig-panel ol.fig-chain > li.you { background: var(--fig-you); border: 2px solid var(--fig-you); padding: 11px 5px; }
.fig-panel .fig-nm  { font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-bold); line-height: 1.25; color: var(--fig-ink); white-space: nowrap; }
.fig-panel .fig-ref { font-family: var(--font-mono); font-size: 13px; line-height: 1.3; color: var(--fig-ref); white-space: nowrap; }
.fig-panel .fig-tag { font-family: var(--font-sans); font-size: 13px; font-weight: var(--fw-bold); line-height: 1.3; margin-top: 2px; color: var(--fig-ink); white-space: nowrap; }
.fig-panel ol.fig-chain > li.you .fig-nm  { color: var(--fig-you-ink); }
.fig-panel ol.fig-chain > li.you .fig-ref { color: var(--fig-you-ref); }
.fig-panel ol.fig-chain > li.you .fig-tag { color: var(--fig-you-tag); }
.fig-panel p.fig-note { /* dashed call-out under the chain */
  margin: 18px 0 0; padding: 12px 14px; border: 2px dashed var(--fig-ink);
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
  font-family: var(--font-sans); font-size: 15px; line-height: 1.35; color: var(--fig-ink);
}
.fig-panel .fig-note .seg { white-space: nowrap; }
.fig-panel .fig-note b { font-weight: var(--fw-bold); }
.fig > figcaption { font-family: var(--font-sans); font-size: 14px; line-height: 1.55; color: var(--cream-2); margin-top: var(--space-2); }
@media (max-width: 860px) {
  .fig-panel { padding: 20px 16px 18px; }
  .fig-panel::before { -webkit-mask-size: 215% auto; mask-size: 215% auto; -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: calc(var(--fig-guil-op, 0.09) * .8); }
  .fig-panel ol.fig-chain { grid-template-columns: 1fr; gap: 22px; }
  .fig-panel ol.fig-chain > li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; align-items: baseline; text-align: left; padding: 12px 14px; }
  .fig-panel ol.fig-chain > li.you { padding: 11px 13px; }
  .fig-panel ol.fig-chain > li .fig-nm  { grid-column: 1; font-size: 16px; }
  .fig-panel ol.fig-chain > li .fig-ref { grid-column: 2; text-align: right; }
  .fig-panel ol.fig-chain > li .fig-tag { grid-column: 1 / -1; margin-top: 2px; }
  .fig-panel ol.fig-chain > li:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -20px; transform: translateX(-50%); font-size: 18px; }
}
/* ============================================================
   COMPONENT LIBRARY (job figure-library, 2026-10-23): fig-timeline, fig-steps, fig-compare, fig-matrix.
   Built by _workspace/tooling/image_standard/build_figure.py from a JSON spec (_workspace/cloud/figures/SPEC.md).
   Every component is mobile-first: the stacked layout is the default and the row layout is switched on only when
   BOTH the viewport is > 860px AND the panel itself is wide enough (container query on .fig-panel), so a label never
   has to squeeze or wrap. Labels are one nowrap line each; a two-line label is two .fig-ln lines, never a wrap.
   ============================================================ */
.fig-panel { container: fig / inline-size; }
.fig-panel .fig-ln   { display: block; white-space: nowrap; font-family: var(--font-sans); font-size: 14px; line-height: 1.35; color: var(--fig-ink); }
.fig-panel .fig-date { display: block; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; font-weight: var(--fw-bold); line-height: 1.3; letter-spacing: .02em; color: var(--fig-ink); }
.fig-panel .fig-num  { display: block; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-bold); line-height: 1.3; letter-spacing: .1em; color: var(--fig-ref); }
.fig-panel .fig-col-h{ display: block; white-space: nowrap; font-family: var(--font-sans); font-size: 15px; font-weight: var(--fw-bold); line-height: 1.3; color: var(--fig-ink); }
.fig-panel .fig-sr   { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fig-panel .you .fig-ln, .fig-panel .you .fig-date, .fig-panel .you .fig-nm, .fig-panel .you .fig-col-h, .fig-panel .you .fig-cell { color: var(--fig-you-ink); }
.fig-panel .you .fig-num, .fig-panel .you .fig-ref, .fig-panel .you .fig-mh { color: var(--fig-you-ref); }
.fig-panel .you .fig-tag { color: var(--fig-you-tag); }

/* ---- timeline: dated milestones on a rail; .you = "you are here"; .est = our estimate (dashed) ---- */
.fig-panel ol.fig-timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 8px; }
.fig-panel ol.fig-timeline::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; border-left: 2px solid var(--fig-ink); }
.fig-panel ol.fig-timeline > li { position: relative; margin: 0; padding: 8px 12px; min-width: 0; border: 2px solid transparent; display: flex; flex-direction: column; gap: 2px; }
.fig-panel ol.fig-timeline > li::before { content: ""; position: absolute; left: -29px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--fig-paper); border: 2px solid var(--fig-ink); }
.fig-panel ol.fig-timeline > li .fig-date { margin-bottom: 2px; }
.fig-panel ol.fig-timeline > li.you { background: var(--fig-you); border-color: var(--fig-you); }
.fig-panel ol.fig-timeline > li.you::before { background: var(--fig-you); }
.fig-panel ol.fig-timeline > li.est { border: 2px dashed var(--fig-ink); }
@container fig (min-width: 520px) { /* wide stack: dates in their own column */
  .fig-panel ol.fig-timeline { grid-template-columns: max-content minmax(0, 1fr); column-gap: 18px; }
  .fig-panel ol.fig-timeline > li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; }
  .fig-panel ol.fig-timeline > li .fig-date { grid-column: 1; grid-row: 1 / span 4; margin: 0; }
  .fig-panel ol.fig-timeline > li .fig-ln, .fig-panel ol.fig-timeline > li .fig-tag { grid-column: 2; }
}
@media (min-width: 861px) { @container fig (min-width: 640px) { /* row layout: up to 5 milestones */
  .fig-panel ol.fig-timeline:not(:has(> li:nth-child(6))) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 10px; padding: 0; }
  .fig-panel ol.fig-timeline:not(:has(> li:nth-child(6)))::before { left: 0; right: 0; top: 7px; bottom: auto; border-left: 0; border-top: 2px solid var(--fig-ink); }
  .fig-panel ol.fig-timeline:not(:has(> li:nth-child(6))) > li { grid-column: auto; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 26px; padding: 10px 8px; }
  .fig-panel ol.fig-timeline:not(:has(> li:nth-child(6))) > li::before { left: 50%; top: -27px; margin-left: -8px; }
  .fig-panel ol.fig-timeline:not(:has(> li:nth-child(6))) > li .fig-date { grid-row: auto; margin-bottom: 2px; }
} }

/* ---- steps: numbered 3–6 step flow ---- */
.fig-panel ol.fig-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.fig-panel ol.fig-steps > li {
  position: relative; margin: 0; padding: 12px 14px; min-width: 0;
  background: var(--fig-card); border: 1px solid var(--fig-rule);
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: baseline;
}
.fig-panel ol.fig-steps > li .fig-num { grid-column: 1; grid-row: 1 / span 3; }
.fig-panel ol.fig-steps > li .fig-nm, .fig-panel ol.fig-steps > li .fig-ref, .fig-panel ol.fig-steps > li .fig-tag { grid-column: 2; }
.fig-panel ol.fig-steps > li:not(:last-child)::after { content: "\2193"; position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font-size: 18px; line-height: 1; color: var(--fig-ink); }
.fig-panel ol.fig-steps > li.you { background: var(--fig-you); border: 2px solid var(--fig-you); padding: 11px 13px; }
@media (min-width: 861px) { @container fig (min-width: 640px) { /* row layout: up to 4 steps */
  .fig-panel ol.fig-steps:not(:has(> li:nth-child(5))) { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
  .fig-panel ol.fig-steps:not(:has(> li:nth-child(5))) > li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px; }
  .fig-panel ol.fig-steps:not(:has(> li:nth-child(5))) > li.you { padding: 11px 7px; }
  .fig-panel ol.fig-steps:not(:has(> li:nth-child(5))) > li:not(:last-child)::after { content: "\2192"; left: auto; right: -14px; bottom: auto; top: 50%; transform: translateY(-50%); width: 14px; text-align: center; font-size: 16px; }
} }

/* ---- compare: two or three columns ("Today / Proposed"); .you = the highlighted column ---- */
.fig-panel .fig-compare { display: grid; gap: 22px; }
.fig-panel .fig-compare > .fig-col { position: relative; margin: 0; padding: 12px 14px; min-width: 0; background: var(--fig-card); border: 1px solid var(--fig-rule); }
.fig-panel .fig-compare > .fig-col.you { background: var(--fig-you); border: 2px solid var(--fig-you); padding: 11px 13px; }
.fig-panel .fig-compare > .fig-col > ul { list-style: none; margin: 8px 0 0; padding: 0; }
.fig-panel .fig-compare > .fig-col > ul > li { margin: 0; padding: 6px 0 0; border-top: 1px solid var(--fig-rule); }
.fig-panel .fig-compare > .fig-col > ul > li + li { margin-top: 6px; }
.fig-panel .fig-compare > .fig-col.you > ul > li { border-top-color: var(--fig-you-ref); }
.fig-panel .fig-compare.fig-arrow > .fig-col:not(:last-child)::after { content: "\2193"; position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font-size: 18px; line-height: 1; color: var(--fig-ink); }
@media (min-width: 861px) { @container fig (min-width: 600px) {
  .fig-panel .fig-compare { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
  .fig-panel .fig-compare.fig-arrow { gap: 22px; }
  .fig-panel .fig-compare.fig-arrow > .fig-col:not(:last-child)::after { content: "\2192"; left: auto; right: -19px; bottom: auto; top: 50%; transform: translateY(-50%); width: 16px; text-align: center; font-size: 16px; }
} }

/* ---- matrix: rows x <= 4 columns of ✓ / – / short words. Stacked = one card per row ---- */
.fig-panel table.fig-matrix { width: 100%; border-collapse: collapse; background: var(--fig-card); border: 1px solid var(--fig-rule); }
.fig-panel table.fig-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fig-panel table.fig-matrix, .fig-panel table.fig-matrix tbody, .fig-panel table.fig-matrix tr, .fig-panel table.fig-matrix th, .fig-panel table.fig-matrix td { display: block; }
.fig-panel table.fig-matrix tbody tr { padding: 10px 4px; border-top: 1px solid var(--fig-rule); }
.fig-panel table.fig-matrix tbody tr:first-child { border-top: 0; }
.fig-panel table.fig-matrix tbody tr.you { background: var(--fig-you); }
.fig-panel table.fig-matrix tbody th { padding: 0 10px 4px; text-align: left; font-weight: inherit; }
.fig-panel table.fig-matrix tbody td { padding: 3px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fig-panel table.fig-matrix .fig-mh   { white-space: nowrap; font-family: var(--font-mono); font-size: 13px; line-height: 1.3; color: var(--fig-ref); }
.fig-panel table.fig-matrix .fig-cell { white-space: nowrap; font-family: var(--font-sans); font-size: 14px; font-weight: var(--fw-bold); line-height: 1.3; color: var(--fig-ink); }
.fig-panel table.fig-matrix tr.you .fig-nm, .fig-panel table.fig-matrix tr.you .fig-cell { color: var(--fig-you-ink); }
.fig-panel table.fig-matrix tr.you .fig-mh { color: var(--fig-you-ref); }
.fig-panel table.fig-matrix tr.you th, .fig-panel table.fig-matrix tr.you td { border-top-color: var(--fig-you); }
@media (min-width: 861px) { @container fig (min-width: 600px) {
  .fig-panel table.fig-matrix { display: table; }
  .fig-panel table.fig-matrix thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .fig-panel table.fig-matrix tbody { display: table-row-group; }
  .fig-panel table.fig-matrix tr { display: table-row; }
  .fig-panel table.fig-matrix thead th, .fig-panel table.fig-matrix tbody th, .fig-panel table.fig-matrix tbody td { display: table-cell; padding: 9px 12px; border-top: 1px solid var(--fig-rule); text-align: center; vertical-align: middle; }
  .fig-panel table.fig-matrix thead th { border-top: 0; }
  .fig-panel table.fig-matrix thead th:first-child { text-align: left; }
  .fig-panel table.fig-matrix thead th .fig-col-h { font-size: 14px; }
  .fig-panel table.fig-matrix tbody th { text-align: left; padding: 9px 12px; }
  .fig-panel table.fig-matrix .fig-mh { display: none; }
} }

/* ---- card-row variants used by the short-version figures (steps/timeline = arrows, compare/matrix = plain; 3, 4 or 6 cards; forced vertical stack) ---- */
@media (min-width: 861px) {
  .fig-panel ol.fig-chain[data-n="3"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .fig-panel ol.fig-chain[data-n="4"] { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
.fig-panel ol.fig-chain.fig-chain--plain > li:not(:last-child)::after { content: none; }
.fig-panel ol.fig-chain.fig-chain--stack { grid-template-columns: 1fr; gap: 22px; }
.fig-panel ol.fig-chain.fig-chain--stack > li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; align-items: baseline; text-align: left; padding: 12px 14px; }
.fig-panel ol.fig-chain.fig-chain--stack > li.you { padding: 11px 13px; }
.fig-panel ol.fig-chain.fig-chain--stack > li .fig-nm  { grid-column: 1; font-size: 16px; }
.fig-panel ol.fig-chain.fig-chain--stack > li .fig-ref { grid-column: 2; text-align: right; }
.fig-panel ol.fig-chain.fig-chain--stack > li .fig-tag { grid-column: 1 / -1; margin-top: 2px; }
.fig-panel ol.fig-chain.fig-chain--stack > li:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -20px; transform: translateX(-50%); font-size: 18px; }
.fig-panel ol.fig-chain.fig-chain--stack.fig-chain--plain { gap: 12px; }
.fig-panel ol.fig-chain.fig-chain--stack.fig-chain--plain > li:not(:last-child)::after { content: none; }
@media (max-width: 860px) { .fig-panel ol.fig-chain.fig-chain--plain { gap: 12px; } }
/* generic cards (every short-version figure except the approved retailers sample): ref/tag sit UNDER the name when stacked, never beside it */
.fig-panel ol.fig-chain.fig-chain--g.fig-chain--stack > li { grid-template-columns: 1fr; }
.fig-panel ol.fig-chain.fig-chain--g.fig-chain--stack > li .fig-ref { grid-column: 1; text-align: left; }
@media (max-width: 860px) {
  .fig-panel ol.fig-chain.fig-chain--g > li { grid-template-columns: 1fr; }
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-ref { grid-column: 1; text-align: left; }
}
/* narrow phones: more room for the dashed call-out text (labels never wrap) */
@media (max-width: 380px) { .fig-panel p.fig-note { padding: 12px 8px; font-size: 14px; } }
/* phones: a long figure title (never wraps) needs less tracking to fit a 320px panel */
@media (max-width: 480px) { .fig-panel .fig-kicker { letter-spacing: .03em; } }
/* very narrow phones (<=380px): squeeze tracking, padding and the 13px lines to 12px so every label stays on one line */
@media (max-width: 380px) {
  .fig-panel { padding-left: 12px; padding-right: 12px; }
  .fig-panel .fig-kicker { letter-spacing: 0; }
  .fig-panel ol.fig-chain.fig-chain--g > li { padding-left: 10px; padding-right: 10px; }
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-ref, .fig-panel ol.fig-chain.fig-chain--g > li .fig-tag { font-size: 12px; }
}
/* <= 380px: the small figure title may break between words (never inside a word) when it cannot fit one line; card labels never wrap */
@media (max-width: 600px) { .fig-panel .fig-kicker { white-space: normal; } }
/* call-out sentences may wrap between words; on phones (<= 440px) the secondary lines (ref, tag) of stacked cards may too (long legal citations in DE/FR). Card names (.fig-nm) never wrap. */
.fig-panel .fig-note .seg { white-space: normal; }
@media (max-width: 440px) {
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-ref, .fig-panel ol.fig-chain.fig-chain--g > li .fig-tag { white-space: normal; overflow-wrap: break-word; }
}
/* <= 380px: a little more room inside stacked cards so even long names keep >= 8px free space */
@media (max-width: 380px) {
  .fig-panel ol.fig-chain.fig-chain--g > li { padding-left: 8px; padding-right: 8px; }
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-nm { font-size: 14px; }
}
/* phones (job mobile-guides, 2026-10-24, owner rule 7 "breathing room"): >= 12px between every label and its card edge,
   at every width. Card names still never wrap: at <= 380px the panel's own side padding gives the room instead. */
@media (max-width: 860px) {
  .fig-panel ol.fig-chain > li, .fig-panel ol.fig-chain.fig-chain--g > li { padding-left: 14px; padding-right: 14px; }
  .fig-panel ol.fig-chain > li.you, .fig-panel ol.fig-chain.fig-chain--g > li.you { padding-left: 13px; padding-right: 13px; }
  .fig-panel p.fig-note { padding: 12px 14px; }
}
@media (max-width: 380px) {
  .fig-panel { padding-left: 12px; padding-right: 12px; }
  .fig-panel ol.fig-chain > li, .fig-panel ol.fig-chain.fig-chain--g > li { padding-left: 12px; padding-right: 12px; }
  .fig-panel ol.fig-chain > li.you, .fig-panel ol.fig-chain.fig-chain--g > li.you { padding-left: 11px; padding-right: 11px; }
  .fig-panel p.fig-note { padding: 12px; }
}

/* very small phones (<= 340px, e.g. 320px): card names 12px (the floor) so 27-28 character DE/FR names keep >= 8px free space in the 218px card; names still never wrap */
@media (max-width: 340px) {
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-nm { font-size: 12px; }
}

/* 2026-10-25 (visual sweep, all widths x all languages): a stacked card's second/third line (ref, tag) may wrap
   between words at ANY width when it cannot fit one line (seen: DE "Falls der Hersteller nicht in der EU
   niedergelassen" clipped at 441-560px). Card names (.fig-nm) still never wrap. */
.fig-panel ol.fig-chain.fig-chain--g.fig-chain--stack > li .fig-ref,
.fig-panel ol.fig-chain.fig-chain--g.fig-chain--stack > li .fig-tag { white-space: normal; overflow-wrap: break-word; }
@media (max-width: 860px) {
  .fig-panel ol.fig-chain.fig-chain--g > li .fig-ref, .fig-panel ol.fig-chain.fig-chain--g > li .fig-tag { white-space: normal; overflow-wrap: break-word; }
}
