/* The shared component stylesheet (docs/architecture.md, rule 9): every variant of every component in
   src/components/, as every skin draws it. Every wiki, docs and qa skin loads it.

   Tokens only. A colour, font or size that differs between skins is a custom property (--c-…), listed
   with its default below; each skin sets its own in its extras (public/static/wiki.css for the two
   wiki skins, pydocs-extra/ and furo-extra/ for the docs skins). The defaults are the python docs
   skin's light theme. Upstream theme CSS stays as it is: the wiki skins draw the infobox's and navbox's
   own box with Wikipedia's CSS, and the docs skins with public/static/docs/sphinx.css; this file draws
   what each variant adds.

   Some tokens are optional, with a default worked out from others where they are used
   (var(--c-crumbs-color, var(--c-muted))): a skin that sets its colours on <body> (Furo) then needs to set
   only the main ones. They are: --c-callout-<type>-soft and -edge (warning, tip, note), --c-border-subtle, --c-crumbs-color, --c-crumbs-link,
   --c-infobox-title-padding, --c-card-title-padding, --c-card-padding, --c-card-row-border,
   --c-card-row-background and --c-card-label-color.

   Variants: src/components/registry.ts. A variant is a class or its own markup (the infobox). */
:root {
    /* Colours */
    --c-border: #ccc;               /* box and card borders, rules between rows */
    --c-surface: #f8f8f8;           /* box backgrounds */
    --c-card: #fff;                 /* a card inside a box, a navbox column */
    --c-muted: #555;                /* secondary text: descriptions, review line, breadcrumbs */
    --c-accent: #0072aa;            /* step badges, the "Start here" bar, hover borders */
    --c-on-accent: #fff;            /* text on the accent */
    --c-title-bar: #cee0f2;         /* Wikipedia's title bars: series sidebar, main page boxes */
    --c-group-bar: #e6e6ff;         /* Wikipedia's navbox group headings (navbox: columns) */
    --c-new-link: #ba0000;          /* links to pages not written yet */
    --c-warning: #b32424;
    --c-input-border: #a2a9b1;
    /* Spacing and shape */
    --c-space: 16px;                /* gaps between blocks */
    --c-inset: 13px;                /* padding inside a block */
    --c-measure: 35rem;             /* the widest a component gets, to match the skin's text (none: no cap) */
    --c-radius: 3px;
    --c-radius-large: 6px;          /* cards */
    /* Type */
    --c-label-weight: 600;          /* labels: infobox labels, card titles */
    --c-small: 0.9em;               /* the review line */
    /* Breadcrumbs: their size and colour where the skin has not already set them (the wiki's #contentSub has) */
    --c-crumbs-size: 0.875em;
    /* Infobox */
    --c-infobox-row-gap: 6px;       /* padding above and below a row's text */
    --c-infobox-line-size: 1em;     /* infobox: line */
    /* infobox: card. The docs draw it as a grid of tiles, label small above value; the wiki as one list of
       rows, label beside value, in Wikipedia's box. */
    --c-card-box-padding: 0;        /* inside the box, around the title and the list */
    --c-card-columns: repeat(auto-fill, minmax(12rem, 1fr));
    --c-card-gap: 8px;
    --c-card-row: 1fr;              /* a row's columns: 1fr = label above value */
    --c-card-row-padding: 8px 10px;
    --c-card-label-size: 0.8em;
    --c-card-label-case: uppercase;
    --c-card-label-spacing: 0.02em;
    --c-card-label-gap: 2px;
    /* infobox: the title bar's colour by page type (the class infobox-<type>). Only the wiki gives an
       infobox a type; transparent leaves the skin's own title bar. */
    --c-infobox-procedure: transparent;
    --c-infobox-test: transparent;
    --c-infobox-condition: transparent;
    --c-infobox-law: transparent;
    --c-infobox-organisation: transparent;
    --c-infobox-location: transparent;
    --c-infobox-comparison: transparent;
    --c-infobox-guide: transparent;
    /* Wikipedia's Main Page palette (mainpage: portal, twocol) */
    --c-mp-start: #eaf3ff;
    --c-mp-heading: #000;
    --c-mp-green: #f5fffa;
    --c-mp-green-bar: #cef2e0;
    --c-mp-green-edge: #a3bfb1;
    --c-mp-blue: #f5faff;
    --c-mp-blue-bar: #cedff2;
    --c-mp-blue-edge: #a3b0bf;
    --c-mp-purple: #faf5ff;
    --c-mp-purple-bar: #ddcef2;
    --c-mp-purple-edge: #afa3bf;
    /* Content blocks (src/lib/markdown-blocks.ts): each callout type's colour (its icon, its bar or border, and
       a tint of it behind an alert), the steps' number badges, the checklist's boxes, the timeline's dots */
    --c-callout-warning: #9a5800;
    --c-callout-tip: #1a7f37;
    --c-callout-note: var(--c-accent);
    --c-step-badge: var(--c-accent);
    --c-on-step-badge: var(--c-on-accent);
    --c-checkbox: var(--c-muted);
    --c-timeline-dot: var(--c-accent);
    /* guide: the summary box (infobox: summary), the FAQ, and the home page's blocks (homeBlocks) */
    --c-summary: var(--c-surface);  /* the summary box's background, and its bar down the left */
    --c-summary-edge: var(--c-accent);
    --c-faq-question: var(--c-surface);
    --c-page-width: 75rem;          /* the home page's bands: their content's width and side gutter */
    --c-page-gutter: 1rem;
    --c-band: var(--c-surface);     /* the hero's band, the guide boxes' band, the cards' tinted panels */
    --c-band-alt: var(--c-surface);
    --c-button-radius: var(--c-radius);
    --c-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ---- Infobox (src/components/infobox.ts) ------------------------------------------------------------ */
/* The title bar coloured by page type, in the spirit of Wikipedia's infobox families */
.infobox-procedure .infobox-above { background-color: var(--c-infobox-procedure); color: inherit; }
.infobox-test .infobox-above { background-color: var(--c-infobox-test); color: inherit; }
.infobox-condition .infobox-above { background-color: var(--c-infobox-condition); color: inherit; }
.infobox-law .infobox-above { background-color: var(--c-infobox-law); color: inherit; }
.infobox-organisation .infobox-above { background-color: var(--c-infobox-organisation); color: inherit; }
.infobox-location .infobox-above { background-color: var(--c-infobox-location); color: inherit; }
.infobox-comparison .infobox-above { background-color: var(--c-infobox-comparison); color: inherit; }
.infobox-guide .infobox-above { background-color: var(--c-infobox-guide); color: inherit; }
.infobox-subheader {
    text-align: center;
    font-style: italic;
}

/* stacked: each label on its own row above its value, a rule between facts */
table.infobox-stacked th.infobox-label {
    padding-top: var(--c-infobox-row-gap);
    padding-bottom: 0;
}
table.infobox-stacked td.infobox-data {
    padding-top: 0;
    padding-bottom: var(--c-infobox-row-gap);
}
table.infobox-stacked tr:has(> .infobox-data) + tr:has(> .infobox-label) > * {
    border-top: 1px solid var(--c-border-subtle, var(--c-border));
}

/* card: a definition list instead of a table */
.infobox-card {
    box-sizing: border-box;
    padding: var(--c-card-box-padding);
}
.infobox-card .infobox-above {
    display: block;
    padding: var(--c-card-title-padding, var(--c-infobox-title-padding, 8px var(--c-inset)));
}
.infobox-card .infobox-list {
    display: grid;
    grid-template-columns: var(--c-card-columns);
    gap: var(--c-card-gap);
    margin: 0;
    padding: var(--c-card-padding, var(--c-inset));
}
.infobox-card .infobox-row {
    display: grid;
    grid-template-columns: var(--c-card-row);
    column-gap: 0.5em;
    padding: var(--c-card-row-padding);
    border: var(--c-card-row-border, 1px solid var(--c-border));
    border-radius: var(--c-radius);
    background: var(--c-card-row-background, var(--c-card));
}
.infobox-card .infobox-label {
    margin: 0 0 var(--c-card-label-gap);
    font-size: var(--c-card-label-size);
    font-weight: var(--c-label-weight);
    letter-spacing: var(--c-card-label-spacing);
    text-transform: var(--c-card-label-case);
    color: var(--c-card-label-color, var(--c-muted));
}
.infobox-card .infobox-data {
    margin: 0;
}
/* The wiki's rows that docs pages leave out. */
.infobox-card .infobox-subheader {
    padding: 0.2em 0.4em;
}
.infobox-card .infobox-image {
    margin: 0.3em 0;
    text-align: center;
}
.infobox-card .infobox-header,
.infobox-card .infobox-full-data {
    padding: 0.2em;
    text-align: center;
    font-weight: bold;
}
.infobox-card .infobox-full-data {
    font-weight: normal;
}

/* line: one compact line of "label: value" pairs under the title, no box. The title is for screen readers;
   header rows, full-width values and the image are left out. */
.infobox.infobox-line {
    float: none;
    clear: none;
    width: auto;
    max-width: none;
    margin: 0 0 var(--c-space);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: var(--c-infobox-line-size);
    color: var(--c-muted);
}
.infobox-line .infobox-above {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.infobox-line .infobox-subheader,
.infobox-line .infobox-image,
.infobox-line .infobox-header,
.infobox-line .infobox-full-data {
    display: none;
}
.infobox-line .infobox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    margin: 0;
}
.infobox-line .infobox-row,
.infobox-line .infobox-label,
.infobox-line .infobox-data {
    display: inline;
    margin: 0;
    vertical-align: baseline;
    line-height: inherit;
}
.infobox-line .infobox-label {
    font-weight: var(--c-label-weight);
}
.infobox-line .infobox-label::after {
    content: ": ";
}
.infobox-line .infobox-row:not(:last-child)::after {
    content: "·";
    margin: 0 0.6em;
}

/* ---- Navbox (src/components/navbox.ts): the variants beyond Module:Navbox's own box ----------------- */
/* columns: {{Navbox with columns}} */
.navbox-columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
    gap: 2px;
}
.navbox-column {
    background: var(--c-card);
}
.navbox-column-heading {
    padding: 0.25em 0.5em;
    text-align: center;
    font-weight: bold;
    background: var(--c-group-bar);
}
.navbox-column ul {
    list-style: none;
    margin: 0.3em 0.6em 0.5em;
    padding: 0;
    text-align: left;
}
.navbox-column li,
.navbox-column li a {
    margin: 0;
    padding: 0.1em 0;
    white-space: normal;
}
/* related: a plain "related articles" section */
.related-articles {
    clear: both;
    margin-top: 1.5em;
}
.related-articles-group h3 {
    margin: 0.6em 0 0.1em;
    font-size: 100%;
}
.related-articles-group .hlist {
    font-size: 95%;
}
/* Navboxes stack on narrow screens instead of overflowing */
@media (max-width: 720px) {
    .navbox-inner,
    .navbox-inner > tbody,
    .navbox-inner tr {
        display: block;
        width: 100% !important;
    }
    .navbox-inner th.navbox-group,
    .navbox-inner td.navbox-list {
        display: block;
        width: auto !important;
        text-align: left;
        white-space: normal;
    }
    .navbox-title > div {
        margin: 0 !important;
    }
}

