/* ══════════════════════════════════════════════════════════════
   Neorgon Footer Kit: footer.css
   Canonical source: packages/neorgon-ui/footer/
   Vendored per site as css/neorgon-footer.css. Do not edit copies.
   Live CDN: https://cdn.neorgon.org/v1.0.0/footer/footer.css
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Geometry: minimal mode is sized to match the one-line .info-footer
     it replaces (~70px total). Raise --footer-pad-block per site only if
     that site genuinely wants a heavier footer. */
  --footer-pad-block: 24px;
  --footer-pad-block-app: 14px;
  --footer-pad-block-content: 40px;
  --footer-max-w: 1100px;
  --footer-control-h: 32px;
  /* One line of footer copy, and the WCAG 2.5.8 minimum a bar target has to
     reach. They are tokens because the bar compensates its target boxes
     against the line height exactly (see .neo-footer-bar a below), and a
     hand-edited `line-height: 1.7` would silently put that compensation out. */
  --footer-line: 1.7;
  --footer-target: 24px;

  /* Palette. --footer-bg, --footer-text, --footer-text-strong and
     --footer-surface are plain defaults. The four that follow the header
     (--footer-accent, --footer-border, --footer-border-strong,
     --footer-hover) are deliberately NOT declared here: see "Header-derived
     tokens" just below. A site still sets any of them, anywhere, to win. */
  --footer-bg: transparent;
  --footer-text: var(--text-muted, rgba(255, 255, 255, .55));
  --footer-text-strong: var(--text-secondary, #cacaca);
  --footer-surface: var(--surface-1, rgba(255, 255, 255, .03));

  --footer-z-top: 150; /* back-to-top: above content, below header (200) and modals (400) */

  /* Back-to-top geometry. Phones get 14px and 38px. The gap is what the
     button keeps above the footer once the footer scrolls into view (see
     "Riding above the footer" at .neo-top). */
  --footer-top-size: 40px;
  --footer-top-inset: 20px;
  --footer-top-gap: 8px;
}

/* ── Header-derived tokens ────────────────────────────────────
   The accent, borders and hover follow the header: ?theme=, a named
   header skin (data-header-skin) and an armed CDN season. Themes declare
   on <html>, but skins and seasons declare on .header-bar, which the
   footer does not sit inside, so the header kit (header.css) and
   season.css hand the same --header-* tokens to these pieces as well:
   .neo-footer, .neo-top, .neo-modal (the last two are appended to <body>).

   That only helps if the tokens are resolved HERE, on the pieces. A
   custom property's var() is resolved where it is declared, so the old
   `:root { --footer-accent: var(--header-accent) }` baked in the root's
   magenta and every footer focus ring on a slate or jade site stayed
   magenta (queue #156). The --_footer-* names are private: read them,
   never set them. A site's own --footer-accent, on :root, body or the
   footer itself, still comes first. */
