/* Octet : feuille de style unique.
   Identité : les quatre paires d'un câble Ethernet T568B (bleu, orange, vert, marron) codent les catégories ;
   le logo reprend les huit conducteurs d'une prise RJ45. Typographie Atkinson Hyperlegible, conçue pour
   distinguer les caractères ambigus (l/I/1, O/0) : utile pour lire des IP, des empreintes et des mots de passe. */

@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Mono"; src: url("../fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Mono"; src: url("../fonts/atkinson-hyperlegible-mono-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2113, U+A720-A7FF; }

/* ───────────── Jetons ───────────── */
:root {
  color-scheme: light;
  --font: "Atkinson Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: .8125rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem; --fs-3xl: 2.25rem;

  --bg: #eef0f0; --bg-2: #e3e7e7; --surface: #ffffff; --surface-2: #f6f7f7; --sunken: #f1f3f3;
  --line: #d6dcde; --line-strong: #b9c3c7;
  --ink: #18222d; --ink-2: #3a4752; --muted: #5d6a74; --faint: #87939b;
  --focus: #2160d6;
  --ok: #17733f; --ok-bg: #e2f2e8; --warn: #8f5800; --warn-bg: #fbefd6; --bad: #b42318; --bad-bg: #fbe6e3;
  --info: #1d55b3; --info-bg: #e5edfa;
  --stripe-white: #f6f6f1;

  /* Paires T568B */
  --c-bleu: #2160d6; --c-orange: #f07a1a; --c-vert: #1f9d55; --c-marron: #8a5a35;

  /* Accent par défaut (pages hors catégorie) */
  --accent: var(--ink); --accent-btn: var(--ink); --accent-on: #fff; --accent-ink: var(--ink); --accent-tint: var(--bg-2);

  --r-sm: 5px; --r-md: 8px; --r-lg: 12px;
  --shadow-pop: 0 1px 2px rgba(24, 34, 45, .08), 0 12px 32px -8px rgba(24, 34, 45, .28);
  --topbar-h: 60px;
  --side-w: 264px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14181d; --bg-2: #1b2026; --surface: #1c2229; --surface-2: #222931; --sunken: #181d23;
  --line: #2e363f; --line-strong: #46515c;
  --ink: #e6eaed; --ink-2: #c3cbd1; --muted: #9aa5ae; --faint: #6f7b85;
  --focus: #79a7f5;
  --ok: #5fd38f; --ok-bg: rgba(63, 196, 122, .13); --warn: #f2bd5b; --warn-bg: rgba(242, 189, 91, .12);
  --bad: #ff8a7f; --bad-bg: rgba(255, 110, 97, .13); --info: #8db4f5; --info-bg: rgba(91, 147, 240, .14);
  --stripe-white: #e9e9e2;
  --c-bleu: #5b93f0; --c-orange: #ff9442; --c-vert: #3fc47a; --c-marron: #c8956b;
  --accent-on: #14181d;
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -8px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14181d; --bg-2: #1b2026; --surface: #1c2229; --surface-2: #222931; --sunken: #181d23;
    --line: #2e363f; --line-strong: #46515c;
    --ink: #e6eaed; --ink-2: #c3cbd1; --muted: #9aa5ae; --faint: #6f7b85;
    --focus: #79a7f5;
    --ok: #5fd38f; --ok-bg: rgba(63, 196, 122, .13); --warn: #f2bd5b; --warn-bg: rgba(242, 189, 91, .12);
    --bad: #ff8a7f; --bad-bg: rgba(255, 110, 97, .13); --info: #8db4f5; --info-bg: rgba(91, 147, 240, .14);
    --stripe-white: #e9e9e2;
    --c-bleu: #5b93f0; --c-orange: #ff9442; --c-vert: #3fc47a; --c-marron: #c8956b;
    --accent-on: #14181d;
    --shadow-pop: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -8px rgba(0, 0, 0, .6);
  }
}