/* ---- Series sidebar (src/components/series.ts): {{Sidebar}} ------------------------------------------ */
table.sidebar {
    float: right;
    clear: right;
    width: 22em;
    margin: 0.5em 0 1em 1em;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    padding: 0.2em;
    border-spacing: 0;
    font-size: 88%;
    line-height: 1.4em;
    text-align: center;
}
.sidebar-pretitle {
    padding: 0.4em 0.4em 0;
}
.sidebar-title {
    font-size: 125%;
    padding: 0.2em 0.4em 0.4em;
    background: var(--c-title-bar);
}
.sidebar-content {
    padding: 0 0.4em 0.4em;
}
.sidebar-heading {
    font-weight: bold;
    padding-top: 0.4em;
}
.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-list li {
    display: inline;
}
.sidebar-list li:not(:last-child)::after {
    content: " · ";
    font-weight: bold;
}
/* A long title (an Act's name) would otherwise stretch the box past its 22em. */
.sidebar-list a {
    white-space: normal;
}
@media (max-width: 640px) {
    table.sidebar {
        float: none;
        width: 100%;
        margin: 0.5em 0;
    }
}

/* ---- Breadcrumbs (src/components/breadcrumbs.ts) ------------------------------------------------------
   Where the skin places them is the skin's own CSS; this is their look.
   subpages: MediaWiki's "< Parent" line. trail: the whole trail on wide screens, "‹ Parent" on narrow ones;
   the switch is at the python skin's mobile width (1023px; a custom property can't be used in a media
   query), and furo-extra repeats it at Furo's 63em. */
.subpages,
nav.breadcrumbs {
    font-size: var(--c-crumbs-size);
    color: var(--c-crumbs-color, var(--c-muted));
}
nav.breadcrumbs a {
    color: var(--c-crumbs-link, var(--c-muted));
}
nav.breadcrumbs .crumbs-up {
    display: none;
}
@media (max-width: 1023px) {
    nav.breadcrumbs .crumbs-full {
        display: none;
    }
    nav.breadcrumbs .crumbs-up,
    nav.breadcrumbs .crumbs-here {
        display: inline-block;
        padding: 4px 0;
        text-decoration: none;
    }
}

/* ---- Review line under the title (src/components/review.ts): subtitle, title ------------------------- */
.mw-reviewed-line,
.doc-review-line {
    font-size: var(--c-small);
    color: var(--c-muted);
}
.doc-review-line {
    margin: 0 0 var(--c-space);
}

/* ---- Steps: <section class="step" data-step="n"><h2 data-step="n"><span class="step-label">Step n: </span>…
   list: the heading as written. numbered / cards / timeline: the number as a badge drawn before the heading (its
   ::before, sized in the heading's own em so it scales with h2 or h3 in any skin, centred on the line);
   the "Step n:" words stay for screen readers, at font-size 0. */
.steps-numbered .step-label,
.steps-cards .step-label,
.steps-timeline .step-label {
    font-size: 0;
}
.steps-numbered section.step > :is(h2, h3),
.steps-cards section.step > :is(h2, h3),
.steps-timeline section.step > :is(h2, h3) {
    display: flex;
    align-items: center;
}
.steps-numbered section.step > :is(h2, h3)::before,
.steps-cards section.step > :is(h2, h3)::before,
.steps-timeline section.step > :is(h2, h3)::before {
    content: attr(data-step);
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Half the heading's size for the number; the circle is 1.1 times the heading's size. */
    font-size: 0.5em;
    width: 2.2em;
    height: 2.2em;
    margin-right: 1.1em;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-on-accent);
    font-weight: 700;
    line-height: 1;
}

/* cards: each step in its own box */
.steps-cards section.step {
    box-sizing: border-box;
    max-width: var(--c-measure);
    margin: var(--c-space) 0;
    padding: 0 var(--c-inset) 2px;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
}
.steps-cards section.step > :is(h2, h3) {
    margin-top: var(--c-inset);
}

/* timeline: badges in a gutter on the left, joined by a line */
.steps-timeline section.step {
    position: relative;
    padding: 0 0 var(--c-space) 3rem;
}
.steps-timeline section.step > :is(h2, h3) {
    margin-top: var(--c-space);
}
.steps-timeline section.step > :is(h2, h3)::before {
    /* A fixed 2rem badge in the 3rem gutter, centred on the line (1rem in): the badge plus the gap fill
       the gutter, so the title starts where the step's text does. */
    font-size: 0.9rem;
    width: 2rem;
    height: 2rem;
    margin-left: -3rem;
    margin-right: 1rem;
    position: relative;
    z-index: 1;
}
.steps-timeline section.step::after {
    content: "";
    position: absolute;
    left: calc(1rem - 1px);
    top: var(--c-space);
    bottom: 0;
    width: 2px;
    background: var(--c-border);
}
.steps-timeline section.step:not(:has(+ section.step))::after {
    display: none;
}

/* ---- Content blocks: the templates in src/lib/markdown-blocks.ts, each drawn by its component ---------------
   Every block keeps to the text's measure and the skin's block spacing; the first and last child of an item's
   text lose their margins, so an item written as paragraphs (a loose list) sits as tight as one that isn't. */
.deflist,
.step-list,
.checklist,
.callout,
.key-facts,
.timeline {
    box-sizing: border-box;
    max-width: var(--c-measure);
    margin: var(--c-space) 0;
}
:is(.deflist dd, .step-list-text, .checklist-text, .callout-body, .key-facts dd, .timeline-text) > :first-child { margin-top: 0; }
:is(.deflist dd, .step-list-text, .checklist-text, .callout-body, .key-facts dd, .timeline-text) > :last-child { margin-bottom: 0; }

/* Definition list (definitionList): stacked = term, then its definition indented under it; grid = the terms
   in a column, a rule between pairs (stacked again on phones) */
.deflist .deflist-item > dt { margin: 0; font-weight: var(--c-label-weight); }
.deflist .deflist-item > dd { margin: 0; }
.deflist-stacked .deflist-item + .deflist-item { margin-top: 0.75em; }
.deflist-stacked .deflist-item > dd { margin: 0.15em 0 0 1.25em; }
.deflist-grid { border-top: 1px solid var(--c-border-subtle, var(--c-border)); }
.deflist-grid .deflist-item {
    display: grid;
    grid-template-columns: minmax(7em, 30%) 1fr;
    column-gap: 1em;
    padding: 0.55em 0;
    border-bottom: 1px solid var(--c-border-subtle, var(--c-border));
}
@media (max-width: 600px) {
    .deflist-grid .deflist-item { grid-template-columns: 1fr; row-gap: 0.15em; }
}

/* Steps (steps): list = the numbers as written, the label in bold on its own line; numbered / cards /
   timeline = each number in a circle in a gutter on the left (a counter, so it follows the list), the label
   on its own line beside it */
