/*
 * Zoey Made — global header.
 *
 * One responsive header for the whole site: a wordmark that goes home, the primary
 * navigation, and the commerce utilities. It renders on every route, including the ones
 * WooCommerce serves from its own block templates, so it has to stay cheap: no images, no
 * project JavaScript, and no behaviour that WordPress does not already own.
 *
 *   parts/header.html   structure
 *   this file           appearance
 *   functions.php       the cart link, whose count only the server knows
 *
 * The interaction — the mobile overlay, its focus trap, Escape, the body scroll lock, and
 * the expanding search field — is core's, through the Navigation and Search blocks. That
 * is also why several selectors here name core's classes: this file styles markup core
 * generates, and each of those rules says what it is overriding and why.
 */

/*
 * The sticky shell.
 *
 * The class this component owns sits on the group inside the template part, but the
 * element that has to stick is the <header> the template part renders: a sticky child can
 * only travel inside its parent's box, and the parent's box is exactly as tall as it is.
 * :has() names that parent through our own class rather than through core's, and degrades
 * to a header that simply scrolls away, which stays perfectly usable.
 *
 * The scalloped frame is printed outside .wp-site-blocks, so it scrolls away on its own
 * while the header stays — which is the arrangement FOUND-006 left in place for this.
 */
:where(header):has(> .zoey-site-header) {
  position: sticky;
  inset-block-start: 0;
  /* Above page content, far below core's overlay (100000) and the admin bar (99999). */
  z-index: 10;
  background-color: var(--wp--preset--color--surface);
  border-block-end: 1px solid var(--wp--preset--color--border-soft);
}

/*
 * The admin bar is fixed from 601px up, so a sticky header has to start below it. Under
 * 601px WordPress lets the bar scroll away and there is nothing to avoid.
 */
@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar :where(header):has(> .zoey-site-header) {
    inset-block-start: 46px;
  }
}

@media (min-width: 783px) {
  body.admin-bar :where(header):has(> .zoey-site-header) {
    inset-block-start: 32px;
  }
}

/*
 * What the sticky header owes every in-page link.
 *
 * A sticky header covers the top of the page, so anything the browser scrolls to lands
 * underneath it: "Skip to content" put the first part of <main> — and the first control
 * inside it — behind this header, which is exactly the failure FOUND-011 §11 names. Every
 * in-page destination has the same problem, including the product tabs.
 *
 * scroll-margin is the fix the platform provides: it tells the browser to stop short. It
 * belongs here because the header is what creates the debt: base.css states the guarantee,
 * this supplies the measurement. The row height is a variable so the offset and the header
 * cannot drift apart — change one and the other follows.
 */
:root {
  --zoey-site-header-height: 64px;
}

:where(#wp--skip-link--target, [id]:target) {
  scroll-margin-block-start: calc(var(--zoey-site-header-height) + var(--wp--preset--spacing--40));
}

.zoey-site-header__inner {
  /* Comfortable without being tall; the search field is positioned against this row. */
  position: relative;
  min-block-size: var(--zoey-site-header-height);
  gap: var(--wp--preset--spacing--40);
}

/*
 * Four pixels back from each gap, on phones only, and the brand logo is what they are for.
 *
 * At 320px the row has 280px to divide between the brand, the menu button and the two action
 * icons, and at the shipped 1rem gap that left the logo exactly one pixel of slack — measured
 * at 107px wide in 280px of room, with 44px and 96px of controls beside it. A logo big enough
 * to read was wrapping the row to 104px because of that pixel.
 *
 * It is the gap *between the three groups* rather than between the icons, which keep their own
 * spacing inside .zoey-site-header__actions — so no two touch targets moved closer together.
 * Above 600px the row has room to spare and the gap goes back to 1rem.
 */
@media (max-width: 599px) {
  .zoey-site-header .zoey-site-header__inner {
    gap: var(--wp--preset--spacing--30);
  }
}