.neo-footer,
.neo-top,
.neo-modal {
  --_footer-accent: var(--footer-accent, var(--header-accent, #e879f9));
  --_footer-border: var(--footer-border, var(--header-border, rgba(255, 255, 255, .07)));
  --_footer-border-strong: var(--footer-border-strong, var(--header-border-strong, rgba(255, 255, 255, .22)));
  --_footer-hover: var(--footer-hover, var(--header-menu-hover, rgba(255, 255, 255, .08)));
}

/* ── Always-at-the-bottom ─────────────────────────────────────
   Primary: any <body> that owns a .neo-footer becomes a column so
   the footer's margin-top:auto pins it to the viewport floor on
   short pages and flows naturally on long ones. Scoped with :has()
   so sites without the kit are untouched.
   Fallback (no :has()): the sticky top:100vh trick. It is the
   fallback rather than the default because several sites set
   `overflow-x: hidden` on body, which makes body a scroll container
   and silently breaks sticky. */
body:has(> .neo-footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body:has(> .neo-footer) > .neo-footer { margin-top: auto; }

@supports not (selector(:has(*))) {
  body { min-height: 100vh; min-height: 100dvh; }
  .neo-footer { position: sticky; top: 100vh; }
}

/* Wrapped layouts: when the footer lives inside a wrapper instead of
   directly under <body>, footer.js tags the chain and the same
   column-with-auto-margin applies one level down. */
body.neo-footer-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.neo-footer-host {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.neo-footer-host > .neo-footer { margin-top: auto; }

/* Escape hatch: a site whose layout owns its own bottom (full-screen
   canvas, virtualised scroller) opts out without losing kit styling. */
.neo-footer[data-stick="off"] { margin-top: 0; position: static; }

/* ── Footer shell ─────────────────────────────────────────────── */
.neo-footer {
  width: 100%;
  flex-shrink: 0;
  padding: var(--footer-pad-block) var(--space-6, 24px);
  padding-bottom: calc(var(--footer-pad-block) + env(safe-area-inset-bottom, 0px));
  background: var(--footer-bg);
  border-top: 1px solid var(--_footer-border);
  color: var(--footer-text);
  /* Every size in this file is floored at 12px: reading text under it failed
     the fleet's type floor (queue #154). max() keeps the rem scaling for a
     site whose root runs larger, and only lifts one whose root runs small. */
  font-size: max(12px, .78rem);
  line-height: var(--footer-line);
  text-align: center;
}

.neo-footer-inner {
  max-width: var(--footer-max-w);
  margin: 0 auto;
}

/* Site-authored copy (privacy note, data provenance, disclaimer) */
.neo-footer-note { margin: 0; }
.neo-footer-note + .neo-footer-note { margin-top: 6px; }

/* Links: .neo-footer a is styled broadly so retrofitted markup that
   still uses .footer-link inherits the right treatment for free. */
.neo-footer a {
  color: var(--footer-text);
  text-decoration: none;
  border-radius: 4px;
  transition: color var(--dur, 200ms) ease;
}
.neo-footer a:hover,
.neo-footer a:focus-visible { color: var(--footer-text-strong); text-decoration: underline; }
.neo-footer a:focus-visible { outline: 2px solid var(--_footer-accent); outline-offset: 3px; }

/* ── Meta bar (built by footer.js) ────────────────────────────── */
.neo-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  max-width: var(--footer-max-w);
  margin: 0 auto;
}
/* A row between the copy and the bar must not cost the bar its gap: an
   adjacent-sibling rule alone stops matching the moment anything sits
   between them (an app-mode phone footer lost 14px that way while the row
   was placed there). Declared before the modes, which reset it at equal
   specificity. */
.neo-footer-inner + .neo-footer-bar,
.neo-footer-inner + .neo-more + .neo-footer-bar { margin-top: 14px; }

/* Right-hand cluster in content mode (© stays left) */
.neo-footer-bar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

/* Target size: WCAG 2.5.8 (Minimum, 24x24). Bar links are standalone
   controls in a row, not links inside a sentence, so the inline exception
   does not cover them: they measured ~84x20 and ~37x20.

   Each one is grown to a 24px box and handed the difference straight back as
   negative block margin, so the item's *margin* box still measures exactly one
   line and the bar does not get taller. That matters here more than usual:
   `minimal` is tuned to ~70px against the .info-footer it replaced and `app`
   to ~50px, and this row is what sets both. The text keeps the baseline it
   had; only the hit area grows, ~2px above and below the line.

   min() clamps the compensation at zero, so a site that sets a line taller
   than the 24px minimum keeps its own spacing instead of being pulled tight.
   Sized in em, not px, because `app` mode runs a smaller font than the rest.
   The "More in" row's links are the same kind of standalone control on the
   same line, so they take the same box. In content mode they are a column
   instead, spaced like the link columns (see .neo-footer-col a). */
.neo-footer-bar a,
.neo-footer-bar .neo-footer-disclaimer,
.neo-footer:not([data-footer-mode="content"]) .neo-more__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-target);
  min-width: var(--footer-target);
  margin-block: min(0px, calc((var(--footer-line) * 1em - var(--footer-target)) / 2));
}

.neo-footer-sep { opacity: .4; user-select: none; }

/* The version stamp: mono + tabular so it never jitters */
/* The end mark. Ornament only: it states nothing the page needs, which is
   why it is safe to render in a language most visitors do not read. */
.neo-footer-fin {
  font-style: italic;
  letter-spacing: .08em;
  color: var(--footer-text-dim, var(--header-text-dim));
  opacity: .75;
}

.neo-footer-stamp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: max(12px, .95em);
  opacity: .8;
}