.step-list { padding: 0; list-style: none; counter-reset: step; }
.step-list-item { counter-increment: step; position: relative; }
.step-list-list { padding-left: 1.6em; list-style: decimal; }
.step-list-list .step-list-label { display: block; }
.step-list-list .step-list-item + .step-list-item { margin-top: 0.35em; }
.step-list:is(.step-list-numbered, .step-list-cards, .step-list-timeline) .step-list-item {
    min-height: 1.9rem;
    padding-left: 2.75rem;
}
.step-list:is(.step-list-numbered, .step-list-cards, .step-list-timeline) .step-list-item::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--c-step-badge);
    color: var(--c-on-step-badge);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}
/* The step's first line (its label, else its text) is centred on the badge: padded by half the difference between
   the badge (1.9rem) and that line's own height (1lh, whatever the skin's size and line height), so a label that
   wraps keeps its first line level with the badge. 0.2rem where lh is not supported. */
.step-list:is(.step-list-numbered, .step-list-cards, .step-list-timeline) .step-list-label {
    display: block;
    margin-bottom: 0.15em;
}
.step-list:is(.step-list-numbered, .step-list-cards, .step-list-timeline) :is(.step-list-label, .step-list-item > .step-list-text:first-child) {
    padding-top: 0.2rem;
    padding-top: max(0px, calc((1.9rem - 1lh) / 2));
}
.step-list-numbered .step-list-item + .step-list-item { margin-top: 0.9em; }
.step-list-cards .step-list-item {
    padding: var(--c-inset) var(--c-inset) var(--c-inset) calc(var(--c-inset) + 2.75rem);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
}
.step-list-cards .step-list-item::before { left: var(--c-inset); top: var(--c-inset); }
.step-list-cards .step-list-item + .step-list-item { margin-top: 0.6em; }
.step-list-timeline .step-list-item { padding-bottom: 1.1em; }
.step-list-timeline .step-list-item:last-child { padding-bottom: 0; }
.step-list-timeline .step-list-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(0.95rem - 1px);
    top: 1.9rem;
    bottom: 0;
    width: 2px;
    background: var(--c-border);
}

/* Checklist (checklist): an empty box (the skin's icon) before each item. boxes = a plain list; card = rows
   in a bordered box */
.checklist { padding: 0; list-style: none; }
.checklist-item { display: flex; align-items: flex-start; gap: 0.6em; }
.checklist-box { flex: none; width: 1.15em; height: 1.15em; margin-top: 0.15em; color: var(--c-checkbox); }
.checklist-text { flex: 1; min-width: 0; }
.checklist-boxes .checklist-item + .checklist-item { margin-top: 0.4em; }
.checklist-card {
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
    overflow: hidden;
}
.checklist-card .checklist-item { padding: 0.6em var(--c-inset); }
.checklist-card .checklist-item + .checklist-item { border-top: 1px solid var(--c-border-subtle, var(--c-border)); }

/* Callout (callout): the type's icon and label on the first line, then the text. alert = a box tinted with
   the type's colour and bordered in it; quote = a bar in the type's colour down the left of a light box */
/* A skin can set an alert's tint and border per type (--c-callout-<type>-soft, -edge); by default they are
   mixed from the type's colour. */
.callout {
    --c-callout: var(--c-callout-note);
    --c-callout-soft: var(--c-callout-note-soft, color-mix(in srgb, var(--c-callout-note) 8%, var(--c-card)));
    --c-callout-edge: var(--c-callout-note-edge, color-mix(in srgb, var(--c-callout-note) 40%, transparent));
    padding: var(--c-inset) calc(var(--c-inset) + 0.25em);
}
.callout-warning {
    --c-callout: var(--c-callout-warning);
    --c-callout-soft: var(--c-callout-warning-soft, color-mix(in srgb, var(--c-callout-warning) 8%, var(--c-card)));
    --c-callout-edge: var(--c-callout-warning-edge, color-mix(in srgb, var(--c-callout-warning) 40%, transparent));
}
.callout-tip {
    --c-callout: var(--c-callout-tip);
    --c-callout-soft: var(--c-callout-tip-soft, color-mix(in srgb, var(--c-callout-tip) 8%, var(--c-card)));
    --c-callout-edge: var(--c-callout-tip-edge, color-mix(in srgb, var(--c-callout-tip) 40%, transparent));
}
.callout .callout-label {
    display: flex;
    align-items: center;
    gap: 0.45em;
    margin: 0 0 0.3em;
    font-weight: var(--c-label-weight);
}
.callout-icon { flex: none; width: 1.2em; height: 1.2em; color: var(--c-callout); }
.callout-alert {
    border: 1px solid var(--c-callout-edge);
    border-radius: var(--c-radius-large);
    background: var(--c-callout-soft);
}
.callout-quote {
    border-left: 4px solid var(--c-callout);
    border-radius: 0 var(--c-radius) var(--c-radius) 0;
    background: var(--c-surface);
}

/* Key facts (keyFacts): a small title over label / value pairs. box = a bordered box with a title bar, each
   label beside its value; tiles = a grid of tiles, each label small above its value */
.key-facts .key-facts-title { margin: 0; font-weight: var(--c-label-weight); }
.key-facts .key-facts-list { margin: 0; }
.key-facts .key-facts-item > dt { margin: 0; font-weight: var(--c-label-weight); }
.key-facts .key-facts-item > dd { margin: 0; }
.key-facts-box {
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
    overflow: hidden;
}
.key-facts-box .key-facts-title {
    padding: 0.5em var(--c-inset);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.key-facts-box .key-facts-item {
    display: grid;
    grid-template-columns: minmax(7em, 35%) 1fr;
    column-gap: 1em;
    padding: 0.45em var(--c-inset);
}
.key-facts-box .key-facts-item + .key-facts-item { border-top: 1px solid var(--c-border-subtle, var(--c-border)); }
.key-facts-box .key-facts-item > dt { color: var(--c-muted); }
.key-facts-tiles .key-facts-title {
    margin-bottom: 0.4em;
    color: var(--c-muted);
    font-size: var(--c-small);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.key-facts-tiles .key-facts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.5em;
}
.key-facts-tiles .key-facts-item {
    padding: 0.6em 0.75em;
    border-radius: var(--c-radius-large);
    background: var(--c-surface);
}
.key-facts-tiles .key-facts-item > dt { margin-bottom: 0.15em; color: var(--c-muted); font-size: var(--c-small); font-weight: normal; }


/* Timeline (timeline): a dot per item on a line. rail = the labels in a column on the left, the line between
   them and the text; line = the line down the left, each label above its text. The inner paragraphs' selectors
   carry two classes so a skin's own rule for paragraphs in a post (a class and an element) doesn't win. */
.timeline { padding: 0; list-style: none; }
.timeline-item { position: relative; }
.timeline .timeline-when { margin: 0; font-weight: var(--c-label-weight); }
.timeline-item::before {
    content: "";
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    width: 0.8em;
    height: 0.8em;
    border: 2px solid var(--c-timeline-dot);
    border-radius: 50%;
    background: var(--c-card);
}
.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 2px;
    background: var(--c-border);
}
/* rail: one grid for the whole list (each item a subgrid row), so the label column is as wide as the longest label,
   up to --c-timeline-when; labels aligned by --c-timeline-when-align, nudged down by --c-timeline-when-offset to sit
   on the text's first line when they are set smaller.
   The dot and the line belong to the text cell, so they sit on the gap whatever the label column's width. */
.timeline-rail { --c-timeline-when: 6.5em; --c-timeline-gap: 2em; display: grid; grid-template-columns: fit-content(var(--c-timeline-when)) minmax(0, 1fr); column-gap: var(--c-timeline-gap); }
@media (max-width: 600px) {
    .timeline-rail { --c-timeline-when: 5em; }
}
.timeline-rail .timeline-item { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; margin: 0; }
.timeline-rail .timeline-item::before, .timeline-rail .timeline-item::after { content: none; }
.timeline-rail .timeline-when { padding-top: var(--c-timeline-when-offset, 0); text-align: var(--c-timeline-when-align, right); }
.timeline-rail .timeline-when, .timeline-rail .timeline-text { padding-bottom: 1em; }
.timeline-rail .timeline-item:last-child > * { padding-bottom: 0; }
.timeline-rail .timeline-text { position: relative; }
.timeline-rail .timeline-text::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: calc(var(--c-timeline-gap) / -2 - 0.4em);
    top: calc((1lh - 0.8em) / 2);
    box-sizing: border-box;
    width: 0.8em;
    height: 0.8em;
    border: 2px solid var(--c-timeline-dot);
    border-radius: 50%;
    background: var(--c-card);
}
.timeline-rail .timeline-item:not(:last-child) .timeline-text::after {
    content: "";
    position: absolute;
    left: calc(var(--c-timeline-gap) / -2 - 1px);
    top: calc(1lh / 2);
    bottom: calc(-1lh / 2);
    width: 2px;
    background: var(--c-border);
}
.timeline-line .timeline-item { padding: 0 0 1em 1.75em; }
.timeline-line .timeline-item:last-child { padding-bottom: 0; }
.timeline-line .timeline-item::before { left: 0.1em; top: 0.35em; }
.timeline-line .timeline-item::after { left: calc(0.5em - 1px); top: 0.35em; }
.timeline-line .timeline-when { color: var(--c-timeline-dot); font-size: var(--c-small); }

