/* ==========================================================================
   Vivah · the one header and the one footer
   --------------------------------------------------------------------------
   🔑 ONE HEADER AND ONE FOOTER FOR THE WHOLE SITE — every public page AND the
   React application, before sign-in and after it. The markup is two Twig
   partials, templates/public/_site_header.html.twig and _site_footer.html.twig,
   and this file is their design. Signing in changes the MENU; it never changes
   the header.

   It is a file of its own because the application's page cannot load site.css.
   That file's base rules restyle `body`, `a`, `button`, `p` and every heading,
   and around the application they would repaint screens drawn with Tailwind. So
   everything here is scoped to the chrome's own class names — none of which the
   application uses — and the few element rules the chrome needs are written
   under `.site-header` and `.site-footer` rather than against the document.

   Every value is a var(--token) from tokens.css, which both pages load.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. frame */

/*
 * 🔴 `hidden` MUST BEAT EVERY `display` RULE ON THE PAGE.
 *
 * The header hides one of its two menus and one of its two sets of actions with the HTML
 * attribute, and the mobile panel is `hidden` until the burger is pressed — but
 * `.nav-panel { display: grid }` and `.nav-auth { display: flex }` are both more specific
 * than the user-agent's `[hidden] { display: none }`. Without this, a desktop page renders
 * the mobile menu expanded under the header and offers Sign in and Dashboard at the same
 * time, which is exactly how it shipped the first time.
 */
[hidden] {
  display: none !important;
}

body.is-locked {
  overflow: hidden;
}

/*
 * 🔑 THE HEADER'S HEIGHT, AS ONE VALUE EVERY PAGE CAN READ. The bar is `--layout-header-h`
 * tall at the top of a page and shrinks once the page has moved; anything pinned under it —
 * the bio-data form's progress bar — reads `--site-header-h` and follows it down and back.
 * The shrink used to be a rule on `.is-scrolled > .wrap` that nothing outside the header
 * could see.
 */
:root {
  --site-header-h: var(--layout-header-h);
  /* The fixed header would otherwise cover the heading an in-page link jumps to. */
  scroll-padding-top: calc(var(--layout-header-h) + var(--space-4));
}

:root:has(.site-header.is-scrolled) {
  --site-header-h: 68px;
}

/*
 * The application's page: the header is out of flow, so the app's mount point makes room
 * for it — what `main { padding-top }` in site.css does for the public pages.
 */
.site-body {
  padding-top: var(--layout-header-h);
}

/*
 * 🔴 AROUND THE APPLICATION, THE FOOTER IS NEVER THE SCROLL ANCHOR. On a phone it is taller
 * than the screen, so a devotee flicked to the end of search sees only the footer, and
 * Chrome anchored to it: each page of results landed above and the footer stayed put, the
 * load-more sentinel never left range, and infinite scroll stopped at forty cards. Unanchored,
 * a new page appears under the devotee instead, as it did when the app drew its own short
 * footer. The sentinel is excluded as well — assets/features/search/useSearch.ts.
 */
.site-body ~ .site-footer {
  overflow-anchor: none;
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  background: var(--bg-raised);
  color: var(--brand-primary-800);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3);
  transition: top var(--duration-base) var(--ease-standard);
}

.skip:focus {
  top: var(--space-4);
}

/*
 * 🔴 NO BLUE FLASH UNDER A TAP (2026-10-11). The owner reported that tapping the footer logo
 * on a phone showed "a blue patch". That is the browser's own tap highlight: Chrome on
 * Android paints a translucent blue box over whatever is tapped, and on this cream page it
 * looked like a fault. It is off for the whole document, here because every page loads this
 * file. Every control has its own pressed or hover state, and the keyboard focus ring is not
 * affected.
 */
html {
  -webkit-tap-highlight-color: transparent;
}

/*
 * 🔑 THE CHROME SETS ITS OWN TYPE. It used to inherit it from site.css's `body`, and the
 * application's `body` is set smaller and tighter — so without this the one header would
 * be drawn at two sizes, depending on which side of sign-in the page was.
 */
.site-header,
.site-footer,
.nav-panel {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  font-variation-settings: var(--vary-body);
  line-height: var(--leading-relaxed);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

/* The element rules the chrome relies on, which site.css gives the public pages globally
   and the application's page does not. `:where()` keeps them as weak as the originals.
   `.nav-panel` is listed with the header because the phone's drawer is its sibling, not its
   child — see "the phone's menu" below. */
:where(.site-header, .site-footer, .nav-panel) *,
:where(.site-header, .site-footer, .nav-panel) *::before,
:where(.site-header, .site-footer, .nav-panel) *::after {
  box-sizing: border-box;
}

:where(.site-header, .site-footer, .nav-panel) a {
  color: inherit;
  text-decoration: none;
}

:where(.site-header, .site-footer, .nav-panel) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:where(.site-header, .site-footer, .nav-panel) img {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(.site-header, .site-footer, .nav-panel) :where(h2, p, ul, form) {
  margin: 0;
}

:where(.site-header, .site-footer, .nav-panel) :focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.wrap {
  width: 100%;
  max-width: var(--layout-content-max);
  margin-inline: auto;
  padding-inline: var(--layout-gutter);
}

.wrap--narrow {
  max-width: 880px;
}

/* ------------------------------------------------------------- 2. controls */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--layout-tap-target);
  padding: var(--space-3) var(--space-8);
  /*
   * 🔑 THE GILDED PILL (2026-10-08) — AND IT REVERSES AN EARLIER DECISION, DELIBERATELY.
   * This rule used to say "nearly square, not a pill": a 12px letterspaced capital label in
   * a rectangle, after the first reference's "RSVP". The owner has since pointed at a
   * devotee matrimony site whose buttons he prefers — soft, rounded, a serif label in
   * sentence case, a gold edge — and asked for a style of our own in that spirit.
   *
   * So: a full pill; the label in the display face at reading size, because a button that
   * says "Create your bio-data" should read as a sentence and not as a stamp; a gold
   * hairline set just inside the edge, which is what makes it ours rather than anybody's
   * rounded button; and a band of light that crosses it once when the pointer arrives.
   * The fill is unchanged — `gradient-brand` is still the lightest rose that carries ivory
   * type at 4.5:1, and the gold ring is 1px, so it moves no contrast figure.
   */
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  font-variation-settings: var(--vary-display-medium);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--text-inverse);
  background-color: var(--brand-primary-700);
  background-image: var(--gradient-brand);
  border: 1px solid var(--brand-primary-800);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-brand), inset 0 0 0 1px color-mix(in srgb, var(--brand-accent-on-brand) 62%, transparent),
    inset 0 2px 0 var(--sheen-brand), inset 0 -2px 0 var(--sheen-brand-shade);
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-standard),
    background-color var(--duration-base) var(--ease-standard);
}