/*
 * The row wraps rather than letting the wordmark run over the controls.
 *
 * The block declares `flexWrap: nowrap`, which is right at every text size the site supports
 * — wordmark, menu button, search and cart fit on one line and this rule never fires. It
 * fires for a reader at 200% text on a small screen, where the wordmark grows to 202px in a
 * box the row can spare 92 for and, being `white-space: nowrap`, drew straight across the
 * menu and search icons. Measured overlapping at 320, 360 and 390px, and no longer.
 *
 * The header's height is a `min-block-size`, so a second line simply makes it taller. Two
 * classes so this wins against the same-specificity layout class WordPress generates for the
 * block, whose print order is not guaranteed.
 */
.zoey-site-header .zoey-site-header__inner {
  flex-wrap: wrap;
}

/*
 * The brand.
 *
 * The approved logo, with the text wordmark still here underneath it as the fallback for a
 * theme directory that has no artwork in it. Either way it links home and does nothing else —
 * the header is not the place to hide a surprise behind the way out.
 */
.zoey-site-header__brand {
  margin-block: 0;
  min-inline-size: 0;
  font-size: var(--wp--preset--font-size--section-small);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/*
 * The logo.
 *
 * Sized by its *height*, because the row is a height and the artwork is nearly three times as
 * wide as it is tall — pinning the width instead would let a future re-export change how tall
 * the header is. `inline-size: auto` with the intrinsic ratio off the element's own `width` and
 * `height` keeps the box reserved before the bytes land, so the header cannot shift.
 *
 * The size is fluid rather than two steps, because the constraint is the *row* and the row is
 * different at every width. VS-003 replaced the artwork with the approved master, and the ratio
 * the header lays out against changed with it — 2.36:1 now, against the **2.70:1 of the WebP the
 * header used to serve** (`zoeys-creative-station-logo.webp`, 440 × 163). That derivative was a
 * trimmed one: its own master PNG was 1672 × 941, which is 1.78:1, with wide white margins above
 * and below the artwork. The header only ever rendered the WebP, so 2.70:1 is the number this
 * comparison is about. Re-measured at default text:
 *
 *   320-390   42px tall,  99px wide   the ceiling — see the gap below
 *   600       48px,      113px        row unchanged at 64px
 *   768       55px,      130px        row unchanged at 64px
 *   1024+     56px,      132px        row unchanged at 80px, which is the nav's height
 *
 * so it is as large as the header can hold at every width and never the thing that decides how
 * tall the header is.
 *
 * `max-block-size` in pixels is the one deliberate exception to this project's `rem` habit. The
 * fluid size is in `rem` so that browser zoom scales it — zoom scales pixels too, so the cap
 * follows — but a reader who has enlarged *text alone* is telling us about type, not about
 * artwork, and left uncapped the logo doubles to 80px. The cap holds it at 64px tall and 151px
 * wide. A logo that has grown past legibility is not buying anybody anything.
 *
 * The artwork no longer carries a white ground. The old file was drawn on an opaque white
 * rectangle; the approved master is 38.8% fully transparent, which is better on the pale pink
 * surface and is the one thing about this change that needs a rule of its own — see forced colors
 * below.
 */
.zoey-site-header__brand--logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.zoey-site-header__brand--logo a {
  display: block;
  line-height: 0;
}

.zoey-site-header__logo {
  display: block;
  inline-size: auto;
  block-size: clamp(2.625rem, 1.5rem + 4vw, 3.5rem);
  max-block-size: 64px;
  max-inline-size: 100%;
  /* The hover response the wordmark has, in the one form a raster logo can offer it. */
  transition: transform 180ms ease;
}

/*
 * Forced colors: the logo keeps the ground it was drawn against.
 *
 * The approved artwork is transparent and drawn in dark ink, so it relies on the surface behind
 * it being light. On this header that surface is white and nothing is needed. Under a
 * high-contrast scheme the header's background is replaced with the system Canvas, which in every
 * dark scheme is near-black — and dark ink on near-black is a logo that is simply not there. The
 * previous artwork survived this by accident, because it had an opaque white rectangle baked into
 * it.
 *
 * So the plate the old file carried in its pixels is drawn in CSS instead, and only in the one
 * mode that needs it. `forced-color-adjust: none` is what keeps the system from replacing it
 * again; it is scoped to this element, which is brand artwork, and nothing else on the page opts
 * out. The padding is what stops the ink touching the plate's edge, and the radius is what makes
 * it read as placed rather than as a raw rectangle.
 *
 * Emulated, not verified on a real high-contrast desktop — see the VS-003 report's limitations.
 */
@media (forced-colors: active) {
  .zoey-site-header__logo {
    forced-color-adjust: none;
    padding: 2px 4px;
    border-radius: var(--wp--custom--radius--small);
    background-color: #fff;
  }
}

.zoey-site-header__brand--logo a:hover .zoey-site-header__logo {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .zoey-site-header__logo,
  .zoey-site-header__brand--logo a:hover .zoey-site-header__logo {
    transform: none;
    transition: none;
  }
}

.zoey-site-header__brand a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.zoey-site-header__brand a:hover {
  color: var(--wp--preset--color--zoey-purple);
}

/*
 * Primary navigation.
 *
 * Restrained on purpose: one weight and one colour at rest. Pointing at an item tints it; being
 * *in* it marks it four ways. See the two sections below.
 */
.zoey-site-header__nav {
  min-inline-size: 0;
}

.zoey-site-header__nav .wp-block-navigation-item__content {
  position: relative;
  padding-block: var(--wp--preset--spacing--30);
  color: var(--wp--preset--color--ink);
  font-weight: 600;
  text-decoration: none;
}

/*
 * The short bar under a selected item.
 *
 * Drawn here, invisible here, and switched on by the selected rules below. It used to double as
 * the hover treatment; §8 gives hover a tint instead, so this pseudo-element now has exactly one
 * job and the two states cannot be confused for each other.
 */
.zoey-site-header__nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: var(--wp--preset--spacing--20);
  block-size: 3px;
  border-radius: var(--wp--custom--radius--pill);
  background-color: currentColor;
  opacity: 0;
}