/* ── Mode: minimal (default): the one-liner most tool sites use ──
   The note and the meta bar share ONE centred line whenever they fit,
   and wrap to a second only when the copy is genuinely long. Stacking
   them unconditionally made this mode ~60% taller than the
   `.info-footer` one-liner it is meant to replace. */
.neo-footer[data-footer-mode="minimal"],
.neo-footer:not([data-footer-mode]) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 12px;
}
.neo-footer[data-footer-mode="minimal"] > .neo-footer-inner,
.neo-footer[data-footer-mode="minimal"] > .neo-footer-bar,
.neo-footer:not([data-footer-mode]) > .neo-footer-inner,
.neo-footer:not([data-footer-mode]) > .neo-footer-bar {
  margin: 0;
  font-size: 1em;
}

/* ── Mode: app: slim, low-contrast, stays out of the way ───────── */
.neo-footer[data-footer-mode="app"] {
  padding-top: var(--footer-pad-block-app);
  padding-bottom: calc(var(--footer-pad-block-app) + env(safe-area-inset-bottom, 0px));
  font-size: max(12px, .75rem);
  background: var(--footer-surface);
}
.neo-footer[data-footer-mode="app"] .neo-footer-inner,
.neo-footer[data-footer-mode="app"] .neo-footer-bar {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
}
@media (min-width: 701px) {
  .neo-footer[data-footer-mode="app"] .neo-footer-inner { justify-content: flex-start; }
  .neo-footer[data-footer-mode="app"] .neo-footer-bar { justify-content: flex-end; margin-top: 0; }
  .neo-footer[data-footer-mode="app"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .neo-footer[data-footer-mode="app"] .neo-footer-inner { flex: 1 1 auto; }
  /* A site that turns the row on keeps its one line (note left, bar right)
     and gets the row as a second, left-aligned line: footer.js puts it after
     the bar in app mode, so it needs no reordering. Squeezed into the same
     line it wrapped the note, the row and the bar into three ragged columns. */
  .neo-footer[data-footer-mode="app"][data-footer-more="on"] { flex-wrap: wrap; row-gap: 6px; }
  /* A long note can push the bar onto its own line; it stays at the right. */
  .neo-footer[data-footer-mode="app"][data-footer-more="on"] > .neo-footer-bar { margin-left: auto; margin-right: 0; }
  .neo-footer[data-footer-mode="app"][data-footer-more="on"] > .neo-more {
    flex: 1 0 100%;
    justify-content: flex-start;
  }
  .neo-footer[data-footer-mode="app"][data-footer-more="on"] .neo-more__list { justify-content: flex-start; }
}

/* ── Mode: content: brand block + link columns + bottom bar ──────
   Deliberately the tall one: it carries navigation, not just a note. */
.neo-footer[data-footer-mode="content"] { text-align: left; padding-top: var(--footer-pad-block-content); }
.neo-footer[data-footer-mode="content"] .neo-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 32px;
}
.neo-footer-brand { display: flex; flex-direction: column; gap: 10px; }
.neo-footer-logo {
  height: 28px;
  width: auto;
  align-self: flex-start;
  filter: brightness(0) invert(1);
  opacity: .75;
}
.neo-footer-tagline { margin: 0; max-width: 34ch; }

.neo-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
}
.neo-footer-col { display: flex; flex-direction: column; gap: 8px; }
.neo-footer-col h2,
.neo-footer-col h3 {
  margin: 0 0 2px;
  font-size: max(12px, .75rem);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--footer-text-strong);
}
.neo-footer-col a { line-height: 1.5; }

.neo-footer[data-footer-mode="content"] .neo-footer-bar {
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--_footer-border);
}