/*
 * The band of light. It waits off the left edge and crosses once on hover — `translate`,
 * per this stylesheet's rule, and behind the label (`z-index: -1` inside the button's own
 * stacking context) so the words never dim as it passes.
 */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, var(--sheen-brand) 50%, transparent 70%);
  translate: -120% 0;
  pointer-events: none;
}

.btn:hover::after {
  translate: 120% 0;
  transition: translate 900ms var(--ease-out);
}

.btn:hover {
  background-image: var(--gradient-brand-hover);
  transform: translateY(-2px);
}

/* An arrow or an icon inside a button leans forward with it. */
.btn svg {
  flex-shrink: 0;
  transition: translate var(--duration-base) var(--ease-out);
}

.btn:hover svg {
  translate: 3px 0;
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inset-well);
}

/* The ink button — the second action in a pair, where two roses would compete. */
.btn--ink {
  color: var(--text-inverse);
  background-image: none;
  background-color: var(--brand-secondary-700);
  border-color: var(--brand-secondary-700);
  box-shadow: var(--shadow-2), inset 0 0 0 1px color-mix(in srgb, var(--brand-accent-on-brand) 50%, transparent);
}

.btn--ink:hover {
  background-image: none;
  background-color: var(--text-secondary);
}

/*
 * The second button of a pair: cream, with the gold edge doing the work the fill does on
 * the first. It was a transparent box with a grey border, which beside a rose pill read as
 * a disabled one.
 */
.btn--outline {
  color: var(--brand-secondary-700);
  background-image: none;
  background-color: var(--bg-surface);
  border-color: var(--brand-accent-500);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--sheen-top);
}

.btn--outline::after {
  background: linear-gradient(105deg, transparent 30%, var(--brand-accent-200) 50%, transparent 70%);
}

/* 🔴 `background-image: none` IS THE FIX (owner's screenshot, 2026-10-08). `.btn:hover` paints
   the maroon gradient as an IMAGE, which sits over any background-COLOUR — so a hovered
   outline button turned maroon under its maroon words and could not be read. */
.btn--outline:hover {
  color: var(--brand-primary-800);
  background-image: none;
  background-color: var(--bg-surface);
  border-color: var(--brand-accent-600);
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--sheen-top);
}

/* The header's button: the same pill, a size down, so the bar is not all button. */
.btn--sm {
  min-height: 0;
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

@media (prefers-reduced-motion: reduce) {
  .btn::after {
    display: none;
  }
  .btn:hover,
  .btn:hover svg {
    transform: none;
    translate: none;
  }
}

.btn--wide {
  width: 100%;
}

/* A label that wraps inside a narrow column wraps centred, not ragged-left. */
.btn {
  text-align: center;
}

/*
 * In the header a button never wraps. "Register free" broke onto two lines at 390px and
 * the pill doubled in height, crowding the wordmark it sits beside. The tagline under the
 * wordmark gives way instead on the narrowest phones — it is the least necessary thing in
 * the bar, and the register button is the most.
 */
.site-header .btn {
  white-space: nowrap;
}

@media (max-width: 30rem) {
  .site-header .brand-tag {
    display: none;
  }
  .site-header .btn--sm {
    padding-inline: var(--space-4);
  }
}

.link-quiet {
  color: var(--text-secondary);
  transition: color var(--duration-base) var(--ease-standard);
}

.link-quiet:hover {
  color: var(--brand-primary-800);
}

/* --------------------------------------------------------------- 3. header */

/*
 * FIXED, NOT STICKY, and `main` carries a matching padding-top (`.site-body` on the
 * application's page).
 *
 * Sticky keeps the header in flow, so the banner started below it — and the header's own
 * pale scrim met the banner's blush wash in a hard horizontal seam directly under the
 * wordmark. Out of flow, the banner runs to the top of the viewport and the header is
 * genuinely transparent over it, which is the whole effect.
 *
 * 🔴 `z-index: 40`, UNDER THE APPLICATION'S LAYERS. It was 100, which is above every dialog,
 * sheet, popover and select list the app opens (50) and its toasts (60): a dialog's backdrop
 * would have dimmed the page and left the header bright and clickable on top of it. Nothing on
 * the public pages sits between 3 and 200, so 40 changes nothing there.
 *
 * 🔴 THE RIGHT EDGE FOLLOWS THE SCROLL LOCK. A select or a dialog in the app locks the page
 * (react-remove-scroll-bar, under Radix): the scrollbar goes, and the body is given a margin
 * the width of it so nothing in the page moves — but a FIXED header spans the viewport, not
 * the body, so it grew into the gap and its menu slid sideways every time a dropdown opened
 * (2026-10-06). While locked, the library sets --removed-body-scroll-bar-size on <body>.
 */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  right: var(--removed-body-scroll-bar-size, 0px);
  z-index: 40;
  transition: background-color var(--duration-slow) var(--ease-standard),
    box-shadow var(--duration-slow) var(--ease-standard);
}

/*
 * Transparent over the banner, glass once the page has moved.
 *
 * The gradient scrim rather than nothing at all: the banner behind it is a pale
 * wash with an illustration in it, and dark nav text over the illustration's
 * lighter areas is the one place this design can lose contrast.
 */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg-band-blush) 96%, transparent),
    color-mix(in srgb, var(--bg-band-blush) 0%, transparent)
  );
  transition: opacity var(--duration-slow) var(--ease-standard);
  pointer-events: none;
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.site-header.is-scrolled {
  background: var(--glass-bg);
  box-shadow: 0 1px 0 var(--border-subtle);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.is-scrolled {
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  }
}

/*
 * 🔑 THREE TRACKS: BRAND LEFT, NAV CENTRED, ACTIONS RIGHT.
 *
 * ⚠️ THIS REVERSES AN EARLIER DECISION, DELIBERATELY. The rule here used to say "NOT
 * space-between, which floats the nav in the middle of the bar" — the nav sat tight
 * against the wordmark with the actions pushed away by `margin-left: auto`. Sujay's
 * review asked for the reference's arrangement, where the pages ARE in the middle.
 *
 * A grid rather than the reference's `space-between`, because space-between only centres
 * the nav when the two things either side happen to be the same width — and ours are
 * not: the wordmark carries a tagline and the actions are one button. `1fr auto 1fr`
 * centres the nav against the BAR, whatever is beside it, which is what the eye reads as
 * centred. Below 60rem `.nav-links` is `display: none`, the middle track collapses to
 * zero, and the brand and the burger fall to the two edges — which is right there too.
 */