/*
 * ────────────────────────────────────────────────────────────────────────────────────────────
 * Hover: a pale tint (VS-003).
 *
 * `STYLE-GUIDE-v1.md` §8, approved. This replaced a full-width underline that had been here
 * since FOUND, and the replacement is the point rather than a side effect: with the selected
 * item now wearing a lavender *pill*, a hover underline was a second visual language for a
 * weaker signal. A pale tint is the same shape as the pill in a lighter colour, so pointing at an
 * item previews the shape that marking it would use.
 *
 * Zoey Lavender Pale rather than any other pale step, because it is the selected pill's own
 * colour mixed back towards the surface — hover and selected are then one idea at two strengths
 * instead of two unrelated colours. Measured: Ink on Zoey Lavender Pale is **11.3:1**, against
 * 8.25:1 on the full lavender, so the label is if anything easier to read while tinted.
 *
 * Three things this deliberately does not do:
 *
 *   it does not touch the selected item          `:not(.is-current)` — a selected item already
 *                                                has the stronger fill, and tinting it on hover
 *                                                would make it *paler* when pointed at
 *   it does not move anything                    the inline padding is on every item at rest, so
 *                                                the tint appears inside a box that is already
 *                                                the right size
 *   it does not stand in for focus               keyboard focus is base.css's 3px Ink outline
 *                                                with a 2px offset, drawn outside this fill and
 *                                                unaffected by it. Hover is pointer feedback;
 *                                                focus is where the keyboard is. They are
 *                                                different colours, different geometry, and
 *                                                `brand.mjs` measures all three states apart.
 */
.zoey-site-header__nav .wp-block-navigation-item__content:not(.is-current):hover {
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--preset--color--zoey-lavender-pale);
}

