:root {
  --bg: #fbfbf9; --fg: #1d1f1c; --muted: #66695f; --line: #e2e3dc; --card: #ffffff;
  --accent: #1f6f5f; --accent-fg: #ffffff; --code-bg: #f1f2ec; --warn: #a1431a; --error-bg: #fdecea; --error-fg: #8a1f11;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15171a; --fg: #e8e9e4; --muted: #9ca094; --line: #2b2f33; --card: #1c1f23; --accent: #3fae95; --accent-fg: #0f1512; --code-bg: #22262a; --warn: #e8956a; --error-bg: #3a1d1a; --error-fg: #f3b3a8; }
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; color: var(--fg); background: var(--bg); }
body { margin: 0; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; max-width: 1040px; margin: 0 auto; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
/* The brand: a cat head (the catalog's cat) carrying the AXP mark - the counters of the A and
   the P read as its eyes - then the wordmark. Inline SVG styled through classes so it follows
   dark mode and stays CSP-clean. */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; text-decoration: none; color: var(--fg); font-size: 1.25rem; }
.brand .logo { width: 40.5px; height: 36px; flex: none; }
.logo .head { fill: var(--accent); }
.logo .face { fill: var(--accent-fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.02em; }
.brand .cat { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }
nav a { text-decoration: none; color: var(--fg); }
nav a:hover { color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; max-width: 1040px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0; max-width: 60ch; }
footer nav { gap: 0.2rem 0.5rem; }
footer nav a { color: var(--muted); }
footer nav a + a::before { content: "\00b7"; margin-right: 0.5rem; color: var(--muted); }
.foot-logo { flex-basis: 100%; display: flex; justify-content: center; margin-top: 1rem; }
.foot-logo .logo { width: 27px; height: 24px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 2.4rem; max-width: 22ch; }
.lead { font-size: 1.12rem; max-width: 70ch; color: var(--fg); }
.actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button { display: inline-block; background: var(--accent); color: var(--accent-fg); text-decoration: none; padding: 0.6rem 1.1rem; border-radius: 8px; font-weight: 600; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.card h2 { margin-top: 0.2rem; font-size: 1.1rem; }
.card p { margin-bottom: 0; color: var(--muted); }
ol.checks li, ul.checks li { margin-bottom: 0.5rem; max-width: 80ch; }
table.listings { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
table.listings th, table.listings td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
table.listings th { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
/* Only the description column may break inside a word; the short columns keep their tokens
   (versions, domains, component names) whole and wrap only between list items. */
table.listings td.package { width: 100%; overflow-wrap: anywhere; }
table.listings td[data-label="Version"], table.listings td[data-label="Publisher"] { white-space: nowrap; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.tag { display: inline-block; background: var(--code-bg); border-radius: 999px; padding: 0 0.6em; font-size: 0.8em; }
form.search { display: flex; gap: 0.5rem; margin: 1rem 0; }
form.search input { flex: 1; }
input[type=search], input[type=text] { font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); width: 100%; }
button { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 8px; padding: 0.55rem 1rem; cursor: pointer; }
form.submit { display: grid; gap: 0.5rem; max-width: 720px; margin: 1rem 0 2rem; }
form.submit label { font-weight: 600; }
.error { background: var(--error-bg); color: var(--error-fg); border-radius: 8px; padding: 0.8rem 1rem; margin: 1rem 0; max-width: 80ch; }
.crumbs { color: var(--muted); margin-bottom: 0; }
.install { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.2rem 1.2rem 1rem; margin: 1.5rem 0; }
.install h2 { margin-top: 0.8rem; }
.install pre { margin-bottom: 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.2rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
code.key { font-size: 0.8em; }
ul.publishers { columns: 2; list-style: none; padding: 0; }
details { margin-top: 2rem; }
summary { cursor: pointer; font-weight: 600; }
.empty { color: var(--muted); }
/* Inline SVG figures on the front page. Colours come from the page variables so the
   figures follow dark mode; the CSP forbids inline styles, hence classes only. */
figure.diagram { margin: 1.5rem 0 0.5rem; }
figure.diagram figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; max-width: 80ch; }
svg.diagram { display: block; width: 100%; height: auto; overflow: visible; }
svg.diagram text { font-family: inherit; font-size: 13px; fill: var(--fg); }
svg.diagram .heading { font-weight: 700; font-size: 14px; }
svg.diagram .label { fill: var(--muted); font-size: 12px; }
svg.diagram .proto { font-weight: 700; fill: var(--accent); font-size: 12px; letter-spacing: 0.04em; }
svg.diagram .strong { font-weight: 700; }
svg.diagram .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
svg.diagram .box { fill: var(--card); stroke: var(--line); stroke-width: 1.2; }
svg.diagram .box.axp { fill: var(--accent); stroke: var(--accent); }
svg.diagram .on-axp { fill: var(--accent-fg); }
svg.diagram .divider { stroke: var(--line); stroke-width: 1; }
svg.diagram .arrows line, svg.diagram .arrow { stroke: var(--muted); stroke-width: 1.5; fill: none; }
svg.diagram .arrows.tangled line { stroke: var(--warn); stroke-width: 1.2; opacity: 0.75; }
svg.diagram .arrowhead { fill: var(--muted); }
svg.diagram .arrowhead.warn { fill: var(--warn); }
/* The protocol comparison table; on a phone it scrolls sideways instead of squeezing four columns. */
.table-scroll { overflow-x: auto; margin: 1rem 0 0.5rem; }
table.compare { width: 100%; min-width: 600px; border-collapse: collapse; }
table.compare th, table.compare td { text-align: left; vertical-align: top; padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--line); }
table.compare th { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
table.compare td:first-child { font-weight: 600; white-space: nowrap; }
table.compare td:first-child .muted { font-weight: 400; }
table.compare tr.axp td { background: var(--code-bg); }
table.compare tr.axp td:first-child { color: var(--accent); }
@media (max-width: 640px) { table.compare td:first-child { white-space: normal; } svg.diagram text { font-size: 14px; } svg.diagram .label, svg.diagram .proto, svg.diagram .mono { font-size: 13px; } }
@media (max-width: 640px) { dl { grid-template-columns: 1fr; gap: 0.1rem 0; } dt { margin-top: 0.6rem; } .hero h1 { font-size: 1.8rem; } nav { gap: 0.2rem 0.9rem; } }
/* On a phone the five-column listing becomes a stack of cards and each cell names its column. */
@media (max-width: 640px) {
  table.listings, table.listings tbody, table.listings tr, table.listings td { display: block; }
  table.listings thead { display: none; }
  table.listings tr { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0.75rem 0; }
  table.listings td, table.listings td[data-label] { border: 0; padding: 0.15rem 0; white-space: normal; overflow-wrap: anywhere; }
  table.listings td.package { padding-bottom: 0.5rem; }
  table.listings td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 5.5rem; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
  ul.publishers { columns: 1; }
}
