/*
 * zpe-foot.css: one row, four items, and nothing under it.
 *
 * THE SHAPE (owner, 2026-11-01: "even more minimal"): the operator's name, then the three papers, on one
 * line, in the page's own ink. No wordmark (the bar carries the mark), no slogan, no group heading, no
 * copyright line and no second row: each of those repeated something the row already said, on every page
 * in the estate.
 *
 * NOTHING SITS BELOW IT (owner, 2026-11-01: "at the bottom of the page with nothing below it, no space").
 * The page's own `min-height: 100svh` leaves spare height under the copy, so the document is one column
 * that ends at the footer, and the footer takes that spare height to sit on the viewport floor. The sheet's
 * bottom padding is gone for the same reason: the last pixel of the page is the last line of text.
 *
 * NO PALETTE LITERALS, AND NO IMPORTED PALETTE EITHER: the sheet reads four colour names (--ink, --muted, --line,
 * --accent) and one font name (--font-sans), and every one carries a fallback that keeps the page's own ink:
 * `inherit` for text and font, `currentColor` on the two rules that draw a line and a focus ring, because a border
 * and an outline have no text to inherit. The guard on the bar's sheet counts hex codes and this sheet carries none.
 *
 * THE VENDORED LIBRARY IS NOT IMPORTED HERE (2026-11-01). It used to be, and it is a whole design system in one
 * file: its `:root` palette and its component rules both land on the adopting page. Measured on `zpe.vc/privacy`,
 * whose footer link sits at the END of the body: unlayered it landed after the page's own token sheet and won,
 * flipping `--ink` to a near-black while the page's dark panels stayed dark, which left 205 runs of text (the score
 * band, every request row, every table) at about 1:1 contrast. Layered it stopped the palette and not the
 * components: the library's own `th` rule painted `--sunken`, a near-white cell, under the page's light ink. This
 * footer needs none of it: four colour names are defined by every adopter's own sheet, --font-sans is defined by
 * some and inherited by the rest, and the fallbacks carry both cases. A page that defines no palette gets a footer
 * in its own text colour, which is the point, and a page whose ink is a bare UA default gets that too, which is
 * why zpe-newsletter's embed page now sets an explicit body colour.
 *
 * The column rule is guarded by `:has()`, so it applies to the page that mounts the footer and touches no
 * page that merely loads the sheet.
 */

body:has([data-zpe-foot]) {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* THE SLACK GOES TO THE CONTENT, NOT TO THE ROW. With `margin-top: auto` alone the spare height landed between a
 * page's own <footer> and this row, which is a 302px hole on the thirteen adopters that close with a footer of
 * their own (measured 2026-11-01 in Chrome at 1280x577: the app footer ended at y=213 and the row began at y=515).
 * Growing the reading column instead keeps the page's close tight under its content and puts both blocks on the
 * floor together. */
body:has([data-zpe-foot]) > main,
body:has([data-zpe-foot]) > .mk {
  flex: 1 0 auto;
}

.zpe-foot {
  margin: 0;
  padding: 2.25rem 1.25rem 0;
  border-top: 1px solid var(--line, currentColor);
  font-family: var(--font-sans, inherit);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted, inherit);
}

.zpe-foot-row {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}

.zpe-foot-name {
  color: var(--ink, inherit);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* THE MARK, WHEN A PAGE PUTS ONE IN THE ROW.
 *
 * zpe.vc's door does: `index.html`, `src/home/page.ts` and `src/notfound/page.ts` each open the row with the
 * three-bar Z as an `<svg class="zpe-foot-name zpe-foot-mark">`, and each links THIS sheet by its zone address
 * rather than a vendored copy. The row aligns on BASELINE, which is right for text and wrong for a mark twice the
 * cap height: an SVG's baseline is its bottom edge, so the mark's bottom edge lands on the text baseline and the
 * mark rides that far above the line.
 *
 * MEASURED 2026-11-04: no sheet in the door's cascade carried this rule - not this one, not `/_/chrome/bar.css`,
 * and not the Vite entry's CSS - so the mark was unstyled on every page that draws it, while the design package's
 * `chrome/foot.css` had carried it since the owner merged the door's footer into the shared row. Centring is the
 * only correction needed, and it belongs here rather than in an inline `style=""` attribute, because the door's
 * not-found page forbids inline styles in the body outright (src/notfound/page.ts, and its suite asserts it).
 *
 * INERT FOR EVERY ROW THAT DOES NOT USE IT: this rule paints nothing on a page whose row has no mark, which is
 * every adopter that does not put one there. A page that wants its operator's mark states it as
 * `class="zpe-foot-mark"` and gets the row's ink without naming a colour. */
.zpe-foot-mark {
  flex: none;
  align-self: center;
  color: var(--ink, inherit);
}

.zpe-foot-dot {
  color: var(--muted, inherit);
  user-select: none;
}

.zpe-foot-link {
  color: var(--muted, inherit);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  /* A tap target, not a text node: build-offer's gate measures every control and refuses one under
   * 24x24 CSS px, and a 19px line of link text is exactly that. The padding buys the height without
   * moving the baseline, because the row aligns on baseline. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.zpe-foot-link:hover,
.zpe-foot-link:focus-visible {
  color: var(--ink, inherit);
  border-bottom-color: currentColor;
}

.zpe-foot-link:focus-visible {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: 3px;
}

@media (max-width: 32rem) {
  .zpe-foot { padding: 1.75rem 1rem 0; }
  .zpe-foot-row { gap: 0.4rem; }
  .zpe-foot-dot { display: none; }
}

/* A page that cannot run a script gets the same four items as one sentence, so a reader without
 * JavaScript is not left without the operator's name or the way to the papers. */
.zpe-foot-noscript {
  display: block;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted, inherit);
}

.zpe-foot-noscript a {
  color: inherit;
}

/* THE PROVENANCE LINE (owner, 2026-11-06: "can we put it in the footer of the estate ... I know it would look
 * better"). It is the second line and the LAST one: the row says who this is, this says whether the page can be
 * checked, and nothing follows it. Same two names as the row and the same fallbacks, no new palette, no rule of its
 * own above it: the footer must not start growing borders a page did not ask for. */
.zpe-foot-prov {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  max-width: 72rem;
  /* NO HORIZONTAL PADDING: .zpe-foot already pads 1.25rem and .zpe-foot-row centres its 72rem, so a second
   * inset indented this line 20px inside the row it belongs under (measured 2026-11-06 at 1440). */
  margin: 0.45rem auto 0;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--muted, inherit);
}

.zpe-foot-prov-what[hidden] {
  display: none;
}

.zpe-foot-prov-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.zpe-foot-prov-link:hover {
  color: var(--ink, inherit);
}

.zpe-foot-prov-link:focus-visible {
  outline: 2px solid var(--accent, currentColor);
  outline-offset: 3px;
}

@media (max-width: 32rem) {
  .zpe-foot-prov {
    font-size: 0.72rem;
  }
}

/* A dot with nothing to its left is a line starting with a middot: the version span is empty until a manifest
 * answers, so the separator waits for it. */
.zpe-foot-prov-what[hidden] + .zpe-foot-dot {
  display: none;
}