.site-header > .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  /* 92px at the top of a page, 68px once it has moved — see `--site-header-h` above. */
  height: var(--site-header-h);
  transition: height var(--duration-slow) var(--ease-standard);
}

/*
 * 🔴 EXPLICIT TRACKS, BECAUSE THE NAV DISAPPEARS. Below 60rem `.nav-links` is
 * `display: none`, and a hidden grid child takes no track — so auto-placement moved the
 * actions into the MIDDLE track, and the register button and the burger sat in the centre
 * of the bar on every phone. Pinned, the actions stay in the last track whatever is drawn.
 */
.site-header > .wrap > .brand {
  grid-column: 1;
}

.site-header > .wrap > .nav-links {
  grid-column: 2;
}

.site-header > .wrap > .nav-actions {
  grid-column: 3;
}

/* `min-height`: the lock-up is a link home, and on a phone the name alone is ~33px tall —
   under the 44px tap target e2e/responsive-sweep.spec.ts holds every control to. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  min-height: var(--layout-tap-target);
  color: var(--brand-secondary-700);
}

.brand-mark {
  flex-shrink: 0;
  color: var(--brand-primary-700);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

/*
 * The wordmark is the biggest thing in the bar, and that is the reference's own
 * proportion: its logo is set at 34px beside a 12px nav, so the name reads as the name
 * and the navigation reads as navigation. Ours was 25px against a 14px nav — under three
 * points of difference, which is why the two competed and neither won.
 *
 * Letter-spacing goes back to normal with it. Cormorant is a high-contrast old-style face
 * drawn tight; tracking it out at display size is what made the wordmark read as a label.
 */
/*
 * The reference sets its logo at 34px. `2.4vw` lands on exactly that at a 1440px window
 * and scales either side of it, between the two type-scale steps that bracket it — 31px
 * and 39px — so the wordmark is bigger than the 31px ceiling it used to hit while still
 * being bounded by the scale rather than by a number typed off a screenshot.
 */
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 2.4vw, var(--text-3xl));
  letter-spacing: var(--tracking-normal);
}

.brand-tag {
  font-size: 0.625rem;
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-accent-600);
}

/*
 * 🔑 THE WORDMARK (2026-10-10). The owner's logo is a picture of the name — "Sacred Vivah", the
 * peacock feather and the gold swash — so it is sized by HEIGHT and its width follows the
 * artwork's own 2.28:1. In the bar it follows `--site-header-h` with 22px of air: 70px tall in
 * the 92px bar at the top of a page, 46px once the bar has shrunk to 68px, and it shrinks with
 * the bar rather than snapping.
 *
 * `max-width: none`, because the application's Tailwind preflight gives every <img>
 * `max-width: 100%` and a flex child capped by its column shrinks its HEIGHT with it — the
 * logo would come out shorter on exactly the screens with the least room to spare.
 */
.brand-wordmark {
  display: block;
  width: auto;
  max-width: none;
  height: 64px;
}

.site-header .brand-wordmark {
  height: calc(var(--site-header-h) - 22px);
  transition: height var(--duration-slow) var(--ease-standard);
}

.nav-panel-head .brand-wordmark {
  height: 44px;
}

/* The tagline under the wordmark starts where the lettering does, not at the feather's curl
   that is the artwork's left edge — flush with that, it reads as indented by mistake. */
.brand--wordmark .brand-tag {
  margin-top: var(--space-2);
  padding-left: 13%;
}

/* The reference spaces its nav by a real gap (16–34px) rather than by padding inside
   each link, which is what lets the words sit as words instead of as adjacent buttons. */
.nav-links {
  display: none;
  align-items: center;
  gap: clamp(var(--space-4), 2vw, var(--space-8));
}

@media (min-width: 60rem) {
  .nav-links {
    display: flex;
  }
}

/*
 * 🔑 UPPERCASE AT 12px ON 0.2em — the reference's nav exactly, and `--tracking-wider`
 * IS 0.2em, so this is the token rather than a number copied off a screenshot.
 *
 * Sentence case at 14px was the single biggest reason the header did not read like the
 * reference: lower-case words in the body face at nearly reading size look like prose
 * that happens to be at the top of the page. Letterspaced small caps read as navigation
 * at a glance, which is the whole job of a nav bar.
 *
 * The ink is `brand.secondary-700` rather than `text.secondary` for the same reason the
 * reference's is `--ink`: a nav that is quieter than the paragraph under it inverts the
 * hierarchy. At 12.38:1 on the canvas it is the strongest pair in the palette.
 */
/*
 * 🔴 `font-weight` ALONE DOES NOTHING HERE, AND THAT IS WHY THE NAV LOOKED WRONG.
 *
 * Jost is a VARIABLE font, and `body` in tokens.css sets
 * `font-variation-settings: var(--vary-body)` — `'wght' 300`. That property inherits to
 * every element and BEATS `font-weight` on a variable face, so the nav rendered at 300
 * however it was weighted. The reference sets a plain `font-weight: 400` over a 300 body
 * and gets 400, because it never uses variation settings at all.
 *
 * Both are set below: the variation for the variable face, and `font-weight` so that a
 * fallback (Helvetica, Arial) is weighted too if Jost has not loaded.
 *
 * This is the whole of "the font colour is not matching" from Sujay's review. The colour
 * was already right — `brand.secondary-700` is #3A2E2A and the reference's `--ink` is
 * #3a2e2a, the same value — but a light 300 at 12px reads as grey next to a 400.
 */
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--layout-tap-target);
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-secondary-700);
  transition: color var(--duration-base) var(--ease-standard);
}

/*
 * The rule under the word GROWS, and the direction carries the meaning: it wipes in from
 * the left when you point at it and sits there when the page is current. That is the
 * reference's own motion, and it replaces a filled pill — a pill in a header reads as a
 * button, and these are locations rather than actions.
 *
 * ⚠️ `transform` is safe here: this pseudo-element has no static transform of its own, so
 * there is nothing for a transition to replace. The rule that bit the banner is about a
 * static transform competing with an ANIMATION on the same property.
 */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-slow) var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

/*
 * 🔑 TWO MENUS, ONE DRAWN: the public pages for a visitor, the application's five
 * destinations for a signed-in devotee. The server hides one; see the note at the top of
 * _site_header.html.twig for who swaps them after that. Each set lays its links out exactly
 * as the bar did when it held one menu, so a sign-in changes the words and not the rhythm.
 */
.nav-set {
  display: flex;
  align-items: center;
  gap: inherit;
}

/* `justify-self`, not `margin-left: auto`: the auto margin was what pushed the actions
   away from a nav sitting beside the wordmark. In the three-track grid the actions own
   the last track and simply sit at its end. */
.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: var(--space-3);
}

