/* kadet-hub catalog. Tokens follow the system colour scheme; data-theme on
   <html> overrides it (CAT-9 for wrapping). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f7fb, #0d1117);
  --bg-subtle: light-dark(#eef1f7, #131922);
  --surface: light-dark(#ffffff, #161c26);
  --border: light-dark(#dfe3ec, #262f3d);
  --border-strong: light-dark(#c4cad8, #364154);
  --text: light-dark(#141a26, #e7ebf3);
  --text-muted: light-dark(#566075, #9aa4b8);
  --accent: light-dark(#3346d3, #8c9bff);
  --accent-strong: light-dark(#2433a8, #b3bdff);
  --accent-bg: light-dark(#e9ecff, #1d2350);
  --on-accent: light-dark(#ffffff, #0d1117);
  --warn: light-dark(#9a3412, #fdba74);
  --warn-bg: light-dark(#fff1e7, #3a2112);
  --ok: light-dark(#166534, #86efac);
  --ok-bg: light-dark(#e8f7ee, #12301e);
  --focus: light-dark(#3346d3, #b3bdff);
  --shadow: light-dark(0 1px 2px rgb(20 26 38 / 6%), 0 1px 2px rgb(0 0 0 / 40%));
  --shadow-lift: light-dark(0 8px 24px rgb(20 26 38 / 10%), 0 8px 24px rgb(0 0 0 / 50%));
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
svg[hidden] { display: block !important; position: absolute; width: 0; height: 0; overflow: hidden; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--text); background: var(--bg); overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, pre { font-family: var(--mono); font-size: .875em; }
:not(pre) > code { padding: .1em .35em; border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--border); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; padding: .5rem 1rem; background: var(--surface); border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; }

/* Layout */
header.site, main, footer.site { width: 100%; max-width: 76rem; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 48rem) { header.site, main, footer.site { padding-inline: 24px; } }
header.site { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .55rem; font-weight: 750; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.brand img { border-radius: 7px; }
header.site nav { display: flex; align-items: center; gap: .25rem .9rem; flex-wrap: wrap; justify-content: flex-end; }
header.site nav a { color: var(--text-muted); text-decoration: none; font-weight: 550; font-size: .95rem; }
header.site nav a:hover { color: var(--text); }
footer.site { margin-top: 4rem; padding-block: 2rem 3rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .9rem; }
footer.site p { margin: .25rem 0; }

/* Buttons and chips */
.button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; }
.button:hover { color: var(--text); border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 1.05rem; }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
#theme .on-dark { display: none; }
#theme[aria-pressed="true"] .on-dark { display: block; }
#theme[aria-pressed="true"] .on-light { display: none; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* Hero */
.hero { padding: 2.5rem 0 1.5rem; }
.hero h1 { text-wrap: balance; }
.hero .lead { max-width: none; font-size: 1.2rem; text-wrap: pretty; }
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); margin: 0 0 .75rem; letter-spacing: -.025em; }
.lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 1.25rem; max-width: 46rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.actions.small { margin-top: 1rem; }
.actions.small .button { min-height: 36px; font-size: .9rem; }