/* ── More in <category> (stamped by scripts/fleet_stamp.py) ─────
   Sibling tools from the registry, between <!-- neo-fleet:more -->
   markers in the page. footer.js lifts the row out of the copy and puts
   it between the copy and the bar (minimal, app) or among the columns
   (content).

   It wears the footer's own tokens, nothing else: a header skin, an
   armed season and a visitor theme re-skin it with the rest of the
   footer. The category is told by its icon and its label, never by a
   category colour, which stays on the hub's board.

   In minimal mode it is one more item of the footer's wrapping row, so
   on a wide screen with a short note the whole footer is still one line
   inside the ~70px budget, and it takes a line of its own only when the
   copy is long. Measured in tests/footer-more-browser.mjs. */
.neo-more {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 10px;
  margin: 0;
}
.neo-footer[data-footer-mode="minimal"] > .neo-more,
.neo-footer:not([data-footer-mode]) > .neo-more { margin-inline: 6px; }

.neo-more__label {
  display: inline-flex;
  /* Baseline, so the row lines up on the words and not on the icon's
     bottom edge, which is where an svg's baseline is synthesised. */
  align-items: baseline;
  gap: 6px;
  color: var(--footer-text-strong);
  font-weight: 600;
  white-space: nowrap;
}
/* The stamp also writes width/height 16 on the <svg>, so a page whose
   stylesheet predates the row never draws it at the browser's 300x150. */
.neo-more__icon {
  flex: none;
  align-self: center;
  width: 1.2em;
  height: 1.2em;
}

.neo-more__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.neo-more__list li { display: inline-flex; align-items: center; }
/* Names run to two words ("Glass Box", "Prompt Forge"), so the items need a
   mark between them. A drawn dot, not a "·", because generated text is read
   aloud; and only while the row sits on one line: on a phone it wraps, and
   a dot would open the second line. There the gap does the separating. */
.neo-more__list li + li::before {
  content: "";
  flex: none;
  width: 3px;
  height: 3px;
  margin: 0 9px;
  border-radius: 50%;
  background: currentColor;
  opacity: .45;
}

/* App mode is the slim one: the row is off unless the site asks for it.
   Any mode can opt out. The markup stays, hidden, for the header kit. */
.neo-footer[data-footer-mode="app"]:not([data-footer-more="on"]) .neo-more,
.neo-footer[data-footer-more="off"] .neo-more { display: none; }

/* Content mode: one more column, headed like the others. */
.neo-footer[data-footer-mode="content"] .neo-more {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}
.neo-footer[data-footer-mode="content"] .neo-more__label {
  margin: 0 0 2px;
  font-size: max(12px, .75rem);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.neo-footer[data-footer-mode="content"] .neo-more__list {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
}
.neo-footer[data-footer-mode="content"] .neo-more__list a { line-height: 1.5; }
.neo-footer[data-footer-mode="content"] .neo-more__list li + li::before { content: none; }

/* ── Theme switcher (opt-in: <meta name="neo-theme-switcher" content="footer">) */
.neo-footer-theme { position: relative; display: inline-flex; }
.neo-footer-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--footer-control-h);
  padding: 0 10px;
  border: 1px solid var(--_footer-border);
  border-radius: 999px;
  background: transparent;
  color: var(--footer-text);
  font: inherit;
  cursor: pointer;
  transition: color var(--dur, 200ms), border-color var(--dur, 200ms), background var(--dur, 200ms);
}
.neo-footer-theme-toggle:hover,
.neo-footer-theme-toggle[aria-expanded="true"] {
  color: var(--footer-text-strong);
  border-color: var(--_footer-border-strong);
  background: var(--_footer-hover);
}
.neo-footer-theme-toggle svg { width: 15px; height: 15px; display: block; }

.neo-footer-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--header-menu-bg, #10142a);
  border: 1px solid var(--_footer-border-strong);
  border-radius: 10px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .5);
  display: none;
  text-align: left;
  z-index: 2;
}
.neo-footer-menu.open { display: block; }
.neo-footer-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--header-text, #f9f9f9);
  font: inherit;
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
}
.neo-footer-menu button:hover,
.neo-footer-menu button:focus-visible { background: var(--_footer-hover); outline: none; }
.neo-footer-menu .theme-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .25);
}
.neo-footer-menu [aria-checked="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--_footer-accent);
}