/*
 * ────────────────────────────────────────────────────────────────────────────────────────────
 * The selected state (VS-003).
 *
 * `STYLE-GUIDE-v1.md` §8, which Product approved: a lavender pill, stronger text, and a short
 * purple underline. One treatment, two meanings — the page you are on, and the section you are
 * inside — and they look the same on purpose, because §8 asks for selection to *follow section
 * ancestry*: a reader on the paper-airplane guide should see that Make is where they are. What
 * differs between the two is what assistive technology is told, which is
 * zoey_made_mark_current_navigation_link()'s half and not this file's.
 *
 * This replaced a full-width purple underline and nothing else. The underline is still here, and
 * is now *short* and centred, because a pill with a bar across its whole floor reads as an
 * underlined pill rather than a mark under a word.
 *
 * ## Measured contrast
 *
 * Against `docs/ACCESSIBILITY.md`'s table:
 *
 *   Ink on Zoey Lavender                 8.25:1   the label — clears AAA for normal text
 *   Ink on Zoey Lavender Pale           11.28:1   the label while hovered
 *   Zoey Lavender against Surface        1.58:1   the pill's own edge
 *   Zoey Lavender against Lavender Pale  1.49:1   selected against hovered — see below
 *   Zoey Purple on Zoey Lavender         2.14:1   the bar
 *
 * The pill edge and the bar are both under 3:1, and neither is relied on: §9 forbids state by
 * colour alone and this is marked four ways — the fill, the weight going 600 to 700, the bar, and
 * `aria-current`. The *label* is what has to be readable and it is the strongest number on the
 * page. Recorded rather than smoothed over: Ink would give the bar 8.25:1, and §8 asked for
 * purple, so purple is what this draws and the number is Product's to overrule.
 *
 * Selected against hovered is 1.49:1, which is why the two are **not** told apart by fill alone
 * either: a selected item is also 700 against 600 and carries the bar and `aria-current`, and a
 * selected item is never tinted on hover in the first place. Colour is the last of the four
 * signals here, not the first.
 *
 * `em` padding, not the spacing scale, because this same rule dresses the 32px labels in the
 * mobile overlay — see the overlay section at the foot of this file. A pill sized in `px` would
 * be a tight collar there.
 */
.zoey-site-header__nav .wp-block-navigation-item__content.is-current {
  padding-inline: 0.75em;
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--preset--color--zoey-lavender);
  font-weight: 700;
}

/*
 * The short underline, inside the pill rather than under it.
 *
 * 1.25em wide and centred, which is roughly the width of two characters at any size this renders
 * at — so it stays a mark under a word on a 16px desktop label and on a 32px label in the
 * overlay, where a fixed width would be a dash under one letter.
 *
 * `inset-inline: auto` is what undoes the full-width bar above; the hover rule is the same
 * pseudo-element, so the selected item does not gain a second one on hover.
 */
.zoey-site-header__nav .wp-block-navigation-item__content.is-current::after {
  inset-inline: auto;
  inset-inline-start: 50%;
  inline-size: 1.25em;
  translate: -50% 0;
  background-color: var(--wp--preset--color--zoey-purple);
  opacity: 1;
}

/*
 * The pill is a box, and a box in a row of plain labels needs the row to allow for it.
 *
 * Without this the selected item's own padding pushes its neighbours by 24px when the page
 * changes — measured, the nav shifting sideways between / and /shop/. Giving *every* item the
 * same inline padding costs nothing visually, because an unselected item has no fill to show it,
 * and it means the row is the same width whichever item is marked.
 */
.zoey-site-header__nav .wp-block-navigation-item__content {
  padding-inline: 0.75em;
}

/*
 * Commerce utilities.
 *
 * Search and cart. Account is deliberately absent: it would be a third icon for something
 * the site cannot yet do anything useful with. Nothing here reserves space for it, and
 * nothing here would need to change to add it.
 */
.zoey-site-header__actions {
  gap: var(--wp--preset--spacing--20);
}

.zoey-site-header__action,
.zoey-site-header .wp-block-navigation__responsive-container-open,
.zoey-site-header .wp-block-navigation__responsive-container-close,
.zoey-site-header__search .wp-block-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* The comfortable-touch minimum, which is larger than any of these icons. */
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--wp--custom--radius--pill);
  background-color: transparent;
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.zoey-site-header__action:hover,
.zoey-site-header .wp-block-navigation__responsive-container-open:hover,
.zoey-site-header .wp-block-navigation__responsive-container-close:hover,
.zoey-site-header__search .wp-block-search__button:hover {
  background-color: var(--wp--preset--color--surface-soft);
  color: var(--wp--preset--color--zoey-purple);
}

.zoey-site-header__cart {
  position: relative;
}

/*
 * The count rides on the corner of the cart icon and is absent at zero — a badge that is
 * always there stops meaning anything. The number is decoration for anyone who cannot see
 * it: the link's accessible name already says "Cart, 2 items".
 */