/* ---- Page lists (src/components/page-list.ts): cards for sections (sections: cards) and the home page (home: cards) */
.doc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--c-inset);
    margin: var(--c-space) 0;
}
.doc-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--c-inset);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
}
.doc-card-title {
    font-weight: var(--c-label-weight);
    font-size: 1.05em;
}
/* Links in cards and the section list are underlined on hover only: a card full of underlines is heavy. */
.doc-card a,
.doc-section-list a,
.doc-start a {
    text-decoration: none;
}
.doc-card a:hover,
.doc-section-list a:hover,
.doc-start a:hover {
    text-decoration: underline;
}
.doc-card p {
    margin: 0;
}
.doc-card-description,
.doc-card-count {
    font-size: 0.9em;
    color: var(--c-muted);
}
.doc-card-pages {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
}
.doc-card-pages li {
    margin: 0 0 4px;
}
.doc-card-more {
    margin-top: auto;
    font-size: 0.9em;
}

/* home: intro: "Start here", then the sections with their descriptions */
.doc-start {
    box-sizing: border-box;
    max-width: var(--c-measure);
    margin: var(--c-space) 0;
    padding: var(--c-inset);
    border: 1px solid var(--c-border);
    border-left: 4px solid var(--c-accent);
    border-radius: var(--c-radius);
    background: var(--c-surface);
}
.doc-start p {
    margin: 0;
}
.doc-start-label {
    font-size: 0.8em;
    font-weight: var(--c-label-weight);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.doc-start-link {
    display: inline-block;
    margin: 4px 0;
    font-size: 1.15em;
    font-weight: var(--c-label-weight);
}
.doc-section-list {
    max-width: var(--c-measure);
    margin: var(--c-space) 0;
}
.doc-section-list dt {
    font-weight: var(--c-label-weight);
}
.doc-section-list dd {
    margin: 2px 0 var(--c-inset);
    color: var(--c-muted);
}

/* related: the same section's other pages after the content (list | cards) */
.doc-related {
    clear: both;
    max-width: var(--c-measure);
    margin: calc(var(--c-space) * 2) 0 var(--c-space);
    padding-top: var(--c-space);
    border-top: 1px solid var(--c-border);
}
.doc-related-title {
    margin: 0 0 8px;
    font-weight: var(--c-label-weight);
}
.doc-related ul {
    margin: 0;
    padding-left: 1.2em;
}
.doc-related li {
    margin: 0 0 4px;
}

/* ---- Previous / next cards after the content (src/components/prev-next.ts, prevNext: buttons) --------- */
.doc-prevnext {
    clear: both;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--c-inset);
    max-width: var(--c-measure);
    margin: calc(var(--c-space) * 2) 0 var(--c-space);
}
.doc-prevnext a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--c-inset);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    text-decoration: none;
}
.doc-prevnext a:hover {
    border-color: var(--c-accent);
}
.doc-prevnext-next {
    grid-column: 2;
    text-align: right;
}
.doc-prevnext-label {
    font-size: 0.85em;
    color: var(--c-muted);
}
.doc-prevnext-title {
    font-weight: var(--c-label-weight);
}

/* ---- Main page (the wiki's mainpage component) ------------------------------------------------------- */
/* portal: a grid of topic boxes */
.mp-columns {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}
.mp-box {
    flex: 1 1 22em;
    border: 1px solid var(--c-border-subtle, var(--c-border));
    margin-bottom: 1em;
}
.mp-box > h2 {
    margin: 0;
    padding: 0.2em 0.5em;
    font-family: sans-serif;
    font-size: 1em;
    font-weight: bold;
    border: 0;
    background: var(--c-title-bar);
}
.mp-box.mp-box-b > h2 {
    background: var(--c-mp-green-bar);
}
.mp-box > div {
    padding: 0.3em 0.8em 0.6em;
}
.mp-start {
    margin: 0 0 1em;
    padding: 0.2em 0.9em 0.6em;
    border: 1px solid var(--c-border-subtle, var(--c-border));
    background: var(--c-mp-start);
}
.mp-start h2 {
    border: 0;
    margin: 0.3em 0 0.2em;
    font-family: sans-serif;
    font-size: 1em;
    font-weight: bold;
}
.mp-start p {
    margin: 0;
}
.mp-portal .mp-box {
    flex: 1 1 18em;
}
.mp-portal .mp-box ul {
    margin-top: 0.2em;
}
.mp-lead {
    margin: 0.3em 0 0.2em;
}
.mp-outer > div p {
    margin: 0.4em 0;
}
.mp-browse {
    text-align: center;
    margin-top: 1em;
}
/* twocol: Wikipedia's Main Page boxes, with its colours */
.mp-banner {
    text-align: center;
    background: var(--c-surface);
}
.mp-upper {
    display: flex;
    gap: 1em;
    margin: 0 0 1em;
}
.mp-upper > div {
    flex: 1 1 50%;
    min-width: 0;
    border: 1px solid;
    padding-bottom: 0.4em;
}
.mp-left {
    background: var(--c-mp-green);
    border-color: var(--c-mp-green-bar) !important;
}
.mp-right {
    background: var(--c-mp-blue);
    border-color: var(--c-mp-blue-bar) !important;
}
.mp-section .mp-h2 {
    margin: 0.5em;
    padding: 0.2em 0.4em;
    font-family: sans-serif;
    font-size: 120%;
    font-weight: bold;
    color: var(--c-mp-heading);
    border: 1px solid;
}
.mp-left .mp-h2 {
    background: var(--c-mp-green-bar);
    border-color: var(--c-mp-green-edge);
}
.mp-right .mp-h2 {
    background: var(--c-mp-blue-bar);
    border-color: var(--c-mp-blue-edge);
}
.mp-section-body {
    padding: 0.1em 0.6em;
}
.mp-section-body p {
    margin: 0.3em 0;
}
.mp-lower {
    background: var(--c-mp-purple);
    border: 1px solid var(--c-mp-purple-bar);
    padding-bottom: 0.4em;
    margin-bottom: 1em;
}
.mp-lower .mp-h2 {
    background: var(--c-mp-purple-bar);
    border-color: var(--c-mp-purple-edge);
}
.mp-lower-group {
    margin: 0.4em 0;
}
@media (max-width: 720px) {
    .mp-upper {
        flex-direction: column;
    }
}
/* contents: Wikipedia's Contents pages */
.mp-contents-bar {
    text-align: center;
    border: 1px solid var(--c-border-subtle, var(--c-border));
    background: var(--c-surface);
    padding: 0.4em 0.8em;
    margin: 0 0 1em;
}
.mp-contents-lead {
    margin: 0.4em 0 0.2em;
}
.mp-contents-list {
    margin-bottom: 0.6em;
}
.mp-contents-outer dt {
    font-weight: bold;
    margin-top: 0.6em;
}
.mp-contents-outer dd {
    margin: 0 0 0.2em;
}

/* ---- Q&A: questionList, answers, topics (src/components/questions.ts, answers.ts) ----------------------
   Tokens of their own, with defaults here; a skin sets them in its extras like the others:
   --c-success / --c-on-success / --c-success-soft (the accepted answer), --c-tag / --c-tag-text (tags),
   --c-tone-0 … --c-tone-9 (topic badges), --c-heading (question titles), --c-on-avatar (the initials on an
   avatar, whose background is worked out from the name: hsl(hue 40% 32%), dark enough for white at every hue, 4.5:1 or more). The tones have no palette here: a
   skin that shows badges sets its own (public/static/discourse/discourse.css), and without one every badge
   falls back to the neutral --c-muted. */
:root {
    --c-success: #198754;
    --c-on-success: #fff;
    --c-success-soft: #e8f3ee;
    --c-tag: #e9ecef;
    --c-tag-text: #495057;
    --c-heading: inherit;
    --c-on-avatar: #fff;
}
.qa-icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.qa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qa-solved { display: inline-flex; margin-right: 0.3em; color: var(--c-success); }
.qa-summary { color: var(--c-muted); font-size: var(--c-small); }
p.qa-summary { margin: 0.25em 0 0.5em; }

/* Initials in place of an avatar. */
.qa-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    border-radius: var(--c-avatar-radius, 50%); color: var(--c-on-avatar); font-weight: 600; line-height: 1;
    background: hsl(var(--qa-hue, 210) 40% 32%);
}
.qa-avatar-sm { width: 24px; height: 24px; font-size: 0.6rem; }
.qa-avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }
.qa-avatar-lg { width: 45px; height: 45px; font-size: 0.95rem; }
.qa-avatar-xl { width: 96px; height: 96px; font-size: 2rem; }
.qa-avatar { vertical-align: middle; box-sizing: border-box; }
/* A picture in place of the initials: the same box, circle and size, cropped to fill it. */
img.qa-avatar { display: inline-flex; padding: 0; border: 0; object-fit: cover; background: var(--c-surface); }
/* A stack of avatars (renderAvatarGroup): each overlaps the one before by about 30%, the latest on top, with a
   ring in the background colour (--c-avatar-ring, else the card colour) so the overlaps read; "+N" for the rest. */