/* ── Back to top (built by footer.js; data-footer-top="off" disables) ──
   Riding above the footer. The button is fixed in the bottom-right corner,
   and at the foot of the page that corner is the footer's: it sat on
   floorplan's v1.0.0 stamp at 390px, and on the right end of the bar or the
   note in every mode somewhere between 390 and 1440px (84 of 283 fleet views,
   2026-11-12). Over a bar link it then stepped aside, so it vanished exactly
   where a reader wants it. footer.js writes how much of the footer is on
   screen into --_footer-top-lift, and the button rests that far up plus
   --footer-top-gap, never lower than its corner. The footer keeps its layout
   and its height budget; reserving room inside the bar instead cost 13 fleet
   views a line, minimal one-row footers among them. */
.neo-top {
  position: fixed;
  right: var(--footer-top-inset);
  bottom: max(calc(var(--footer-top-inset) + env(safe-area-inset-bottom, 0px)),
              calc(var(--_footer-top-lift, 0px) + var(--footer-top-gap)));
  z-index: var(--footer-z-top);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--footer-top-size);
  height: var(--footer-top-size);
  padding: 0;
  border: 1px solid var(--_footer-border-strong);
  border-radius: 50%;
  background: var(--header-menu-bg, #10142a);
  color: var(--footer-text-strong);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  /* visibility waits out the fade before it flips, so for 200ms a leaving
     button would still take the tap it is leaving to avoid. pointer-events
     flips at once. footer.js also hides it (.is-yielding) while it sits over
     a control; see "Yielding" there. */
  pointer-events: none;
  transition: opacity var(--dur, 200ms) ease, transform var(--dur, 200ms) ease, visibility var(--dur, 200ms);
}
.neo-top.is-visible { opacity: .9; visibility: visible; transform: none; pointer-events: auto; }
.neo-top:hover { opacity: 1; background: var(--_footer-hover); color: var(--header-text, #f9f9f9); }
.neo-top:focus-visible { outline: 2px solid var(--_footer-accent); outline-offset: 3px; opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.neo-top svg { width: 18px; height: 18px; display: block; }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
  :root { --footer-top-size: 38px; --footer-top-inset: 14px; }
  .neo-footer { padding-left: var(--space-4, 16px); padding-right: var(--space-4, 16px); }
  .neo-footer[data-footer-mode="content"] {
    text-align: center;
    padding-top: 32px;
  }
  .neo-footer[data-footer-mode="content"] .neo-footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .neo-footer-brand { align-items: center; }
  .neo-footer-logo { align-self: center; }
  .neo-footer-tagline { max-width: none; }
  .neo-footer-col { align-items: center; }
  .neo-footer[data-footer-mode="content"] .neo-footer-bar { justify-content: center; }
  /* App mode stacks here instead of sharing a line: a row the site turned on
     comes after the bar, with the same breathing room the bar has. */
  .neo-footer[data-footer-mode="app"] > .neo-footer-bar + .neo-more { margin-top: 12px; }
  /* The row wraps here: the gap separates the names instead of the dots. */
  .neo-more__list { gap: 2px 16px; }
  .neo-more__list li + li::before { content: none; }
  /* Content mode on a phone: a column of six links stacked one per line
     cost ~180px under the site's own columns, so the row becomes a full-width
     block that wraps like the minimal one. 8px between lines keeps the links
     26.7px apart, the same spacing exception the link columns rely on. */
  .neo-footer[data-footer-mode="content"] .neo-more {
    grid-column: 1 / -1;
    align-items: center;
  }
  .neo-footer[data-footer-mode="content"] .neo-more__list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .neo-footer a,
  .neo-footer-theme-toggle,
  .neo-top { transition: none; }
  .neo-top { transform: none; }
}

/* ── Disclaimer: bar trigger + modal (built by footer.js) ──────
   The trigger is a <button> that has to sit in a row of <a>s without
   announcing itself as the odd one out, so it borrows the link treatment
   rather than the kit's control treatment. */
.neo-footer-disclaimer {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--footer-text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  border-radius: 4px;
  transition: color var(--dur, 200ms) ease;
}
.neo-footer-disclaimer:hover,
.neo-footer-disclaimer:focus-visible {
  color: var(--footer-text-strong);
  text-decoration-style: solid;
}
.neo-footer-disclaimer:focus-visible { outline: 2px solid var(--_footer-accent); outline-offset: 3px; }

.neo-modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(78dvh, 640px);
  /* Centring is declared, not inherited. showModal() centres via the UA's
     `margin: auto` on inset:0, and any site carrying a `* { margin: 0 }`
     reset beats the UA sheet and pins the dialog to the top-left (affinity
     did exactly that). Too site-dependent to leave implicit. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--_footer-border-strong);
  border-radius: 12px;
  background: var(--header-bg-end, #0d0d12);
  color: var(--footer-text-strong);
  overflow: hidden;
}
/* A <dialog> is display:none until opened; showModal() flips it to the
   UA default (block), so the flex layout has to be scoped to [open] or
   the closed dialog counts as shown. */
.neo-modal[open] { display: flex; flex-direction: column; }
.neo-modal::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(2px); }

.neo-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--_footer-border);
}
.neo-modal-title {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .01em;
  color: var(--footer-text-strong);
}
.neo-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--footer-control-h);
  height: var(--footer-control-h);
  padding: 0;
  border: 1px solid var(--_footer-border-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--footer-text);
  cursor: pointer;
  transition: color var(--dur, 200ms) ease, background var(--dur, 200ms) ease;
}
.neo-modal-close:hover { color: var(--footer-text-strong); background: var(--_footer-hover); }
.neo-modal-close:focus-visible { outline: 2px solid var(--_footer-accent); outline-offset: 2px; }
.neo-modal-close svg { width: 18px; height: 18px; display: block; }