/*
 * 🔑 THE REGISTER BUTTON SURVIVES ON A PHONE; THE SIGN-IN LINK DOES NOT.
 *
 * Hiding the whole pair below the nav breakpoint put the page's primary action behind a
 * burger on exactly the devices most devotees will open this on. The quiet "Sign in" can
 * live in the menu — somebody who already has an account will look for it — but the
 * thing a first-time visitor is here to do has to be on screen.
 */
.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/*
 * ONE BUTTON IN THE BAR, AT EVERY WIDTH — the reference's arrangement, which Sujay asked for
 * in as many words. This used to hide the quiet link on phones only. Sign-in is not lost:
 * the mobile menu carries it as a full-width button (`.nav-panel` uses `btn--outline`, not
 * `.link-quiet`, so this rule does not reach it), and the footer carries it too.
 */
.site-header .nav-auth .link-quiet {
  display: none;
}

/*
 * 🔑 MESSAGES — the conversation button beside the account (2026-10-10, live messages).
 *
 * The account trigger's own shape — the same height, hairline and small caps — so the two
 * read as a pair; the icon alone on a phone, the word as well on a wide screen. The badge is
 * the count of what is waiting, in the brand's rose, ringed in the bar's own surface so it
 * reads as pinned to the button rather than floating beside it. The number is aria-hidden;
 * `.nav-messages-sr` says it in words.
 */
.nav-messages {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--layout-tap-target);
  min-height: var(--layout-tap-target);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-secondary-700);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-base) var(--ease-standard);
}

.nav-messages[hidden] {
  display: none;
}

.nav-messages:hover,
.nav-messages[aria-current='page'] {
  border-color: var(--brand-primary-600);
}

.nav-messages-icon {
  display: grid;
  place-items: center;
}

.nav-messages-label,
.nav-messages-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.nav-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  display: grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
  line-height: 1;
  color: var(--text-inverse);
  background: var(--brand-primary-700);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 2px var(--bg-surface);
  animation: nav-badge-in var(--duration-base) var(--ease-out);
}

.nav-badge[hidden] {
  display: none;
}

@keyframes nav-badge-in {
  from {
    scale: 0.4;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-badge {
    animation: none;
  }
}

@media (min-width: 60rem) {
  .nav-messages {
    padding-inline: var(--space-3) var(--space-4);
  }
  .nav-messages-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

/*
 * 🔑 THE ACCOUNT MENU — the signed-in right of the bar, in place of the register button.
 *
 * A <details>, so it opens with no script at all, and the trigger is drawn to sit where the
 * register button sat: the same height and the same letterspaced small caps. It carries who
 * is signed in, Settings and Sign out — the two controls the app once had no way to reach.
 */
.account-menu {
  position: relative;
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--layout-tap-target);
  padding: var(--space-1);
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-secondary-700);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color var(--duration-base) var(--ease-standard),
    background-color var(--duration-base) var(--ease-standard);
}

/* The disclosure triangle, which is the browser's and not this design's. `list-style` removes
   it everywhere but Safari, which draws it with its own pseudo-element. */
.account-trigger::-webkit-details-marker {
  display: none;
}

.account-trigger:hover,
.account-menu[open] > .account-trigger {
  border-color: var(--brand-primary-600);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--text-inverse);
  background-color: var(--brand-secondary-700);
  border-radius: var(--radius-full);
}

/* On a phone the trigger is the round avatar alone, beside the burger. The word stays in the
   accessibility tree — clipped, not removed — so the control is still called "Account". */
.account-trigger-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.account-chevron {
  display: none;
  color: var(--text-muted);
  transition: rotate var(--duration-base) var(--ease-standard);
}

.account-menu[open] .account-chevron {
  rotate: 180deg;
}

@media (min-width: 60rem) {
  .account-trigger {
    padding-right: var(--space-4);
  }
  .account-trigger-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .account-chevron {
    display: block;
  }
}

.account-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: min(17rem, calc(100vw - 2 * var(--layout-gutter)));
  padding: var(--space-2);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-3);
}

.account-who {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  border-bottom: 1px solid var(--border-subtle);
}

.account-who-label {
  color: var(--text-muted);
}

.account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.account-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--layout-tap-target);
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
  text-align: left;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-base) var(--ease-standard),
    color var(--duration-base) var(--ease-standard);
}

.account-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.account-item:hover {
  color: var(--brand-primary-800);
  background: var(--bg-sunken);
}

/* --------------------------------------------- 3a. the phone: a compact app bar */

/*
 * 🔑 ON A PHONE THE HEADER IS AN APP BAR, NOT A MASTHEAD (2026-10-08). It was the desktop's
 * 92px bar on a 390px screen: a seventh of the display, on every page, holding a wordmark and
 * a button the tab bar under the thumb already carries. An app spends 56 to 60 pixels on this
 * and gives the rest to the page.
 *
 * It is done by moving the ONE value everything else reads — `--layout-header-h`, which the
 * banner, the application's shell and the bio-data form's pinned rows all take their offsets
 * from — so nothing that sits under the header has to know it changed.
 *
 * Signed out, the bar's Register button goes: Register is the raised tab at the foot of the
 * screen, and Sign in is beside it. The account menu stays, because nothing else reaches it.
 */
/*
 * 🔑 ON THE HOME PAGE, 72px UNTIL IT MOVES (2026-10-11). The owner asked for a bigger logo on
 * the home page, then: "when scrolling the header logo is fine, only need to change on
 * landing". So it applies to the home page (the page with `.banner`) at its top: the bar is
 * 72px and the logo 58px. As soon as the page moves, it is the bar every page has once
 * scrolled, 56px with a 42px logo, unchanged. Every other page is 60px at its top, as
 * before. `:root:has(.site-header.is-scrolled)` outranks `:root:has(.banner)` (0,3,0 against
 * 0,2,0), so a scrolled home page shrinks too.
 */
@media (max-width: 59.99rem) {
  :root {
    --layout-header-h: 60px;
    --site-header-h: 60px;
    scroll-padding-top: calc(60px + var(--space-4));
  }

  :root:has(.banner) {
    --layout-header-h: 72px;
    --site-header-h: 72px;
    scroll-padding-top: calc(72px + var(--space-4));
  }

  :root:has(.site-header.is-scrolled) {
    --site-header-h: 56px;
  }

  .site-header .nav-auth[data-auth='out'] {
    display: none;
  }

  .site-header .brand-name {
    font-size: var(--text-xl);
  }

  .site-header .brand-tag {
    display: none;
  }

  .site-header .brand-mark,
  .site-header .brand-mark svg {
    width: 26px;
    height: 26px;
  }

  /* 14px of air rather than 22: at 38px the "SACRED" line of the wordmark drops under the
     size it can be read at. 46px, then 42px once scrolled; 58px at the top of the home page. */
  .site-header .brand-wordmark {
    height: calc(var(--site-header-h) - 14px);
  }

  .site-header .account-trigger,
  .site-header .nav-messages {
    transform: scale(0.9);
  }

  /* The avatar opens the menu sheet here; the dropdown is a wide screen's. See the note on
     `.account-trigger--sheet` in the header template. */
  .site-header .account-menu {
    display: none;
  }
}