.qa-avatars { display: inline-flex; align-items: center; vertical-align: middle; }
.qa-avatars > * { flex: none; border-radius: var(--c-avatar-radius, 50%); box-shadow: 0 0 0 2px var(--c-avatar-ring, var(--c-card, #fff)); }
.qa-avatars > * > .qa-avatar { display: flex; }
.qa-avatars-sm > * + * { margin-left: -7px; }
.qa-avatars-md > * + * { margin-left: -12px; }
.qa-avatar-more { color: var(--c-muted); background: var(--c-surface); font-weight: 600; }
.qa-avatar-link { display: inline-flex; flex: none; border-radius: var(--c-avatar-radius, 50%); text-decoration: none; }
.qa-avatar-link:hover .qa-avatar { opacity: 0.85; }

/* topics */
.qa-tags, .qa-badges { display: inline-flex; flex-wrap: wrap; gap: 0.3em 0.4em; }
.qa-tag {
    display: inline-block; padding: 0 0.45em 1px; border-radius: var(--c-radius);
    background: var(--c-tag); color: var(--c-tag-text); font-size: 0.875rem; text-decoration: none;
}
.qa-tag:hover { text-decoration: none; filter: brightness(0.95); }
.qa-badges { gap: 0.15em 0.9em; }
.qa-badge { display: inline-flex; align-items: center; gap: 0.35em; color: var(--c-muted); font-size: 0.875rem; text-decoration: none; }
/* A topic's icon (its category page's `icon:`), in its tone, in place of the square; in a tag, before its name. */
.qa-topic-icon { width: 1em; height: 1em; flex: none; }
.qa-tag-icon { width: 1em; height: 1em; margin-right: 0.3em; vertical-align: -0.125em; }
.qa-badge-dot { display: inline-block; width: 0.65em; height: 0.65em; border-radius: 1px; background: var(--c-tone-0, var(--c-muted)); }
.qa-tone-1 { background: var(--c-tone-1, var(--c-muted)); } .qa-tone-2 { background: var(--c-tone-2, var(--c-muted)); } .qa-tone-3 { background: var(--c-tone-3, var(--c-muted)); }
.qa-tone-4 { background: var(--c-tone-4, var(--c-muted)); } .qa-tone-5 { background: var(--c-tone-5, var(--c-muted)); } .qa-tone-6 { background: var(--c-tone-6, var(--c-muted)); }
.qa-tone-7 { background: var(--c-tone-7, var(--c-muted)); } .qa-tone-8 { background: var(--c-tone-8, var(--c-muted)); } .qa-tone-9 { background: var(--c-tone-9, var(--c-muted)); }

/* The answer count: a pill, green with a tick when an answer is accepted. */
.qa-count { display: inline-flex; align-items: center; gap: 0.3em; color: var(--c-muted); font-size: var(--c-small); }
.qa-count-accepted .qa-icon { color: var(--c-success); }

/* questionList: list */
.qa-questions-list { padding-left: 1.2em; }
.qa-questions-list li { margin: 0.4em 0; }
.qa-questions-list .qa-q-meta { color: var(--c-muted); font-size: var(--c-small); }

/* questionList: cards */
.qa-questions-cards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-border); }
.qa-question { padding: 1em 0.5em; border-bottom: 1px solid var(--c-border); }
.qa-q-heading { margin: 0 0 0.4em; padding: 0; border: 0; font-size: 1.25rem; font-weight: 500; line-height: 1.3; }
.qa-q-title { color: var(--c-heading); text-decoration: none; }
.qa-q-title:hover { color: var(--c-accent); text-decoration: none; }
.qa-q-topics { margin: 0 0 0.7em; }
.qa-q-count { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 0.4em; }
.qa-q-when { color: var(--c-muted); font-size: var(--c-small); }
.qa-q-when::before { content: "·"; margin-right: 0.4em; }
.qa-compact .qa-question { padding: 0.6em 0; }
.qa-compact .qa-q-heading { font-size: 1rem; font-weight: 400; }
.qa-compact.qa-questions-cards { border-top: 0; }
.qa-compact .qa-question:last-child { border-bottom: 0; }

/* questionList: table */
.qa-questions-table { width: 100%; border-collapse: collapse; }
.qa-questions-table th {
    padding: 0.5em 0.6em; border-bottom: 3px solid var(--c-border-subtle, var(--c-border));
    color: var(--c-muted); font-size: var(--c-small); font-weight: 400; text-align: left;
}
.qa-questions-table td { padding: 0.75em 0.6em; border-bottom: 1px solid var(--c-border-subtle, var(--c-border)); vertical-align: middle; }
.qa-questions-table .qa-q-title { font-size: 1.1rem; font-weight: 500; }
.qa-questions-table .qa-t-num, .qa-questions-table .qa-t-activity { width: 6.5em; text-align: center; color: var(--c-muted); font-size: var(--c-small); }
.qa-questions-table td.qa-t-num { font-size: 1.05rem; font-weight: 600; }
.qa-questions-table td.qa-t-accepted { color: var(--c-success); }
.qa-questions-table .qa-t-people { width: 8em; white-space: nowrap; }
.qa-t-topics { margin-top: 0.2em; }
.qa-t-fold { display: none; }
.qa-compact .qa-q-title { font-size: 1rem; }
@media (max-width: 720px) {
    .qa-questions-table thead { display: none; }
    .qa-questions-table .qa-t-people, .qa-questions-table .qa-t-num, .qa-questions-table .qa-t-activity { display: none; }
    .qa-questions-table td { padding: 0.75em 0.25em; }
    .qa-t-fold { display: block; margin-top: 0.35em; color: var(--c-muted); font-size: var(--c-small); }
}

/* answers */
.qa-answer { scroll-margin-top: var(--c-anchor-offset, 1em); }
.qa-answer-body > :first-child { margin-top: 0; }
/* An answer's reference list, folded (<details>, src/lib/markdown.ts referencesDetails): a small muted
   summary with a chevron, the list as it was inside. */
.mw-references-details { margin: 1em 0 0; }
.mw-references-details > summary { display: flex; align-items: center; gap: 0.4em; width: fit-content; cursor: pointer; list-style: none; color: var(--c-muted); }
.mw-references-details > summary::-webkit-details-marker { display: none; }
.mw-references-details > summary::before { content: ""; width: 0.45em; height: 0.45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.mw-references-details[open] > summary::before { transform: rotate(45deg); }
.mw-references-details > summary:hover { color: var(--c-heading, inherit); }
.qa-answer .qa-answer-body .mw-references-details > summary > :is(h2, h3, h4, h5, h6) { display: inline; margin: 0; font-size: var(--c-small); font-weight: 600; color: inherit; }
.mw-references-details[open] > summary { margin-bottom: 0.5em; }
/* Headings in an answer step down from its title: the title (h2, under the author line, modest but the top
   of its answer) > the copy's h3 > h4 > h5/h6, in size and weight. A skin whose own CSS forces heading sizes
   sets these tokens' sizes on the same headings (answer-extra/extra.css). The skins' h2 rules are for page
   sections, so the title undoes their borders and spacing. */
/* Space: more above a heading than below it (--c-qa-heading-above/-below, in the heading's own em; a skin
   whose own CSS spaces headings in rem sets them in rem). */
.qa-answer {
    --c-qa-title-size: 1.25em; --c-qa-h3-size: 1.075em; --c-qa-h4-size: 0.975em; --c-qa-h5-size: 0.875em;
    --c-qa-title-below: 0.45em; --c-qa-heading-above: 1em; --c-qa-heading-below: 0.4em;
}
.qa-answer .qa-answer-title { margin: 0 0 var(--c-qa-title-below); padding: 0; border: 0; color: inherit; font-family: inherit; font-size: var(--c-qa-title-size); font-weight: 700; line-height: 1.3; letter-spacing: normal; }
.qa-answer .qa-answer-body :is(h3, h4, h5, h6) { margin: var(--c-qa-heading-above) 0 var(--c-qa-heading-below); font-family: inherit; line-height: 1.35; letter-spacing: normal; }
.qa-answer .qa-answer-body h3 { font-size: var(--c-qa-h3-size); font-weight: 600; }
.qa-answer .qa-answer-body h4 { font-size: var(--c-qa-h4-size); font-weight: 600; }
.qa-answer .qa-answer-body :is(h5, h6) { font-size: var(--c-qa-h5-size); font-weight: 600; color: var(--c-muted); }
.qa-answer-body > :last-child { margin-bottom: 0; }
.qa-review { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4em; margin: 0.9em 0 0; color: var(--c-muted); font-size: var(--c-small); }
.qa-review > .qa-icon { color: var(--c-success); }
.qa-review-by::before { content: "· "; }
p.qa-review-by::before { content: none; }
.qa-who { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.45em; }
.qa-job { color: var(--c-muted); font-size: var(--c-small); }
/* plain */
.qa-answer-plain { margin: 1.5em 0; padding-top: 1em; border-top: 1px solid var(--c-border); }
.qa-accepted-line { display: flex; align-items: center; gap: 0.3em; margin: 0 0 0.3em; color: var(--c-success); }
.qa-answer-plain p.qa-review-by { margin: 0 0 0.6em; color: var(--c-muted); font-size: var(--c-small); }
/* card */
.qa-answer-card { padding: 1.5em 0; border-top: 1px solid var(--c-border); }
.qa-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.5em 1em; margin-bottom: 1em; }
.qa-user { display: flex; gap: 0.5em; min-width: 0; }
.qa-user-text { display: flex; flex-direction: column; min-width: 0; font-size: var(--c-small); }
.qa-when { color: var(--c-muted); }
.qa-sep { margin: 0 0.35em; }
.qa-accepted-badge {
    display: inline-flex; align-items: center; gap: 0.3em; padding: 0.3em 0.65em; border-radius: 1em;
    color: var(--c-on-success); background: var(--c-success); font-size: 0.75rem; font-weight: 700; line-height: 1;
}
@media (max-width: 720px) {
    .qa-answer-card .qa-avatar-md { width: 24px; height: 24px; font-size: 0.6rem; }
}
/* post */
.qa-answer-post { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 0.85em; padding: 1em 0; border-top: 1px solid var(--c-border-subtle, var(--c-border)); }
.qa-answer-post:first-child { border-top: 0; }
.qa-post-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25em 1em; margin-bottom: 0.4em; }
.qa-post-head .qa-name { color: inherit; font-weight: 700; }
.qa-post-date { color: var(--c-muted); font-size: var(--c-small); text-decoration: none; }
.qa-solution {
    display: inline-flex; align-items: center; gap: 0.35em; margin: 0 0 0.6em; padding: 0.15em 0.6em; border-radius: var(--c-radius);
    color: var(--c-success); background: var(--c-success-soft); font-size: var(--c-small); font-weight: 600;
}
@media (max-width: 720px) {
    .qa-answer-post { grid-template-columns: 32px minmax(0, 1fr); gap: 0.6em; }
    .qa-answer-post .qa-avatar-lg { width: 32px; height: 32px; font-size: 0.75rem; }
}