.neo-modal-body {
  padding: 18px;
  overflow-y: auto;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--footer-text);
}
.neo-modal-body > :first-child { margin-top: 0; }
.neo-modal-body > :last-child { margin-bottom: 0; }
.neo-modal-body p { margin: 0 0 .9em; }
.neo-modal-body strong { color: var(--footer-text-strong); font-weight: 620; }
.neo-modal-body a { color: var(--_footer-accent); text-decoration: underline; }

@media (max-width: 700px) {
  .neo-modal { width: calc(100vw - 20px); max-height: 84dvh; }
}

/* ── Print: the footer is the only place a printed page can show
   provenance, so expand link URLs and drop the floating control. ── */
@media print {
  /* The row is navigation, and paper goes nowhere: printed, its six links
     would each expand into a URL under the provenance it exists beside. */
  .neo-top, .neo-footer-theme, .neo-more { display: none !important; }

  /* Provenance must survive the move into the dialog. On paper there is
     nothing to click, so the trigger goes and the copy itself comes back,
     laid out in flow at the end of the document rather than as an overlay. */
  .neo-footer-disclaimer, .neo-modal-close { display: none !important; }
  .neo-modal {
    display: block !important;
    position: static;
    width: auto;
    max-height: none;
    border: 0;
    border-top: 1px solid #999;
    border-radius: 0;
    background: none;
    color: #000;
    overflow: visible;
  }
  .neo-modal::backdrop { display: none; }
  .neo-modal-head { border-bottom: 0; padding: 12px 0 0; }
  .neo-modal-body { padding: 0; color: #000; }

  .neo-footer {
    color: #000;
    border-top: 1px solid #999;
    background: none;
    page-break-inside: avoid;
  }
  .neo-footer a { color: #000; text-decoration: underline; }
  /* Paper has no pointers, so the 24px target boxes come off, and they have
     to: inside an inline-flex link the expanded href below would be laid out
     as a second flex item beside the label instead of flowing after it. */
  .neo-footer-bar a {
    display: inline;
    min-height: 0;
    min-width: 0;
    margin-block: 0;
  }
  .neo-footer a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .9em;
    word-break: break-all;
  }
}

/* The outbound arrow on a footer link. Sized in em so it tracks the label at
   whatever size a site's footer runs, and nudged up off the baseline because a
   45-degree arrow reads low when it is optically centred. */
.neo-footer-out { display: inline-block; vertical-align: -0.05em; margin-left: 0.28em; width: 0.72em; height: 0.72em; opacity: 0.75; }
.neo-footer a:hover .neo-footer-out, .neo-footer a:focus-visible .neo-footer-out { opacity: 1; }