@media (min-width: 60rem) {
  .account-trigger--sheet {
    display: none;
  }
}

/*
 * How far down the page this is, as a gold thread along the foot of the bar. site.js keeps
 * `--page-progress` (0 to 1) on <html>; with the script blocked it stays at 0 and the thread
 * is simply not there. A long page — the bio-data form, the terms — is the reason it exists.
 */
.site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--gradient-gold-foil);
  transform-origin: 0 50%;
  scale: var(--page-progress, 0) 1;
  opacity: 0.9;
  pointer-events: none;
}

/* ----------------------------------------------- 3b. the phone: tab bar + sheet */

/*
 * 🔑 BELOW 60rem THE NAVIGATION IS AT THE FOOT OF THE SCREEN (2026-10-07, the owner's request:
 * the site should handle "like working on the app"). The header keeps the wordmark and the
 * account; four destinations and Menu sit in a bar a thumb can reach, on every page, and Menu
 * opens the rest as a sheet. Until then the phone had a burger in the header and a drawer from
 * the right — a desktop pattern shrunk, with everything a devotee wanted two taps away at the
 * far corner of the screen.
 *
 * `--tabbar-space` IS THE ROOM THE BAR TAKES, AS ONE VALUE EVERY PAGE CAN READ — the same
 * arrangement as `--site-header-h` above. It is 0 on a wide screen. Anything pinned to the foot
 * of the viewport sits above it: the bio-data form's Back/Continue bar, the toasts. The footer
 * pads itself by it so its last line is not under the bar.
 */
:root {
  --tabbar-h: 4rem;
  --tabbar-space: 0px;
}

@media (max-width: 59.99rem) {
  :root {
    --tabbar-space: calc(var(--tabbar-h) + var(--space-3) + env(safe-area-inset-bottom, 0px));
  }
}

/*
 * A floating bar, not a strip welded to the edge: the page is visible either side of it and
 * under it, which is what stops a fixed bar reading as a second footer.
 *
 * `z-index: 40`, the header's own layer — under the application's dialogs and sheets (50), for
 * the reason the header gives. `pointer-events: none` on the frame, because the gutter either
 * side of the bar is page, and a devotee tapping a link there should reach it.
 */
.tabbar {
  position: fixed;
  inset: auto 0 0;
  right: var(--removed-body-scroll-bar-size, 0px);
  z-index: 40;
  padding: 0 var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  font-family: var(--font-body);
  font-variation-settings: var(--vary-body-medium);
  line-height: 1;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 60rem) {
  .tabbar {
    display: none;
  }
}

/*
 * 🔑 TUCKED: SLID BELOW THE SCREEN WHILE THE PAGE SCROLLS DOWN (2026-10-11, the owner's
 * choice). site.js decides when and says why. The extra 2rem takes the raised middle disc
 * with it, since it stands 1.6rem above the bar. This uses `translate`, following this
 * stylesheet's rule about `translate` and `transform`. With reduced motion it simply goes
 * and comes, with no slide.
 */
.tabbar {
  transition: translate var(--duration-base) var(--ease-out);
}

.tabbar.is-tucked {
  translate: 0 calc(100% + 2rem);
}

@media (prefers-reduced-motion: reduce) {
  .tabbar {
    transition: none;
  }
}

.tabbar *,
.tabbar *::before,
.tabbar *::after {
  box-sizing: border-box;
}

/*
 * The deep ink panel — the site's one dark surface, and the ground `text.on-brand` and
 * `brand.accent-on-brand` were drawn for. Slightly translucent over a blur, so a page
 * scrolling under it is felt rather than hidden.
 */
.tabbar-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: var(--tabbar-h);
  max-width: 30rem;
  margin-inline: auto;
  padding-inline: var(--space-1);
  border: 1px solid var(--border-on-brand);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--bg-brand-panel) 95%, transparent);
  box-shadow: var(--shadow-4);
  pointer-events: auto;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .tabbar-inner {
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  }
}

/* A gold thread along the top edge, as the footer has. */
.tabbar-inner::before {
  content: '';
  position: absolute;
  inset: 0 var(--space-6) auto;
  height: 1px;
  background: var(--gradient-gold-rule);
  opacity: 0.55;
  pointer-events: none;
}

/*
 * 🔑 THREE SETS OF TABS ARE IN THE DOCUMENT AND TWO ARE `hidden`, as with the bar's menu.
 * `display: contents` lets whichever one is drawn lay its four tabs straight into the bar's
 * five columns, beside the Menu button that all three share.
 */
.tabbar-set {
  display: contents;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0 0 0.1rem;
  font: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--text-on-brand-muted);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-lg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--duration-fast) var(--ease-standard),
    scale var(--duration-fast) var(--ease-standard);
}

.tab:active {
  scale: 0.94;
}

.tab:focus-visible {
  outline: 2px solid var(--brand-accent-on-brand);
  outline-offset: -4px;
}

.tab-icon {
  display: grid;
  place-items: center;
}

.tab-icon svg {
  display: block;
}

.tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Where the devotee is: gold, and a small diamond under the word — colour AND a mark, so the
   current tab is not told apart by hue alone. */
.tab[aria-current='page'],
.tab[aria-expanded='true'] {
  color: var(--brand-accent-on-brand);
}

.tab[aria-current='page']::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  left: 50%;
  width: 0.25rem;
  height: 0.25rem;
  background: currentColor;
  translate: -50% 0;
  rotate: 45deg;
}

/*
 * 🔑 THE MIDDLE TAB IS RAISED: a rose disc standing half out of the bar, ringed in the page's
 * own cream so it reads as set INTO the bar rather than laid on it. It is the one thing each
 * state is for — Register, the bio-data, Matches — and the only filled control in the bar.
 *
 * The label keeps the other labels' baseline: the disc is lifted by a negative margin and the
 * tab is packed to the foot.
 */
.tab--main {
  justify-content: flex-end;
  padding-bottom: 0.7rem;
  color: var(--text-on-brand);
}

.tab--main .tab-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-top: -1.6rem;
  color: var(--text-inverse);
  background-color: var(--brand-primary-700);
  background-image: var(--gradient-brand);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--bg-canvas), inset 0 1px 0 var(--sheen-brand),
    inset 0 -1px 0 var(--sheen-brand-shade), var(--shadow-brand);
  transition: translate var(--duration-base) var(--ease-out);
}