/* profile (an author's profile page, src/components/profile.ts). Shared pieces first, then each variant. */
.qa-profile-who { min-width: 0; }
.qa-profile-badge { display: inline-block; padding: 0.15em 0.6em; border-radius: 1em; color: var(--c-on-accent); background: var(--c-accent); font-size: var(--c-small); font-weight: 600; line-height: 1.3; vertical-align: middle; }
.qa-profile-short { max-width: 68ch; margin: 0 0 0.5em; }
.qa-profile-links { display: flex; flex-wrap: wrap; gap: 0.25em 1em; margin: 0; padding: 0; list-style: none; font-size: var(--c-small); }
.qa-profile .qa-profile-heading { margin: 1.75em 0 0.6em; padding: 0; border: 0; font-size: 1.15em; font-weight: 600; line-height: 1.3; }
.qa-profile-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 1.25em; margin: 0; padding: 0; list-style: none; }
.qa-profile-count { margin-left: 0.35em; color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-bio { max-width: 68ch; line-height: 1.65; }
.qa-profile-bio > :not(.qa-profile-heading) { margin: 0 0 0.85em; }
.qa-profile-bio > :last-child { margin-bottom: 0; }
.qa-profile-bio :is(ul, ol) { padding-left: 1.4em; }
.qa-profile-bio li { margin: 0.2em 0; }
.qa-profile-a { display: block; }
.qa-profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25em 0.9em; color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-accepted { display: inline-flex; align-items: center; gap: 0.25em; color: var(--c-success); font-weight: 600; }
.qa-profile-section { scroll-margin-top: var(--c-anchor-offset, 1em); }
/* Anchor tabs (tabs, summary): links in a row over a rule, the first marked. */
.qa-profile-nav { margin: 1.25em 0 0; border-bottom: 1px solid var(--c-border); }
.qa-profile-nav ul { display: flex; gap: 0.25em; margin: 0; padding: 0; list-style: none; }
.qa-profile-nav a { display: block; padding: 0.5em 0.9em; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--c-muted); text-decoration: none; }
.qa-profile-nav a:hover { color: var(--c-heading, inherit); }
.qa-profile-nav a[aria-current] { border-bottom-color: var(--c-accent); color: var(--c-heading, inherit); font-weight: 600; }

/* plain: one column under the layout's <h1>: header, counts strip, topics, About, answers. */
.qa-profile-plain .qa-profile-head { display: flex; align-items: flex-start; gap: 1.25em; margin: 0 0 1.25em; }
.qa-profile-plain .qa-profile-role { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em 0.6em; margin: 0.25em 0 0.5em; color: var(--c-muted); }
.qa-profile-stats { display: flex; flex-wrap: wrap; gap: 0.75em 2.25em; margin: 0 0 1em; padding: 0.75em 1em; border: 1px solid var(--c-border); border-radius: var(--c-radius-large); background: var(--c-surface); }
.qa-profile-stats dt { color: var(--c-muted); font-size: var(--c-small); font-weight: 400; }
.qa-profile-stats dd { margin: 0; font-size: 1.15em; font-weight: 600; }
.qa-profile-topics-part .qa-profile-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.qa-profile-answers { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--c-border); }
.qa-profile-answers li { display: flex; flex-direction: column; gap: 0.15em; padding: 0.75em 0; border-bottom: 1px solid var(--c-border); }
.qa-profile-q { font-weight: 600; }

/* tabs (Apache Answer's user page): the name as a large heading beside a large avatar, one muted stats line. */
.qa-profile-tabs .qa-profile-head { display: flex; align-items: flex-start; gap: 1.5em; }
.qa-profile-tabs .qa-profile-head .qa-avatar-xl { width: 128px; height: 128px; font-size: 2.6rem; }
.qa-profile .qa-profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em 0.6em; margin: 0 0 0.2em; padding: 0; border: 0; font-size: 1.75rem; font-weight: 600; line-height: 1.2; }
.qa-profile-tabs .qa-profile-role { margin: 0 0 0.5em; color: var(--c-muted); }
.qa-profile-name .qa-profile-badge { font-size: 0.8rem; }
.qa-profile-statline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 0.5em; margin: 0.6em 0 0; color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-statline strong { color: var(--c-heading, inherit); font-weight: 600; }
.qa-profile-answer-cards .qa-q-heading { font-size: 1.1rem; }
.qa-profile-answer-cards .qa-summary { margin: 0.15em 0 0.4em; }

/* summary (Discourse's user summary): a header panel, stat tiles, top topics, answers as a topic table. */
.qa-profile-panel { display: flex; align-items: flex-start; gap: 1.5em; padding: 1.5em; border: 1px solid var(--c-border-subtle, var(--c-border)); border-radius: var(--c-radius-large); background: var(--c-surface); }
.qa-profile-panel .qa-avatar-xl { width: 120px; height: 120px; font-size: 2.5rem; }
.qa-profile-summary .qa-profile-role { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em 0.6em; margin: 0 0 0.6em; color: var(--c-muted); }
.qa-profile-details { margin: 0.4em 0; color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.75em; margin: 0; padding: 0; list-style: none; }
.qa-profile-tiles li { display: flex; flex-direction: column; align-items: center; padding: 0.9em 0.5em; border: 1px solid var(--c-border-subtle, var(--c-border)); border-radius: var(--c-radius-large); text-align: center; }
.qa-profile-tile-num { font-size: 1.6em; font-weight: 600; line-height: 1.2; }
.qa-profile-tile-label { color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-top-topics { gap: 0.5em 1.5em; }
.qa-profile-table { width: 100%; border-collapse: collapse; }
.qa-profile-table th { padding: 0.5em 0.6em; border-bottom: 2px solid var(--c-border); color: var(--c-muted); font-size: var(--c-small); font-weight: 600; text-align: left; }
.qa-profile-table td { padding: 0.75em 0.6em; border-bottom: 1px solid var(--c-border-subtle, var(--c-border)); vertical-align: top; }
.qa-profile-table .qa-q-title { font-size: 1.05rem; font-weight: 500; }
.qa-profile-table .qa-profile-a { margin-top: 0.15em; color: var(--c-muted); font-size: var(--c-small); }
.qa-profile-row-topics { margin-top: 0.3em; font-size: var(--c-small); }
.qa-profile-table-date { width: 11em; color: var(--c-muted); font-size: var(--c-small); white-space: nowrap; text-align: right; }
th.qa-profile-table-date { text-align: right; }

@media (max-width: 720px) {
    .qa-profile-plain .qa-profile-head { gap: 0.9em; }
    .qa-profile .qa-profile-head .qa-avatar-xl, .qa-profile-panel .qa-avatar-xl { width: 64px; height: 64px; font-size: 1.4rem; }
    .qa-profile-tabs .qa-profile-head, .qa-profile-panel { gap: 0.9em; }
    .qa-profile-panel { padding: 1em; }
    .qa-profile .qa-profile-name { font-size: 1.5rem; }
    .qa-profile-stats { gap: 0.5em 1.25em; padding: 0.6em 0.8em; }
    .qa-profile-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qa-profile-table-date { width: auto; }
}

/* A question with no answers yet (renderAnswers with none): one muted line where the answers would be. */
.qa-no-answers { margin: 1.5em 0; padding: 1em 0; border-top: 1px solid var(--c-border-subtle, var(--c-border)); color: var(--c-muted); }

/* ---- Infobox: summary (src/components/infobox.ts): a summary box, the card's markup drawn as a tinted panel with
   a bar down its left, the title as its heading, then one "label: value" line per fact (guide). */
.infobox-summary {
    box-sizing: border-box;
    max-width: var(--c-measure);
    margin: var(--c-space) 0;
    padding: var(--c-inset) calc(var(--c-inset) * 1.5);
    border-left: 6px solid var(--c-summary-edge);
    border-radius: 0 var(--c-radius) var(--c-radius) 0;
    background: var(--c-summary);
}
.infobox-summary .infobox-above {
    margin: 0 0 0.35em;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-heading, inherit);
}
.infobox-summary .infobox-subheader { margin: 0 0 0.35em; text-align: left; color: var(--c-muted); }
.infobox-summary .infobox-image { display: none; }
.infobox-summary .infobox-list { margin: 0; padding: 0; }
.infobox-summary .infobox-row { padding: 0.35em 0; }
.infobox-summary .infobox-row + .infobox-row { border-top: 1px solid var(--c-border-subtle, var(--c-border)); }
.infobox-summary .infobox-label { display: inline; font-weight: var(--c-label-weight); }
.infobox-summary .infobox-label::after { content: ":"; }
.infobox-summary .infobox-data { display: inline; margin: 0 0 0 0.25em; }
.infobox-summary .infobox-header { margin: 0.6em 0 0.1em; font-weight: 700; }
.infobox-summary .infobox-full-data { padding: 0.35em 0; }