.zoey-site-header__cart-count {
  position: absolute;
  inset-block-start: var(--wp--preset--spacing--10);
  inset-inline-end: var(--wp--preset--spacing--10);
  display: grid;
  place-items: center;
  /* Sized to two digits rather than to the spacing scale — this is type in a circle. */
  min-inline-size: 1.25rem;
  block-size: 1.25rem;
  padding-inline: var(--wp--preset--spacing--10);
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--preset--color--zoey-pink);
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--body-small);
  font-weight: 700;
  line-height: 1;
}

/*
 * Search.
 *
 * Core's button-only Search block is already the expanding field this design wants, with
 * the aria-expanded, Escape and focus handling that comes with it. What it does not do is
 * decide where the field goes, and inline it would squeeze the wordmark. Taking it out of
 * flow drops it just under the header row instead, so opening search never moves anything.
 */
.zoey-site-header__search {
  /* Wide enough for a product name, narrow enough not to read as a second header. */
  --zoey-site-header-search-width: 22rem;

  margin: 0;
}

/*
 * The search button's focus ring, un-clipped.
 *
 * Core clips the collapsed search form and its wrapper so the field is hidden while it
 * slides out from zero width. This theme does not use that animation — it takes the field
 * out of flow and drops it under the header row — so the clip had nothing left to hide and
 * was only cutting the top and bottom off the 3px focus ring on the search button, on every
 * route: the ring rendered as four corner fragments. Verified whole at 320, 390 and 1440,
 * with opening and closing search unchanged.
 */
.zoey-site-header__search.wp-block-search__button-only.wp-block-search__searchfield-hidden,
.zoey-site-header__search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper {
  overflow: visible;
}

/*
 * ...and the collapsed field hides itself instead of relying on that clip.
 *
 * Removing the clip also let the collapsed field add 12px to the width of every page in
 * WebKit at 200% text — real horizontal scrolling, not a reported number: WebKit counts the
 * absolutely positioned field's static position in the flex row, plus the row's column gap,
 * as scrollable overflow. `visibility: hidden` was not enough, because the box is still
 * there to be counted. `content-visibility` is, and it is the honest description: while the
 * field is collapsed it is not rendered. Core already marks it `aria-hidden` and
 * `tabindex="-1"` there, and the class core toggles brings it back.
 */
.zoey-site-header__search.wp-block-search__searchfield-hidden .wp-block-search__input {
  content-visibility: hidden;
}

/*
 * Ink Soft for the edge, not Border Soft: this is the boundary of a form control, and a
 * control has to look like one. Border Soft is 1.2:1 against the white field — a hairline
 * for separating content, which is all it is used for elsewhere — where Ink Soft is 5.4:1
 * and clears the 3:1 WCAG asks of a control boundary. The shadow stays; it lifts the field
 * off the page but it is not what says "you can type here".
 */
.zoey-site-header__search .wp-block-search__input {
  position: absolute;
  inset-block-start: calc(100% + var(--wp--preset--spacing--20));
  inset-inline-end: 0;
  inline-size: min(var(--zoey-site-header-search-width), 100%);
  min-block-size: 44px;
  padding-inline: var(--wp--preset--spacing--40);
  border: 1px solid var(--wp--preset--color--ink-soft);
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--preset--color--surface);
  box-shadow: var(--wp--preset--shadow--lifted);
  color: var(--wp--preset--color--ink);
}

/*
 * Focus is base.css's now.
 *
 * This component used to carry its own Ink ring because nothing site-wide existed yet.
 * FOUND-011 made that ring the site's, so the header simply inherits it — and the header,
 * the footer, the store and the content now agree without three files saying so.
 */

/*
 * Mobile.
 *
 * Core switches the Navigation block to its overlay below 600px. At 600px this header has
 * a wordmark, six labels and two icons to fit, and it cannot: the labels start colliding
 * around 880px. These two rules move core's switch to where the content actually breaks,
 * which is the only reason to reach into its class names. They are more specific than the
 * rules they replace, so load order cannot change the outcome.
 */