.tab--main[aria-current='page'] .tab-icon {
  translate: 0 -2px;
}

/* The disc is the mark; the diamond under it would be a second one. */
.tab--main[aria-current='page']::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tab,
  .tab--main .tab-icon {
    transition: none;
  }
  .tab:active {
    scale: 1;
  }
}

/*
 * The page ends above the bar. The footer is the last thing on every page, so it carries the
 * room; nothing else needs to know the bar exists. `--footer-end` is that room, and the
 * footer's own rule (section 4) applies it. It used to be a `padding-bottom` set here, which
 * lost to that rule's later `padding-block`, and that is how the bar came to sit on the mantra
 * band. The extra `--space-5` clears the bar's raised middle button.
 */
@media (max-width: 59.99rem) {
  :root {
    --footer-end: calc(var(--tabbar-space) + var(--space-5));
  }
}

/*
 * 🔑 INSIDE A CONVERSATION THE SCREEN IS THE CONVERSATION (2026-10-10, live messages). On a
 * phone the tab bar would sit where the composer belongs and the footer would hang under a
 * screen that is meant not to scroll, so both stand aside while a thread is open — the way
 * a messaging app hides its tabs inside a chat. The thread's own back arrow and the header
 * stay. The application sets `data-screen="thread"` on <html> while the thread is mounted
 * (assets/features/messages/Thread.tsx), and with the script blocked nothing changes.
 */
html[data-screen='thread'] .site-footer {
  display: none;
}

@media (max-width: 59.99rem) {
  html[data-screen='thread'] {
    --tabbar-space: 0px;
  }
  html[data-screen='thread'] .tabbar {
    display: none;
  }
}

/*
 * 🔑 ON A PHONE THE BIO-DATA FORM IS THE WHOLE SCREEN TOO (2026-10-11). The tab bar sat right
 * under the form's own Back/Next bar — two rows of buttons at the foot of the screen, the one
 * that moves you through the form the less obvious of the two — and the footer hung under every
 * step. Both stand aside while the form is open, as an app's tabs do inside a form; the header
 * and the form's "Save & exit" are the way out. Set by assets/components/wizard/WizardShell.tsx.
 * On a wide screen nothing changes: there is no tab bar, and the footer's links stay.
 */
@media (max-width: 59.99rem) {
  html[data-screen='form'] {
    --tabbar-space: 0px;
  }
  html[data-screen='form'] .tabbar,
  html[data-screen='form'] .site-footer {
    display: none;
  }
}

/*
 * 🔑 THE PHONE'S MENU IS A SHEET FROM THE FOOT OF THE SCREEN, over a scrim. It was a drawer
 * from the right (2026-09-16), opened by a burger in the header; with the navigation at the
 * foot of the screen the menu opens from there too, under the thumb that asked for it.
 *
 * 🔴 IT IS A SIBLING OF THE HEADER, NOT A CHILD. `.site-header.is-scrolled` carries a
 * backdrop-filter, and a filter makes an element the containing block for its `position:
 * fixed` descendants — inside the header, the sheet would be clipped to the bar's height the
 * moment the page had scrolled.
 *
 * `hidden` keeps both out of the page until site.js opens them; `.is-open` is the second step,
 * a frame later, so the slide has somewhere to start from. Above the header and the tab bar
 * (40), below the application's dialogs (50) — nothing opens those while the menu is open.
 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: color-mix(in srgb, var(--text-primary) 46%, transparent);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}

.nav-scrim.is-open {
  opacity: 1;
}

.nav-panel {
  position: fixed;
  inset: auto 0 0;
  z-index: 46;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  max-height: 88svh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-canvas);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-4);
  translate: 0 100%;
  transition: translate var(--duration-base) var(--ease-out);
}

.nav-panel.is-open {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-scrim,
  .nav-panel {
    transition: none;
  }
}

@media (min-width: 60rem) {
  .nav-scrim,
  .nav-panel {
    display: none;
  }
}

/* The grip a sheet is expected to have. Ornament: the close button and the scrim do the work. */
.nav-panel-handle {
  flex-shrink: 0;
  width: 2.5rem;
  height: 0.25rem;
  margin: var(--space-3) auto 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  opacity: 0.55;
}

.nav-panel-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-3) var(--space-5);
}

.nav-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--layout-tap-target);
  height: var(--layout-tap-target);
  color: var(--brand-secondary-700);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
}

.nav-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-5) var(--space-5);
}

/*
 * The destinations, as tiles: an icon over a word, three to a row. A menu a thumb opens is
 * scanned, not read, and a column of nine text rows makes a devotee read it.
 */
.nav-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 5.25rem;
  padding: var(--space-3) var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  line-height: 1.2;
  text-align: center;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-base) var(--ease-standard),
    background-color var(--duration-base) var(--ease-standard);
}

.nav-tile-icon {
  display: grid;
  place-items: center;
  color: var(--brand-accent-600);
}

.nav-tile:hover {
  border-color: var(--brand-accent-500);
}

.nav-tile[aria-current='page'] {
  background: var(--brand-accent-200);
  border-color: var(--brand-accent-500);
}

/* The housekeeping under the tiles: one grouped list, as a phone's own settings draw them. */
.nav-rows {
  display: grid;
  gap: 1px;
  margin-top: var(--space-4);
  padding: var(--space-1);
  background: var(--bg-sunken);
  border-radius: var(--radius-lg);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--layout-tap-target);
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
  text-align: left;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-base) var(--ease-standard);
}

.nav-row > span {
  flex: 1;
  min-width: 0;
}

.nav-row svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.nav-row:hover {
  background: var(--bg-surface);
}

/* Sign out is the last row and the quietest: it is the account's way out, not a destination. */
.nav-row--quiet {
  color: var(--text-secondary);
}

/* Whose session this is, so a shared phone says so before anything is changed. */
.nav-who {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3) var(--space-3);
  line-height: 1.3;
}

.nav-who-label {
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand-accent-600);
}