/* ---- On this page (src/components/on-this-page.ts): top = a list under the title; side = a list the skin places
   in a column beside the article, kept in view. */
.on-this-page { margin: var(--c-space) 0 calc(var(--c-space) * 1.5); }
.on-this-page-title { margin: 0 0 0.4em; font-size: 1.1em; font-weight: 700; line-height: 1.3; color: var(--c-heading, inherit); }
.on-this-page-list { margin: 0; padding-left: 1.25em; }
.on-this-page-list li { margin: 0.3em 0; }
.on-this-page-side { position: sticky; top: var(--c-space); margin: 0; font-size: var(--c-small); }
.on-this-page-side .on-this-page-list { padding: 0; list-style: none; border-left: 2px solid var(--c-border); }
.on-this-page-side .on-this-page-list li { margin: 0; }
.on-this-page-side .on-this-page-list a { display: block; padding: 0.3em 0 0.3em 0.9em; text-decoration: none; }
.on-this-page-side .on-this-page-list a:hover { text-decoration: underline; }
/* The section being read (set by the skin's script): a marker over the list's rule, and the link in the heading colour. */
.on-this-page-side .on-this-page-list a[aria-current] { color: var(--c-heading, inherit); font-weight: var(--c-label-weight); box-shadow: -2px 0 0 var(--c-accent); }

/* ---- FAQ (src/components/faq.ts): accordion = a closed <details> per question; list = all open. */
.faq { margin: calc(var(--c-space) * 2) 0 var(--c-space); }
.faq-items { border-top: 1px solid var(--c-border); }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-question { margin: 0; font-size: 1em; font-weight: var(--c-label-weight); line-height: 1.4; color: var(--c-heading, inherit); }
.faq-answer { padding: 0 var(--c-inset) var(--c-inset); }
.faq-answer p { margin: 0; }
.faq-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 0.8em var(--c-inset);
    cursor: pointer;
    list-style: none;
    background: var(--c-faq-question);
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
    content: "";
    flex: none;
    width: 0.5em;
    height: 0.5em;
    margin-right: 0.2em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-25%) rotate(45deg);
    transition: transform 0.15s;
}
.faq-accordion details[open] > summary::after { transform: translateY(25%) rotate(-135deg); }
.faq-accordion details[open] > summary { margin-bottom: 0.6em; }
.faq-accordion summary:hover .faq-question { text-decoration: underline; }
.faq-list .faq-item { padding: 0.9em 0; }
.faq-list .faq-question { margin-bottom: 0.3em; font-size: 1.05em; }
.faq-list .faq-answer { padding: 0; }

/* ---- Home page blocks (src/components/home-blocks.ts), bands: each block a full-width band, its content in the
   page's width. Complete without photographs: tinted panels, icons and soft circles. */
/* One spacing scale for the home page: --c-home-gap, a band's padding above and below its content (two plain bands
   in a row share one gap; a tinted band keeps its own, the change of colour marking the new group); --c-home-head,
   a section heading (or its intro) to its content; --c-home-inset, the padding inside cards, guide boxes and promos. */
:root { --c-home-gap: calc(var(--c-space) * 3); --c-home-head: 1.25rem; --c-home-inset: calc(var(--c-inset) * 1.5); }
.home-band { padding: var(--c-home-gap) 0; }
.home-band:is(.home-band-cards, .home-band-promo) + .home-band:is(.home-band-cards, .home-band-promo) { padding-top: 0; }
.home-wrap { box-sizing: border-box; max-width: var(--c-page-width); margin: 0 auto; padding: 0 var(--c-page-gutter); }
.home-heading { margin: 0 0 var(--c-home-head); font-size: 1.6rem; line-height: 1.25; color: var(--c-heading, inherit); }
.home-intro { max-width: 46rem; margin: calc(var(--c-home-head) * -0.6) 0 var(--c-home-head); color: var(--c-muted); }
.home-text { margin: 0 0 1.25em; }
.home-button {
    display: inline-block;
    padding: 0.75em 1.4em;
    border-radius: var(--c-button-radius);
    background: var(--c-accent);
    color: var(--c-on-accent);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}
.home-button:hover, .home-button:focus { background: var(--c-accent-hover, var(--c-accent)); color: var(--c-on-accent); text-decoration: none; }
.home-button:visited { color: var(--c-on-accent); }

/* hero */
.home-band-hero { padding: calc(var(--c-space) * 2.5) 0; background: var(--c-band); }
.home-band-hero .home-wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: calc(var(--c-space) * 2); }
.home-hero-heading { margin: 0 0 0.4em; font-size: 2.4rem; line-height: 1.15; color: var(--c-heading, inherit); }
.home-hero-lead { max-width: 36rem; margin: 0 0 1.4em; font-size: 1.2rem; line-height: 1.5; }
.home-hero-art { display: block; width: 100%; max-width: 26rem; height: auto; justify-self: end; }
/* A hero with its own picture: the picture fills most of its column, to the right edge, with less band around it. */
.home-hero-image { width: 92%; max-width: 25rem; justify-self: end; }
/* Optical centring: the picture is centred on its focus point (hero image `focus:`), not its box. Beside the text
   it moves down or up by the focus's distance from the middle; on phones, where it is centred across, sideways. */
.home-hero-image { transform: translateY(calc((0.5 - var(--hero-focus-y, 0.5)) * 100%)); }
.home-band-hero:has(.home-hero-image) { padding: calc(var(--c-space) * 1.4) 0 calc(var(--c-space) * 2.4); }
.home-band-hero:has(.home-hero-image) .home-wrap { column-gap: calc(var(--c-space) * 1.5); }
.home-art-1 { fill: var(--c-home-art-1, var(--c-card)); }
.home-art-2 { fill: var(--c-home-art-2, var(--c-border)); }
.home-art-3 { fill: var(--c-home-art-3, var(--c-accent)); }
.home-art-4 { fill: var(--c-home-art-4, var(--c-border)); }

/* cards */
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: calc(var(--c-space) * 1.5); margin: 0; padding: 0; list-style: none; }
.home-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
    box-shadow: var(--c-shadow);
}
.home-card-art { display: flex; align-items: center; justify-content: center; height: 8.5rem; background: var(--c-band-alt); color: var(--c-accent); }
.home-card-icon { width: 3.25rem; height: 3.25rem; }
.home-card-body { padding: var(--c-home-inset); }
.home-card-title { margin: 0 0 0.35em; font-size: 1.2rem; line-height: 1.3; }
.home-card-title a { text-decoration: none; }
.home-card-title a::after { content: ""; position: absolute; inset: 0; }
.home-card:hover .home-card-title a { text-decoration: underline; }
.home-card:focus-within { outline: 3px solid var(--c-focus, var(--c-accent)); outline-offset: 2px; }
.home-card-title a:focus { outline: none; }
.home-card-text { margin: 0; color: var(--c-muted); }

/* guides: boxes side by side, each a list of links drawn as buttons */
.home-band-guides { background: var(--c-band-alt); }
.home-guides-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: calc(var(--c-space) * 1.5); }
.home-guide {
    padding: var(--c-home-inset);
    border-top: 6px solid var(--c-accent);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
    box-shadow: var(--c-shadow);
}
.home-guide-heading { margin: 0 0 0.35em; font-size: 1.45rem; line-height: 1.25; text-align: center; color: var(--c-heading, inherit); }
.home-guide-text { margin: 0 0 1em; text-align: center; color: var(--c-muted); }
.home-guide-links { display: grid; gap: 0.6em; margin: 0; padding: 0; list-style: none; }
.home-guide-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0.75em 1em;
    border: 2px solid var(--c-accent);
    border-radius: var(--c-button-radius);
    color: var(--c-accent);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}
