:root {
    --htmxo-bg:      var(--pico-background-color, Canvas);
    --htmxo-accent:  var(--pico-primary, #4a90d9);
--htmxo-success: light-dark(#217d72, #2a9d8f);
--htmxo-warning: light-dark(#9c6311, #e9a23b);
--htmxo-error:   light-dark(#ca3f1c, #e76f51);
    /* Pico has no root-level border color: `--pico-border-color` exists only
       on form controls and buttons, and its divider color
       (`--pico-muted-border-color`) is too faint for a status banner's edge. */
    --htmxo-border:  currentColor;
    --htmxo-muted:   var(--pico-muted-color, color-mix(in srgb, currentColor 60%, transparent));
    /* Pico raises this in steps from 576 px up to 131.25% from 1536 px. Its
       media-query rules have the same specificity as this one and come
       earlier in the page, so this value holds at every width. */
    --pico-font-size: 100%;
}
/* From 576 px Pico drops the container's padding and caps it in steps (510,
   700, 950, 1200 and 1450 px), so it left much of a narrower window unused.
   Below 576 px it fills the window, padded, as this does from there on. */
@media (min-width: 576px) {
    .container {
        max-width: min(var(--htmxo-container-max-width, 1600px),
                       calc(100% - 2 * var(--htmxo-container-gutter, 2rem)));
    }
}
/* Pico keeps a `nav` on one line, so a header whose entries outgrew
   `.container`, which holds the header of `pico_page`, broke its labels and
   then ran its last entries off the page, widening it. The nav may now
   use the window, up to a 1rem margin: `(100vw + 100%) / 2` is the distance from
   a centred container's left edge to the window's right edge. Past that it
   continues on further lines, its entries whole. A nav that fits the container
   stays as wide as the container. On one line the gap and the margin cancel;
   on its own line the navigation starts where the brand does. */
body > header nav {
    flex-wrap: wrap;
    width: max-content;
    min-width: 100%;
    max-width: calc((100vw + 100%) / 2 - 1rem);
    column-gap: var(--pico-nav-element-spacing-horizontal);
}
body > header nav ul { flex-wrap: wrap; }
body > header nav ul:last-of-type { margin-left: calc(var(--pico-nav-element-spacing-horizontal) * -1); }
/* Pico gives every `nav li` a `::before` of its own, a zero-width space floated
   left. Its rule is unlayered, so it beats the private mark in
   `htmxo_utility_styles()`, which is layered, while the mark's border and
   padding, which Pico does not set, still apply: a private entry showed an empty
   box, and so did one inside private content, which shows no label at all. These
   rules are as weak as Pico's and come after it, so an app's own rule still wins.
   Pico pads a `nav li` by 1rem above and below, so the outline moves inside the
   entry to stay within the row. */
:where(nav li.htmxo-private) { outline-offset: calc(var(--pico-nav-element-spacing-horizontal) * -0.5); }
:where(nav li.htmxo-private)::before { content: var(--htmxo-private-label); float: none; }
:where(.htmxo-private *):where(nav li.htmxo-private)::before { content: none; }
/* Pico paints a button without a colour class in its primary azure. It takes
   Pico's slate outline (`.secondary.outline`) instead, through the same three
   variables Pico sets on every button; `.secondary` and `.contrast` keep
   theirs. Each selector outranks the Pico rule it replaces. */
:is(button, [type=submit], [type=button], [role=button]):not(.secondary, .contrast) {
    --pico-background-color: transparent;
    --pico-color: var(--pico-secondary);
    --pico-border-color: var(--pico-secondary);
}
:is(button, [type=submit], [type=button], [role=button]):not(.secondary, .contrast):is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
    --pico-background-color: transparent;
    --pico-color: var(--pico-secondary-hover);
    --pico-border-color: var(--pico-secondary-hover);
}
:is(button, [type=submit], [type=button], [role=button]):not(.secondary, .contrast):is(:focus, [aria-current]:not([aria-current=false]):focus) {
    --pico-box-shadow: var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
}
:is([role=search], [role=group]):has(:is(button, [type=submit], [type=button], [role=button]):not(.secondary, .contrast):focus) {
    --pico-group-box-shadow-focus-with-button: 0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
}
/* Pico whitens a dropdown's chevron and a busy button's spinner to suit its
   filled buttons; on the outline they keep their own colour. */
details summary[role=button]:not(.secondary, .contrast)::after,
[aria-busy=true]:not(input, select, textarea):is(button, [type=submit], [type=button], [role=button]):not(.secondary, .contrast)::before {
    filter: none;
}
/* Pico draws a disclosure (`<details>`) as one borderless line with its
   chevron at the far edge, and colours the label like a link while it has
   focus, so readers miss it. It is a bordered box instead: the summary is a
   bold, tinted bar with the chevron right before the label, and the content
   opens inside the box. Pico's dropdown menus and button summaries
   (`summary[role]`) keep their looks. What Pico leaves unset (the box, the
   bar, the new chevron) has zero specificity and what Pico sets (the label's
   line height and colours, its chevron, the gap under an open label) has
   exactly Pico's, so a component that styles its own `<details>` still wins
   wherever it sets something. The box itself has no padding: the bar reaches
   its edges, and the inner spacing sits on the bar and on the content
   (`::details-content`, which also holds bare text). Padding a component sets
   on its `<details>` so insets both, and nothing sticks out of its box; a
   component drops the inner spacing with `--htmxo-disclosure-padding: 0`.
   That variable is registered as not inheriting, so it is the spacing of the
   `<details>` it is set on only: a custom property inherits by default, and a
   component's 0 reached every ordinary disclosure nested inside it, whose bar
   and content then sat flush against its border (snag
   `followed-htmxo-s-6bd66da4`). Its universal syntax needs no initial value,
   so an unset variable still falls back to `1rem`; a `<length>` syntax would
   need a computationally independent initial value, which `1rem` is not.
   Only the box's own rule reads it and asks `:has()` whether its summary is a
   button, and hands the spacing to the bar and to `::details-content` as
   `--htmxo-disclosure-inset` (0 in any other disclosure, a nested one
   included); the rules for what is in the box ask the summary itself
   (`summary:not([role])`, `summary[role] ~`). A `:has()` on a rule for the
   content or the summary made the browser restyle everything inside a
   `<details>` whenever anything in it changed: each update of one cell in a
   table inside a disclosure restyled the whole table, twice. The last child's
   rule checks its parent before its siblings: written as `summary ~
   :last-child`, every class change on the page restyled later siblings. */
@property --htmxo-disclosure-padding { syntax: "*"; inherits: false; }
:where(details) { --htmxo-disclosure-inset: 0px; }
:where(details:not(.dropdown, :has(> summary[role]))) {
    --htmxo-disclosure-inset: var(--htmxo-disclosure-padding, 1rem);
    --pico-accordion-active-summary-color: var(--pico-accordion-close-summary-color);
    --pico-accordion-open-summary-color: var(--pico-accordion-close-summary-color);
    border: var(--pico-border-width) solid var(--pico-form-element-border-color);
    border-radius: var(--pico-border-radius);
}
:where(details)::details-content { padding-inline: var(--htmxo-disclosure-inset); }
:where(details[open])::details-content { padding-bottom: var(--htmxo-disclosure-inset); }
:where(details:not(.dropdown) > summary:not([role])) {
    padding: 0.6rem var(--htmxo-disclosure-inset);
    border-radius: calc(var(--pico-border-radius) - var(--pico-border-width));
    background: var(--pico-card-sectioning-background-color);
    font-weight: 600;
}
:where(details:not(.dropdown) > summary:not([role])):hover {
    background: color-mix(in srgb, currentColor 7%, var(--pico-card-sectioning-background-color));
}
:where(details:not(.dropdown)[open] > summary:not([role])) {
    border-bottom: var(--pico-border-width) solid var(--pico-muted-border-color);
    border-end-start-radius: 0;
    border-end-end-radius: 0;
}
:where(details:not(.dropdown) > summary:not([role]))::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-inline-end: 0.5rem;
    vertical-align: -0.125rem;
    background-image: var(--pico-icon-chevron);
    background-position: center;
    background-size: 1rem auto;
    background-repeat: no-repeat;
    transform: rotate(-90deg);
    transition: transform var(--pico-transition);
}
:where(details:not(.dropdown)[open] > summary:not([role]))::before {
    transform: rotate(0);
}
:last-child:where(details:not(.dropdown) > *):where(:not(summary[role], summary[role] ~ *)) { margin-bottom: 0; }
details:where(:not(.dropdown)) > summary:where(:not([role])) { line-height: var(--pico-line-height); }
details:where(:not(.dropdown)) > summary:where(:not([role]))::after { content: none; }
details:where(:not(.dropdown))[open] > summary:where(:not([role])) {
    margin-bottom: var(--htmxo-disclosure-inset);
}
details:where(:not(.dropdown)) > summary:focus-visible:not([role]) {
    outline-offset: calc(-1 * var(--pico-outline-width));
}
/* A `SemanticArtifact` is a download control, drawn in the buttons' slate
   outline: icon, label, then format and size in muted `small` text, which
   wraps below the label in a narrow box. Unlayered, because Pico's own `a`
   rule is, and with direct colours, because Pico sets `--pico-color` on every
   link to its azure. */
a.htmxo-semantic-artifact {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: .5rem;
    row-gap: .1rem;
    max-width: 100%;
    padding: .4rem .85rem;
    border: var(--pico-border-width, 1px) solid var(--pico-secondary);
    border-radius: var(--pico-border-radius);
    color: var(--pico-secondary);
    text-decoration: none;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
a.htmxo-semantic-artifact:is(:hover, :active, :focus) {
    color: var(--pico-secondary-hover);
    border-color: var(--pico-secondary-hover);
}
a.htmxo-semantic-artifact:focus-visible {
    box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
}
a.htmxo-semantic-artifact > svg {
    flex: none;
}
a.htmxo-semantic-artifact > small {
    color: var(--pico-muted-color);
    font-size: .85em;
    white-space: nowrap;
}
/* Pico's unlayered `td, th` rule sets every cell's colour and weight, and beats
   any rule in a layer, so the `data-status` rules of `htmxo_utility_styles()`
   never reach a cell. These match that rule's specificity and follow it, so an
   app's rule still wins. Only the cell's own attribute counts: the KB's
   `tr[data-status]` keeps Pico's cells. */
:is(td, th):where([data-status]) { font-weight: bold; }
:is(td, th):where([data-status="success"]) { color: var(--htmxo-success); }
:is(td, th):where([data-status="error"]) { color: var(--htmxo-error); }
:is(td, th):where([data-status="warning"]) { color: var(--htmxo-warning); }
:is(td, th):where([data-status="muted"]) { color: var(--htmxo-muted); }