.nav-who-email {
  overflow: hidden;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Signed out, the two ways in. The sheet's own foot, so they are in reach whatever is scrolled. */
.nav-panel-foot {
  display: grid;
  flex-shrink: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

/* Two buttons side by side at 360px: the label keeps its stamp, the padding gives way. */
.nav-panel-foot .btn {
  padding-inline: var(--space-3);
}

/* --------------------------------------------------------------- 4. footer */

/*
 * 🔑 THE FOOTER IS LIGHT, AND IT IS THE REFERENCE THAT DECIDED IT.
 *
 * It was the deep ink panel, which put two dark bands back to back: the closing CTA band
 * (`section--ink`) ends the page, and the footer repeated it. On the reference the page
 * closes onto a soft blush with a floral garland over the seam, so the last thing a
 * visitor sees is the palette rather than a black slab.
 *
 * Every `*-on-brand` token inside this footer went with it. Those are the tokens drawn
 * for a dark ground — near-white ink, pale gold accents — and on blush they would be
 * invisible. That is the same class of failure `check-token-refs.mjs` was written for,
 * except the names all still resolve: they resolve to the wrong end of the ramp.
 */
.site-footer {
  position: relative;
  /* Clip rather than let a wide ornament open a horizontal scrollbar, which is what the
     360px overflow test checks for. */
  overflow-x: clip;
  background: var(--bg-band-blush);
  color: var(--text-muted);
  /*
   * The top padding is the bouquet's own height plus a gap, computed rather than guessed.
   * The last version kept a fixed ~96px while the vine hung ~120px into the footer, which
   * is what laid a rose across the wordmark in the review screenshot. `spray-gold` is
   * 1.4577 times as wide as it is tall.
   */
  /* Halved on review (was min(440px, 72vw)): the bouquet is a crown over the footer, not
     its subject, and at full size it took more height than the four columns under it. */
  --garland-w: min(220px, 36vw);
  /*
   * The bottom padding is the room the phone's tab bar takes, and 0 on a wide screen, where
   * the mantra band is the footer's last strip and meets the foot of the page.
   *
   * 🔴 IT WAS `0` OUTRIGHT, AND ON A PHONE THE TAB BAR SAT ON THE MANTRA (the owner,
   * 2026-10-11). "The page ends above the bar" in section 3b did set
   * `padding-bottom: var(--tabbar-space)`, but this rule comes later in the file with the
   * same specificity, so its `0` won. The band was always under the bar: measured, its last
   * 76px. The room lives here now, in the one rule that sets the footer's padding, as
   * `--footer-end` (section 3b): the bar's room plus a little more, because the bar's raised
   * middle button stands above its top edge and would otherwise touch the words.
   */
  padding-block: calc(var(--garland-w) / 1.4577 + var(--space-12)) var(--footer-end, 0px);
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--gradient-gold-rule);
}

/*
 * The bouquet crowns the footer, centred and wholly INSIDE its top edge. The reference
 * hangs its garland over the seam; ours cannot, because on the home page the band above is
 * the ink closing band, and watercolour multiplied over ink vanishes.
 */
.footer-garland {
  position: absolute;
  left: 50%;
  top: var(--space-4);
  z-index: 0;
  width: var(--garland-w);
  max-width: none;
  translate: -50% 0;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: multiply;
}

.site-footer .wrap {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/*
 * 🔴 FOUR FIXED TRACKS — AND THE `auto-fit` THAT WAS HERE WAS INVALID CSS.
 *
 * It read `1.6fr repeat(auto-fit, minmax(9rem, 1fr))`. The grid spec allows an auto-repeat
 * only beside FIXED-size tracks, and `1.6fr` is flexible, so the browser discarded the
 * whole declaration without a word and the footer fell back to the two-column rule above.
 * That is the brand|Explore / Support|Legal / Get started stack the review screenshot
 * showed — a layout nobody wrote, produced by a rule that never applied.
 *
 * The template now always renders four blocks (the brand, the first CMS group, every other
 * group gathered, Get started), so four fixed tracks are valid and right: the reference's
 * own proportions, with the brand widest.
 */
@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

.site-footer .brand,
.site-footer .brand-name {
  color: var(--brand-secondary-700);
}

/* The reference's footer logo is its largest type, bigger than its header's. */
.site-footer .brand-name {
  font-size: var(--text-3xl);
}

.site-footer .brand-mark {
  color: var(--brand-primary-700);
}

.site-footer .brand-tag {
  color: var(--brand-accent-600);
}

/* The footer's logo is the largest on the page, as the typeset name was before it. */
.site-footer .brand-wordmark {
  height: clamp(88px, 8vw, 100px);
}

/* `text.muted` is #786A60 and the reference's `--ink-soft` is #76675f — the same soft
   brown, at 4.63:1 on this band. */
.footer-blurb {
  max-width: 34ch;
  margin: var(--space-5) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-contact {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--text-secondary);
}

.footer-contact svg {
  flex-shrink: 0;
  margin-top: 0.3em;
  color: var(--brand-primary-600);
}

.footer-contact a:hover {
  color: var(--brand-primary-800);
  text-decoration: underline;
}

.social {
  list-style: none;
  display: flex;
  gap: var(--space-2);
  margin: var(--space-6) 0 0;
  padding: 0;
}

.social a {
  display: grid;
  place-items: center;
  width: var(--layout-tap-target);
  height: var(--layout-tap-target);
  color: var(--brand-secondary-700);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-base) var(--ease-standard),
    color var(--duration-base) var(--ease-standard);
}

.social a:hover {
  color: var(--text-inverse);
  background: var(--brand-primary-700);
  border-color: var(--brand-primary-700);
}

/* `.footer-nav` is gone: it was the wrapper that made this a two-column footer with
   four columns squeezed into the right half. The columns are direct grid children now —
   see the note in templates/public/base.html.twig. */

/*
 * The column titles are DISPLAY type at the reference's size — its 26px against our 25px
 * step — not tiny gold capitals. That is what gives its footer the look of a printed page
 * rather than of a site map.
 */
.footer-head {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-normal);
  color: var(--brand-secondary-700);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

/* A label over a gathered group — the reference's WHEN / WHERE. Small type, so it takes the
   4.5:1 gold rather than the reference's own rose, which is about 3.5:1 at this size. */
.footer-label {
  margin: var(--space-4) 0 var(--space-1);
  font-size: var(--text-2xs);
  font-weight: var(--weight-regular);
  font-variation-settings: var(--vary-body-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-accent-600);
}

.footer-head + .footer-label {
  margin-top: 0;
}

/*
 * 🔴 `:not(.footer-cta, .footer-secondary)` IS THE FIX FOR A LABEL NOBODY COULD READ.
 *
 * This rule was plain `.footer-col a`, specificity (0,1,1), and it outranked `.btn` (0,1,0)
 * — so the old "Create your bio-data" button had its ivory label repainted in dark ink on
 * maroon. It was harmless while the footer was dark and this colour was light, which is
 * exactly why it survived until the footer changed. Styled links opt out by name now.
 */
.footer-col a:not(.footer-cta, .footer-secondary) {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--duration-base) var(--ease-standard),
    padding-left var(--duration-slow) var(--ease-out);
}

/*
 * 🔑 34px UNDER A MOUSE, 44px UNDER A THUMB — the design system's own rule (`Button`'s
 * `pointer-coarse:min-h-11`), applied to the footer. The reference's tight rows are right for a
 * pointer; on a phone a column of 34px links is a column of mis-taps. The footer used to live
 * only on Twig pages, which no sweep measured; around the application it is held to the 44px
 * target like every other control.
 */