.home-guide-link::after { content: ""; flex: none; width: 0.45em; height: 0.45em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.home-guide-link:hover, .home-guide-link:focus { background: var(--c-accent); color: var(--c-on-accent); text-decoration: none; }
.home-guide-link:visited { color: var(--c-accent); }
.home-guide-link:visited:hover { color: var(--c-on-accent); }

/* promo: a picture beside a heading, text and button; promos alternate sides */
.home-promo-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-large);
    background: var(--c-card);
    box-shadow: var(--c-shadow);
}
.home-promo-flip .home-promo-art { order: 2; }
.home-promo-art { min-height: 14rem; }
.home-promo-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-promo-panel { display: flex; align-items: center; justify-content: center; background: var(--c-band); color: var(--c-accent); }
.home-promo-icon { width: 5rem; height: 5rem; }
.home-promo-body { align-self: center; padding: calc(var(--c-home-inset) * 1.33); }
.home-promo-heading { margin: 0 0 0.45em; font-size: 1.5rem; line-height: 1.25; color: var(--c-heading, inherit); }

@media (max-width: 40em) {
    :root { --c-home-gap: calc(var(--c-space) * 2); --c-home-head: 1rem; --c-home-inset: calc(var(--c-inset) * 1.25); }
    .home-band-hero .home-wrap { grid-template-columns: 1fr; }
    .home-hero-art { display: none; }
    /* The hero's own picture stays on phones under the text, most of the column wide, the gap above it tight. */
    .home-band-hero .home-wrap { row-gap: calc(var(--c-space) * 0.75); }
    .home-band-hero:has(.home-hero-image) { padding: calc(var(--c-space) * 2) 0 calc(var(--c-space) * 1.25); }
    .home-band-hero:has(.home-hero-image) .home-wrap { row-gap: calc(var(--c-space) * 1.5); }
    .home-hero-image { display: block; justify-self: center; width: 81%; max-width: 22rem; margin: 0; transform: translateX(calc((0.5 - var(--hero-focus-x, 0.5)) * 100%)); }
    /* A button alone under its text spans the column on phones (hero, promo, the closing Ask banner). */
    .home-button { display: block; text-align: center; }
    .home-hero-heading { font-size: 1.75rem; }
    .home-hero-lead { font-size: 1.05rem; }
    .home-heading { font-size: 1.35rem; }
    .home-promo-inner { grid-template-columns: 1fr; }
    .home-promo-flip .home-promo-art { order: 0; }
    .home-promo-art { min-height: 8rem; }
    .home-promo-body { padding: var(--c-home-inset); }
}

/* ---- Search results as a list of pages (src/components/page-list.ts renderFoundPages; guide) ----------------- */
.doc-found { margin: var(--c-space) 0; padding: 0; list-style: none; }
.doc-found-item { padding: var(--c-inset) 0; border-bottom: 1px solid var(--c-border-subtle, var(--c-border)); }
.doc-found-title { font-size: 1.15em; font-weight: var(--c-label-weight); text-decoration: none; }
.doc-found-title:hover { text-decoration: underline; }
.doc-found-excerpt { margin: 0.3em 0 0; color: var(--c-muted); }
.doc-found-excerpt mark { padding: 0; color: inherit; background: none; font-weight: 700; }

/* ---- "On this page" with many sections (on-this-page.ts): the rest behind a "Show all" toggle, no script */
.on-this-page-more > summary { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.3em; color: var(--c-accent); cursor: pointer; list-style: none; font-weight: var(--c-label-weight); }
.on-this-page-more > summary::-webkit-details-marker { display: none; }
.on-this-page-more > summary::after { content: ""; width: 0.4em; height: 0.4em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-20%) rotate(45deg); }
.on-this-page-more[open] > summary { display: none; }
.on-this-page-more > .on-this-page-list { margin-top: 0.3em; }

/* ---- Ask a question (src/components/ask.ts). askBanner: the promo block's look (.home-promo-…) in the article;
   askPrompt: a quiet line in the text, an icon, a question, the link. */
.ask-banner { margin: calc(var(--c-space) * 2) 0; }
.ask-banner.home-promo-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.ask-banner .home-promo-art { min-height: 0; }
.ask-banner .home-promo-icon { width: 3.5rem; height: 3.5rem; }
.ask-banner .home-promo-body { padding: calc(var(--c-space) * 1.5); }
.ask-banner .home-promo-heading { font-size: 1.3rem; }
@media (max-width: 40em) { .ask-banner.home-promo-inner { grid-template-columns: 1fr; } .ask-banner .home-promo-art { min-height: 5rem; } }
.ask-prompt { display: flex; align-items: baseline; gap: 0.5em; margin: var(--c-space) 0; padding: 0.6em 0; border-top: 1px solid var(--c-border-subtle, var(--c-border)); border-bottom: 1px solid var(--c-border-subtle, var(--c-border)); color: var(--c-muted); }
.ask-prompt-icon { flex: none; width: 1.1em; height: 1.1em; align-self: center; color: var(--c-accent); }
.ask-prompt a { font-weight: var(--c-label-weight); }

/* ---- About this page (src/components/page-info.ts): a light bordered box, label / value lines */
.page-info { box-sizing: border-box; max-width: var(--c-measure); margin: calc(var(--c-space) * 2) 0 0; padding: var(--c-inset) calc(var(--c-inset) * 1.25); border: 1px solid var(--c-border); border-radius: var(--c-radius); background: var(--c-card); font-size: var(--c-small); }
.page-info-title { margin: 0 0 0.4em; font-weight: 700; color: var(--c-heading, inherit); }
.page-info-list { margin: 0; }
.page-info-row { display: flex; flex-wrap: wrap; gap: 0 0.5em; padding: 0.15em 0; }
.page-info-row dt { min-width: 9em; margin: 0; color: var(--c-muted); }
.page-info-row dd { margin: 0; }
.page-info-report { margin: 0.5em 0 0; }

/* ---- Clinics (src/components/clinics.ts): plain reference listings. clinicList cards / table, clinicComparison
   table, clinicProfile sections. A table scrolls inside its own box. */
.clinic-order { margin: var(--c-space) 0 0.5em; color: var(--c-muted); font-size: var(--c-small); }
.clinic-none { color: var(--c-muted); }
.clinic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--c-space); margin: 0 0 calc(var(--c-space) * 1.5); padding: 0; list-style: none; }
.clinic-card { display: flex; flex-direction: column; gap: 0.35em; margin: 0; padding: var(--c-inset); border: 1px solid var(--c-border); border-radius: var(--c-radius-large); background: var(--c-card); }
.clinic-card-featured { border-color: var(--c-accent); }
.clinic-card-flag { margin: 0; color: var(--c-accent); font-size: var(--c-small); font-weight: var(--c-label-weight); }
.clinic-card-name { margin: 0; font-size: 1.05em; line-height: 1.3; }
.clinic-card-name a { text-decoration: none; }
.clinic-card-name a:hover { text-decoration: underline; }
.clinic-card-meta { margin: 0; color: var(--c-muted); font-size: var(--c-small); }
.clinic-badges { display: flex; flex-wrap: wrap; gap: 0.3em; margin: 0.15em 0; padding: 0; list-style: none; }
.clinic-badge { margin: 0; padding: 0.1em 0.5em; border: 1px solid var(--c-border); border-radius: var(--c-radius); background: var(--c-surface); font-size: 0.8em; font-weight: var(--c-label-weight); }
.clinic-card-facts { margin: 0; font-size: var(--c-small); }
.clinic-card-facts > div { display: flex; flex-wrap: wrap; gap: 0 0.4em; }
.clinic-card-facts dt { margin: 0; color: var(--c-muted); }
.clinic-card-facts dt::after { content: ":"; }
.clinic-card-facts dd { margin: 0; }
.clinic-card-note { margin: 0.2em 0 0; font-size: var(--c-small); }
.clinic-table-wrap { position: relative; max-width: 100%; overflow-x: auto; margin: 0 0 var(--c-space); }
.clinic-table { width: 100%; border-collapse: collapse; font-size: var(--c-small); line-height: 1.4; }
.clinic-table caption { padding: 0 0 0.5em; font-weight: 700; text-align: left; color: var(--c-heading, inherit); }
.clinic-table :is(th, td) { padding: 0.5em 0.65em; border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.clinic-table thead th { background: var(--c-surface); font-weight: 700; white-space: nowrap; }
.clinic-table tbody th { font-weight: var(--c-label-weight); }
.clinic-table-note { margin: -0.4em 0 var(--c-space); color: var(--c-muted); font-size: var(--c-small); }
.clinic-amount { white-space: nowrap; }
.clinic-excludes, .clinic-conditions { color: var(--c-muted); }
.clinic-profile .clinic-facts { margin: 0 0 calc(var(--c-space) * 1.5); }
.clinic-section { margin: calc(var(--c-space) * 1.75) 0 0; }
.clinic-section > h2 { margin: 0 0 0.6em; }
.clinic-scope, .clinic-checked, .clinic-prices-note { color: var(--c-muted); font-size: var(--c-small); }
.clinic-sources { font-size: var(--c-small); }
.clinic-sources li { margin: 0.3em 0; overflow-wrap: anywhere; }
.clinic-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.clinic-tick { color: var(--c-accent); font-weight: 700; }
.clinic-table abbr[title] { text-decoration: none; cursor: help; }
.clinic-table tbody th { min-width: 8rem; }
