/* design-system: page-library v1 | foot.css */
/* chrome/foot.css: the estate foot's sheet, as the package ships it.
 *
 * ONE ROW, FOUR ITEMS, AND NOTHING UNDER IT, and no import of the design system: the footer's link sits at the
 * END of the body, so a library `:root` landing there wins over the page's own token sheet. Measured on
 * `zpe.vc/privacy`: unlayered it flipped `--ink` light while the page's dark panels stayed dark, 205 text runs
 * below their contrast floor. Layered it stopped the palette and not the components. So this sheet reads four
 * colour names and one font name, each with a fallback, and carries no `@import` at all — which
 * `tools/chrome_check.py` asserts, for the same reason the rule exists.
 *
 * `zpe-nav/public/zpe-foot.css` is the source; the rules below are that file's, unchanged.
 */
/*
 * 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;
}

.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;
}