[data-pair="bleu"]   { --accent: var(--c-bleu);   --accent-btn: #2160d6; --accent-on: #fff;    --accent-ink: #1b4fb3; --accent-tint: #e7eefb; }
[data-pair="orange"] { --accent: var(--c-orange); --accent-btn: #f07a1a; --accent-on: #1d1206; --accent-ink: #a54c08; --accent-tint: #fdede0; }
[data-pair="vert"]   { --accent: var(--c-vert);   --accent-btn: #17773f; --accent-on: #fff;    --accent-ink: #146b38; --accent-tint: #e2f3e9; }
[data-pair="marron"] { --accent: var(--c-marron); --accent-btn: #8a5a35; --accent-on: #fff;    --accent-ink: #7a4e2d; --accent-tint: #f2eae2; }
:root[data-theme="dark"] [data-pair="bleu"]   { --accent-btn: #5b93f0; --accent-on: #0c1525; --accent-ink: #8db4f5; --accent-tint: rgba(91,147,240,.14); }
:root[data-theme="dark"] [data-pair="orange"] { --accent-btn: #ff9442; --accent-on: #1d1206; --accent-ink: #ffb27a; --accent-tint: rgba(255,148,66,.13); }
:root[data-theme="dark"] [data-pair="vert"]   { --accent-btn: #3fc47a; --accent-on: #07170d; --accent-ink: #7adaa4; --accent-tint: rgba(63,196,122,.13); }
:root[data-theme="dark"] [data-pair="marron"] { --accent-btn: #c8956b; --accent-on: #1a1008; --accent-ink: #ddb592; --accent-tint: rgba(200,149,107,.14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-pair="bleu"]   { --accent-btn: #5b93f0; --accent-on: #0c1525; --accent-ink: #8db4f5; --accent-tint: rgba(91,147,240,.14); }
  :root:not([data-theme="light"]) [data-pair="orange"] { --accent-btn: #ff9442; --accent-on: #1d1206; --accent-ink: #ffb27a; --accent-tint: rgba(255,148,66,.13); }
  :root:not([data-theme="light"]) [data-pair="vert"]   { --accent-btn: #3fc47a; --accent-on: #07170d; --accent-ink: #7adaa4; --accent-tint: rgba(63,196,122,.13); }
  :root:not([data-theme="light"]) [data-pair="marron"] { --accent-btn: #c8956b; --accent-on: #1a1008; --accent-ink: #ddb592; --accent-tint: rgba(200,149,107,.14); }
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: var(--fs-md); line-height: 1.55; color: var(--ink); background: var(--bg);
  font-feature-settings: "kern"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 750; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, canvas { max-width: 100%; }
code, kbd, pre, samp, .mono { font-family: var(--mono); font-size: .94em; }
kbd { font-size: var(--fs-xs); padding: .1em .45em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--c-bleu) 28%, transparent); }
[hidden] { display: none !important; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { top: 10px; }

/* ───────────── Logo : prise RJ45, câblage T568B ───────────── */
.jack {
  display: inline-flex; align-items: stretch; gap: 2px; height: 28px; padding: 6px 6px 5px;
  background: #18222d; border-radius: 6px 6px 7px 7px; box-shadow: inset 0 -3px 0 rgba(255,255,255,.08);
}
.jack i { width: 3px; border-radius: 1px; }
.jack i:nth-child(1) { background: repeating-linear-gradient(135deg, var(--stripe-white) 0 2px, #f07a1a 2px 4px); }
.jack i:nth-child(2) { background: #f07a1a; }
.jack i:nth-child(3) { background: repeating-linear-gradient(135deg, var(--stripe-white) 0 2px, #1f9d55 2px 4px); }
.jack i:nth-child(4) { background: #2160d6; }
.jack i:nth-child(5) { background: repeating-linear-gradient(135deg, var(--stripe-white) 0 2px, #2160d6 2px 4px); }
.jack i:nth-child(6) { background: #1f9d55; }
.jack i:nth-child(7) { background: repeating-linear-gradient(135deg, var(--stripe-white) 0 2px, #8a5a35 2px 4px); }
.jack i:nth-child(8) { background: #8a5a35; }
:root[data-theme="dark"] .jack { background: #0b0e11; box-shadow: inset 0 0 0 1px #2e363f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jack { background: #0b0e11; box-shadow: inset 0 0 0 1px #2e363f; } }
.jack-sm { height: 20px; padding: 4px; gap: 1.5px; border-radius: 4px; vertical-align: -5px; margin-right: 6px; }
.jack-sm i { width: 2px; }

/* Repère de paire : moitié unie, moitié rayée (comme un conducteur et son blanc) */
.pair-swatch {
  display: inline-block; width: 12px; height: 16px; border-radius: 2px; flex: none;
  background: linear-gradient(90deg, var(--accent) 0 50%, transparent 50%),
              repeating-linear-gradient(135deg, var(--stripe-white) 0 2px, var(--accent) 2px 4px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ───────────── Barre supérieure ───────────── */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand:hover .jack i { filter: saturate(1.25); }
.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(420px, 46vw); height: 40px; padding: 0 8px 0 12px;
  font: inherit; font-size: var(--fs-sm); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--ink-2); }
.search-trigger .st-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; flex: none; color: var(--ink-2);
  background: transparent; border: 1px solid transparent; border-radius: var(--r-md); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .when-dark { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
}
.nav-toggle { display: none; }

/* ───────────── Structure des pages outils ───────────── */
.shell { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--topbar-h); align-self: start; height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 20px 12px 40px 20px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-cat + .side-cat { margin-top: 20px; }
.side-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 750; color: var(--ink); margin: 0 0 6px 8px; letter-spacing: 0; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); line-height: 1.3; }
.sidebar a .i { color: var(--faint); width: 16px; height: 16px; }
.sidebar a:hover { background: var(--bg-2); color: var(--ink); }
.sidebar a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar a[aria-current="page"] .i { color: var(--accent-ink); }
.main { min-width: 0; padding: 28px 32px 56px; outline: none; }
.main-wide { flex: 1; width: 100%; outline: none; }

/* ───────────── En-tête d'outil ───────────── */
.tool { max-width: 1120px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); margin-bottom: 10px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent-ink); text-decoration: underline; }
.tool-title-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.tool-title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 800; letter-spacing: -.025em; }
.tool-title .i { width: 1.1em; height: 1.1em; padding: 6px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-ink); stroke-width: 1.8; box-sizing: content-box; width: .8em; height: .8em; }
.tool-desc { margin-top: 8px; color: var(--muted); font-size: var(--fs-lg); max-width: 70ch; }
.tool-desc .mode { margin-left: 4px; vertical-align: 2px; }
.mode { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; cursor: help; }
.mode .i { width: 14px; height: 14px; }
.mode-local .i { color: var(--ok); }
.mode-serveur .i { color: var(--info); }
.fav-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; font: inherit; font-size: var(--fs-sm); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; flex: none; }
.fav-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.fav-btn[aria-pressed="true"] { color: #8f5800; border-color: #e7b54a; background: #fdf3da; }
.fav-btn[aria-pressed="true"] .i { fill: #f2b233; stroke: #c98a12; }
:root[data-theme="dark"] .fav-btn[aria-pressed="true"] { color: #f2bd5b; background: rgba(242,189,91,.1); border-color: rgba(242,189,91,.45); }
.tool-body { margin-top: 24px; display: grid; gap: 16px; }
.tool-about { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 75ch; }
.tool-about h2 { font-size: var(--fs-lg); margin-bottom: 8px; }
.tool-about p { color: var(--ink-2); }
.related { margin-top: 32px; }
.related h2 { font-size: var(--fs-lg); margin-bottom: 12px; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.related a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; height: 100%; }
.related a:hover { border-color: var(--accent); }
.related a .i { color: var(--accent-ink); margin-top: 2px; }
.related strong { display: block; font-size: var(--fs-sm); }
.related small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; margin-top: 2px; }

/* ───────────── Accueil ───────────── */
.hero { border-bottom: 1px solid var(--line); background:
  linear-gradient(var(--bg), var(--bg)) padding-box,
  radial-gradient(1200px 400px at 10% -10%, color-mix(in srgb, var(--c-bleu) 9%, transparent), transparent 70%); }
.hero-in { max-width: 1440px; margin: 0 auto; padding: 56px 24px 48px; }
.hero-title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; max-width: 18ch; }
.hero-sub { margin-top: 14px; font-size: var(--fs-lg); color: var(--muted); max-width: 60ch; }
.sniffer { margin-top: 32px; max-width: 980px; }
.sniffer-label { display: block; font-weight: 700; margin-bottom: 10px; }
.sniffer-box { position: relative; display: flex; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 0 rgba(24,34,45,.04); }
.sniffer-box:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-bleu) 16%, transparent); }
/* Les huit conducteurs, dans l'ordre T568B, en liseré du champ */
.cable { position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg,
  #f07a1a 0 12.5%, #f07a1a 12.5% 25%, #1f9d55 25% 37.5%, #2160d6 37.5% 50%, #2160d6 50% 62.5%, #1f9d55 62.5% 75%, #8a5a35 75% 87.5%, #8a5a35 87.5% 100%); }
.cable::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,
  var(--stripe-white) 0 12.5%, transparent 12.5% 25%, var(--stripe-white) 25% 37.5%, transparent 37.5% 50%, var(--stripe-white) 50% 62.5%, transparent 62.5% 75%, var(--stripe-white) 75% 87.5%, transparent 87.5%);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px); mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px); }
.sniffer-input { flex: 1; min-height: 64px; max-height: 220px; padding: 20px 8px 16px 20px; resize: none; border: 0; outline: none; background: transparent;
  font-family: var(--mono); font-size: 1.2rem; line-height: 1.45; color: var(--ink); overflow-y: auto; }
.sniffer-input::placeholder { color: var(--faint); font-family: var(--font); }
.sniffer-paste { margin: 12px 10px 0 0; }
.sniffer-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; color: var(--muted); font-size: var(--fs-sm); }
.sniffer-examples > span { margin-right: 4px; }
.sniffer-out { margin-top: 14px; display: grid; gap: 10px; }
.sniff-kind { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sniff-kind strong { font-size: var(--fs-lg); }
.sniff-kind .sniff-preview { color: var(--ink-2); font-family: var(--mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.sniff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sniff-actions a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--r-md); text-decoration: none; font-weight: 650;
  font-size: var(--fs-sm); color: var(--accent-ink); background: var(--surface); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--accent); }
.sniff-actions a:hover { border-color: var(--accent); background: var(--accent-tint); }
.sniff-actions a:first-child { color: var(--accent-on); background: var(--accent-btn); border-color: var(--accent-btn); box-shadow: none; }
.sniff-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 5px; vertical-align: -5px; border: 1px solid var(--line-strong); }
@media (prefers-reduced-motion: no-preference) {
  .sniffer-out:not([hidden]) { animation: rise .22s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
}

.shortcuts { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.shortcuts-in { max-width: 1440px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.shortcut-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shortcut-group h2 { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; }
.shortcut-group ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.shortcut-group a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.shortcut-group a .i { width: 14px; height: 14px; color: var(--accent-ink); }
.shortcut-group a:hover { border-color: var(--accent); }

.index { max-width: 1440px; margin: 0 auto; padding: 40px 24px 56px; width: 100%; }
.index-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.index-head { position: relative; padding-top: 18px; margin-bottom: 14px; }
.pair-cable { position: absolute; top: 0; left: 0; right: 0; height: 8px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(var(--accent) 0 50%, transparent 50%),
              repeating-linear-gradient(90deg, var(--stripe-white) 0 6px, var(--accent) 6px 12px); }
.index-head h2 { font-size: var(--fs-xl); }
.index-head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list a { display: flex; align-items: flex-start; gap: 12px; padding: 11px 6px 11px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.index-list a > .i { margin-top: 3px; color: var(--accent-ink); }
.index-list a:hover { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.index-list a:hover .il-name { color: var(--accent-ink); }
.il-text { flex: 1; min-width: 0; }
.il-name { display: block; font-weight: 700; line-height: 1.3; }
.il-desc { display: block; font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; margin-top: 2px; }
.il-mode { color: var(--faint); margin-top: 2px; }
.il-mode .i { width: 15px; height: 15px; }
.index-legend { margin-top: 24px; font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* ───────────── Pied de page ───────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer-in { max-width: 1440px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: var(--fs-sm); color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ───────────── Composants ───────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; min-width: 0; }
.panel-tight { padding: 14px 16px; }
.panel > h2, .panel-title { font-size: var(--fs-lg); font-weight: 750; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-title .i { color: var(--accent-ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: var(--fs-lg); }
.stack > .panel-head { margin-bottom: 0; }
.sub { color: var(--muted); font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.center { text-align: center; }
.right { text-align: right; }

.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.stack-sm { display: grid; gap: 8px; align-content: start; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-end { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.grow { flex: 1 1 220px; min-width: 0; }

/* Champs */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 9px 12px; line-height: 1.4;
}
.input, .select { height: 42px; }
.input-lg { height: 48px; font-size: var(--fs-lg); }
.textarea { min-height: 140px; resize: vertical; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.55; tab-size: 2; }
.textarea.tall { min-height: 300px; }
.textarea.short { min-height: 84px; }
.input.mono, .mono .input { font-family: var(--mono); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-btn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.select { appearance: none; padding-top: 0; padding-bottom: 0; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6a74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; cursor: pointer; }
.input-group { display: flex; min-width: 0; }
.input-group > .input, .input-group > .select { border-radius: 0; margin-left: -1px; }
.input-group > :first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.input-group > :last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group > .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-left: -1px; height: 42px; }
.input-group > .input:focus { position: relative; z-index: 1; }
input[type="color"].input { padding: 4px; width: 56px; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--accent-btn); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-btn); width: 16px; height: 16px; margin: 0; flex: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); cursor: pointer; user-select: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; font: inherit; font-weight: 700;
  font-size: var(--fs-sm); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--ink-2); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .i { width: 17px; height: 17px; }
.btn-primary { color: var(--accent-on); background: var(--accent-btn); border-color: var(--accent-btn); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-btn) 88%, #000); border-color: color-mix(in srgb, var(--accent-btn) 88%, #000); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: var(--bad-bg); }
.btn-sm { height: 32px; padding: 0 10px; font-size: var(--fs-xs); gap: 6px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-lg { height: 48px; padding: 0 22px; font-size: var(--fs-md); }
.btn-icon.btn-lg { width: 48px; padding: 0; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--accent-on) var(--accent-on) transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary).is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contrôle segmenté (choix exclusif) */
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md); }
.seg button, .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font: inherit; font-size: var(--fs-sm); font-weight: 650; color: var(--muted);
  background: transparent; border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.seg button:hover, .seg label:hover { color: var(--ink); }
.seg [aria-pressed="true"], .seg [aria-selected="true"], .seg input:checked + span, .seg label:has(input:checked) { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(24,34,45,.12), 0 0 0 1px var(--line); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg-sm button, .seg-sm label { padding: 4px 9px; font-size: var(--fs-xs); }

/* Onglets */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { position: relative; padding: 10px 14px; font: inherit; font-size: var(--fs-sm); font-weight: 650; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs .count { margin-left: 6px; font-size: var(--fs-xs); color: var(--faint); font-weight: 600; }
[role="tabpanel"] { padding-top: 16px; min-width: 0; }

/* Paires clé / valeur */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 0; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: var(--fs-sm); padding-right: 20px; }
.kv dd { font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.kv dd.mono, .kv .mono { font-weight: 500; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; color: var(--ink-2); background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.table tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td.mono, .table .mono { font-size: .88em; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact th, .table-compact td { padding: 6px 10px; }
.table-records { table-layout: fixed; }
.table tr.grp td { border-top: 2px solid var(--line-strong); }
.tool-body > [aria-live] { display: grid; gap: 16px; min-width: 0; }
.tool-body > [aria-live]:empty { display: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.6;
  background: var(--bg-2); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.badge .i { width: 13px; height: 13px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: var(--accent-tint); color: var(--accent-ink); }
.badge-outline { background: transparent; border-color: var(--line-strong); }
.method { font-family: var(--mono); font-weight: 700; font-size: var(--fs-xs); padding: 1px 6px; border-radius: 4px; background: var(--bg-2); }
.method-GET { color: var(--ok); background: var(--ok-bg); }
.method-POST { color: var(--info); background: var(--info-bg); }
.method-PUT, .method-PATCH { color: var(--warn); background: var(--warn-bg); }
.method-DELETE { color: var(--bad); background: var(--bad-bg); }

/* Alertes */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); border: 1px solid transparent; line-height: 1.5; }
.alert > .i { margin-top: 2px; }
.alert-info { background: var(--info-bg); color: var(--ink); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-info > .i { color: var(--info); }
.alert-ok { background: var(--ok-bg); color: var(--ink); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-ok > .i { color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--ink); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-warn > .i { color: var(--warn); }
.alert-error { background: var(--bad-bg); color: var(--ink); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.alert-error > .i { color: var(--bad); }
.alert strong { font-weight: 750; }

/* Listes de constats (analyse) */
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.findings li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); background: var(--surface-2); }
.findings li > .i { margin-top: 2px; }
.findings .f-ok > .i { color: var(--ok); }
.findings .f-warn > .i { color: var(--warn); }
.findings .f-bad > .i { color: var(--bad); }
.findings .f-info > .i { color: var(--info); }

/* Code et sorties */
.code { position: relative; margin: 0; padding: 14px 16px; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.6; background: var(--sunken);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: auto; max-height: 560px; white-space: pre; tab-size: 2; color: var(--ink); }
.code.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.code-box { position: relative; min-width: 0; }
.code-box > .copy-float { position: absolute; top: 8px; right: 8px; z-index: 2; opacity: .85; }
.code-box:has(> .copy-float) > .code { padding-right: 96px; }
.code-box > .copy-float:hover { opacity: 1; }
.output { font-family: var(--mono); font-size: var(--fs-sm); padding: 10px 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-wrap: anywhere; min-height: 42px; }
.copyable { display: flex; align-items: center; gap: 8px; min-width: 0; }
.copyable > .output, .copyable > .input { flex: 1; }
/* Coloration syntaxique */
.tk-key { color: #8a3ab9; } .tk-str { color: #17733f; } .tk-num { color: #b35400; } .tk-bool { color: #1d55b3; font-weight: 600; } .tk-null { color: #8b979f; font-style: italic; }
.tk-punc { color: var(--muted); } .tk-tag { color: #1d55b3; } .tk-attr { color: #8a3ab9; } .tk-com { color: var(--faint); font-style: italic; }
:root[data-theme="dark"] .tk-key { color: #d5a8f5; } :root[data-theme="dark"] .tk-str { color: #7adaa4; } :root[data-theme="dark"] .tk-num { color: #ffb27a; } :root[data-theme="dark"] .tk-bool, :root[data-theme="dark"] .tk-tag { color: #8db4f5; } :root[data-theme="dark"] .tk-attr { color: #d5a8f5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tk-key, :root:not([data-theme="light"]) .tk-attr { color: #d5a8f5; } :root:not([data-theme="light"]) .tk-str { color: #7adaa4; }
  :root:not([data-theme="light"]) .tk-num { color: #ffb27a; } :root:not([data-theme="light"]) .tk-bool, :root:not([data-theme="light"]) .tk-tag { color: #8db4f5; }
}
mark, .hl { background: color-mix(in srgb, var(--c-orange) 30%, transparent); color: inherit; border-radius: 2px; }
.hl-alt { background: color-mix(in srgb, var(--c-bleu) 26%, transparent); }

/* Arbre JSON */
.tree { font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.7; }
.tree details { padding-left: 18px; }
.tree summary { margin-left: -18px; cursor: pointer; list-style: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: "▸"; display: inline-block; width: 18px; color: var(--faint); transition: transform .12s; }
.tree details[open] > summary::before { transform: rotate(90deg); }
.tree .leaf { padding-left: 0; }
.tree .meta { color: var(--faint); }

/* Zone de dépôt */
.dropzone { display: grid; place-items: center; gap: 8px; padding: 32px 20px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-tint); color: var(--ink); }
.dropzone .i { width: 32px; height: 32px; color: var(--accent-ink); stroke-width: 1.6; }
.dropzone strong { color: var(--ink); font-size: var(--fs-lg); }
.dropzone input[type="file"] { display: none; }

/* Puces */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; font: inherit; font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-ink); }

/* Note / sévérité */
.grade { display: grid; place-items: center; width: 84px; height: 84px; flex: none; border-radius: 14px; font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; color: #fff; background: var(--faint); }
.grade-A, .grade-Ap { background: #17733f; } .grade-B { background: #4c8a1e; } .grade-C { background: #b07a00; } .grade-D { background: #c25a0a; } .grade-E, .grade-F { background: #b42318; }
.score-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.score-head h2 { font-size: var(--fs-xl); }
.sev { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-weight: 750; font-size: var(--fs-sm); color: #fff; background: var(--faint); }
.sev-none { background: #5d6a74; } .sev-low { background: #2f7d32; } .sev-medium { background: #b07a00; } .sev-high { background: #c25a0a; } .sev-critical { background: #9f1d14; }

/* Jauge */
.meter { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease, background-color .25s; }
.meter-segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.meter-segs span { height: 8px; border-radius: 3px; background: var(--bg-2); }
.meter-segs[data-score="0"] span:nth-child(-n+1) { background: #b42318; }
.meter-segs[data-score="1"] span:nth-child(-n+2) { background: #c25a0a; }
.meter-segs[data-score="2"] span:nth-child(-n+3) { background: #b07a00; }
.meter-segs[data-score="3"] span:nth-child(-n+4) { background: #4c8a1e; }
.meter-segs[data-score="4"] span:nth-child(-n+5) { background: #17733f; }

/* État vide / chargement */
.empty { display: grid; place-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.empty .i { width: 28px; height: 28px; color: var(--faint); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.loading { display: flex; align-items: center; gap: 12px; padding: 20px; color: var(--muted); }

/* Notifications */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; max-width: 360px; border-radius: var(--r-md); background: var(--ink); color: var(--bg);
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-pop); pointer-events: auto; }
.toast .i { color: #7adaa4; }
.toast.toast-error .i { color: #ff8a7f; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } }

/* Palette de recherche (Ctrl+K) */
.palette { padding: 0; border: 0; background: transparent; width: min(640px, calc(100vw - 24px)); max-height: min(560px, 80vh); margin: 12vh auto auto; overflow: visible; color: var(--ink); }
.palette::backdrop { background: rgba(14, 20, 26, .45); backdrop-filter: blur(2px); }
.palette-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: min(560px, 80vh); }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.palette-search .i { color: var(--muted); width: 20px; height: 20px; }
.palette-input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; font: inherit; font-size: var(--fs-lg); color: var(--ink); }
.palette-input::-webkit-search-cancel-button { display: none; }
.palette-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.palette-list li .i { color: var(--accent-ink); }
.palette-list li[aria-selected="true"] { background: var(--accent-tint); }
.palette-list .p-name { font-weight: 700; }
.palette-list .p-desc { font-size: var(--fs-xs); color: var(--muted); display: block; }
.palette-list .p-cat { margin-left: auto; font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.palette-list .p-empty { color: var(--muted); cursor: default; justify-content: center; padding: 24px; }

/* Pages de texte */
.page { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.prose h1 { font-size: var(--fs-3xl); margin-bottom: 16px; letter-spacing: -.03em; }
.prose h2 { font-size: var(--fs-xl); margin: 36px 0 10px; }
.prose p, .prose ul { margin: 0 0 12px; color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 4px; }
.prose ul.cols { columns: 3 180px; list-style: none; padding: 0; font-size: var(--fs-sm); }
.todo { background: var(--warn-bg); color: var(--warn); padding: 0 6px; border-radius: 4px; font-size: var(--fs-sm); }
.error-page { max-width: 640px; margin: 0 auto; padding: 72px 24px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.error-code { font-family: var(--mono); font-size: 5rem; font-weight: 700; line-height: 1; color: var(--faint); letter-spacing: -.04em; }

/* Éléments spécifiques réutilisables */
.swatch-lg { width: 100%; height: 120px; border-radius: var(--r-md); border: 1px solid var(--line); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumb { position: relative; display: grid; gap: 6px; padding: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md); cursor: pointer; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
.thumb canvas, .thumb img { width: 100%; height: auto; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.thumb[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.file-item.dragging { opacity: .5; }
.file-item.drop-target { border-color: var(--accent); box-shadow: 0 -3px 0 var(--accent); }
.file-item .grip { cursor: grab; color: var(--faint); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { flex: 1 1 140px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.stat b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat > span { font-size: var(--fs-xs); color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-xs); color: var(--muted); }

/* ───────────── Adaptatif ───────────── */
@media (max-width: 1180px) {
  .index-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
}
@media (max-width: 1000px) {
  :root { --side-w: 0px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-grid; }
  .sidebar { position: fixed; z-index: 50; top: var(--topbar-h); left: 0; width: min(320px, 86vw); background: var(--bg); border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(14,20,26,.35); z-index: 45; }
  .main { padding: 22px 20px 48px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .index-in { grid-template-columns: minmax(0, 1fr); }
  .search-trigger { width: auto; flex: 1; }
  .search-trigger .st-kbd { display: none; }
  .topbar-in { padding: 0 12px; gap: 8px; }
  .brand-name { display: none; }
  .hero-in { padding: 36px 18px 32px; }
  .sniffer-input { font-size: 1.05rem; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .fav-label { display: none; }
  .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .sidebar, .footer, .related, .tool-about, .fav-btn, .btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

/* ───────────── Outils de sécurité ───────────── */
.pw-display { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md); }
.pw-value { flex: 1; min-width: 0; font-family: var(--mono); font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem); line-height: 1.4; overflow-wrap: anywhere; letter-spacing: .02em; }
.pw-d { color: #1b4fb3; } .pw-s { color: #a54c08; }
:root[data-theme="dark"] .pw-d { color: #8db4f5; } :root[data-theme="dark"] .pw-s { color: #ffb27a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pw-d { color: #8db4f5; } :root:not([data-theme="light"]) .pw-s { color: #ffb27a; } }
.jwt-h { color: #b42318; } .jwt-p { color: #8a3ab9; } .jwt-s { color: #1d55b3; }
:root[data-theme="dark"] .jwt-h { color: #ff8a7f; } :root[data-theme="dark"] .jwt-p { color: #d5a8f5; } :root[data-theme="dark"] .jwt-s { color: #8db4f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jwt-h { color: #ff8a7f; } :root:not([data-theme="light"]) .jwt-p { color: #d5a8f5; } :root:not([data-theme="light"]) .jwt-s { color: #8db4f5; } }
.cvss-score { display: grid; place-items: center; align-content: center; width: 124px; height: 104px; flex: none; border-radius: 14px; color: #fff; background: #5d6a74; }
.cvss-score b { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.cvss-score span { font-size: var(--fs-sm); font-weight: 700; margin-top: 4px; }
.cvss-score.sev-low { background: #2f7d32; } .cvss-score.sev-medium { background: #b07a00; } .cvss-score.sev-high { background: #c25a0a; } .cvss-score.sev-critical { background: #9f1d14; }
.cvss-top { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px 24px; }
.cv-metric { display: grid; gap: 6px; align-content: start; }
.cv-label { font-size: var(--fs-sm); line-height: 1.35; }
details.panel > summary { cursor: pointer; margin: 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin: 0 4px; }
details.panel[open] > summary { margin-bottom: 14px; }
details.panel[open] > summary::before { transform: rotate(45deg); }
.sh-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-check { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.sh-check-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-fix { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px dashed var(--line-strong); }

/* ───────────── Outils de développement ───────────── */
.tall-out { min-height: 300px; max-height: 68vh; }
.editor-pair > .field { align-content: stretch; grid-template-rows: auto minmax(0, 1fr); grid-auto-rows: auto; }
.editor-pair .textarea.tall { min-height: 340px; height: 100%; }
.rx-pattern { display: flex; align-items: center; gap: 4px; }
.rx-pattern .input { flex: 1; }
.rx-delim { font-family: var(--mono); font-size: 1.4rem; color: var(--faint); }
.rx-pattern .rx-flags { flex: 0 0 90px; }
.rx-preview { min-height: 120px; max-height: 360px; line-height: 1.7; }
.cron-expr { font-size: 1.5rem; letter-spacing: .06em; height: 56px; }
.cron-human { font-size: var(--fs-lg); font-weight: 700; color: var(--accent-ink); min-height: 1.5em; }
.cron-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cron-field .select { height: 34px; font-size: var(--fs-xs); }
.cron-next { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.cron-next li::marker { color: var(--faint); }
.rc-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-bar .input { flex: 1 1 320px; height: 44px; }
.rc-method { width: 120px; height: 44px; font-family: var(--mono); font-weight: 700; }
.rc-via { width: auto; height: 44px; }
.rc-bar .btn { height: 44px; }
.kv-editor { display: grid; gap: 6px; }
.kv-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1.4fr) 34px; gap: 8px; align-items: center; }
.kv-row .input { height: 36px; font-size: var(--fs-sm); }
.wh-url { font-size: var(--fs-lg); font-weight: 600; color: var(--accent-ink); }
.wh-live .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .wh-live .dot { animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .25; } } }
.wh-layout { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.wh-list-panel { padding: 14px; position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto; }
.wh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wh-item { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 8px 10px; text-align: left; font: inherit;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer; color: var(--ink); }
.wh-item:hover { background: var(--surface-2); }
.wh-item[aria-pressed="true"] { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.wh-item-path { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-item-meta { grid-column: 2; font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 900px) { .wh-layout { grid-template-columns: minmax(0, 1fr); } .wh-list-panel { position: static; max-height: 300px; } .cron-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────────── Outils fichiers et productivité ───────────── */
.checker { background-color: #fff; background-image: conic-gradient(#e6e9eb 25%, #fff 0 50%, #e6e9eb 0 75%, #fff 0); background-size: 16px 16px; }
.linklike { padding: 0; font: inherit; color: var(--accent-ink); background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike:hover { text-decoration-thickness: 2px; }
.textarea-prose { font-family: var(--font); font-size: var(--fs-md); line-height: 1.6; min-height: 340px; }

/* PDF et images */
.pm-thumb { display: grid; place-items: center; flex: none; width: 46px; height: 60px; overflow: hidden; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.pm-thumb canvas, .pm-thumb img { max-width: 100%; max-height: 100%; }
.thumb-img { display: block; width: 100%; border-radius: 3px; background: var(--sunken); box-shadow: 0 0 0 1px var(--line); }
.ic-prev { flex: none; width: 52px; height: 52px; object-fit: cover; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line);
  background-color: #fff; background-image: conic-gradient(#e6e9eb 25%, #fff 0 50%, #e6e9eb 0 75%, #fff 0); background-size: 12px 12px; }
span.ic-prev { background: var(--sunken); }
.compare { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--line);
  background-color: #fff; background-image: conic-gradient(#e6e9eb 25%, #fff 0 50%, #e6e9eb 0 75%, #fff 0); background-size: 16px 16px; }
.compare > img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.compare-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.compare-after img { display: block; width: 100%; height: 100%; }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); pointer-events: none; }
.compare:focus-within::after { width: 4px; margin-left: -2px; background: var(--focus); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }

/* QR code */
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 16px; align-items: start; }
.qr-preview-panel { position: sticky; top: calc(var(--topbar-h) + 12px); }
.qr-preview { display: grid; place-items: center; min-height: 240px; }
.qr-preview svg { width: 100%; max-width: 300px; height: auto; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line); }
.qr-layout details > summary { cursor: pointer; }
@media (max-width: 900px) { .qr-layout { grid-template-columns: minmax(0, 1fr); } .qr-preview-panel { position: static; } }

/* Comparaison de textes */
.diff-wrap { max-height: 72vh; }
.diff { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.55; }
.diff td { padding: 1px 10px; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .d-num { padding: 1px 8px; text-align: right; color: var(--faint); background: var(--surface-2); user-select: none; font-variant-numeric: tabular-nums; }
.diff-split .d-num:nth-child(3) { border-left: 1px solid var(--line); }
.d-del td:not(.d-num), .d-mod .d-old { background: color-mix(in srgb, var(--bad) 11%, transparent); }
.d-add td:not(.d-num), .d-mod .d-new { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.diff-split .d-del .d-new, .diff-split .d-add .d-old { background: var(--sunken); }
.diff del { text-decoration: none; background: color-mix(in srgb, var(--bad) 30%, transparent); border-radius: 2px; }
.diff ins { text-decoration: none; background: color-mix(in srgb, var(--ok) 32%, transparent); border-radius: 2px; }
.d-skip td { padding: 4px 10px; text-align: center; font-family: var(--font); color: var(--muted); background: var(--surface-2); border-block: 1px solid var(--line); }

/* Compteur de mots */
.wc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; }
.wc-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.wc-stat b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.wc-stat span { font-size: var(--fs-xs); color: var(--muted); }
.wc-big b { font-size: 2.4rem; letter-spacing: -.035em; color: var(--accent-ink); }
.wc-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.wc-limits { display: grid; gap: 12px; }
.wc-limit { display: grid; gap: 5px; }
.wc-limit-head { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 650; font-variant-numeric: tabular-nums; }
.wc-limit .meter { height: 6px; }
.wc-limit.is-over .meter > span { background: var(--bad); }
.wc-over { color: var(--bad); font-weight: 750; }
.wc-bar-cell { width: 35%; vertical-align: middle !important; }
.wc-bar { display: block; height: 8px; border-radius: 4px; background: var(--accent); opacity: .75; }
@media (max-width: 900px) { .wc-layout { grid-template-columns: minmax(0, 1fr); } }

/* Timestamp */
.ts-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.ts-now-main { display: grid; gap: 2px; }
.ts-now-row { display: flex; align-items: center; gap: 6px; }
.ts-now-row b { font-size: 2.2rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--accent-ink); line-height: 1.15; }
.ts-now-side { display: grid; gap: 10px; justify-items: end; text-align: right; }
.ts-input { min-height: 48px; font-size: var(--fs-lg); line-height: 1.5; padding-top: 10px; resize: none; overflow: hidden; }
.ts-table th { width: 30%; white-space: normal; position: static; background: transparent; color: var(--muted); font-weight: 600; }
.ts-table td { overflow-wrap: anywhere; font-weight: 600; }
.ts-table td:last-child { width: 44px; padding: 4px 8px; }
@media (max-width: 640px) { .ts-now-side { justify-items: start; text-align: left; } }

/* Unités */
.uc-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-cat { padding: 6px 13px; font: inherit; font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.uc-cat:hover { border-color: var(--line-strong); color: var(--ink); }
.uc-cat[aria-pressed="true"] { color: var(--accent-on); background: var(--accent-btn); border-color: var(--accent-btn); }
.uc-results { display: grid; gap: 18px; }
.uc-block { display: grid; gap: 8px; }
.uc-group { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.uc-item { display: grid; gap: 2px; padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); cursor: copy; min-width: 0; }
.uc-item:hover { border-color: var(--accent); }
.uc-item.is-src { background: var(--accent-tint); border-color: var(--accent); }
.uc-v { font-family: var(--mono); font-size: var(--fs-lg); font-weight: 650; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.uc-v sup { font-size: .65em; }
.uc-u { font-size: var(--fs-xs); color: var(--muted); }
.uc-u b { color: var(--ink-2); }
.uc-transfer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-tint); }
.uc-transfer b { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; color: var(--accent-ink); }

/* Couleurs */
.cc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.cc-input-row { display: flex; align-items: flex-end; gap: 10px; }
.cc-picker-wrap { position: relative; flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.cc-picker-wrap input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }
.cc-picker-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.cc-formats th { width: 72px; position: static; background: transparent; color: var(--muted); }
.cc-formats td { font-weight: 600; overflow-wrap: anywhere; }
.cc-formats td .xsmall { margin-top: 2px; font-family: var(--font); font-weight: 400; }
.cc-formats td:last-child { width: 44px; padding: 4px 8px; }
.cc-swatch { position: sticky; top: calc(var(--topbar-h) + 12px); padding: 0; overflow: hidden; }
.cc-swatch-color { display: flex; align-items: flex-end; justify-content: space-between; height: 220px; padding: 16px 18px; }
.cc-aa { font-size: 2.6rem; font-weight: 800; line-height: 1; transition: opacity .2s; }
.cc-aa-w { color: #fff; } .cc-aa-b { color: #000; }
.cc-swatch-meta { display: grid; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.cc-aa-row { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.cc-aa-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cc-mini { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; box-shadow: 0 0 0 1px var(--line); }
.cc-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.cc-chip { display: grid; align-content: space-between; gap: 18px; min-height: 92px; padding: 8px; font: inherit; text-align: left; color: var(--t); background: var(--c); border: 0; cursor: copy; }
.cc-chip span { font-size: var(--fs-xs); font-weight: 750; }
.cc-chip code { font-size: .72rem; opacity: .9; }
.cc-chip:hover, .cc-chip:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--ink); outline-offset: -2px; }
.cc-harm { display: grid; gap: 12px; }
.cc-harm-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: center; }
.cc-harm-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.cc-harm-chips .cc-chip { min-height: 56px; gap: 6px; }
.cc-contrast-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cc-preview { display: grid; gap: 10px; align-content: center; min-height: 190px; padding: 20px 22px; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line); }
.cc-preview p { margin: 0; }
.cc-p-normal { font-size: 16px; }
.cc-p-large { font-size: 24px; font-weight: 700; line-height: 1.2; }
.cc-p-ui { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 14px; border: 2px solid; border-radius: var(--r-sm); font-weight: 700; }
.cc-ratio b { display: block; font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cc-contrast .table th { position: static; }
@media (max-width: 1000px) { .cc-scale { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cc-layout, .cc-contrast-grid { grid-template-columns: minmax(0, 1fr); } .cc-swatch { position: static; } .cc-harm-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