/* Filters */
.filters { position: sticky; top: 0; z-index: 2; display: grid; gap: .75rem; padding: 1rem 0; margin-bottom: .5rem; background: var(--bg); }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 1rem; top: 50%; translate: 0 -50%; color: var(--text-muted); font-size: 1.1rem; }
#search { width: 100%; min-height: 48px; padding: .7rem 1rem .7rem 2.8rem; font: inherit; font-size: 1.05rem; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#search:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:disabled { opacity: .45; cursor: default; }
.chip .count { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; font-size: .8rem; }
.chip.clear { border-style: dashed; color: var(--text-muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.result { margin: 0; color: var(--text-muted); font-size: .95rem; }
.sort { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .95rem; }
.sort select { min-height: 36px; padding: 0 .6rem; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }

/* Cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s, translate .15s; }
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift); translate: 0 -2px; }
.card:has(.card-name a:focus-visible) { border-color: var(--accent); }
.card[hidden] { display: none; }
.card-head { display: flex; align-items: center; gap: .85rem; }
.card .card-name { margin: 0; font-weight: 700; font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.tile { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; font-weight: 750; font-size: 1.1rem; background: var(--m-bg); color: var(--m-fg); }
.tile .icon { width: 22px; height: 22px; }
.card .card-name a { color: var(--text); text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card .card-name a:focus-visible { outline: none; }
.card .card-name a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.meta-line { margin: .1rem 0 0; color: var(--text-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.description { margin: 0; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.tag { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .3rem; min-height: 26px; padding: 0 .6rem; border-radius: 999px; background: var(--accent-bg); color: var(--accent-strong); font-size: .8rem; font-weight: 600; text-decoration: none; }
.tag:hover { color: var(--accent-strong); outline: 1px solid var(--accent); }
.facts { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: auto 0 0; padding-top: .75rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .875rem; }
.facts div { display: flex; align-items: center; gap: .35rem; }
.facts dt { display: flex; }
.facts dd { margin: 0; }
.card .facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .9rem; }
.card .facts div { display: contents; }
.card .facts dt::after { content: ":"; }
.card .facts dd { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; color: var(--text); }
.fact-link { position: relative; z-index: 1; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }

/* Monogram */
.monogram { position: relative; display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; font-weight: 750; font-size: 1.35rem; background: var(--m-bg); color: var(--m-fg); }
.monogram.large { width: 72px; height: 72px; border-radius: 18px; font-size: 2rem; }
.monogram .badge { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); color: var(--m-fg); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.monogram.large .badge { width: 28px; height: 28px; padding: 4px; border-radius: 9px; }
.hue-0 { --m-bg: light-dark(#e0e7ff, #232a5c); --m-fg: light-dark(#2c37a3, #c7d0ff); }
.hue-1 { --m-bg: light-dark(#ede4ff, #31215a); --m-fg: light-dark(#5b2bb5, #ddd0ff); }
.hue-2 { --m-bg: light-dark(#d9f4ef, #0f3b36); --m-fg: light-dark(#0b5e55, #a6eadf); }
.hue-3 { --m-bg: light-dark(#fdeccc, #43300c); --m-fg: light-dark(#7a4a05, #fbd78d); }
.hue-4 { --m-bg: light-dark(#fde2e7, #4a1a26); --m-fg: light-dark(#9f1239, #fecdd6); }
.hue-5 { --m-bg: light-dark(#dcf5e3, #133a22); --m-fg: light-dark(#166534, #b0ecc4); }
.hue-6 { --m-bg: light-dark(#dbeefe, #0f3350); --m-fg: light-dark(#0b4f86, #b5dcfb); }
.hue-7 { --m-bg: light-dark(#ffe6d5, #4a2410); --m-fg: light-dark(#9a3412, #fed2b5); }

/* Generator page */
.generator-head { display: flex; gap: 1.25rem; align-items: flex-start; padding: 2rem 0 1.5rem; }
.generator-head h1 { margin: 0 0 .4rem; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); letter-spacing: -.02em; }
.generator-head .lead { margin-bottom: .9rem; }
.generator-head .facts { border: 0; padding: .9rem 0 0; margin: 0; font-size: .95rem; }
.generator-head .facts dt { color: var(--text-muted); }
.generator-head .facts dt::after { content: ":"; }
.generator-head .facts dd { color: var(--text); }
@media (max-width: 36rem) { .generator-head { flex-direction: column; } }
.badge-snippet { margin-top: 1rem; font-size: .9rem; }
.badge-snippet summary { cursor: pointer; color: var(--text-muted); }
.generator { max-width: 52rem; margin-inline: auto; }
.generator-body { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.toc { margin-bottom: 1.5rem; }
.toc summary { display: flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "›"; color: var(--text-muted); transition: rotate .15s; }
.toc details[open] summary::after { rotate: 90deg; }
.toc h2 { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.toc ol { margin: .6rem 0 0; padding: 0; list-style: none; border-left: 2px solid var(--border); }
.toc li a { display: block; margin-left: -2px; padding: .3rem 0 .3rem .9rem; border-left: 2px solid transparent; color: var(--text-muted); font-size: .9rem; text-decoration: none; }
.toc li a:hover { color: var(--text); }
.toc li a[aria-current="true"] { border-left-color: var(--accent); color: var(--text); font-weight: 600; }
@media (min-width: 78rem) {
  .generator { max-width: none; display: grid; grid-template-columns: 1fr minmax(0, 52rem) 1fr; column-gap: 2rem; }
  .generator > * { grid-column: 2; }
  .generator > .toc { grid-column: 3; grid-row: 2 / span 2; position: sticky; top: 1.5rem; align-self: start; max-width: 13rem; margin: 0; }
  .toc summary { pointer-events: none; }
  .toc summary::after { content: none; }
}
.panel { padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.panel p { margin: .5rem 0; }
.note { color: var(--text-muted); font-size: .9rem; }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem .9rem; margin: .5rem 0 0; font-size: .9rem; }
.details dt { color: var(--text-muted); }
.details dd { margin: 0; }

/* Code: wraps, never scrolls sideways (CAT-9) */
.snippet { position: relative; margin: .75rem 0; }
pre { margin: 0; padding: .9rem 1rem; border-radius: 10px; background: var(--bg-subtle); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; overflow-x: hidden; line-height: 1.5; }
.snippet pre { padding-right: 3.25rem; }
.copy { position: absolute; top: .5rem; right: .5rem; }
.copy.done { color: var(--ok); border-color: var(--ok); }

/* README */
.readme { padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.readme > :first-child { margin-top: 0; }
.readme h2 { font-size: 1.5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); margin: 2rem 0 1rem; }
.readme h3 { font-size: 1.2rem; margin: 1.75rem 0 .75rem; }
.readme h4, .readme h5, .readme h6 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.readme pre { margin: 1rem 0; }
.readme table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.readme th, .readme td { padding: .5rem .6rem; border: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.readme th { background: var(--bg-subtle); }
.readme blockquote { margin: 1rem 0; padding: .25rem 1rem; border-left: 3px solid var(--border-strong); color: var(--text-muted); }
.readme img { max-width: 100%; }
.image-link::before { content: "▣ "; }

/* Versions */
.versions { margin-top: 2.5rem; }
.versions > h2 { font-size: 1.4rem; }
.version { padding: 0; margin: .75rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
details.version > summary { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.25rem; cursor: pointer; list-style: none; color: var(--text-muted); }
details.version > summary::-webkit-details-marker { display: none; }
details.version > summary::before { content: "›"; font-size: 1.3rem; line-height: 1; transition: rotate .15s; }
details.version[open] > summary::before { rotate: 90deg; }
details.version > summary .v { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
details.version > :not(summary) { margin-inline: 1.25rem; }
details.version[open] { padding-bottom: 1rem; }
details.version h3 { font-size: 1rem; margin: 1rem 1.25rem .25rem; }
.version.yanked { opacity: .85; }
.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.warning { color: var(--warn); font-weight: 600; }
/* CAT-34: listed versions with what they are built for, and the selector over them. */
.match-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.25rem 0 .5rem; }
.match-form select, .match-form input { min-height: 44px; max-width: 100%; padding: 0 .7rem; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.match-form input { width: 10rem; }
.match-result:empty { display: none; }
.built { width: 100%; table-layout: fixed; border-collapse: collapse; margin: .75rem 0 1.5rem; font-size: .9rem; background: var(--surface); }
.built th, .built td { padding: .5rem .7rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.built thead th { background: var(--bg-subtle); }
.built th:first-child { width: 40%; }

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

/* Syntax highlighting (Chroma classes; markup.highlight.noClasses = false) */
.chroma .c, .chroma .c1, .chroma .cm, .chroma .ch, .chroma .cs { color: var(--text-muted); font-style: italic; }
.chroma .nt, .chroma .na, .chroma .nf, .chroma .py { color: light-dark(#2433a8, #a5b4fc); }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sb, .chroma .sd, .chroma .se { color: light-dark(#0b5e55, #7dd3c0); }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kr, .chroma .kt, .chroma .ow { color: light-dark(#7a1fa2, #e0a8ff); }
.chroma .m, .chroma .mi, .chroma .mf, .chroma .il { color: light-dark(#9a3412, #fdba74); }
.chroma .p, .chroma .o { color: var(--text-muted); }

/* Tags and glossary pages */
.prose-page { max-width: 52rem; padding-top: 2rem; }
.prose-page h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); margin: 0 0 .5rem; }
.tag-defs { display: grid; gap: 1rem; margin-top: 1.5rem; }
.tag-def h2 { display: flex; align-items: center; gap: .5rem; }
.tag-def h2 code { font-size: .8rem; font-weight: 500; }
.tag-def dd p { margin: 0; }
.tags-help { align-self: center; font-size: .9rem; margin-left: .25rem; }
.glossary { margin: 1.5rem 0 0; }
.glossary dt { font-weight: 700; font-size: 1.1rem; margin-top: 1.5rem; }
.glossary dd { margin: .35rem 0 0; color: var(--text-muted); }
.glossary dd a { white-space: nowrap; }

/* Prose pages (LEG-1) */
.prose h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.prose p { max-width: 46rem; }
/* CAT-36a: blog posts. 18px body, lines of at most 68 characters, code scrolls instead of wrapping. */
.post { font-size: 1.125rem; line-height: 1.6; }
.post > p, .post > ul, .post > ol, .post > blockquote { max-width: 68ch; }
.post pre { white-space: pre; overflow-x: auto; overflow-wrap: normal; word-break: normal; font-size: .85rem; }
.post .byline { color: var(--text-muted); font-size: .95rem; margin: 0 0 1rem; }
.post .toc h2 { font-size: .75rem; margin: 0; }
.post .toc ul { margin: .6rem 0 0; padding: 0; list-style: none; border-left: 2px solid var(--border); }
.post .toc ul ul { border-left: 0; padding-left: .9rem; }
.post .anchor { color: var(--text-muted); text-decoration: none; font-weight: 400; opacity: 0; }
/* The "#" is drawn by CSS, so copies of the text (Medium's import, reader views) do not pick it up. */
.post .anchor::after { content: "#"; }
.post :is(h2, h3):hover .anchor, .post .anchor:focus { opacity: 1; }
.post-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 1rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.disclaimer { color: var(--text-muted); font-size: .875rem; }
/* Checks (CAT-14) */
.scan-head { display: flex; gap: .4rem; align-items: baseline; font-size: .9rem; }
.checks { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .6rem; font-size: .9rem; }
.checks li { display: flex; gap: .55rem; align-items: flex-start; }
.checks .icon.ok { color: var(--ok); margin-top: .2rem; }
.checks .tool { color: var(--text-muted); font-size: .8rem; }
.muted { color: var(--text-muted); }
.small-button { min-height: 36px; gap: .4rem; font-size: .9rem; }

/* Built for (CAT-15) */
.card .facts dd.built-for { flex-direction: column; align-items: flex-start; gap: 0; color: var(--ok); font-weight: 600; }

/* Tag pages and guides (CAT-18) */
.crumbs { color: var(--text-muted); font-size: .9rem; margin: 0 0 .5rem; }
.tag-cards { margin-top: 1.5rem; }
.kind-list { columns: 16rem; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.guide-list li { padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.guide-list a { font-weight: 700; font-size: 1.1rem; }
.guide-list p { margin: .35rem 0 0; color: var(--text-muted); }
.prose table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5rem .6rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
/* CAT-30: the compatibility table takes the page width; below 60rem each row is a block, every value after its column name. */
.prose-page.wide { max-width: none; }
.prose-page.wide > ul { max-width: 46rem; }
.compat th:first-child { width: 16%; }
.compat th:last-child { width: 24%; }
@media (max-width: 60rem) {
  .compat thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compat tr, .compat th, .compat td { display: block; }
  .compat tr { margin-bottom: .75rem; border: 1px solid var(--border); }
  .compat th, .compat td { border: 0; }
  .compat td::before { content: attr(data-label) ": "; color: var(--text-muted); }
}
/* Version permalinks (CAT-17) */
.permalink { color: var(--text-muted); text-decoration: none; padding: 0 .25rem; opacity: .6; }
.permalink:hover, .permalink:focus-visible { opacity: 1; color: var(--accent); }
details.version:target { border-color: var(--accent); }
/* Process diagrams (CAT-35a): dot's SVG coloured by class; a failure path is --warn, dashed and labelled. */
.diagram { margin: 1.5rem 0; overflow-x: auto; }
.diagram svg { display: block; max-width: 100%; height: auto; margin-inline: auto; pointer-events: none; }
.diagram text { fill: var(--text); }
.diagram .node path, .diagram .node polygon { fill: var(--surface); stroke: var(--text-muted); }
.diagram .cluster path, .diagram .cluster polygon { fill: var(--bg-subtle); stroke: var(--border-strong); }
.diagram .cluster > text { fill: var(--text-muted); }
.diagram .edge path { stroke: var(--text-muted); }
.diagram .edge polygon { fill: var(--text-muted); stroke: var(--text-muted); }
.diagram .fail path, .diagram .fail polygon { stroke: var(--warn); }
.diagram .edge.fail polygon { fill: var(--warn); }
.diagram .fail text { fill: var(--warn); }