@media (max-width: 899px) {
  .zoey-site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }

  .zoey-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: inline-flex;
  }

  /*
   * Collapsed, the navigation is one button, so the brand takes the free space and the
   * button joins the utilities on the right. The child selector is what beats core's
   * `.is-layout-flex > * { margin: 0 }`, which is more specific than a bare class.
   */
  .zoey-site-header__inner > .zoey-site-header__brand {
    margin-inline-end: auto;
  }
}

@media (min-width: 900px) {
  /* The other half of the moved breakpoint: core hides its menu button from 600px, so
     this puts it back in step with the container rule above. */
  .zoey-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none;
  }

  /* Redeclared on :root, not on the row, so the scroll offset above changes with it. */
  :root {
    --zoey-site-header-height: 80px;
  }

  .zoey-site-header__inner {
    gap: var(--wp--preset--spacing--50);
  }

  .zoey-site-header__nav .wp-block-navigation__container {
    gap: var(--wp--preset--spacing--50);
  }
}

/*
 * Without JavaScript.
 *
 * The overlay is a dialog, and a dialog needs script to open, so with script unavailable
 * the menu button would be a dead control and the navigation would be out of reach on
 * small screens. This lays the links out inline on their own row instead — the header
 * grows a little and nothing else changes. The logo, cart and search form are ordinary
 * HTML and already work without any of this.
 */
@media (scripting: none) and (max-width: 899px) {
  .zoey-site-header > .zoey-site-header__inner {
    flex-wrap: wrap;
    padding-block: var(--wp--preset--spacing--20);
  }

  .zoey-site-header__nav {
    inline-size: 100%;
  }

  /* Left-aligned reads better than a centred stray label once the row wraps. */
  .zoey-site-header__nav .wp-block-navigation__container {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  /* Same selectors as the rules above, so that being later in the file is what decides. */
  .zoey-site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block;
    position: relative;
    inset: auto;
    z-index: auto;
  }

  .zoey-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none;
  }

  .zoey-site-header .wp-block-navigation__responsive-container-close {
    display: none;
  }
}

/*
 * The mobile menu.
 *
 * Core renders it as a full-screen dialog and handles opening, closing, Escape, the focus
 * trap and the background scroll lock. This only makes the links big enough to hit and
 * far enough apart to read.
 */
.zoey-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  gap: var(--wp--preset--spacing--40);
  font-size: var(--wp--preset--font-size--section-title);
}

.zoey-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  padding-block: var(--wp--preset--spacing--20);
  /*
   * The inline padding has to be restated *here*, and finding out why is the whole reason this
   * declaration exists.
   *
   * Every nav item carries `padding-inline: 0.75em` from the rules above, at specificity 0,2,0.
   * Core's overlay rule for these labels is 0,3,0 and sets `padding: 0`, so inside the open menu
   * the inline padding was silently zero — measured, `padding-left: 0px` on a 66×58 box whose
   * label was also 66 wide. With a pill radius on a box that is taller than its content is wide,
   * the result was not a tight pill: it was a **circle**, with the label touching the curve on
   * both sides.
   *
   * Restating it on this selector, which is already 0,4,0, is the smallest fix. 0.75em is the
   * same value the desktop row uses, so this is the one pill at two sizes rather than a second
   * set of proportions for mobile. Measured after: 106×58, which reads as a pill.
   *
   * Nothing about the treatment changed — same lavender, same weight, same short underline. Only
   * the breathing room that was supposed to be there all along.
   */
  padding-inline: 0.75em;
}

/*
 * The selected state in the overlay, which is the same state and not a second one.
 *
 * §8 asks that "mobile exposes the same state", and the cheapest way to be sure it does is for
 * there to be nothing here that draws it: the pill, the weight and the short underline are the
 * rules above, the overlay contains the same links with the same classes, and the sizes are in
 * `em` so they grow with the 32px labels. Nothing in this section paints a selected item.
 *
 * What the overlay *does* need is one declaration, and the first pass of this story got that
 * wrong. It assumed the pill's inline padding reached the overlay from the nav rules and said so
 * in a comment; measured, core's own overlay rule had zeroed it, and the pill rendered as a
 * circle with the label against the curve. The rule just above now restates it, and says why.
 *
 * Measured in the overlay at 390px with /make/ and with /make/paper-airplane-lab/: the same fill,
 * the same weight, the same bar, centred under the label.
 */