@media (pointer: coarse) {
  /* Both ways: "FAQ" is 29px wide, and a target is a box, not a line. */
  .footer-col a:not(.footer-cta, .footer-secondary),
  .footer-contact a {
    min-width: var(--layout-tap-target);
    min-height: var(--layout-tap-target);
  }
  .footer-contact a {
    display: inline-flex;
    align-items: center;
  }
}

/* The reference nudges a footer link to the right as it colours. It is a small thing and
   it is the difference between a list that responds and a list that is printed on. */
.footer-col a:not(.footer-cta, .footer-secondary):hover {
  padding-left: var(--space-1);
  color: var(--brand-primary-800);
}

.footer-join p {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/*
 * 🔑 "GET STARTED" IS A CARD WITH TWO BUTTONS (2026-10-11), the same ivory card, gold
 * hairline and pill buttons as the sign-in page. The owner asked for the footer to look like
 * that page. It was a line with an arrow at its end, in the shape of the reference's
 * newsletter field, and a text link under it. Both read as underlines, which is what the
 * owner had asked to have removed from the sign-in page an hour before.
 *
 * The buttons are the site's own (`.btn`, `.btn--outline`), stacked full width, because the
 * column is about 250px on a computer. Their size is between `.btn` and `.btn--sm`: `--sm`
 * drops the 44px minimum a thumb needs, and the full size wraps "Create your bio-data" onto
 * two lines.
 */
.footer-join {
  align-self: start;
  padding: var(--space-6);
  background: var(--glass-bg);
  border: 1px solid var(--brand-accent-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2);
}

.footer-actions {
  display: grid;
  gap: var(--space-3);
}

.footer-actions .btn {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: clamp(var(--space-10), 5vw, var(--space-16));
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-bottom p {
  margin: 0;
}

.footer-to-top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--layout-tap-target);
  color: var(--brand-primary-800);
}

/*
 * 🔑 ON A PHONE THE FOOTER IS CENTRED AND SHORT (2026-10-11). The owner asked for the logo
 * and the line under it to be centred, for the links to "not take more place" and sit "one
 * by one", and for the flowers above the logo to be smaller. So:
 *   · the logo, the line under it, the headings, the "Get started" card's words and the
 *     copyright are centred;
 *   · each list of links flows along the line, one after another, wrapping where it must,
 *     instead of one link per 44px row (each link still keeps a 44px target);
 *   · the Help column's small labels (Support, Legal) are left out, since its heading covers
 *     them;
 *   · the bouquet is drawn smaller (`--garland-w`), and the footer's top padding, which is
 *     computed from it, shrinks with it.
 * This replaces the same morning's two side-by-side columns. Those halved the height but
 * left long labels wrapping word by word in half a phone's width.
 *
 * ⚠️ IT SITS AFTER EVERY FOOTER RULE IT CHANGES, AND MUST STAY THERE. Its selectors have the
 * same specificity as those rules, so the later one wins. The first draft sat beside
 * `.footer-grid`, above `.footer-col ul { display: grid }`, and its links went on stacking
 * one per line.
 */
@media (max-width: 39.99rem) {
  .site-footer {
    --garland-w: min(220px, 26vw);
  }

  .footer-about,
  .footer-col,
  .footer-bottom {
    text-align: center;
  }

  .footer-about {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer .brand-text {
    align-items: center;
  }

  .footer-blurb {
    margin-inline: auto;
  }

  .footer-contact {
    justify-items: center;
  }

  .social {
    justify-content: center;
  }

  .footer-head {
    margin-bottom: var(--space-2);
  }

  /* Inline rather than flex, so Help's two lists run on into each other as one line of links
     instead of each starting a line of its own. The lists stay lists. */
  .footer-col ul {
    display: inline;
  }

  .footer-col li {
    display: inline-block;
    margin-inline: calc(var(--space-5) / 2);
  }

  .footer-label {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-1);
  }
}

/*
 * THE MANTRA, PASSING — the footer's last strip, and so the last thing on every page (owner,
 * 2026-10-08; it was a band under the home page's search card for a day). One line of script
 * moving slowly across a gold-ruled band: the sixteen words every devotee who reads this site
 * says daily. Two copies of the line sit end to end and the pair moves left by exactly one of
 * them, so it never jumps.
 *
 * It is in this file because the footer is: the application's page loads chrome.css and not
 * site.css, and the band has to be drawn there too.
 *
 * Decoration, and marked so (`aria-hidden` in the template). Under reduced motion it is one
 * centred line that does not move.
 */
.mantra {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: var(--space-8);
  padding-block: var(--space-4);
  background: var(--bg-band-sand);
  border-top: 1px solid var(--brand-accent-200);
  /* A mask reads only the alpha, so any opaque token does: the line fades in and out at the
     band's two ends instead of being cut off by them. */
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--bg-brand-panel) 12%, var(--bg-brand-panel) 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, var(--bg-brand-panel) 12%, var(--bg-brand-panel) 88%, transparent);
}

.mantra__track {
  display: flex;
  width: max-content;
  animation: mantra-pass 48s linear infinite;
}

.mantra__line {
  flex-shrink: 0;
  margin: 0;
  padding-inline: var(--space-8);
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--brand-accent-600);
}

.mantra__line span {
  margin-inline: var(--space-5);
  font-family: var(--font-body);
  font-size: 0.5em;
  vertical-align: middle;
  color: var(--brand-primary-500);
}

@keyframes mantra-pass {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mantra__track {
    width: 100%;
    justify-content: center;
    animation: none;
  }
  .mantra__line + .mantra__line {
    display: none;
  }
}

/* ------------------------------------------------------ 4b. pictures stay put */

/*
 * 🔑 A PICTURE IS NOT SOMETHING TO PICK UP (owner, 2026-10-08). Pressing and moving on the
 * couple's illustration lifted a ghost of it off the page and washed it with the selection
 * colour — the browser treating artwork as a file to drag out and as text to select. No
 * image or icon anywhere on the site, public or in the application, can be selected or
 * dragged. Words are untouched: they can still be selected and copied.
 *
 * `-webkit-user-drag` is Chrome's and Safari's; site.js cancels `dragstart` on images for
 * the browsers that do not have it. In this file because both kinds of page load it.
 */
img,
svg,
picture {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* ---------------------------------------------------------------- 5. print */

@media print {
  .site-header,
  .site-footer,
  .tabbar,
  .nav-scrim,
  .nav-panel,
  .skip {
    display: none !important;
  }
  .site-body {
    padding-top: 0;
  }
}
