/* Useless Umlaut: a placeholder child theme for the uselessumlaut.wine preview. The design round comes later;
   this only makes the wines, the labels and the shipping estimate readable. Loaded after @fluid-theme/core;
   everything is in @layer themes, so the core's utilities (.hp, .sr-only) still win. */
@layer themes {
  :root {
    --accent: oklch(40% 0.14 15); /* Sangiovese red */
    --radius-card: 0px;
    --radius-control: 0px;
  }

  .hero__headline { font-size: var(--step-5); max-inline-size: 14em; }
  .hero__subheadline { max-inline-size: 38rem; }

  /* The preview strip under the nav. */
  .preview-note {
    margin: 0;
    inline-size: 100%;
    max-inline-size: none;
    padding: var(--space-2xs, 0.35rem) var(--space-s, 1rem);
    font-size: var(--step--1);
    text-align: center;
    background: var(--color-surface);
    border-block-end: var(--border-width) solid var(--color-border);
  }

  /* Text sections: a reading width. */
  .text-block .container > * { max-inline-size: 44rem; }
  .text-block .section__head, .wines-block .section__head, .gallery-block .section__head { margin-block-end: var(--space-m); }
  .faq .accordion { max-inline-size: 48rem; }
  .accordion__trigger::before { content: none; }

  /* Wine cards. */
  .wine-grid {
    display: grid;
    gap: var(--space-m);
    /* 17rem: the narrowest card still fits the price and "Current release" on one line in every look. */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    margin-block-end: var(--space-m);
  }
  /* Every card is a column and its body grows, so the price and status row sits on the card's floor and lines up
     across a row of cards however long the name, facts or origin are (Neil's review 2026-11-22). */
  .wine-card { display: flex; flex-direction: column; border: var(--border-width) solid var(--color-border); background: var(--color-surface); }
  .wine-card__link { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit; text-decoration: none; }
  .wine-card__link:hover .wine-card__title, .wine-card__link:focus-visible .wine-card__title { text-decoration: underline; }
  .wine-card__media { aspect-ratio: 3 / 4; overflow: hidden; background: var(--color-border-subtle, var(--color-border)); }
  .wine-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .wine-card__nophoto {
    display: grid; place-items: center; width: 100%; height: 100%;
    font-family: var(--font-heading); font-size: var(--step-2); color: var(--color-text-muted);
  }
  .wine-card__body { flex: 1 1 auto; padding: var(--space-s); display: flex; flex-direction: column; gap: var(--space-3xs, 0.25rem); }
  .wine-card__body > * { margin: 0; }
  .wine-card__title { font-size: var(--step-1); }
  .wine-card__facts, .wine-card__origin { font-size: var(--step--1); color: var(--color-text-muted); }
  /* Price and status share a baseline (the badge's text, not its box, lines up with the price). */
  .wine-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs); margin-block-start: auto; padding-block-start: var(--space-xs); }
  /* Shared rows line up across a row of cards (playbook "Cards and grids line up"): with subgrid every card's photo,
     name, facts, origin and price row sit on the same tracks of the grid, so a two-line name or a missing origin
     never moves the next card's lines. The rows between cards come from the card's own margin (the grid's row gap
     would open inside the cards too). Without subgrid the flex column above still pins the price row to the floor. */
  @supports (grid-template-rows: subgrid) {
    html:root .wine-grid { row-gap: 0; } /* html:root: wins over a look's own gap shorthand; the card margin is the row gap */
    .wine-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; margin-block-end: var(--wine-grid-row-gap, var(--space-l)); }
    .wine-card__link { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; row-gap: 0; }
    .wine-card__media { grid-row: 1; }
    .wine-card__body { display: grid; grid-row: 2 / -1; grid-template-rows: subgrid; row-gap: var(--space-3xs, 0.25rem); }
    .wine-card__title { grid-row: 1; }
    .wine-card__facts { grid-row: 2; }
    .wine-card__origin { grid-row: 3; }
    .wine-card__meta { grid-row: 4; align-self: end; }
  }
  .wine-card__price, .wine__price { font-weight: 700; font-variant-numeric: tabular-nums; }

  /* One wine. */
  .wine__grid {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    align-items: start;
  }
  .wine__media img { width: 100%; height: auto; display: block; }
  .wine__nophoto { aspect-ratio: 3 / 4; border: var(--border-width) solid var(--color-border); }
  .wine__body { max-inline-size: 40rem; }
  .wine__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs); font-size: var(--step-1); }
  .wine__facts { display: grid; gap: var(--space-3xs, 0.25rem); margin: 0; }
  /* Label and value share a baseline: the small caps label used to sit at the top of the row and its own
     margin pushed the row open, so values looked lower than their labels. */
  .wine__facts > div { display: grid; grid-template-columns: 7rem 1fr; gap: var(--space-s); align-items: first baseline; }
  .wine__facts dt { font-weight: 700; margin: 0; line-height: var(--leading-normal, 1.5); }
  .wine__facts dd { margin: 0; line-height: var(--leading-normal, 1.5); }
  .wine__notes h2 { font-size: var(--step-1); }
  .wine__order { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }

  /* Shipping estimate. */
  .ship-estimate {
    margin-block-start: var(--space-l);
    max-inline-size: 48rem;
    border: var(--border-width) solid var(--color-border);
    background: var(--color-surface);
    padding: clamp(var(--space-s), 4cqi, var(--space-l));
  }
  .ship-estimate__head > * { margin: 0; }
  .ship-estimate__head > * + * { margin-block-start: var(--space-3xs, 0.25rem); }
  .ship-estimate__free { font-weight: 700; }
  /* The fields: ZIP, how many, service. Each field spans three rows of the grid (label, box, help) and shares
     them through subgrid, so the boxes sit on one line at one height even if a label wraps; a label sits at the
     bottom of its row, next to its box. Two columns on a phone (service on its own line), three from 34rem. */
  .ship-estimate__form { container-type: inline-size; }
  .ship-estimate__fields {
    display: grid;
    gap: var(--space-s);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-block: var(--space-s);
  }
  .ship-estimate__fields .form-group {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: var(--space-3xs, 0.25rem);
    align-content: start;
    margin: 0;
    min-inline-size: 0;
  }
  .ship-estimate__fields .form-group:last-child { grid-column: 1 / -1; }
  @container (min-width: 34rem) {
    .ship-estimate__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ship-estimate__fields .form-group:last-child { grid-column: auto; }
  }
  /* Labels, help and error text line up with the text inside the field, not with its box edge (Neil, 2026-11-22):
     --field-pad is the field's own inline padding, and --field-inset follows the field's corner, so a pill field
     (radius as large as the padding or more) insets its label by padding + border, a square one by 0, a slightly
     rounded one by its radius. Lengths are in rem (from --step-0), so the label's smaller type uses the same inset. */
  .ship-estimate {
    --field-pad: var(--look-field-pad, calc(0.8 * var(--step-0)));
    --field-inset: min(var(--field-pad) + var(--border-width, 1px), var(--radius-control, 0px));
  }
  .ship-estimate__fields .form-label { align-self: end; margin: 0; line-height: 1.3; }
  .ship-estimate__fields .form-help { margin: 0; }
  .ship-estimate__fields :is(.form-label, .form-help, .form-error) { padding-inline-start: var(--field-inset); }
  .ship-estimate input:not([type="checkbox"]), .ship-estimate select { padding-inline-start: var(--field-pad); }
  .ship-estimate input:not([type="checkbox"]) { padding-inline-end: var(--field-pad); }
  .ship-estimate__check { padding-inline-start: var(--field-inset); }
  .ship-estimate .alert { --field-inset: 0; }
  /* How many: no native spinner (it sat as a grey box inside the pill); one fewer / one more are buttons at the
     field's end, on the field's own colours, with the arrow keys and typing still working. */
  .ship-estimate input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
  .ship-estimate input[type="number"]::-webkit-inner-spin-button,
  .ship-estimate input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
  .ship-estimate__qty { position: relative; container-type: inline-size; }
  .ship-estimate__qty input[type="number"] { padding-inline-end: calc(max(var(--field-pad) - 0.5rem, 0.25rem) + 4.25rem); }
  .ship-estimate__step {
    position: absolute; inset-block: 0; margin-block: auto;
    display: grid; place-items: center;
    inline-size: 2rem; block-size: 2rem; padding: 0;
    color: var(--color-text); background: transparent;
    -webkit-tap-highlight-color: transparent;
    border: 0; border-radius: var(--radius-control, 0);
    cursor: pointer;
    transition: background-color var(--duration-fast, 0.15s) ease;
  }
  .ship-estimate__step[data-step="-1"] { inset-inline-end: calc(max(var(--field-pad) - 0.5rem, 0.25rem) + 2rem); }
  .ship-estimate__step[data-step="1"] { inset-inline-end: max(var(--field-pad) - 0.5rem, 0.25rem); }
  /* A field too narrow for the number and both buttons (a pill at 320 px) keeps the number: typing and the arrow
     keys still step it. */
  @container (max-width: 8.5rem) {
    .ship-estimate__step { display: none; }
    .ship-estimate__qty input[type="number"] { padding-inline-end: var(--field-pad); }
  }
  .ship-estimate__step:hover { background: color-mix(in oklab, currentColor 10%, transparent); }
  .ship-estimate__step:focus-visible { outline: var(--focus-ring-width, 2px) solid var(--color-focus); outline-offset: -2px; }
  @media (forced-colors: active) { .ship-estimate__step { color: ButtonText; } }
  /* One height for every box; no block padding, so the text's line box fits inside and the input and the select
     centre their text the same way (with the core's padding the 1.4 line box overflowed a 3.25rem box and the
     select's text sat up to 2px lower than the input's in Courier Prime). */
  .ship-estimate select, .ship-estimate input:not([type="checkbox"]) { inline-size: 100%; block-size: 3.25rem; min-block-size: 0; padding-block: 0; margin: 0; }
  .ship-estimate__check { display: flex; gap: var(--space-xs); align-items: center; margin-block: 0 var(--space-s); font-weight: 600; }
  .ship-estimate__check input { margin: 0; flex: none; }
  .ship-estimate__to { font-weight: 600; }
  .ship-estimate__result { margin-block-start: var(--space-m); }
  .ship-estimate__result p { margin: 0; }
  .ship-estimate__total { font-size: var(--step-2); font-weight: 700; }
  /* The boxes are already named ("Box 1: 6 bottles"), so no list numbers hanging outside the text edge. */
  .ship-estimate__boxes { margin: 0; padding: 0; list-style: none; }
  .ship-estimate__warnings { margin: 0; padding-inline-start: 1.25rem; }
  .form-help { font-size: var(--step--1); color: var(--color-text-muted); }

  /* Select boxes: our own arrow with room around it. The native arrow sat almost on the box's right edge, and on
     the pill-shaped fields (night, cellar) it touched the curve. Two gradient halves draw a small triangle in the
     text colour, --select-arrow-inset from the box's end edge (1em; the pill looks set 1.4em). Forced-colours
     mode gets the native control back.
     Same fix proposed upstream in the Fluid Theme (base.css); drop this once a release with it is vendored. */
  select:not([multiple], [size]) {
    --_arrow: 0.3em;
    --_arrow-inset: var(--select-arrow-inset, 1em);
    -webkit-appearance: none;
    appearance: none;
    padding-inline-end: calc(var(--_arrow-inset) + 2 * var(--_arrow) + 0.75em);
    background-image:
      linear-gradient(45deg, transparent calc(50% - 0.5px), currentColor calc(50% + 0.5px)),
      linear-gradient(135deg, currentColor calc(50% - 0.5px), transparent calc(50% + 0.5px));
    background-size: var(--_arrow) var(--_arrow);
    background-position:
      right calc(var(--_arrow-inset) + var(--_arrow)) top 52%,
      right var(--_arrow-inset) top 52%;
    background-repeat: no-repeat;
  }
  select:not([multiple], [size]):dir(rtl) {
    background-position:
      left var(--_arrow-inset) top 52%,
      left calc(var(--_arrow-inset) + var(--_arrow)) top 52%;
  }
  @media (forced-colors: active) {
    select:not([multiple], [size]) { -webkit-appearance: auto; appearance: auto; background-image: none; }
  }

  /* Pill and block buttons: the label is centred on its cap height, not on the font's ascent and descent, which
     differ per face (Schibsted Grotesk, Courier Prime). text-box trims the line box to cap height and baseline
     where supported; the height stays as before (min-block-size). Upstream proposal as above. */
  /* text-box trims block containers only, and a flex container's text sits in an anonymous flex item it can't
     reach, so a text-only button becomes an inline-block here; the padding is worked out from the cap height so
     the button keeps its height (2.8em, at least 3rem). Buttons with an icon or other child keep the flex layout. */
  @supports (text-box: trim-both cap alphabetic) {
    .button:not([data-variant="ghost"]):not(:has(> *)) {
      display: inline-block;
      vertical-align: middle;
      text-align: center;
      text-box: trim-both cap alphabetic;
      padding-block: max(calc((2.8em - 1cap) / 2), calc((3rem - 1cap) / 2 - var(--border-width, 1px)));
      min-block-size: 0;
    }
  }
  /* Without text-box (Firefox today) the core's flex button stays; Courier Prime (zine) then sits 0.09em high, so
     its padding shifts the label down by that much. Schibsted Grotesk measures centred already. */
  @supports not (text-box: trim-both cap alphabetic) {
    [data-look="zine"] .button { padding-block: calc(0.9em + 0.09em) calc(0.9em - 0.09em); }
  }

  /* Labels gallery. */
  .label-grid {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
  }
  .label-grid figure { margin: 0; }
  .label-grid img {
    width: 100%; aspect-ratio: 1; object-fit: contain; display: block;
    background: var(--color-surface); border: var(--border-width) solid var(--color-border);
  }
  .label-grid figcaption { font-size: var(--step--1); margin-block-start: var(--space-3xs, 0.25rem); }

  /* Footer: the site name in the heading face. */
  .site-footer__name { font-family: var(--font-heading); font-size: var(--step-1); color: var(--color-text); margin: 0; }
  .site-footer__brand p { margin: 0; max-inline-size: 22rem; }

  [id] { scroll-margin-block-start: var(--space-m); }
}

/* The looks (styles/looks/*.css, src/lib/look.ts). Every rule here is scoped to [data-look] or to markup only a look
   shows, so the placeholder look above is unchanged. */
@layer themes {
  [data-look] .hero[data-art] { display: grid; gap: var(--space-l) var(--space-xl); align-items: center; }
  @media (min-width: 52rem) {
    [data-look] .hero[data-art] { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  }
  [data-look] .hero__content { max-inline-size: 40rem; }
  [data-look] .hero__headline { max-inline-size: none; }
  [data-look] .hero[data-art] { padding-block-end: var(--space-l); }
  [data-look] .hero__art { margin: 0; justify-self: center; inline-size: min(100%, 30rem); }
  [data-look] .hero__art img { display: block; inline-size: 100%; block-size: auto; }
  /* Each look's hero art is in the page; only the current look's shows (Hero.astro). */
  [data-look-art] { display: none; }
  [data-look="night"] [data-look-art~="night"], [data-look="zine"] [data-look-art~="zine"], [data-look="cellar"] [data-look-art~="cellar"],
  [data-look="sk"] [data-look-art~="sk"], [data-look="sk2"] [data-look-art~="sk2"] { display: block; }
  .site-footer__mark { inline-size: 4.5rem; block-size: auto; display: block; }
  :root:not([data-look]) .site-footer__mark { display: none; }
}

/* The look picker (components/LookPicker.astro) and the look's name toast. Built from the look's own tokens, so it
   belongs to every look. */
@layer themes {
  /* The bar sits above the page so the open list covers the hero (whose content is raised, Fluid hero.css). */
  .nav:has(.look-picker) { position: relative; z-index: 30; }
  .look-picker { position: relative; display: flex; }
  .look-picker__button {
    display: grid; place-items: center;
    inline-size: 2.75rem; block-size: 2.75rem; padding: 0;
    color: var(--nav-ink, var(--color-text)); background: transparent;
    border: var(--border-width, 1px) solid transparent; border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .look-picker__button svg { inline-size: 1.35rem; block-size: 1.35rem; }
  .look-picker__button:hover { background: color-mix(in oklab, currentColor 9%, transparent); }
  .look-picker__button[aria-expanded="true"] { border-color: currentColor; }
  .look-picker__button:focus-visible { outline: var(--focus-ring-width, 2px) solid var(--nav-ink, var(--color-focus)); outline-offset: 2px; }
  .look-picker__panel {
    position: absolute; inset-block-start: calc(100% + 0.5rem); inset-inline-end: 0; z-index: 50;
    inline-size: max-content; min-inline-size: 15rem; max-inline-size: calc(100vw - 2rem);
    padding: var(--space-xs) 0;
    color: var(--color-text); background: var(--color-background);
    border: var(--border-width, 1px) solid var(--color-border-strong); border-radius: min(var(--radius-card, 0px), 1rem);
    box-shadow: 0 1rem 2.5rem -1rem rgb(0 0 0 / 0.35);
  }
  .look-picker__panel:not([hidden]) { animation: look-panel-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes look-panel-in { from { opacity: 0; transform: translateY(-0.35rem); } }
  .look-picker__title {
    margin: 0; padding: var(--space-3xs, 0.25rem) var(--space-s) var(--space-2xs, 0.4rem);
    font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted);
  }
  .look-picker__list { margin: 0; padding: 0; list-style: none; }
  .look-picker__item {
    display: flex; align-items: center; gap: var(--space-xs);
    min-block-size: 2.75rem; padding: 0 var(--space-s);
    font-family: var(--font-body); font-size: var(--step-0); line-height: 1.2;
    color: var(--color-text); text-decoration: none;
  }
  .look-picker__item:hover { background: color-mix(in oklab, var(--color-text) 7%, transparent); }
  /* Inset ring (stays on the panel's colour); :root raises it over a look's own :focus-visible offset. */
  :root .look-picker .look-picker__item:focus-visible { outline: var(--focus-ring-width, 2px) solid var(--color-focus); outline-offset: -4px; }
  /* The current look: a small dot at the row's end. */
  .look-picker__item[aria-current="true"]::after {
    content: ""; flex: none; margin-inline-start: auto;
    inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: currentColor;
  }
  .look-picker__name { margin-inline-end: var(--space-s); }
  /* A swatch of the look: its paper, its ink and its accent. */
  .look-picker__swatch {
    flex: none; inline-size: 1.5rem; block-size: 1.5rem; border-radius: 50%;
    background: conic-gradient(var(--s3) 0 25%, var(--s2) 0 50%, var(--s1) 0);
    box-shadow: inset 0 0 0 1px rgb(127 127 127 / 0.55);
  }
  @media (forced-colors: active) { .look-picker__swatch { forced-color-adjust: none; } }

  .look-toast {
    position: fixed; inset-inline: 0; inset-block-end: max(1.25rem, env(safe-area-inset-bottom)); z-index: 60;
    inline-size: max-content; max-inline-size: calc(100vw - 2rem); margin: 0 auto;
    padding: 0.7rem 1.25rem;
    font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; line-height: 1.2; letter-spacing: 0.02em;
    color: var(--color-background); background: var(--color-text);
    border-radius: 999px; box-shadow: 0 0.75rem 2rem -0.75rem rgb(0 0 0 / 0.45);
    opacity: 0; transform: translateY(0.75rem); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .look-toast:empty { visibility: hidden; }
  .look-toast[data-show] { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .look-toast { transform: none; transition: opacity 0.15s linear; }
    .look-picker__panel:not([hidden]) { animation: none; }
  }
}

/* The header and the look picker at every width (Neil, 2026-11-23: between about 600 and 1200px the palette, cart and
   "See the wines" dropped to a second row on the LEFT and the look list opened off the left edge; in Opus Lily the
   list's names were cream on cream). */
@layer themes {
  /* Two deliberate rows when one doesn't fit. Wide: the brand and the links on the first row, and when the palette,
     cart and button can't fit beside them they take a second row on the RIGHT. The links take almost all the free
     space (1000 to 1) with their items pushed to the end, so on one row nothing moves; a wrapped actions row is alone
     on its line, takes the whole width and pushes its items to the end. */
  .nav > .nav__menu { flex-grow: 1000; justify-content: flex-end; }
  .nav > .nav__actions { flex-grow: 1; justify-content: flex-end; }
  /* Narrower than 58rem the brand and the links no longer share a row in every look (sk2's wide caps need 57.4rem,
     glyph's 55.3rem), the links would wrap under the brand and push the icons to a third row, so the bar turns to
     the phone layout: the brand and the icons on the first row, the links under them from the text edge. The button
     repeats the Wines link and steps aside. (Fluid's own phone rules apply below 40rem.) */
  @container nav (max-width: 58rem) {
    .nav > .nav__brand { flex: 1 1 0; min-inline-size: 0; overflow-wrap: break-word; }
    .nav > .nav__actions { order: 1; flex: none; margin-inline-start: auto; gap: var(--space-2xs, 0.4rem); }
    .nav > .nav__menu {
      order: 3; flex: 1 1 100%; justify-content: flex-start;
      margin-inline: calc(-1 * var(--_nav-pad, var(--nav-gap, var(--space-3))));
    }
    .nav .nav__cta { display: none; }
    /* The list hangs from the end of the icon group, which ends at the bar's edge (on a phone the cart sits after
       the palette, so a list hung from the palette's own edge ran off the left side at 320). */
    .nav > .nav__actions { position: relative; }
    .nav .look-picker { position: static; }
  }

  /* The list has its own surface and ink, the page's, whatever the bar sets: a look that re-inks its nav (Opus
     sets --color-text to cream on .nav) left the names cream on a cream panel. The page's colours are caught on
     :root, where var() resolves to the look's own tokens, and the panel uses those. */
  :root {
    --look-panel-bg: var(--color-background);
    --look-panel-ink: var(--color-text);
    --look-panel-muted: var(--color-text-muted);
    --look-panel-border: var(--color-border-strong);
    --look-panel-focus: var(--color-focus);
  }
  .look-picker__panel {
    color: var(--look-panel-ink); background: var(--look-panel-bg); border-color: var(--look-panel-border);
    /* Anchored to the button's end edge; it never runs past the screen (the script also nudges it back inside). */
    max-inline-size: calc(100vw - 32px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .look-picker__title { color: var(--look-panel-muted); }
  .nav .look-picker__item { color: var(--look-panel-ink); }
  .look-picker__item:hover { background: color-mix(in oklab, var(--look-panel-ink) 7%, transparent); }
  :root .look-picker .look-picker__item:focus-visible { outline-color: var(--look-panel-focus); }
}

/* Page transitions, every look: the browser cross-fades and slides one page into the next on a same-site link (a
   cross-document view transition), the nav stays put, and a wine's card photo grows into the wine page's photo
   (view-transition-name from WineCard.astro and Wine.astro) and back. Browsers without cross-document view
   transitions (Firefox today) load the page as usual. With reduced motion there is none. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.nav { view-transition-name: site-nav; }
.wine-card__media, .wine__media { view-transition-class: wine-photo; }
/* The other wines' photos on the way out (no partner on the next page) leave with the page, not on their own. */
::view-transition-old(*.wine-photo):only-child { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both uu-page-out; }
::view-transition-new(*.wine-photo):only-child { animation: 340ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms both uu-page-in; }
::view-transition-old(root) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both uu-page-out; }
::view-transition-new(root) { animation: 340ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms both uu-page-in; }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(site-nav), ::view-transition-new(site-nav) { animation-duration: 200ms; }
@keyframes uu-page-out { to { opacity: 0; transform: translateY(-0.5rem); } }
@keyframes uu-page-in { from { opacity: 0; transform: translateY(1rem); } }
/* A look change (the picker, the wordmark) is a plain cross-fade of the whole page, a little slower. */
:root[data-look-switching]::view-transition-old(root),
:root[data-look-switching]::view-transition-new(root) { animation: 420ms ease both uu-look-fade; transform: none; }
:root[data-look-switching]::view-transition-old(root) { animation-direction: reverse; }
:root[data-look-switching]::view-transition-old(site-nav),
:root[data-look-switching]::view-transition-new(site-nav) { animation-duration: 420ms; }
@keyframes uu-look-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Full visual QA, 2026-11-23 (docs/qa-2026-11-23.md). Shared fixes for every look. */
@layer themes {
  /* Lining figures wherever a number is data or display type. Syne (sk, sk2), Fraunces (cellar) and Cormorant
     Garamond (fog) default to old-style figures, so "Moon Unit 3" dropped its 3 below the line and "$36", "2020"
     sat at x-height next to capitals. Running text keeps the face's own figures. */
  :is(h1, h2, h3, h4, .hero__headline, .nav__brand, .site-footer__name, .wine-card__nophoto, .eyebrow, .badge,
      .wine-card__price, .wine__price, .wine__facts dd, .club-tier__amount, .club-tier__meta, .ship-estimate__total,
      .ship-estimate__to, .cart__totals, .cart-line__total, .cart-line__meta, .order-lines, .cart-link__count) {
    font-variant-numeric: lining-nums;
  }
  :is(.wine-card__price, .wine__price, .club-tier__amount, .club-tier__meta, .cart__totals dd, .cart-line__total,
      .order-lines__amount, .ship-estimate__total) {
    font-variant-numeric: lining-nums tabular-nums;
  }

  /* A painted DIY band (zine, opus, rosé) keeps its top padding: Fluid drops the top padding of a plain section
     that follows another plain section, and these bands are painted by the look, not by data-bg, so the eyebrow
     sat on the band's top edge. */
  :is([data-look="zine"], [data-look="opus"], [data-look="rose"]) #diy { padding-block-start: var(--space-section); }
  :is([data-look="zine"], [data-look="opus"], [data-look="rose"]) #diy > .container { border-block-start: 0; }

  /* The footer's site name sets solid in every look (it took the body's 1.6 leading when it wrapped). */
  .site-footer__name { line-height: 1.1; }
}
