/* ── Base. Three rules, so a freshly scaffolded app looks finished
      before it has any CSS of its own. Delete them if your app owns
      its own base styles. ──────────────────────────────────────────── */
:where([rst-search], [rst-search-clear], [rst-ftok] a, [rst-dropdown] > summary, [rst-dropdown-menu] a, [rst-dropdown-menu] button, [rst-dropdown-menu] [rst-menu-group] > summary, [rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-locale] button, [rst-scheme] button, [rst-combo-option], [rst-dtp-row], [rst-dtp-pick], [rst-cal-nav], [rst-row-menu] > summary, [rst-pagination] > a, [rst-seg-tabs] a, [rst-seg-tabs] > button, [rst-side-nav] a, [rst-switch], [rst-tblock-head], [rst-bulkbar-close], [rst-bulkbar-escalate], [rst-modal-close], [rst-modal-panel] > nav a, [rst-signin-providers] > a) .icon {
  block-size: 1rem;
  inline-size: 1rem;
}
:where([rst-search], [rst-pagination], [rst-side]) :focus-visible {
  outline: 2px solid var(--rst-accent);
  outline-offset: 2px;
}

/* ── page-foot: the column's footer row ───────────────────────────── */
[rst-page-foot] [rst-dropdown] { position: static; }

/* ── The list card, its toolbar, and its search field ─────────────── */
[rst-lbar] > [rst-search] {
  flex: 0 1 20rem;
}
[rst-list] > [rst-search] {
  margin: var(--rst-sp-3);
}
[rst-search] .icon {
  color: var(--rst-text-faint);
}
[rst-search] input[type="search"] {
  background: transparent;
  border: 0;
  color: var(--rst-text);
  flex: 1;
  font-family: inherit;
  font-size: var(--rst-fs-sm);
  min-inline-size: 0;
  padding: 0.2rem 0;
}
/* The zoom floor for the search input. Mobile Safari zooms a page that
   focuses a text control under 16px, and this input is set to
   --rst-fs-sm, which is 14px even after the touch step: this is the one
   floor that fires inside the rastrillo idioms. It sits directly after
   the rule above because at equal weight the later rule wins; see the
   input floor below for the rest of the reasoning. */
@media (pointer: coarse), (max-width: 40rem) {
  [rst-search] input[type="search"] { font-size: max(1rem, 1em); }
}
[rst-search] input[type="search"]::placeholder {
  color: var(--rst-text-faint);
}
/* The field box carries the focus indicator for the whole control, so
   the input's own default outline would only double it up. */
[rst-search] input[type="search"]:focus-visible {
  outline: none;
}
/* Sunk and focused like the other fields (see .rst-input's focus rule).
   The edge stays --rst-accent, not --rst-focus-edge: plain and signal
   set the focus edge to their line-strong grey, and this box has turned
   accent on focus in every theme since before the edge was a token. The
   1px offset is the box's own, kept so a flat theme's ring does not
   move. */
[rst-search]:focus-within {
  border-color: var(--rst-accent);
  box-shadow: inset 0 1px 1px var(--rst-depth-ambient, transparent), 0 0 0 3px var(--rst-focus-halo, transparent);
  outline: 2px solid var(--rst-accent);
  outline-offset: 1px;
}
/* The browser's own ✕ goes (design spec §6-v2.1b.6). It is
   ::-webkit-search-cancel-button and it does exactly what it is
   specified to do — it clears the input's VALUE — but a GET form
   submits on submit, so the results stand and the address bar still
   says ?q=. list-bar-search renders a real link in its place, and
   leaving both would be two affordances, one of which lies.
   -webkit-appearance is not redundant beside display: none: without it
   WebKit reserves the button's box before the display ever applies. */
[rst-search] input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
[rst-search-clear]:hover {
  background: var(--rst-accent-soft);
  color: var(--rst-text);
}

/* ── pagination. The current page is a filled chip AND aria-current AND
      bolder — three signals, so it never rests on colour alone. ────── */
/* border-box because the target floor counts a chip's padding and
   border; the minimum is written to match, the 2rem the chip's text
   has always had room for plus the padding and border around it, so a
   one-digit chip stays 53.19px wide on a desktop. On the content box it
   came to that by itself, and the floor's border-box narrowed it to
   32. A chip is a child of the strip: Previous and Next hold a span of
   their own (the word a phone hides), which drew a chip inside a chip
   when any span in the strip was one. */
[rst-pagination] > a,
[rst-pagination] > span {
  border: 1px solid var(--rst-line);
  border-radius: var(--rst-radius-sm);
  box-sizing: border-box;
  color: var(--rst-text-muted);
  display: inline-block;
  font-size: var(--rst-fs-sm);
  min-inline-size: calc(2rem + 2 * 0.6rem + 2px);
  padding: 0.3rem 0.6rem;
  text-align: center;
  text-decoration: none;
}
/* The current chip is the filled control's token pair, through the
   fallback that is today's accent, so a theme whose fill is not its
   accent (day's cobalt) keeps the chip and the primary button the
   same colour. The tap highlight is off on the links: iOS paints its
   own grey flash on a tapped chip, which is not the theme's. */
[rst-pagination] > a {
  -webkit-tap-highlight-color: transparent;
}
[rst-pagination] [aria-current="page"] {
  background: var(--rst-accent-fill, var(--rst-accent));
  border-color: var(--rst-accent-fill, var(--rst-accent));
  color: var(--rst-on-accent-fill, var(--rst-on-accent));
  font-weight: 600;
}
/* A disabled step has no chip: no edge where a link has one, and the
   faint text, so it is told apart by shape and not by colour alone.
   The border stays, transparent, so the strip does not move. */
[rst-pagination] [rst-pagination-disabled] {
  border-color: transparent;
  border-style: solid;
  color: var(--rst-text-faint);
}
[rst-pagination] [rst-pagination-gap] {
  border-color: transparent;
  min-inline-size: 0;
  padding-inline: var(--rst-sp-1);
}
/* What only a phone draws: the chevrons Previous and Next become, and
   the ellipsis for a run of pages the app passed no Gap for, which a
   wide strip shows in full. */
[rst-pagination-step] .icon { display: none; }
[rst-pagination] [rst-pagination-gap~="narrow"] { display: none; }
[rst-meter-bar]::-webkit-meter-inner-element { block-size: 100%; }
[rst-meter-bar]::-webkit-meter-bar { background: var(--rst-accent-soft); block-size: 100%; border: 0; border-radius: 2px; }
[rst-meter-bar]::-webkit-meter-optimum-value { background: var(--rst-accent); border-radius: 2px; }
[rst-meter-bar]::-moz-meter-bar { background: var(--rst-accent); border-radius: 2px; }
[rst-stat]:first-child {
  border-inline-start: 0;
}
[rst-stat~="lead"] {
  flex-basis: 14rem;
}
[rst-stat~="lead"] [rst-stat-num] {
  font-size: 2.1rem;
}
[rst-stat-delta][rst-tone~="positive"] {
  color: var(--rst-tone-positive-fg);
}
[rst-stat-delta][rst-tone~="negative"] {
  color: var(--rst-tone-negative-fg);
}
[rst-stat-delta][rst-tone~="neutral"] {
  color: var(--rst-text-muted);
}
[rst-tokens-list] { --rst-cols: 2fr 1fr 1fr 1fr 1fr auto var(--rst-col-menu); }
[rst-tokens-fact-label] { display: none; }
[rst-tokens-secret] { overflow-wrap: anywhere; user-select: all; }
@media (max-width: 800px) {
  [rst-tokens-list] [rst-lrow] > [rst-tokens-fact] { display: flex; font-size: inherit; gap: var(--rst-sp-3); grid-column: 1 / -1; justify-content: space-between; white-space: normal; }
  [rst-tokens-fact] > [rst-tokens-fact-label] { color: var(--rst-text); display: inline; }
  [rst-tokens-list] [rst-lrow] > :first-child, [rst-tokens-list] [rst-lrow] > [rst-tokens-state], [rst-tokens-list] [rst-lrow] > [rst-row-menu], [rst-tokens-list] [rst-lrow] > [role="cell"]:last-child:has(> [rst-row-menu]) { grid-row: 1; }
  /* A tokens table keeps its facts on a phone, labelled in the row, so
     the head row's fact headers are moved out of sight rather than
     removed: each fact cell keeps its column header for a screen reader. */
  [rst-tokens-list][role="table"] [rst-lrow~="head"] > .rst-m-hide { block-size: 1px; clip-path: inset(50%); display: block; inline-size: 1px; overflow: hidden; position: absolute; white-space: nowrap; }
}
[rst-snippet] > code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--rst-fs-sm); min-inline-size: 0; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
[rst-snippet-copy] { margin-inline-start: var(--rst-sp-3); }
[rst-snippet-status]:empty { block-size: 1px; clip-path: inset(50%); inline-size: 1px; overflow: hidden; position: absolute; white-space: nowrap; }

/* ── Narrow screens ───────────────────────────────────────────────── */
@media (max-width: 34rem) {
  [rst-lbar] > [rst-search] {
    flex: 1 1 100%;
  }
  [rst-stats~="pairs"] > [rst-stat] {
    padding: var(--rst-sp-3) var(--rst-sp-4);
  }
  [rst-stats~="pairs"] > [rst-stat]:nth-child(odd) {
    border-inline-start: 0;
  }
  [rst-stats~="pairs"] > [rst-stat]:nth-child(n+3) {
    border-block-start: 1px solid var(--rst-line);
  }
}

/* ── The structural idioms: box, list grid, row-menu, dropdown, ftok ── */
[rst-no-match] a { color: var(--rst-accent); }
:where(:is([rst-media-tile]) :is(a[href], button, summary, label, input, select, textarea):not([rst-row-main] > a, [rst-lrow] > a.rst-nm, [rst-lrow] > a[rst-person], [rst-media-name] > a)) { position: relative; z-index: 1; }
[rst-media-tile]:has([rst-media-name] > a:active) { --rst-pressed: 100%; background-color: var(--rst-tint-tile-press, var(--rst-surface)); box-shadow: inset 0 1px 2px var(--rst-depth-ambient, transparent); transition: none; }
@media (hover: hover) {
  [rst-media-tile]:has([rst-media-name] > a):hover { --rst-hover: 100%; --rst-pressed: 0%; background-color: color-mix(in srgb, var(--rst-tint-tile-press, var(--rst-surface)) var(--rst-pressed), color-mix(in srgb, var(--rst-tint-tile-hover, var(--rst-surface)) var(--rst-hover), var(--rst-surface))); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--rst-depth-hl, transparent) var(--rst-hover), transparent), inset 0 -1px 0 color-mix(in srgb, var(--rst-depth-contact, transparent) var(--rst-hover), transparent); transition: --rst-hover 0.25s ease, --rst-pressed 0.25s ease; }
  [rst-media-tile]:hover:has([rst-media-name] > a:active) { --rst-pressed: 100%; background-color: var(--rst-tint-tile-press, var(--rst-surface)); box-shadow: inset 0 1px 2px var(--rst-depth-ambient, transparent); transition: none; }
}
@media (max-width: 800px) {
  [rst-lrow][role="row"]:has(> :last-child > [rst-row-menu]):not(:has(> :not(:first-child, .rst-m-hide, :last-child))) > :first-child { grid-column: 1 / -2; }
}
/* The kebab goes in the last column, never the next free one. Below
   800px a row whose middle cells are all rst-m-hide has only its name
   and its kebab left, and auto-placement put the kebab in the auto
   column: mid-row beside the name, with the empty kebab column after
   it. */
[rst-lrow] > [rst-row-menu]:last-child, [rst-lrow] > [role="cell"]:last-child:has(> [rst-row-menu]) { grid-column-end: -1; }

/* row-menu — the per-row kebab: native details/summary, no JS. The
   destructive item sits last, class rst-danger, label ending "…".
   The panel hangs from the <details>, so the <details> hugs its kebab:
   fit-content, because justify-self only shrinks it in a grid cell (and
   in a block only in engines that apply it there). Left to fill a flex
   column or a block in Safari, it was as wide as its container and the
   panel opened at the container's far edge, nowhere near the kebab.
   The auto margin then puts it at the trailing edge in every engine,
   which justify-self alone does only in a grid and in Chromium. The
   panel opens toward the leading side, and without anchor positioning
   nothing flips it: a hugging menu left at the leading edge hung its
   panel off the screen. In a grid cell or after a flex: 1 cell the
   margin has nothing to take, so it changes nothing there. */
[rst-row-menu] { inline-size: fit-content; justify-self: end; margin-inline-start: auto; position: relative; }
[rst-row-menu] > summary { align-items: center; border-radius: var(--rst-radius-sm); color: var(--rst-text-faint); cursor: pointer; display: flex; height: 26px; justify-content: center; list-style: none; width: 26px; }
[rst-row-menu] > summary::-webkit-details-marker { display: none; }
[rst-row-menu] > summary:hover, [rst-row-menu][open] > summary { background: var(--rst-tint-hover, var(--rst-accent-soft)); color: var(--rst-text); }
[rst-row-menu-panel] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); inset-inline-end: 0; min-width: 176px; padding: 0.25rem; position: absolute; top: calc(100% + 4px); z-index: 40; }
[rst-row-menu-panel] a, [rst-row-menu-panel] button { background: none; border: 0; border-radius: var(--rst-radius-sm); color: var(--rst-text); cursor: pointer; display: block; font: inherit; font-size: var(--rst-fs-sm); font-weight: 450; margin: 0; padding: 0.4rem 0.65rem; text-align: start; text-decoration: none; width: 100%; }
/* A menu row's three states, the same shape in every menu panel: the
   hover tint with a highlight along its top edge, the press tint while
   a hovered row is held, and the tap tint (transparent wherever a
   theme never set it) for a finger, which hovers nothing. The danger
   item is excluded from all three: its hover is the negative tone
   below, and a press rule at a higher weight once turned a held Delete
   blue. */
[rst-row-menu-panel] a:not(.rst-danger):active, [rst-row-menu-panel] button:not(.rst-danger):active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-row-menu-panel] a:not(.rst-danger):hover, [rst-row-menu-panel] button:not(.rst-danger):hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-row-menu-panel] a:not(.rst-danger):hover:active, [rst-row-menu-panel] button:not(.rst-danger):hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
/* The separator every menu surface draws. Scoped to the row menu alone
   until the live page showed the topbar account menu wearing the UA's
   thick inset 3D <hr> instead: that panel is a .rst-dropdown__menu, and
   nothing named it. The three panels are one surface with three entry
   points, so one rule names all three — .rst-locale redundantly, since
   its panel carries .rst-dropdown__menu too, but a locale menu built
   without that class is still a menu and still needs the hairline. */
[rst-row-menu-panel] hr,
[rst-dropdown-menu] hr,
[rst-locale] hr,
[rst-scheme] hr { border: 0; border-top: 1px solid var(--rst-line); margin: 0.25rem 0; }
/* A menu item sets its own colour at (0,1,1), which beat the (0,1,0)
   above, so a destructive item drew in ink. In a menu panel the danger
   colour is restated at (0,2,0). */
[rst-row-menu-panel] .rst-danger, [rst-dropdown-menu] .rst-danger { color: var(--rst-tone-negative-fg); }
[rst-row-menu-panel] .rst-danger:hover { background: var(--rst-tone-negative-bg); }
/* A POST item is a one-button form: no margin, so it lines up with a
   link item. busy.js puts a spinner in front of a submit button's label,
   and a menu item is not an [rst-btn], so the spinner sits BESIDE the
   label; this reserves its slot at the inline end whether or not the
   item is busy, so a long translated label can never widen the panel or
   wrap mid-submit. The cost is 1.5rem of padding on POST items. */
[rst-row-menu-panel] form { margin: 0; }
[rst-row-menu-panel] button { padding-inline-end: calc(0.65rem + 1rem + var(--rst-sp-2)); position: relative; }
[rst-row-menu-panel] button > [rst-spin] { inset-block: 0; inset-inline-end: 0.65rem; margin-block: auto; position: absolute; }

/* dropdown — the details/summary menu vocabulary (header overflow,
   list-bar Filter/Sort). Exclusivity between siblings is the native
   details name attribute — zero JS.
   The panel hangs from the <details>, so the <details> hugs its
   summary: fit-content. Left to fill a block or a stretching flex
   column, it was as wide as its container and the panel opened at the
   container's far edge: at 1280 the gallery's Filter opened its menu
   at the other side of the frame. Unlike the row menu it is not then
   moved to the trailing edge: a dropdown sits where the page puts it,
   at the leading edge of a block as often as at the end of a bar. So
   at the leading edge the panel has no room on the side it opens
   toward, and it hugs only where something can flip it: anchor
   positioning (the @supports block below), or anchor.js, which marks
   the root data-rst-flip-menus where the feature is missing. With
   neither, it keeps the container's width, far from a summary at the
   leading edge but on the screen. :where(), so the three places that
   keep the width they are given win: a dropdown inside another menu is
   one of its rows; a shell's tail lays its menus out as a flex row on a
   desktop, where auto is already the summary's width, and as
   full-width rows of the phone card; and the sidebar's profile spans
   its rail foot, the box its card is as wide as where it cannot be
   anchored. */
[rst-dropdown] { position: relative; }
:where(:root[data-rst-flip-menus] [rst-dropdown]) { inline-size: fit-content; }
[rst-dropdown-menu] [rst-dropdown] { inline-size: auto; }
[rst-dropdown] > summary { align-items: center; color: var(--rst-text-muted); cursor: pointer; display: flex; gap: 0.3rem; list-style: none; padding: 0.4rem 0.6rem; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
[rst-dropdown] > summary::-webkit-details-marker { display: none; }
/* A dropdown's summary wears a plain button's face (A12): a face, and
   its edge as a 1px ring in the shadow, never a border, because a
   border, even transparent, is 1px of layout a summary does not have
   today. The radius is a token whose fallback is today's square
   corner, because the focus outline follows border-radius: a radius
   set here for every theme rounded the focus ring of a flat or old
   theme that paints no face (A15). Not every summary: the topbar and
   console account menus and the sidebar profile are their own
   controls, the menus in a shell's tail are flat beside the nav they
   sit with (in the bar and as rows of the phone card), the footer
   row's are a quiet line under the page, not buttons, a dropdown
   nested in a menu is one of that menu's rows, the bulk bar's summary
   draws its own small face, and a summary written as a button (the
   dropdown partial's) already has the whole button language, press
   and sheen included, which a second face at a higher weight would
   overpaint. The exclusions are in every state's selector, so an
   excluded summary never regains a face on hover or press. */
[rst-dropdown]:not([rst-shell-account], [rst-shell-profile], [rst-shell-tail] [rst-dropdown], [rst-page-foot] [rst-dropdown], [rst-bulkbar] [rst-dropdown], [rst-dropdown-menu] [rst-dropdown]) > summary:not([rst-btn]) { background: var(--rst-summary-face, transparent); border-radius: var(--rst-summary-radius, 0); box-shadow: 0 0 0 1px var(--rst-summary-edge, transparent), inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-x) var(--rst-shadow-y) 1px var(--rst-depth-contact, transparent), calc(var(--rst-shadow-x) * 2) calc(var(--rst-shadow-y) * 1.5) 3px var(--rst-depth-ambient, transparent); }
[rst-dropdown]:not([rst-shell-account], [rst-shell-profile], [rst-shell-tail] [rst-dropdown], [rst-page-foot] [rst-dropdown], [rst-bulkbar] [rst-dropdown], [rst-dropdown-menu] [rst-dropdown]) > summary:not([rst-btn]):active { box-shadow: 0 0 0 1px var(--rst-summary-edge, transparent), inset 0 1px 2px var(--rst-depth-contact, transparent); }
@media (hover: hover) {
  [rst-dropdown]:not([rst-shell-account], [rst-shell-profile], [rst-shell-tail] [rst-dropdown], [rst-page-foot] [rst-dropdown], [rst-bulkbar] [rst-dropdown], [rst-dropdown-menu] [rst-dropdown]) > summary:not([rst-btn]):hover { background: var(--rst-summary-face-hover, transparent); box-shadow: 0 0 0 1px var(--rst-summary-edge-hover, transparent), inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-x) var(--rst-shadow-y) 1px var(--rst-depth-contact, transparent), calc(var(--rst-shadow-x) * 2) calc(var(--rst-shadow-y) * 1.5) 3px var(--rst-depth-ambient, transparent); }
  [rst-dropdown]:not([rst-shell-account], [rst-shell-profile], [rst-shell-tail] [rst-dropdown], [rst-page-foot] [rst-dropdown], [rst-bulkbar] [rst-dropdown], [rst-dropdown-menu] [rst-dropdown]) > summary:not([rst-btn]):hover:active { box-shadow: 0 0 0 1px var(--rst-summary-edge-hover, transparent), inset 0 1px 2px var(--rst-depth-contact, transparent); }
}
[rst-dropdown] > summary:hover, [rst-dropdown][open] > summary { color: var(--rst-text); }
[rst-dropdown-menu] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); inset-inline-end: 0; margin-top: 4px; min-width: 176px; padding: 0.25rem; position: absolute; top: 100%; z-index: 30; }
[rst-dropdown-menu] a { border-radius: var(--rst-radius-sm); color: inherit; display: block; font-size: var(--rst-fs-sm); padding: 0.4rem 0.65rem; text-decoration: none; }
[rst-dropdown-menu] a[aria-current] { background: var(--rst-accent-soft); }
/* The menu row's three states (the comment at the row menu's panel):
   the current item keeps its tint and the danger item its tone. */
[rst-dropdown-menu] a:not([aria-current], .rst-danger):active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-dropdown-menu] a:not([aria-current], .rst-danger):hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-dropdown-menu] a:not([aria-current], .rst-danger):hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
/* locale-menu — the language switcher is a dropdown whose items are
   one-field POST forms (spec §2.4), so the button inside each form
   takes the menu-link styling. Autonyms keep their own script, so no
   text-transform here, ever. scheme-menu is the same shape for the
   colour scheme, and shares every rule, so the two menus beside each
   other in a shell cannot drift apart. */
[rst-locale] form, [rst-scheme] form { margin: 0; }
[rst-locale] button, [rst-scheme] button { background: none; border: 0; border-radius: var(--rst-radius-sm); color: var(--rst-text); cursor: pointer; display: block; font: inherit; font-size: var(--rst-fs-sm); padding: 0.4rem 0.65rem; text-align: start; width: 100%; }
/* The menu row's three states. The current item is not excluded here:
   it has no tint of its own (the accent label and weight mark it), and
   it hovered like its neighbours before, so it still does. */
[rst-locale] button:active, [rst-scheme] button:active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-locale] button:hover, [rst-scheme] button:hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-locale] button:hover:active, [rst-scheme] button:hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
[rst-locale] button[aria-current], [rst-scheme] button[aria-current] { color: var(--rst-accent); font-weight: 600; }
/* A row in an account card: a muted label at the start, a control at
   the end, or under the label where the card is too narrow for both
   (the sidebar's rail-wide card where anchors are missing). */
[rst-menu-row] { align-items: center; display: flex; flex-wrap: wrap; gap: var(--rst-sp-3); justify-content: space-between; min-block-size: var(--rst-target); padding-block: 0.25rem; padding-inline: 0.65rem; }
[rst-menu-row-label] { color: var(--rst-text-muted); font-size: 12.5px; }
/* A menu in a row (the Language menu) opens IN PLACE, as the 1.3
   card's and the sidebar profile's do: as a popover over the card it
   covered the account's links under it. Open, the row lines up on the
   label's and the summary's text, since the summary now has the list
   under it. */
[rst-menu-row]:has(> [rst-dropdown][open]) { align-items: baseline; }
[rst-menu-row] [rst-dropdown-menu] { border: 0; box-shadow: none; inset: auto; margin: 0; max-block-size: none; min-width: 0; padding-block: 0; padding-inline: 0; position: static; }
/* The Language row's list is a popover: a button with popovertarget
   opens it and the browser closes it (a tap outside, Escape, or the
   sheet's own Close), with no script. It never opens inside the card,
   which keeps its height. The button wears the summary's face.

   Below 800px the list is a sheet over the page: the fixed viewport's
   width (a scrollbar gutter the root reserves is outside it, and would
   clip a wider sheet), on the bottom edge, under a heading row (the
   row's own shape: the heading at the start, Close at the end) and
   over the overlay. No rule under the heading: a step of space, so the
   current language's tint never touches it. From 800px it is a menu beside the card, anchored
   to the card's box (--rst-card): at its inline start, top to top, or
   flipped to its other side or upward where there is no room. The
   heading row is a phone's only. Without anchor positioning the menu
   is where the browser puts a popover, centred in the window.

   An engine with no popover (Firefox 121-124) has a <details> in the
   row too, after the button, whose summary is the same face: the
   @supports pair shows the one mechanism the engine has, its open
   <details> shows the list, the next sibling, in the row as the 1.3
   card did, and every rule naming :popover-open is a rule that engine
   drops whole. */
[rst-menu-row] > [popovertarget] { color: var(--rst-text-muted); display: flex; font-size: 12.5px; gap: 0.3rem; inline-size: auto; padding: 0.4rem 0.6rem; white-space: nowrap; }
[rst-dropdown-menu]:has(> [rst-menu-row]) { anchor-name: --rst-card; }
[rst-menu-row] > :popover-open { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); color: var(--rst-text); min-inline-size: 176px; padding: 0.25rem; }
[rst-menu-row] > [popover] > [rst-menu-row] { margin-block-end: var(--rst-sp-2); }
[rst-menu-row] > [popover] h2 { font-size: var(--rst-fs-base); margin: 0; }
[rst-menu-row] [popovertargetaction=hide] { color: var(--rst-accent); font-size: var(--rst-fs-sm); }
@supports selector(:popover-open) {
  [rst-menu-row] > [popovertarget] + [rst-dropdown] { display: none; }
}
@supports not selector(:popover-open) {
  [rst-menu-row] > [popovertarget], [rst-menu-row] > [popover] > [rst-menu-row], [rst-menu-row] > [rst-dropdown]:not([open]) + [popover] { display: none; }
  [rst-menu-row] > [popover] { flex-basis: 100%; }
}
@media (max-width: 799.98px) {
  [rst-menu-row] > :popover-open { border-radius: 14px 14px 0 0; border-width: 1px 0 0; inline-size: auto; inset: auto 0 0; margin: 0; max-block-size: calc(100dvh - 3rem); }
  [rst-menu-row] > :popover-open::backdrop { background: var(--rst-overlay); }
}
@media (min-width: 800px) {
  [rst-menu-row] > [popover] > [rst-menu-row] { display: none; }
  @supports (position-area: block-end) and (position-try-fallbacks: flip-block) {
    [rst-menu-row] > :popover-open { inset: auto; margin: 0 4px; position-anchor: --rst-card; position-area: inline-start span-block-end; position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline; }
  }
}
/* Task 2's menu only ever held links; bulk-bar's actions menu (Task 4)
   is real submit buttons on the surrounding form, so the same panel
   needs button styling too — mirrors .rst-row-menu__panel's combined
   a/button rule above. */
[rst-dropdown-menu] button { background: none; border: 0; border-radius: var(--rst-radius-sm); color: inherit; cursor: pointer; display: block; font: inherit; font-size: var(--rst-fs-sm); margin: 0; padding: 0.4rem 0.65rem; text-align: start; width: 100%; }
[rst-dropdown-menu] button:not(.rst-danger):active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-dropdown-menu] button:not(.rst-danger):hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-dropdown-menu] button:not(.rst-danger):hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
/* The icon scheme control: Light, Dark and System as three icon
   buttons in one row, joined in a soft track with a shared edge. The
   current one is raised the way a seg-tabs current item is. The
   buttons are a menu row's own, not a dropdown's items, so they drop
   the full-width block face of the scheme and menu buttons above and
   take the icon's size. Each is drawn small, 32 by 24px, a menu row's
   control rather than a row of buttons, and its tap is its ::after, the
   target floor each way around its centre: the track's gap and inline
   padding make room for those hit cells, 2px apart, so a finger's
   44px cells never overlap and a mouse's 32px ones sit as close as the
   segments do. The buttons name their attribute twice to outweigh the
   floor's menu-button minimums, and the current button to outweigh the
   card's hover and press, (0,3,1). Each selector ends in what the rules
   above end in, so the control still answers to [rst-scheme] and to
   the script. */
[rst-scheme~="icons"] { align-items: center; background: var(--rst-bg); border: 1px solid var(--rst-line); border-radius: 8px; display: inline-flex; flex: none; gap: calc(var(--rst-target) - 2rem + 2px); padding: 2px max(2px, (var(--rst-target) - 2rem) / 2); }
[rst-scheme~="icons"][rst-scheme~="icons"] button { align-items: center; block-size: 1.5rem; color: var(--rst-text-muted); display: flex; inline-size: 2rem; justify-content: center; min-block-size: 0; min-inline-size: 0; padding: 0; position: relative; }
[rst-scheme~="icons"] button::after { content: ""; inset: calc((100% - var(--rst-target)) / 2); position: absolute; }
[rst-scheme~="icons"][rst-scheme~="icons"] button[aria-current] { background: var(--rst-surface); box-shadow: inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-lift); color: var(--rst-text); font-weight: inherit; }
/* The same content-box bug the inputs had, in the three menu panels:
   a full-width button inside a 0.25rem-padded panel measured 100% of
   the content box and then added its own 0.65rem of side padding, so
   every hover highlight bled ~20.8px past the panel's rounded edge.
   One rule for all three panels, because it is one cause. */
[rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-locale] button, [rst-scheme] button, [rst-dropdown-menu] button { box-sizing: border-box; }
[rst-dropdown-menu] .rst-danger:hover { background: var(--rst-tone-negative-bg); }
[rst-dropdown-menu] [rst-menu-group] > summary { color: var(--rst-text-muted); cursor: pointer; font-size: var(--rst-fs-sm); list-style: none; padding: 0.4rem 0.65rem; }
[rst-dropdown-menu] [rst-menu-group] > summary::-webkit-details-marker { display: none; }
/* A group's summary is a row of the menu and lifts like one, through a
   hover token of its own: it had no hover before, so a flat theme
   keeps none (A15). Held, it reads the tap tint in both press rules,
   which is the press colour in a theme that has one and nothing in a
   theme that does not. */
[rst-dropdown-menu] [rst-menu-group] > summary:active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-dropdown-menu] [rst-menu-group] > summary:hover { background: var(--rst-tint-group-hover, transparent); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-dropdown-menu] [rst-menu-group] > summary:hover:active { background: var(--rst-tint-tap, transparent); }
}
[rst-dropdown-menu] [rst-menu-group] > div { padding-inline-start: 0.6rem; }
/* Menus that fit the viewport (design spec §6-v2.1b, 1 and 2). Two
   bugs, one surface — and one rule for all four panels, because
   .rst-combo__list and .rst-dtp__list have carried the cap and the
   scroll since they were written and these two never did.

   THE CAP AND THE SCROLL come first because they work in every engine.
   The twelve-locale language menu measures 388px; on a short viewport
   its last entries were simply unreachable — no cap, no scroll, nothing
   to drag. The cap is the space a menu may take: 20rem where the window
   is tall, and the window itself less the room the anchor and the
   page's own chrome need where it is not. overscroll-behavior keeps a
   flick that bottoms the menu out from carrying on into the page behind
   it.

   THE 8rem FLOOR IS NOT DECORATION, and it went in after the first
   version of this rule shipped without one. dvh is the viewport, and
   inside an iframe the viewport is THE FRAME — so in the design
   gallery's own 100px preview frames `100dvh - 6rem` computed to 4px
   and a three-item menu rendered as a 12px sliver; below a 96px frame
   it computed to zero and the menu was invisible. A fix aimed at menu
   entries nobody could reach had shipped a menu with no entries at all.
   The floor is the honest trade: in a frame too short for the menu it
   overflows, and an overflowing menu can be scrolled to, where an
   invisible one cannot be anything. Any app embedding a screen in a
   short iframe had the same bug, so this is not a gallery fix.

   THE FLIP is CSS anchor positioning. A menu with no room below opens
   upward; one against the trailing edge opens the other way inline.
   Zero script.

   It is Chromium-only today. That is accepted, and the reason is
   recorded here rather than left looking like an oversight: an engine
   without it lands on the fixed position above, which is exactly what
   every engine does today, so nothing regresses — and Firefox and
   Safari gain the behaviour with no release from us. The alternative
   was script, which would put positioning behind JavaScript and make
   the scriptless path worse than the one we already ship. That trade is
   the wrong way round for this library. The one script there is, for a
   dropdown that hugs its summary at the leading edge, is anchor.js: it
   runs only where this block does not apply and only flips inline (see
   .is-flip-inline below); without it such a panel would open off the
   screen.

   anchor-scope is load-bearing, not decoration. anchor-name is a
   document-wide name, so without a scope every menu on the page would
   resolve --rst-menu to the LAST element carrying it and all of them
   would pile onto one anchor. Scoping the name to each disclosure's own
   subtree is what lets one name serve every menu in the library.

   Inside the @supports the fixed insets have to go. position-area
   supplies the containing block, so a leftover top: 100% would then be
   measured against THAT box and push the panel a whole anchor-height
   further down again. The margin stays: position-try-fallbacks flips
   margins along with insets, so one margin-block-start is the 4px gap
   in both directions.

   The cap is deliberately NOT a percentage of the position-area. A
   percentage would be the exact space available, which sounds better
   and is worse: an element clamped to fit never overflows, and overflow
   is precisely what triggers position-try-fallbacks, so the menu would
   scroll in place at the foot of the window instead of flipping up into
   the room above it.

   position-visibility covers the fixed positioning above. A fixed panel
   is deliberately outside every scrolling ancestor's clip — that is how
   a menu opened inside a card escapes it — but the anchor is NOT, so a
   rail's nav scrolled until the menu's own button is gone could leave
   the menu painted over unrelated content with nothing under it.
   anchors-visible ties the panel's visibility to its anchor's: when the
   button goes, the menu goes.

   It is a no-op in Chromium today, and that is written down rather than
   left to be rediscovered: Chromium's INITIAL value for the property is
   already anchors-visible, on every element. The CSS spec's initial
   value is `always`. So this declaration is not what produces today's
   behaviour — it is what keeps it if an engine ever aligns with the
   spec, which would otherwise orphan every menu here with no warning at
   all. ui's TestAMenuDoesNotOutliveTheAnchorScrolledAwayFromUnderIt
   watches for exactly that, and says the same at more length. */
[rst-dropdown-menu],
[rst-row-menu-panel] {
  max-block-size: min(20rem, max(calc(100dvh - 6rem), 8rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}
@supports (position-area: block-end) and (position-try-fallbacks: flip-block) {
  [rst-dropdown],
  [rst-row-menu] {
    anchor-name: --rst-menu;
    anchor-scope: --rst-menu;
  }
  :where([rst-dropdown]) { inline-size: fit-content; }
  [rst-dropdown-menu],
  [rst-row-menu-panel] {
    inset: auto;
    margin-block-start: 4px;
    position: fixed;
    position-anchor: --rst-menu;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    position-visibility: anchors-visible;
  }
}
/* An engine without anchor positioning cannot flip a panel in CSS:
   where it hangs is the <details>' box, and nothing in a stylesheet
   knows where that box is on the screen. anchor.js, a file of its own
   that does nothing where the feature exists and can be deleted once
   an app's browsers all have it, measures a dropdown's panel as it
   opens, only where the panel is absolute, and when it
   would leave the screen on the side it opens toward, and fits from the
   summary's other edge, marks the <details> .is-flip-inline. Without
   the script that engine keeps the dropdown as wide as its container
   (see the dropdown's own rule), so the panel stays on the screen. */
[rst-dropdown].is-flip-inline > [rst-dropdown-menu] { inset-inline-end: auto; inset-inline-start: 0; }

/* ftok — an applied filter as a removable chip; the × is a plain link
   to the unfiltered URL, so removing a filter is just navigation.
   The × is a target, so the floor block at the end of this file sizes
   it at --rst-target (32px with a mouse, 44 on a touch screen); it was
   17px until the accessibility gate measured it. The 24px here is only
   its size without that block. The chip has no block padding, so the ×
   sets its height rather than adding to it: the chip is the × plus its
   1px border, 34px on a desktop.
   No padding at the trailing end either: the × is the chip's end, and
   its hover fill runs to the border on three sides, with the chip's
   7px corners less the 1px border on its trailing two. Inset by a
   padding, the fill floated inside the chip with a gap after it and
   read as a second, smaller button. Logical corners, so a
   right-to-left chip rounds its left end. */
[rst-ftok] { align-items: center; background: var(--rst-surface); border: 1px solid var(--rst-line-strong); border-radius: 7px; display: inline-flex; font-size: var(--rst-fs-xs); gap: 0.45rem; padding-block: 0; padding-inline: 0.6rem 0; }
[rst-ftok] [rst-ftok-k] { color: var(--rst-text-muted); }
[rst-ftok] a { align-items: center; border-radius: 0; border-end-end-radius: 6px; border-start-end-radius: 6px; color: var(--rst-text-faint); display: inline-flex; height: 24px; justify-content: center; text-decoration: none; width: 24px; }
[rst-ftok] a:hover { background: var(--rst-tone-negative-bg); color: var(--rst-tone-negative-fg); }
@media (prefers-reduced-motion: reduce) {
  [rst-media-tile]:has([rst-media-name] > a):hover { transition: none; }
}

/* ── The form family: field, switch, choice cards, seg-tabs, layout ── */

/* switch — the one toggle mechanism: real checkbox, visible track. The
   track's width and height and the knob's size are theme tokens, in a
   fine-pointer set and a touch set (the query after these rules), each
   read through today's 34x19 and 15px, so a theme written before them
   draws the switch it drew; the knob is inset 2px, so its travel
   (--rst-switch-run) is the width less the knob and the insets, which
   is the width less the height. The track's radius is half its height
   and a hair, which the browser clamps to half: 10px on today's 19px
   track, the literal it replaced, and never the pill token, which a
   theme of its own may set square for its chips and tabs without
   squaring a switch that never read it (A15). The knob sits at the track's inline
   start and travels toward its end by --rst-switch-p, its share of the
   travel: 0 off, 1 on, and while it is dragged whatever rastrillo.js
   writes on the track. The on colour follows it exactly as far:
   --rst-switch-on is the on colour's share of the track, a color-mix()
   of the accent fill into the off colour, 0% off and 100% on, and the
   two numbers are set side by side by every rule here and by the one
   script write, and eased by one transition of the same length and
   curve, so the colour cannot drift from the knob (a scheme change
   mid-toggle lands through rastrillo.js's land(), as before). Two
   numbers rather than one and an overlay: an overlay fading in over
   the track stacks a second antialiased edge on the track's own, which
   measured 5.8% of a plain switch's pixels at a delta of 29 against
   the matrix's allowance of 24 on 1%, where color-mix() at 100% is
   the accent exactly (A15); and a color-mix() share must be a plain
   percentage, never calc(var()) (A4), so the knob's number cannot
   drive it. translateX is physical, so a
   right-to-left switch negates it (--rst-switch-dir) and the knob
   starts at the right; the start and the travel mirror together, or the
   knob leaves the track. The sign comes from the track's own direction,
   :dir(), which inset-inline-start and the drag read too: an LTR section
   inside an RTL page took the ancestor's -1 and sent the knob left out
   of its track. The [dir="rtl"] rule before it is for an engine without
   :dir(), which drops the two rules after it. The numbers' transition
   is a toggle's motion, with scripts or without: 0.24s, firm, no
   bounce; a drag turns it off so the knob follows the pointer 1:1, and
   a release takes the firmer 0.18s rule below to the nearer end.
   Without @property (Firefox before 128) the numbers are still set by
   every rule that reads them, so the switch paints, and a toggle lands
   at once. pan-y lets a vertical swipe on the track scroll the page
   and keeps a horizontal one for the drag. */
@property --rst-switch-p { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --rst-switch-on { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
[rst-switch] { align-items: center; cursor: pointer; display: inline-flex; gap: 0.6rem; position: relative; }
[rst-switch] input { height: 1px; opacity: 0; position: absolute; width: 1px; }
/* The knob is a lit dome in both schemes: near-white, a highlight on the
   side the light comes from, a contact shadow, and the theme's knob
   shadow under it (day's is a drop and a hairline ring); hovered, it
   lifts like a button: the contact shadow reaches further and the
   theme's hover knob shadow replaces the rest one. The track sits in:
   the contact shadow inset, and the ambient tone as a hairline rim
   inside its edge. In dark the knob had been the surface colour and
   read as a hole in the track. The off track is a grey dark enough to
   clear 3:1 against the surface and light enough for the knob to clear
   3:1 on it; the on track is the accent fill, and its sheen sits over
   the knob through --rst-switch-p and --rst-switch-dir, on hover and
   while the knob is dragged, so a right-to-left switch and a mid-drag
   knob keep it.
   Every new token falls back to what the switch painted before (the
   surface knob, the line-strong track, the accent, the rest knob shadow
   for the hover one), so a theme written before them draws the switch
   it drew; the flat themes' transparent depth tokens make the rim and
   the lift's contact shadow nothing on screen. The knob sets its
   background-color under the gradient, so a mode that drops background
   images still draws one. A disabled switch takes no hover. */
[rst-switch-track] { --rst-switch-p: 0; --rst-switch-on: 0%; --rst-switch-run: calc(var(--rst-switch-w, 34px) - var(--rst-switch-knob, 15px) - 4px); background-color: color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) var(--rst-switch-on), var(--rst-track-off, var(--rst-line-strong))); border-radius: calc(var(--rst-switch-h, 19px) / 2 + 0.5px); box-shadow: inset 0 1px 2px var(--rst-depth-contact, transparent), inset 0 0 0 0.5px var(--rst-depth-ambient, transparent); flex: none; height: var(--rst-switch-h, 19px); position: relative; touch-action: pan-y; transition: --rst-switch-p 0.24s cubic-bezier(0.22, 1, 0.36, 1), --rst-switch-on 0.24s cubic-bezier(0.22, 1, 0.36, 1); width: var(--rst-switch-w, 34px); }
[dir="rtl"] [rst-switch-track] { --rst-switch-dir: -1; }
[rst-switch-track]:dir(ltr) { --rst-switch-dir: 1; }
[rst-switch-track]:dir(rtl) { --rst-switch-dir: -1; }
[rst-switch-track]::after { background-color: var(--rst-knob-shade, var(--rst-surface)); background-image: radial-gradient(circle at calc(50% + var(--rst-light-x) * 22%) calc(30% + (var(--rst-light-y) + 1) * 10%), color-mix(in srgb, var(--rst-depth-hl, transparent) 70%, transparent), transparent 60%), linear-gradient(to bottom, var(--rst-knob, var(--rst-surface)), var(--rst-knob-shade, var(--rst-surface))); border-radius: 50%; box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-x) calc(var(--rst-shadow-y) * 0.8) 1px var(--rst-depth-contact, transparent), var(--rst-shadow-knob); content: ""; height: var(--rst-switch-knob, 15px); inset-inline-start: 2px; position: absolute; top: 2px; transform: translateX(calc(var(--rst-switch-p) * var(--rst-switch-run) * var(--rst-switch-dir, 1))); width: var(--rst-switch-knob, 15px); }
[rst-switch]:has(input:checked) [rst-switch-track] { --rst-switch-p: 1; --rst-switch-on: 100%; }
/* The toggle block's head drags like a switch, so the drag, sheen and
   settle rules name it too, by #104 item 1's child combinators. */
[rst-switch][data-rst-drag], [rst-tblock] > [rst-tblock-head][data-rst-drag] { -webkit-user-select: none; user-select: none; }
[rst-switch][data-rst-drag] [rst-switch-track], [rst-tblock] > [rst-tblock-head][data-rst-drag] > [rst-switch-track] { transition: none; }
/* A released knob goes to the nearer end with a firmer, shorter curve
   than a toggle's: the shim marks the label for the 0.18s it takes.
   After the drag rule, because a release ends a drag. */
[rst-switch][data-rst-settle] [rst-switch-track], [rst-tblock] > [rst-tblock-head][data-rst-settle] > [rst-switch-track] { transition: --rst-switch-p 0.18s cubic-bezier(0.3, 0.9, 0.4, 1), --rst-switch-on 0.18s cubic-bezier(0.3, 0.9, 0.4, 1); }
@media (hover: hover) {
  [rst-switch]:hover:not([data-rst-drag]):has(input:enabled) [rst-switch-track]::after, [rst-tblock-head]:hover:not([data-rst-drag]):has(input:enabled) [rst-switch-track]::after { background-image: radial-gradient(circle at calc(50% + var(--rst-light-x) * 22%) calc(30% + (var(--rst-light-y) + 1) * 10%), var(--rst-depth-hl, transparent), transparent 60%), linear-gradient(to bottom, var(--rst-knob, var(--rst-surface)), var(--rst-knob-shade, var(--rst-surface))); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-x) calc(var(--rst-shadow-y) * 1.2) 2px var(--rst-depth-contact, transparent), var(--rst-shadow-knob-hover, var(--rst-shadow-knob)); }
  [rst-switch]:hover:has(input:checked:enabled) [rst-switch-track], [rst-tblock-head]:hover:has(input:checked:enabled) [rst-switch-track] { background-image: radial-gradient(40px circle at calc(50% + var(--rst-switch-dir, 1) * (var(--rst-switch-p) - 0.5) * var(--rst-switch-run)) 20%, var(--rst-sheen-fill, transparent), transparent 70%); }
}
/* Outside the hover query: a knob being dragged is being looked at,
   which is what the hover meant, and a finger has no hover. */
[rst-switch][data-rst-drag]:has(input:checked) [rst-switch-track], [rst-tblock] > [rst-tblock-head][data-rst-drag]:has(> input:checked) > [rst-switch-track] { background-image: radial-gradient(40px circle at calc(50% + var(--rst-switch-dir, 1) * (var(--rst-switch-p) - 0.5) * var(--rst-switch-run)) 20%, var(--rst-sheen-fill, transparent), transparent 70%); }
[rst-switch]:has(input:focus-visible) [rst-switch-track] { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
[rst-switch]:has(input:disabled) { cursor: default; opacity: 0.55; }
/* On a touch screen the switch takes the theme's touch set: day's is
   the phone size, plain's and signal's are their one size. The one
   touch query of the file (§1.1, and the gate that holds it), so a
   narrow window and the gallery's Mobile tab show what a phone shows,
   as the type scale does. The set is read on the track, so the knob
   and the travel, which read the tokens through inheritance, follow. */
@media (pointer: coarse), (max-width: 40rem) {
  [rst-switch-track] { --rst-switch-w: var(--rst-switch-touch-w, 34px); --rst-switch-h: var(--rst-switch-touch-h, 19px); --rst-switch-knob: var(--rst-switch-touch-knob, 15px); }
}

/* seg-tabs — filled pill inside a soft track; current is aria-current.
   It wraps: width: max-content is what a segmented control wants and
   max-inline-size: 100% is what WCAG 2.2 AA 1.4.10 requires, because
   four tabs are 345px wide and a reflow viewport is 320. Two rows beats
   a sideways scrollbar on the whole page.
   The margin below is the one every block leaves: without it the tabs
   sat flush on the list card under them and read as part of it. A flex
   or grid parent that lays the tabs out in a row of controls spaces its
   own items and should zero it. */
[rst-seg-tabs] { background: var(--rst-accent-soft); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 2px; margin-block: 0 var(--rst-sp-4); max-inline-size: 100%; padding: 2px; width: max-content; }
/* A track of buttons is for a choice that changes the page in place
   (a view), its script moving aria-pressed; links stay right where the
   choice has an address, since they work with no script. Each button
   is the track's own child, so a button nested in a tab's content is
   left alone, and it wears exactly what a link wears: this reset takes
   away the browser's face, which would otherwise show grey, bordered
   and in the system font beside the links. */
[rst-seg-tabs] > button { background: none; border: 0; cursor: pointer; font-family: inherit; line-height: inherit; margin: 0; }
[rst-seg-tabs] a, [rst-seg-tabs] > button { border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); font-size: var(--rst-fs-sm); font-weight: 550; padding: 5px 16px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
[rst-seg-tabs] a:hover, [rst-seg-tabs] > button:hover { color: var(--rst-text); }
/* The current tab is a thumb: a top highlight first, then the lift.
   The pressed button is the same thumb, so a reader sees one choice
   made whichever element made it.
   No press rule, because a pressed tab has no fill today (A15). */
[rst-seg-tabs] a[aria-current], [rst-seg-tabs] > button[aria-pressed="true"] { background: var(--rst-surface); box-shadow: inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-lift); color: var(--rst-text); font-weight: 600; }
/* A disabled button is not listening: faint text, as a disabled page
   chip or calendar day has, and the default cursor, as a disabled
   rst-btn has. It comes after the hover and the thumb, which weigh the
   same, so neither a hover nor a pressed state brings back the colour
   of a tab that would answer a click. */
[rst-seg-tabs] > button:disabled { color: var(--rst-text-faint); cursor: default; }

/* side: a sidebar inside a panel, a column of links beside the
   panel's content, the open section's. It answers to its own width,
   not the window's, through a container query: a settings card on a
   desktop is as narrow as a phone, and a window query would put a
   column of links in a card with no room for it. The container is
   rst-side itself, so the side must be given its width by its parent
   (a block, a grid cell); in a flex row or an inline-block, which size
   to their content, an inline-size container is zero wide.
   fit-content(12rem) lets the column be as wide as its longest label,
   up to 12rem, where a label wraps; minmax(0, 1fr) lets the content
   shrink below its longest word instead of pushing the side wider than
   its panel. */
[rst-side] { container-type: inline-size; display: grid; grid-template-columns: fit-content(12rem) minmax(0, 1fr); }
[rst-side-nav] { align-content: start; border-inline-end: 1px solid var(--rst-line); display: grid; gap: 2px; padding: var(--rst-sp-3) var(--rst-sp-2); }
[rst-side] > :not([rst-side-nav]) { padding: var(--rst-sp-4); }
/* The links are a menu's rows, so a page with a side nav and a
   dropdown has one way of saying "here" and one of saying "you can
   go here": the current row on the accent wash in ink at 600, as the
   dropdown's current item, and the hover, press and tap tints and the
   top highlight of its other items. Muted at rest, so the current
   link is the one that stands out; a hovered link comes up to ink, as
   a menu row reads. The current link has no hover or press of its
   own, as a menu's current item has none: it is where you are. */
[rst-side-nav] a { border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); font-size: var(--rst-fs-sm); padding: 0.4rem 0.65rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
[rst-side-nav] a[aria-current] { background: var(--rst-accent-soft); color: var(--rst-text); font-weight: 600; }
[rst-side-nav] a:not([aria-current]):active { background: var(--rst-tint-tap, transparent); }
@media (hover: hover) {
  [rst-side-nav] a:not([aria-current]):hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); color: var(--rst-text); }
  [rst-side-nav] a:not([aria-current]):hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
/* A narrow side: both children span the grid, so the nav sits above
   the content; its links are one row, each as wide as its label
   (max-content, so a long label never wraps into a tall cell), and
   the row scrolls inside the nav when it is wider than the panel, so
   the page never scrolls sideways. The hairline moves under the nav.
   34rem is the width at which the page's own rows give up their
   columns.
   A link reached with Tab must be wholly in view. Chromium does not
   scroll a focused element that is already partly in view, so a link
   half under the row's edge stayed there, cut off. scroll-padding sets
   the part of the row it counts as in view: at 49% on each side that
   is a sliver at the centre, so a focused link that does not cross the
   centre is scrolled to it. The ring is drawn inside the link, as the
   index rows draw theirs, because the row clips anything outside it
   where a link meets the row's edge. */
@container (max-width: 34rem) {
  [rst-side-nav], [rst-side] > :not([rst-side-nav]) { grid-column: 1 / -1; }
  [rst-side-nav] { border-block-end: 1px solid var(--rst-line); border-inline-end: 0; grid-auto-columns: max-content; grid-auto-flow: column; overflow-x: auto; scroll-padding-inline: 49%; }
  [rst-side-nav] a:focus-visible { outline-offset: -2px; }
}

/* ── stack: a page's vertical rhythm ──────────────────────────────────
   The blocks a screen is written in, a heading, a paragraph, a hint, a
   card, a row of buttons, are spaced by the stack they sit in and by
   nothing else. Hand-rolled margins gave every screen its own rhythm:
   a heading further from its own text than from the section before
   it, a hint resting on the button under it. So a stack is a flex
   column, where no margin collapses, every child's own block margins
   are zeroed, and the space before each child is read off one table
   by what it is and what it follows (DESIGN.md, "The stack"):

     after a heading (h1 to h6), unless it is
       a heading or a section                 --rst-sp-2
     before an actions row, a button          --rst-sp-4
     a label or hint, then its input, or an
       input, then its hint                   --rst-sp-2
     before h1, h2 or a section, or after
       the page header                        --rst-sp-5
     before h3 to h6                          --rst-sp-4
     anything else                            --rst-sp-3

   Higher in the table wins. A heading or a section after a heading
   takes its own opening: the heading over it is what it belongs to,
   and the audit's heading rule holds the one that follows instead.
   Each relation sets its own custom property on the child, and the one
   margin rule reads them in the table's order through var() fallbacks,
   so which rule wins is written in one place rather than left to
   specificity. Every child resets all five first, so a nested stack's
   child never inherits its parent's answer. rst-section marks a child
   that opens a new section; a section that holds blocks of its own is
   a stack too, <section rst-stack rst-section>.

   The column's gap is the table's smallest step, --rst-sp-2, and a
   child's block-start margin is the rest of its answer.

   Some children are passed over: not drawn, or not in the column. A
   [hidden] child, a hidden input (a form's CSRF field, an edit form's
   old values), a <dialog> or a popover, a script, a style or a
   template, Fiesta's modal overlay, a visually hidden .rst-sr-only
   child, and anything an app marks rst-stack-out, its own fixed or
   absolute layer, take no margin and keep their own (a dialog's auto
   margins centre it), and the block after one is spaced
   as if it were not there: the first block after one still opens the
   stack flush, and any other takes its own row of the table. CSS has no
   selector for a computed position, so an app's own overlay is marked,
   and the rhythm audit reports one that is not. A passed-over child
   never anchors a relation (a hidden heading does not make the block
   after it its content). A relation that reads the block before (after
   a heading, after the page header, a field and its label or hint)
   sees past two passed-over children in a row; with three or more
   between, the block keeps its own row but loses the relation. A
   field select.js or datetime.js has drawn (rst-combo, rst-dtp) is a
   field, in a stack spelt [rst-stack], as the scripts spell it; the
   native select select.js leaves beside it, .rst-sr-only, is passed
   over. A .rst-sr-only control shown on keyboard focus is still
   passed over, so it sits at the column's gap while it shows. */

@media (prefers-reduced-motion: reduce) {
  [rst-switch-track], [rst-switch][data-rst-settle] [rst-switch-track], [rst-tblock] > [rst-tblock-head][data-rst-settle] > [rst-switch-track] { transition: none; }
}

/* ── The routes family: confirm, toggle-block, modal shells, bulk-bar,
      help ────────────────────────────────────────────────────────── */

/* toggle-block — a bordered card whose head is a switch; the body
   reveals via :has(), zero JS. The switch is authoritative: the server
   treats off as off, whatever the revealed (still-POSTed) fields say. */
[rst-tblock] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); margin: 0.7rem 0; overflow: hidden; }
[rst-tblock] > [rst-tblock-head] { align-items: flex-start; cursor: pointer; display: flex; gap: 0.85rem; margin: 0; padding: 0.9rem 1.05rem; }
/* Behind the hover query: a tap leaves the head :hover on touch, and
   the tint stuck on it after the switch had already answered. */
@media (hover: hover) {
  [rst-tblock] > [rst-tblock-head]:hover { background: var(--rst-accent-soft); }
}
[rst-tblock] [rst-tblock-title] { display: block; font-size: var(--rst-fs-sm); font-weight: 550; }
[rst-tblock] [rst-tblock-desc] { color: var(--rst-text-muted); display: block; font-size: var(--rst-fs-xs); }
[rst-tblock] [rst-tblock-head] input { height: 1px; opacity: 0; position: absolute; width: 1px; }
/* The head's own input and track, by child combinator at each step: a
   block's body is any markup, so "a checked head input somewhere below,
   every track below" drew an off switch in the body as on, let a
   checked block nested in an unchecked one flip the outer head and
   open its body, and outlined every track below a focused head. The
   specificity is the same as the descendant form's. */
[rst-tblock] > [rst-tblock-head]:has(> input:checked) > [rst-switch-track] { --rst-switch-p: 1; --rst-switch-on: 100%; }
[rst-tblock] > [rst-tblock-head]:has(> input:focus-visible) > [rst-switch-track] { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
[rst-tblock] > [rst-tblock-body] { display: none; }
[rst-tblock]:has(> [rst-tblock-head] > input:checked) > [rst-tblock-body] { background: var(--rst-surface-2); border-radius: 0 0 var(--rst-radius) var(--rst-radius); border-top: 1px solid var(--rst-line); display: block; padding: 0.9rem 1.05rem 1.05rem; }
[rst-modal-overlay] { align-items: center; background: var(--rst-overlay); display: flex; inset: 0; justify-content: center; padding: 2rem 1rem; position: fixed; z-index: 10; }
[rst-modal-panel] { background: var(--rst-bg); border: 1px solid var(--rst-line); border-radius: 14px; box-shadow: var(--rst-shadow-pop); display: flex; max-height: min(85vh, 640px); max-width: 860px; overflow: hidden; width: 100%; }
/* The panel is a <dialog open>: the rendered-open, NON-modal dialog is
   exactly what a modal-as-a-URL is — the server sends the page with the
   dialog already open, and nothing calls showModal(). So ::backdrop is
   never painted (it only exists for the top layer) and .rst-modal-overlay
   stays the scrim, as it was. What the element does bring is a UA block
   this idiom has to undo: absolute positioning with auto inline insets,
   auto margins, 1em of padding and the Canvas colour pair. Reset them
   and the panel lays out as the ordinary flex item it already was. */
dialog[rst-modal-panel] { block-size: auto; color: inherit; inset: auto; margin: 0; padding: 0; position: static; }
[rst-modal-panel] > nav { border-inline-end: 1px solid var(--rst-line); display: flex; flex: none; flex-direction: column; gap: 0.15rem; padding: 1.1rem 0.8rem; width: 180px; }
[rst-modal-panel] > nav a { border-radius: 8px; color: inherit; padding: 0.4rem 0.65rem; text-decoration: none; }
[rst-modal-panel] > nav a:hover { background: var(--rst-accent-soft); }
[rst-modal-panel] > nav a[aria-current] { background: var(--rst-accent-soft); color: var(--rst-accent); font-weight: 600; }
[rst-modal-panel] > section { flex: 1; min-width: 0; overflow-y: auto; padding: 1.5rem 2rem 2rem; position: relative; }
[rst-modal-close] { color: var(--rst-text-muted); font-size: 1.5rem; inset-inline-end: 1.1rem; line-height: 1; position: absolute; text-decoration: none; top: 1rem; }
[rst-modal-close]:hover { color: inherit; }
@media (max-width: 800px) {
  [rst-modal-overlay] { padding: 0.75rem; }
  [rst-modal-panel] { flex-direction: column; max-height: 92vh; }
  [rst-modal-panel] > nav { border-bottom: 1px solid var(--rst-line); border-inline-end: 0; flex-direction: row; width: auto; }
}

/* bulk-bar + selbox — select mode as server-rendered state. */
[rst-bulkbar] { align-items: center; background: var(--rst-accent-soft); border-bottom: 1px solid var(--rst-line); display: flex; gap: 0.7rem; min-height: 46px; padding-block: 0; padding-inline: 0.6rem 0.85rem; }
[rst-bulkbar-close] { align-items: center; border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); display: inline-flex; height: 26px; justify-content: center; text-decoration: none; width: 26px; }
[rst-bulkbar-close]:hover { background: var(--rst-accent-soft); color: var(--rst-text); }
[rst-bulkbar-close] svg, [rst-bulkbar-close] .icon { height: 1rem; width: 1rem; }
/* The count and the escalate link's box. It lays nothing out on a
   desktop, where the bar has room for one row; the touch query makes
   it the box the escalate link wraps in. */
[rst-bulkbar-selection] { display: contents; }
[rst-bulkbar-count] { font-size: var(--rst-fs-sm); font-weight: 600; }
[rst-bulkbar-escalate] { color: var(--rst-accent); font-size: var(--rst-fs-xs); font-weight: 550; text-decoration: none; }
[rst-bulkbar-escalate]:hover { text-decoration: underline; }
[rst-bulkbar] [rst-dropdown] { margin-inline-start: auto; }
[rst-bulkbar] [rst-dropdown] > summary { background: var(--rst-surface); border: 1px solid var(--rst-line-strong); border-radius: 7px; font-size: var(--rst-fs-xs); font-weight: 550; padding: 0.22rem 0.6rem; }
/* The row checkbox's target is its LABEL, padded so the unchanged 16px
   box sits in a 24×24 target (WCAG 2.5.8) on every screen. Inside a row
   whose whole width is a link, WCAG's spacing exception cannot rescue a
   16px target, since the row's link covers the space around it, so
   the padding applies on a desktop too, not only on touch. inline-flex
   and justify-self: start keep the label its own size in a grid cell
   and in a line, where display: flex made it as wide as either. A
   larger invisible hit area was rejected: it would overlap the row's own overlay and take clicks meant for it. */
[rst-selbox] { align-items: center; display: inline-flex; justify-self: start; margin: 0; padding: 4px; }
[rst-selbox] input { accent-color: var(--rst-accent); cursor: pointer; height: 16px; margin: 0; width: 16px; }
[rst-selbox] input:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 2px; }

/* ── media-grid: image tiles in an even frame ─────────────────────────
   The columns come from the width: as many 12.5rem tiles as fit, each
   stretched to share its row, and one column once two do not fit.
   min(100%, …) keeps a 12.5rem tile from forcing a sideways scroll at
   320px. Inside a list card the grid pads itself, because a card holds
   rows and pads nothing. */
[rst-media] { display: grid; gap: var(--rst-sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
:where([rst-list]) > [rst-media] { padding: var(--rst-sp-3); }
/* The tile is positioned for the name link's overlay and for the
   checkbox in its frame. It does not clip: a kebab's open panel hangs
   below the caption, over the next row of tiles. */
[rst-media-tile] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); min-width: 0; position: relative; }
/* Selected is an outline, not a border swap, so the tile never changes
   size. :has() reads the checkbox itself, so the checked attribute the
   server wrote and a tap on the box paint the same way, with no script
   keeping a class in step. */
[rst-media-tile]:has([rst-selbox] input:checked) { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
/* An even 4:3 frame whatever the image's shape, so a tall screenshot
   and a wide banner make tiles of one height and the grid's rows stay
   rows. The frame clips the image to its corners; the tile does not. */
[rst-media-frame] { aspect-ratio: 4 / 3; background: var(--rst-surface-2); border-start-end-radius: calc(var(--rst-radius) - 1px); border-start-start-radius: calc(var(--rst-radius) - 1px); overflow: hidden; position: relative; }
/* Cover, from the top: a page screenshot is identified by its top, and
   its middle is a block of body text that could be any page. */
[rst-media-frame] img { block-size: 100%; display: block; inline-size: 100%; object-fit: cover; object-position: top center; }
/* Contain is the caller's choice for a logo, a diagram or a banner,
   with a little padding so its edges do not touch the frame. */
[rst-media-frame~="contain"] img { box-sizing: border-box; object-fit: contain; padding: var(--rst-sp-2); }
/* The checkbox sits in the frame's top start corner, over the image,
   with a surface halo so a 16px box reads on a dark picture. Its label
   is positioned here at (0,2,0): the rule that lifts a row's controls
   over the overlay is weightless, so the label keeps this position
   and takes only its z-index. */
[rst-media-frame] > [rst-selbox] { inset-block-start: var(--rst-sp-1); inset-inline-start: var(--rst-sp-1); position: absolute; }
[rst-media-frame] > [rst-selbox] input { border-radius: 2px; box-shadow: 0 0 0 2px var(--rst-surface); }
[rst-media-caption] { padding: var(--rst-sp-2) var(--rst-sp-3) var(--rst-sp-3); }
/* The name and the kebab share one line; the name takes the room and
   ends in an ellipsis rather than wrapping under the kebab. */
[rst-media-name] { align-items: center; display: flex; gap: var(--rst-sp-2); min-width: 0; }
[rst-media-name] > a, [rst-media-name] > span { color: inherit; flex: 1 1 auto; font-weight: 600; min-width: 0; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
/* The tile is a link through its one name link, as a row is through
   its own ([rst-row-main] > a::after above). */
[rst-media-name] > a::after { content: ""; inset: 0; position: absolute; }
[rst-media-name] > a:hover { color: var(--rst-accent); }
[rst-media-name] > a:focus-visible { outline: none; text-decoration: underline; }
[rst-media-name] > a:focus-visible::after { border-radius: var(--rst-radius); outline: 2px solid var(--rst-accent); outline-offset: 2px; }
/* Two lines, then an ellipsis, so a long description cannot push the
   meta line out of its tile. "No description" takes the same colour
   step down again (faint, still 4.5:1), so a tile without one is read
   as such and not as a description that says so. */
[rst-media-desc] { -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--rst-text-muted); display: -webkit-box; font-size: var(--rst-fs-sm); line-height: 1.4; margin: var(--rst-sp-1) 0 0; overflow: hidden; }
[rst-media-desc~="none"] { color: var(--rst-text-faint); }
/* Tabular numbers so a column of sizes lines up. */
[rst-media-meta] { color: var(--rst-text-faint); font-size: var(--rst-fs-xs); font-variant-numeric: tabular-nums; margin: var(--rst-sp-1) 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* field-select's combobox, built by rastrillo.js past ten options. The
   popup deliberately borrows .rst-dropdown__menu's shape so the two
   overlays read as one system. Nothing here styles the native <select>:
   it keeps .rst-input and is simply moved out of sight by .rst-sr-only. */
[rst-combo] { position: relative; }
[rst-combo-list] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); inset-inline: 0; list-style: none; margin-top: 4px; max-block-size: 15rem; overflow-y: auto; padding: 0.25rem; position: absolute; top: 100%; z-index: 30; }
[rst-combo-option] { border-radius: var(--rst-radius-sm); color: inherit; cursor: pointer; font-size: var(--rst-fs-sm); padding: 0.4rem 0.65rem; }
/* The menu row's three states, plus the keyboard's: .is-active is the
   row select.js walks to, hovered by no pointer, so it reads the hover
   tint outside the hover query. It comes after the tap rule at the
   same weight on purpose: a finger on the walked-to row keeps the
   hover tint, as it did when hover was sticky on touch, rather than
   clearing to the tap tint under the press. */
[rst-combo-option]:active { background: var(--rst-tint-tap, transparent); }
[rst-combo-option].is-active { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
@media (hover: hover) {
  [rst-combo-option]:hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-combo-option]:hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
/* The committed option is marked in the accessibility tree by
   aria-selected; this is the matching visual, never the only signal. */
[rst-combo-option][aria-selected="true"] { font-weight: 600; }
/* A grouped <select> keeps its groups: each <optgroup> becomes an ARIA
   group holding its own list of rows, under a heading that is furniture
   only — the group's aria-label is what a screen reader announces.
   Same faint uppercase recipe as .rst-lrow--head, for the same reason:
   it names a run of rows without competing with them. */
[rst-combo-rows] { list-style: none; margin: 0; padding: 0; }
[rst-select-group] { color: var(--rst-text-faint); font-size: var(--rst-fs-xs); font-weight: 550; letter-spacing: 0.05em; padding-block: 0.4rem 0.2rem; padding-inline: 0.65rem; text-transform: uppercase; }
/* The rest of the combobox's furniture. A divider the page drew between
   two options (an <hr>, pinned rows above the rest) and the row saying
   nothing matches are never stops: select.js leaves both out of the
   keyboard order, and the divider hides while a search re-ranks. */
[rst-combo-sep] { border-top: 1px solid var(--rst-line); list-style: none; margin-block: 0.25rem; }
[rst-combo-empty] { color: var(--rst-text-faint); font-size: var(--rst-fs-sm); list-style: none; padding: 0.4rem 0.65rem; }
/* An option with a description reads as one line: the name, then the
   description quieter — the brackets the native option carries are for a
   reader without JavaScript, and colour does that job here. */
[rst-combo-desc] { color: var(--rst-text-faint); margin-inline-start: 0.5em; }
/* A decorative glyph (a country's flag) before a row, and before the
   closed box once that row is picked. aria-hidden everywhere; the text
   still says which option it is. The box makes room only while there is
   a glyph to show. */
[rst-combo-option] > [rst-combo-lead] { margin-inline-end: 0.5em; }
[rst-combo] > [rst-combo-lead] { align-items: center; display: flex; inset-block: 0; inset-inline-start: 0.65rem; pointer-events: none; position: absolute; }
[rst-combo] > [rst-combo-lead][hidden] { display: none; }
[rst-combo][rst-combo-has-lead] > [rst-input] { padding-inline-start: 2.2rem; }
/* The list opens upward when there is no room below it (select.js
   measures the visual viewport, which a phone's keyboard shrinks). */
[rst-combo][rst-combo-up] > [rst-combo-list] { bottom: 100%; margin-bottom: 4px; margin-top: 0; top: auto; }

/* The date fields' combobox, built by datetime.js on any input carrying
   data-rst-date or data-rst-time. Same shape as .rst-combo above, plus
   a picker button anchored in the field and two kinds of row: the
   reading of what was typed (with its Set affordance) and the quick
   picks under it. The native input is not styled here either — it keeps
   its value and its name and is simply moved out of sight by
   .rst-sr-only, because it is what the form submits. */
[rst-dtp] { position: relative; }
[rst-dtp-input] { padding-inline-end: 2.5rem; }
/* The button is anchored to .rst-dtp, which is exactly as wide and as
   tall as the input it wraps once the input is a border box — so
   inset-inline-end puts it at the control's inline end in either
   writing mode, and inset-block:0 with auto block margins centres it on
   the control at whatever height the type scale gives it. The old
   inset-block-start:0.3rem was that centring measured once by hand
   against one font size. .rst-dtp__input's padding-inline-end is the
   room this reserves inside the control, so text never runs under it,
   with a value or without one: 2.5rem clears the floor's 2rem button
   and its 0.35rem inset. */
[rst-dtp-pick] { align-items: center; background: none; border: 0; border-radius: var(--rst-radius-sm); block-size: 1.75rem; color: var(--rst-text-muted); cursor: pointer; display: flex; inline-size: 1.75rem; inset-block: 0; inset-inline-end: 0.35rem; justify-content: center; margin-block: auto; padding: 0; position: absolute; }
[rst-dtp-pick]:hover { color: var(--rst-text); }
[rst-dtp-pick] svg { block-size: 1rem; inline-size: 1rem; }
[rst-dtp-list] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); inset-inline: 0; list-style: none; margin-block-start: 4px; max-block-size: 17rem; overflow-y: auto; padding: 0.25rem; position: absolute; top: 100%; z-index: 40; }
[rst-dtp-row] { align-items: baseline; border-radius: var(--rst-radius-sm); color: inherit; cursor: pointer; display: flex; font-size: var(--rst-fs-sm); gap: 0.5rem; justify-content: space-between; padding: 0.4rem 0.65rem; }
/* The menu row's three states and the keyboard's, as the combo's
   option has them, in the same order for the same reason. */
[rst-dtp-row]:active { background: var(--rst-tint-tap, transparent); }
[rst-dtp-row].is-active { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
@media (hover: hover) {
  [rst-dtp-row]:hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: inset 0 1px 0 var(--rst-depth-hl, transparent); }
  [rst-dtp-row]:hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); }
}
[rst-dtp-row~="set"] [rst-dtp-label] { font-weight: 600; }
[rst-dtp-quick] [rst-dtp-set] { color: var(--rst-text-muted); }
/* The committed value is marked in the accessibility tree by
   aria-selected; this is the matching visual, never the only signal. */
[rst-dtp-row][aria-selected="true"] [rst-dtp-label] { font-weight: 600; }
[rst-dtp-set] { flex: none; font-size: var(--rst-fs-xs); color: var(--rst-text-muted); }
[rst-dtp-hint] { color: var(--rst-text-muted); font-size: var(--rst-fs-xs); padding: 0.35rem 0.65rem 0.15rem; }

/* The popup opens above the field where there is no room below it —
   datetime.js measures and sets .is-above, because a panel hanging off
   the bottom of the window is a panel whose last week nobody can click.
   One rule for both popups: only ever one of them is open. */
[rst-dtp].is-above [rst-dtp-list], [rst-dtp].is-above [rst-cal] { inset-block-end: 100%; margin-block-end: 4px; margin-block-start: 0; top: auto; }
/* A completion offered rather than chosen — the other months a
   half-typed word could still have meant. Lighter than the reading
   above it, because it is a second-best by construction. */
[rst-dtp-row~="alt"] [rst-dtp-label] { color: var(--rst-text-muted); }

/* ── The calendar overlay (ui/calendar.js): the month grid a date
      field's button opens. A real <table> with real column headers,
      because that is what a calendar is, with role="grid" over the top
      and a roving tabindex so exactly one day sits in the tab order.

      Sized in rem so the grid keeps its shape when a page is zoomed:
      seven columns of text, not seven columns of pixels. A fixed inline
      size rather than the field's, because a calendar is a calendar
      whatever it hangs under — a month stretched across a wide input is
      a grid nobody can aim at.

      Everything here is logical (inline/block, never left/right), so a
      right-to-left page mirrors the panel and the grid together. The
      chevrons are the one thing that needs saying twice, below.
      ───────────────────────────────────────────────────────────────── */
[rst-cal] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); inline-size: 18rem; inset-inline-start: 0; margin-block-start: 4px; padding: var(--rst-sp-2); position: absolute; top: 100%; z-index: 40; }
[rst-cal-head] { align-items: center; display: flex; gap: var(--rst-sp-1); justify-content: space-between; padding-block-end: var(--rst-sp-2); }
[rst-cal-title] { flex: 1; font-size: var(--rst-fs-sm); font-weight: 600; text-align: center; }
[rst-cal-nav] { align-items: center; background: none; block-size: 1.75rem; border: 0; border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); cursor: pointer; display: flex; inline-size: 1.75rem; justify-content: center; padding: 0; }
[rst-cal-nav]:hover:not(:disabled) { background: var(--rst-accent-soft); color: var(--rst-text); }
/* A month with nothing pickable in it — past the field's min, or past
   its max. Dimmed and inert rather than removed, so the header keeps
   its shape and the title stays where the eye left it. */
[rst-cal-nav]:disabled { cursor: default; opacity: 0.35; }
[rst-cal-nav] svg { block-size: 1rem; inline-size: 1rem; }
/* One chevron, drawn once and turned round for the other direction, so
   "back" always points at the start of the line — which is the other
   end of the box in a right-to-left page, and handled there by the
   panel's own direction rather than a second rule. */
[rst-cal-nav~="next"] svg { transform: scaleX(-1); }
[rst-cal-grid] { border-collapse: collapse; inline-size: 100%; table-layout: fixed; }
[rst-cal-grid] th { color: var(--rst-text-muted); font-size: var(--rst-fs-xs); font-weight: 500; padding-block: var(--rst-sp-1); text-align: center; }
[rst-cal-day] { border-radius: var(--rst-radius-sm); cursor: pointer; font-size: var(--rst-fs-sm); font-variant-numeric: tabular-nums; line-height: 2.15; text-align: center; }
[rst-cal-day]:hover { background: var(--rst-accent-soft); }
/* The days either side of the month. Still pickable — reaching for the
   1st from the row above it is how people use a calendar — but plainly
   not part of the month on screen. */
[rst-cal-day].is-outside { color: var(--rst-text-faint); }
/* Today is a ring rather than a fill, so it can still be read when the
   selection is sitting on top of it. */
[rst-cal-day].is-today { box-shadow: inset 0 0 0 1px var(--rst-line-strong); font-weight: 600; }
/* What the text in the box currently reads as: an outline that follows
   the words as they are typed. Deliberately quieter than the selection
   — it is a preview, and nothing has been chosen yet. */
[rst-cal-day].is-preview { box-shadow: inset 0 0 0 2px var(--rst-accent); }
/* The committed value. aria-selected says so in the accessibility tree;
   this is the matching visual, never the only signal. */
[rst-cal-day].is-selected { background: var(--rst-accent); color: var(--rst-on-accent); font-weight: 600; }
[rst-cal-day].is-selected.is-outside { color: var(--rst-on-accent); }
/* Outside the field's own min/max. aria-disabled carries it to a screen
   reader and calendar.js refuses the pick; this says the same to the
   eye. */
[rst-cal-day].is-disabled { color: var(--rst-text-faint); cursor: default; text-decoration: line-through; }
[rst-cal-day].is-disabled:hover { background: none; }
[rst-cal-day]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }

/* ── Shells: the page frames an app's layout template wraps .rst-page
      in — topbar and sidebar. Written in logical properties throughout,
      so a right-to-left locale gets a mirrored shell for free: the rail
      moves to the inline end, the account menu with it, and nothing
      here needs a second rule. ─────────────────────────────────────── */
/* In an account card's row the value (the current language) is set
   as the row's label is; its caret is what marks it a menu. */
[rst-dropdown-menu] [rst-menu-row] > [rst-dropdown] > summary { font-size: 12.5px; font-weight: inherit; }

/* ── rst-signin: the shipped sign-in card (partials/signin.html) ─────
   Brand at the start and the way in at the end, side by side from 48rem
   and stacked below it, so a phone reads the brand and then the door.
   The card paints its own surface and border because it usually sits
   on the stage shell's backdrop: whatever picture an app puts there,
   the controls stay on a known ground and their contrast is the
   theme's, not the picture's. The border is --rst-line-strong because
   it is the card's only edge against that picture, and
   ui/contrast_test.go holds it to 3:1 against the default art.
   overflow-wrap on the door is for the one long string it shows back —
   an address, which has no spaces to break at and would otherwise push
   a 320px screen sideways. */
[rst-signin] { background: var(--rst-surface); border: 1px solid var(--rst-line-strong); border-radius: var(--rst-radius); box-shadow: var(--rst-shadow-pop); box-sizing: border-box; display: grid; gap: var(--rst-sp-5); inline-size: 100%; max-inline-size: 56rem; padding: var(--rst-sp-5); }
@media (min-width: 48rem) {
  [rst-signin] { align-items: center; gap: var(--rst-sp-6); grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); padding: var(--rst-sp-6); }
}
/* The brand column reads mark, name, pitch. The pitch is the line the
   column is for, so it is the largest type on the card, bigger than the
   door's heading; the name above it is a label. A brand with no pitch
   still has its name at label size: the door's heading already says
   "Sign in to" that name. The mark takes the accent through
   currentColor, so an inline SVG drawn in currentColor follows the
   theme without colours of its own. */
[rst-signin-brand] { display: flex; flex-direction: column; gap: var(--rst-sp-3); min-inline-size: 0; }
[rst-signin-mark] { block-size: 3rem; color: var(--rst-accent); inline-size: 3rem; }
[rst-signin-mark] > * { block-size: 100%; display: block; inline-size: 100%; }
[rst-signin-name] { color: var(--rst-text-muted); font-size: var(--rst-fs-lg); font-weight: 600; margin: 0; }
[rst-signin-pitch] { color: var(--rst-text); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin: 0; text-wrap: balance; }
[rst-signin-door] { display: flex; flex-direction: column; gap: var(--rst-sp-4); min-inline-size: 0; overflow-wrap: anywhere; }
[rst-signin-door] h1 { color: var(--rst-text); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; margin: 0; }
[rst-signin-door] > p { margin: 0; }
/* The door spaces its children with gap; a callout's and a field's own
   block margins would double it. */
[rst-signin-door] > [rst-callout] { margin: 0; }
[rst-signin-form] { display: flex; flex-direction: column; gap: var(--rst-sp-3); margin: 0; }
[rst-signin-form] > [rst-field] { margin: 0; }
[rst-signin-remembered] { color: var(--rst-text-muted); margin: 0; }
/* The passkey button and its message are one child of the door. The
   message is a live region and must stay rendered, so it is never
   display: none; it is only spaced from the button once it has
   something to say. While the button is hidden — before the door's
   script has found a working WebAuthn, or on a browser without one —
   the whole pair is, so the door keeps no gap for a control nobody can
   see; the region is back in the page before the button can be
   pressed, which is all an announcement needs. The "or" between the
   pair and the email form goes with them: beside a hidden button the
   page has one way in, and an "or" would point at nothing. It is the
   wrapper's immediate neighbour, before it on Ask and after it on a
   remembered passkey, so one sibling selector each way reaches it. */
[rst-signin-passkey] { display: flex; flex-direction: column; }
[rst-signin-passkey]:has(> [rst-btn][hidden]), [rst-signin-passkey]:has(> [rst-btn][hidden]) + [rst-signin-or], [rst-signin-or]:has(+ [rst-signin-passkey] > [rst-btn][hidden]) { display: none; }
[rst-signin-passkey-msg] { color: var(--rst-text-muted); margin: 0; }
[rst-signin-passkey-msg]:not(:empty) { margin-block-start: var(--rst-sp-2); }
/* The note (1.8): the message in a box that floats beside the door and
   takes no line, because a line that appeared under a tap moved
   Continue out from under the next one. Nothing on the door moves
   after first paint. The wrapper is the note's containing block; the
   note opens below the button, or above it on a door whose form comes
   after the button (rst-signin-passkey="before", a returning passkey),
   so it covers the heading and never the email field, Continue or
   Other ways. Below the button it can cover whatever follows the pair,
   so the default is only for a pair that ends the door. Empty, it draws nothing but stays rendered, so the live
   region inside it is still announced when it fills. Its close button
   is the app's to show and wire up; hidden, it takes no room. A
   message written straight into the wrapper, as before 1.8, keeps its
   line and draws as it did. */
[rst-signin-passkey]:has(> [rst-signin-passkey-note]) { position: relative; }
[rst-signin-passkey-note] { align-items: center; background: var(--rst-surface); border: 1px solid var(--rst-line-strong); border-radius: var(--rst-radius); box-shadow: var(--rst-shadow-pop); box-sizing: border-box; display: flex; gap: var(--rst-sp-2); inset-block-start: calc(100% + var(--rst-sp-2)); inset-inline: 0; padding: var(--rst-sp-2); padding-inline-start: var(--rst-sp-3); position: absolute; z-index: 30; }
[rst-signin-passkey~="before"] > [rst-signin-passkey-note] { inset-block: auto calc(100% + var(--rst-sp-2)); }
[rst-signin-passkey-note]:has(> [rst-signin-passkey-msg]:empty) { background: none; border: 0; box-shadow: none; padding: 0; }
/* In the note the message is not the one-way door's caption: the
   wrapper in the selector outweighs that rule, so it reads at body size
   from the line's start, on every door. */
[rst-signin-passkey] > [rst-signin-passkey-note] > [rst-signin-passkey-msg] { color: var(--rst-text); flex: 1; font-size: inherit; margin: 0; min-inline-size: 0; text-align: start; }
/* The close button takes the target floor, as the bulk bar's does,
   and the root size, so its icon is 16px as in any control. */
[rst-signin-passkey-close] { align-items: center; background: none; block-size: var(--rst-target); border: 0; border-radius: var(--rst-radius-sm); color: var(--rst-text-muted); display: inline-flex; flex: none; font-size: 1rem; inline-size: var(--rst-target); justify-content: center; padding: 0; }
[rst-signin-passkey-close]:hover { background: var(--rst-accent-soft); color: var(--rst-text); }
[rst-signin-passkey-close][hidden] { display: none; }
/* The word sits on a hairline drawn by its own ::before and ::after,
   which carry no text, so a screen reader hears "or" in reading order
   between the two ways in and nothing else. */
[rst-signin-or] { align-items: center; color: var(--rst-text-muted); display: flex; font-size: var(--rst-fs-sm); gap: var(--rst-sp-3); }
[rst-signin-or]::before, [rst-signin-or]::after { border-block-start: 1px solid var(--rst-line); content: ""; flex: 1; }
/* Provider buttons an app adds itself (Google, Apple, …), one form per
   provider because each posts to its own route. Sibling forms carry no
   spacing of their own, so without a wrapper the buttons touch and read
   as one control split in half; the gap is the card form's, so the two
   stacks read alike. The 44rem cap is rst-form's measure: stretched
   past it a block button is a bar with a word in the middle. The forms'
   margins are zeroed because an app's own `form { margin-bottom }` would
   be added to the gap, the double spacing rst-form's rule exists to
   stop. */
[rst-signin-providers] { display: flex; flex-direction: column; gap: var(--rst-sp-3); max-inline-size: 44rem; }
[rst-signin-providers] > form { margin: 0; }
/* The way back to the email form goes last in the stack, as a link.
   On its own line it is a control, not a word in running text, so it
   takes the target floor: as a bare line of text it was 19px tall.
   flex-start keeps it the width of its words, so the empty line beside
   it is not a hidden part of the link. */
[rst-signin-providers] > a { align-items: center; align-self: flex-start; box-sizing: border-box; display: inline-flex; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }

/* ── The one-way door: one way in, and the rest behind a quiet control ─
   rst-signin-door="one-way" is the door that offers a single way in
   (the primary), then "Other ways to sign in", which opens the chooser
   (rst-signin-ways). Every rule here needs that token or the chooser,
   so the classic door above draws as it always has. The pill is the
   door's, not every button's (Paul, 2026-11-19).

   Every button on the door is a pill, lit from above (a white inner
   top edge), at the lg step's height: on the door a button is the
   page, not a toolbar control. The primary's shadow takes its own
   fill's colour, deep in light and faint in dark, where a bright glow
   would read as a halo. The press rules (0,4,0) outweigh these, so a
   pill still sinks. An icon in a door button is 16px, as in any
   control; a glyph that is not one of the icon set (a provider's own
   mark, in currentColor) is 20px. */
[rst-signin-door~="one-way"] [rst-btn~="block"] { border-radius: 999px; font-size: var(--rst-fs-base); min-block-size: max(2.625rem, var(--rst-target)); padding-block: 0.5rem; }
[rst-signin-door~="one-way"] [rst-btn~="primary"] { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 8px 18px -8px light-dark(color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 80%, transparent), color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 30%, transparent)); }
[rst-signin-door~="one-way"] [rst-btn] > svg:not(.icon) { block-size: 1.25rem; flex: none; inline-size: 1.25rem; }
/* What the door says under its button (the remembered address under
   Keymail's one tap, the passkey's status line) is that button's
   caption: centred under it, a step smaller. */
[rst-signin-door~="one-way"] [rst-signin-remembered], [rst-signin-door~="one-way"] [rst-signin-passkey-msg] { font-size: var(--rst-fs-sm); text-align: center; }

/* The small controls are the door's ghosts: Other ways to sign in and
   Back (links, children of the door) and Use a different email (the
   button of a Forget form). They are text buttons a clear step below
   the primary: medium weight, the muted ink that darkens on hover, a
   touch smaller than body text, and a soft pill under them on hover
   and focus. Semibold in full ink was tried and was too bold. The
   focus ring is the page's 2px outline, which follows the pill. */
[rst-signin-door~="one-way"] [rst-btn~="ghost"] { align-self: center; border-radius: 999px; border-color: transparent; color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; inline-size: auto; min-block-size: max(2.5rem, var(--rst-target)); padding: 0 0.875rem; }
[rst-signin-door~="one-way"] [rst-btn~="ghost"]:hover, [rst-signin-door~="one-way"] [rst-btn~="ghost"]:focus-visible { background-color: var(--rst-ghost-face-hover, var(--rst-surface-2)); color: var(--rst-text); }

/* The chooser: one row per way, in a rounded box with hairlines
   between the rows. A row is a link, or the button of a form (Use a
   different email posts to Forget), so it keeps rst-btn for the busy
   spinner and its press; here it is drawn as a row: no edge or fill of
   its own, the row tint on hover, and a press that darkens in place
   rather than dropping, since the box clips. 48px for one line,
   border-box as every button is, so that is the row's height. The
   glyph leads, one colour whatever the way, the name follows, then the
   chevron, both glyphs in the muted ink. The leading glyph is 16px,
   as an icon in any control is, a provider's own mark included, so
   the names line up. The email row's second line
   is the remembered address, the <bdi> in its name, at the row's start
   edge whatever direction the address itself runs. The focus ring is
   drawn inside the row, because the box clips at its corners. The
   name is the row's <span>, never the busy spinner in either spelling:
   busy.js puts a <span rst-spin aria-hidden="true"> first in the
   button whichever spelling the page writes, so the rule passes over a
   hidden span as well as its own spelling's spinner (a spinner is
   always hidden; the name never is), which would otherwise grow to fill
   the row where it is not centred over the label: under reduced
   motion and forced colours. */
[rst-signin-ways] { background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); display: flex; flex-direction: column; overflow: hidden; }
[rst-signin-ways] [rst-btn] { --rst-press-drop: 0px; background-color: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--rst-text); font-size: var(--rst-fs-base); font-weight: 550; gap: 0.75rem; justify-content: flex-start; min-block-size: 3rem; padding: 0.5625rem 0.875rem; text-align: start; }
/* The hairline is on the row (a link) or its form, after the row rule,
   which takes a row's own border away. */
[rst-signin-ways] > :not(:first-child) { border-block-start: 1px solid var(--rst-line); }
[rst-signin-ways] [rst-btn]:hover { --rst-btn-sheen: none; background-color: var(--rst-row-tint-hover, var(--rst-surface-2)); color: var(--rst-text); }
[rst-signin-ways] [rst-btn]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
[rst-signin-ways] [rst-btn] > svg { color: var(--rst-text-muted); }
[rst-signin-ways] [rst-btn] > svg:first-child { block-size: 1rem; flex: none; inline-size: 1rem; }
[rst-signin-ways] [rst-btn] > span:not([rst-spin], [aria-hidden]) { display: grid; flex: 1; min-inline-size: 0; }
[rst-signin-ways] [rst-btn] bdi { color: var(--rst-text-muted); font-size: var(--rst-fs-sm); font-weight: 400; justify-self: start; }

/* A chevron points the way the reader reads: onward toward the line's
   end and Back toward its start, so in a right-to-left page both are
   mirrored, as the pagination's are. A ghost on the door holds only a
   chevron, and a chooser row's last glyph is its chevron. */
[dir="rtl"] [rst-signin-door~="one-way"] [rst-btn~="ghost"] > svg, [dir="rtl"] [rst-signin-ways] [rst-btn] > svg:last-child { transform: scaleX(-1); }

/* ── Tap targets on small or touch screens: what the floor needs
      beyond a size ────────────────────────────────────────────────────
   The touch query raises --rst-target, which every rule in the floor
   block below reads, from the desktop's 32px to --rst-tap (44px). What
   stays here is what a phone needs and a desktop does not: the kebab's
   wider column, a menu cap that fits three 44px rows, the calendar
   docked to the bottom of the screen, and the layout that centres a
   control's text in its 44px. ────────────────────────────── */
@media (pointer: coarse), (max-width: 40rem) {

  /* The menu cap's 8rem floor exists so a three-item menu opened in a
     short frame shows whole; three 44px rows are taller than 8rem, so
     here the floor is three taps plus the panel's padding and border
     (ui's TestAMenuOpenedInsideAShortFrameIsStillUsable). Three 32px
     rows fit 8rem, so the desktop keeps the base cap. */
  [rst-dropdown-menu], [rst-row-menu-panel] { max-block-size: min(20rem, max(calc(100dvh - 6rem), calc(3 * var(--rst-tap) + 1rem))); }

  /* The 44px pick button sits flush with the input's end, because a
     44px button inset 0.35rem would overhang a 44px input, and the
     input keeps room for it so typed text never runs under it. */
  [rst-dtp-input] { padding-inline-end: 3rem; }
  [rst-dtp-pick] { inset-inline-end: 0; }
  [rst-dropdown-menu] [rst-menu-group] > summary, [rst-dropdown-menu] a, [rst-dropdown-menu] button, [rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-locale] button, [rst-scheme] button, [rst-combo-option], [rst-dtp-row], [rst-modal-panel] > nav a { align-items: center; display: flex; }
  [rst-pagination] > a, [rst-pagination] > span, [rst-seg-tabs] a, [rst-seg-tabs] > button { align-items: center; display: inline-flex; justify-content: center; }
  /* A phone's chip is the 44px tap square it has always been, narrower
     than the desktop's own minimum above. */
  [rst-pagination] > a, [rst-pagination] > span { min-inline-size: var(--rst-target); }
  [rst-selbox] { padding: 0; }
  /* At 390 the bar's parts outgrow one row, and squeezed into it
     "3 selected" and "Select all 412 matching" each broke over two and
     three lines. Here they keep one line. When the parts do not fit,
     the escalate link wraps onto a second row, and the close button
     and Actions stay on the first: the bar aligns to the top, so they
     do not drift to the middle of two rows. The 1px of block padding
     is the space the 46px bar left around a 44px row when it centred
     it.
     The second row spans the bar, from where the close button starts,
     because a long link that started under the count ran out of the
     card. So the selection box reaches back under the close button (a
     negative margin of the button and the bar's 0.7rem gap) and its
     ::before holds the button's place on the first row only; the
     button sits above the box so a tap still reaches it. Actions
     still narrows the box, which is what moves the link down when the
     first row is full.
     Text wraps only as a last resort: each text is as wide as its one
     line unless that is wider than the room it has, the bar's width
     (the bar is the container 100cqi measures) for the link, and the
     first row beside the close button for the count. Past that it
     wraps, inside a word if it must, rather than run out of the card. */
  [rst-bulkbar] { align-items: flex-start; container-type: inline-size; padding-block: 1px; }
  [rst-bulkbar-close] { position: relative; z-index: 1; }
  [rst-bulkbar-selection] { align-items: center; column-gap: 0.7rem; display: flex; flex: 1 1 auto; flex-wrap: wrap; margin-inline-start: calc(-1 * (var(--rst-target) + 0.7rem)); min-inline-size: 0; }
  [rst-bulkbar-selection]::before { content: ""; flex: none; inline-size: var(--rst-target); }
  [rst-bulkbar-count] { align-items: center; display: inline-flex; max-inline-size: calc(100% - var(--rst-target) - 0.7rem); min-block-size: var(--rst-target); overflow-wrap: break-word; }
  [rst-bulkbar-escalate] { flex: none; max-inline-size: 100cqi; overflow-wrap: break-word; }
  /* "Previous 1 … 3 4 5 … 9 Next" in 44px chips is wider than a phone
     and wrapped onto two rows. Here it is "‹ 1 … 4 … 9 ›": Previous
     and Next are chevrons whose words stay for a screen reader, the
     pages beside the current one are hidden (paginationItems marks
     them, and the ellipses that stand in for them), and the one line
     is spread across the width. A step is a 44px square: its padding
     would only push the chevron off centre. chevron-down turned a
     quarter points back for Previous and on for Next, and the other
     way round in a right-to-left page, where the line starts at the
     right. No gap of its own: space-between spaces the items, and
     seven of them (five 44px taps, two ellipses) with the 4px gaps
     were 292px, past the 288 a 320px phone has, so Next wrapped. */
  [rst-pagination] { column-gap: 0; justify-content: space-between; }
  [rst-pagination] [rst-pagination-wide] { display: none; }
  [rst-pagination] [rst-pagination-gap~="narrow"] { display: inline-flex; }
  [rst-pagination] [rst-pagination-step] { padding-inline: 0; }
  [rst-pagination-step] .icon { block-size: 1rem; display: block; inline-size: 1rem; }
  [rst-pagination-step~="prev"] .icon, [dir="rtl"] [rst-pagination-step~="next"] .icon { transform: rotate(90deg); }
  [rst-pagination-step~="next"] .icon, [dir="rtl"] [rst-pagination-step~="prev"] .icon { transform: rotate(-90deg); }
  [rst-pagination-word] { block-size: 1px; clip-path: inset(50%); inline-size: 1px; overflow: hidden; position: absolute; white-space: nowrap; }
  /* The calendar docks to the bottom of the viewport on every small or
     touch screen. Anchored, it is placed from the field's inline start,
     and a date field can sit at the trailing end of a field row at any
     width; docked, it is always inside the viewport. The grid asks for
     seven taps and the panel is fit-content around it, with the
     scrollbar gutter reserved, so a classic scrollbar widens the PANEL
     and never narrows the DAYS. Both max sizes clamp to the viewport:
     below a 342px viewport the days narrow to about 41px and stay 44px
     tall, a deliberate exception to the 44px target, because seven full
     days and the panel's padding do not fit a narrower screen. The
     height cap is why the panel scrolls itself: six weeks of 44px rows
     are taller than a phone in landscape, and a fixed panel's clipped
     top cannot be reached by scrolling the page. top: auto because the
     base rule's physical top: 100% would otherwise be measured against
     the viewport; the block-start inset and the margins reset because
     .is-above sets them (the :is() weighs (0,3,0) and beats it). */
  :is([rst-cal], [rst-dtp] [rst-cal], [rst-dtp].is-above [rst-cal]) { box-sizing: border-box; inline-size: fit-content; inset-block-end: var(--rst-sp-2); inset-block-start: auto; inset-inline: 0; margin: 0 auto; max-block-size: calc(100dvh - 2 * var(--rst-sp-2)); max-inline-size: calc(100vw - 2 * var(--rst-sp-2)); overflow-y: auto; overscroll-behavior: contain; position: fixed; scrollbar-gutter: stable; top: auto; }
  :is([rst-cal], [rst-dtp] [rst-cal]) [rst-cal-grid] { inline-size: calc(7 * var(--rst-tap)); max-inline-size: 100%; }
}
@media (forced-colors: active) {
  [rst-search], [rst-dropdown] > summary { border: 1px solid ButtonBorder; }
  [rst-stats] { border: 1px solid CanvasText; }
  /* Forced colours paint a transparent border, so a disabled step
     would wear a link's edge; Canvas keeps it a step with no chip. */
  [rst-pagination] [rst-pagination-disabled] { border-color: Canvas; }
  [rst-switch-track] { background: Canvas; border: 1px solid ButtonText; }
  [rst-switch-track]::after { background: ButtonText; }
  [rst-switch]:has(input:checked) [rst-switch-track], [rst-tblock] > [rst-tblock-head]:has(> input:checked) > [rst-switch-track] { background: Highlight; }
  [rst-switch]:has(input:checked) [rst-switch-track]::after, [rst-tblock] > [rst-tblock-head]:has(> input:checked) > [rst-switch-track]::after { background: HighlightText; }
  [rst-dropdown-menu] a[aria-current], [rst-pagination] [aria-current="page"], [rst-seg-tabs] a[aria-current], [rst-seg-tabs] > button[aria-pressed="true"], [rst-side-nav] a[aria-current] { background: Highlight; box-shadow: none; color: HighlightText; }
}
@media print {
  [rst-search], [rst-dropdown] > summary { background-image: none; border: 1px solid var(--rst-line-strong); box-shadow: none; }
  [rst-stats] { background: transparent; border: 1px solid var(--rst-line-strong); box-shadow: none; }
  [rst-dropdown-menu], [rst-row-menu-panel] { border-color: var(--rst-line-strong); box-shadow: none; }
  [rst-switch-track] { border: 1px solid var(--rst-line-strong); box-shadow: none; }
  [rst-switch]:has(input:checked) [rst-switch-track], [rst-tblock] > [rst-tblock-head]:has(> input:checked) > [rst-switch-track] { background-color: var(--rst-line-strong); }
  [rst-switch-track]::after { background-image: none; box-shadow: none; outline: 1px solid var(--rst-line-strong); outline-offset: -1px; }
  [rst-seg-tabs] a[aria-current], [rst-seg-tabs] > button[aria-pressed="true"], [rst-pagination] [aria-current="page"] { box-shadow: none; }
  /* The current chip's edge was its fill, transparent above, and the
     other chips keep their line: without this the current page is the
     one chip with no outline on paper. */
  [rst-pagination] [aria-current="page"] { border-color: var(--rst-line-strong); }
  /* The current side link's wash is a background, which a printer
     drops or keeps by the reader's settings, so on paper it is marked
     by its ink and weight alone, every time, as the shell's current
     nav item is. */
  [rst-side-nav] a[aria-current] { background: transparent; }
}
[rst-media-tile] a, [rst-dropdown-menu] a, [rst-dropdown-menu] button, [rst-dropdown-menu] [rst-menu-group] > summary, [rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-row-menu] > summary, [rst-locale] button, [rst-scheme] button, [rst-combo-option], [rst-dtp-row], [rst-switch], [rst-tblock-head] { -webkit-tap-highlight-color: transparent; }

/* ── Target floors, at every width ──────────────────────────────────
   Every interactive idiom is at least --rst-target on both axes: 32px
   on a desktop with a mouse, --rst-tap (44px) on a small or touch
   screen, where the query above raises the token. One list of idioms
   read through one token, so a control floored on a phone cannot be
   left at 24px on a desktop, and the two floors cannot drift apart.
   The size is measured as the box a tap or click ACTIVATES: the label
   of a label-backed control, the row of a stretched link. Anything
   that is display: inline today becomes inline-flex or flex here,
   because min sizes do nothing on an inline box; a block keeps its
   display and centres its content with align-content. Nothing else
   belongs here: a declaration that changes a desktop control the floor
   leaves alone goes in the touch query above. Every floor but the
   search box's is border-box, so the floor is the whole control: on
   the content box a control's own padding and border landed on top of
   it, and a 33.8px dropdown summary became 44.8 (the topbar 61.8) on a
   desktop where it already cleared 32. Each selector repeats the weight of the rule
   it raises: a floor lighter than the size it raises loses wherever it
   sits (the topbar's Menu summary is (0,2,1)).

   The block is last before the utilities so it wins ties with every
   component above it. ui/sizing_test.go fails when a rule styling an
   a, button, summary or label arrives without a row in the inventory
   this block implements, and ui/sizing_browser_test.go measures every
   control at 390 and 1024 with a coarse pointer and at 600 with a
   mouse against 44px, and at 1280 with a mouse against 32px. ─────── */
/* A flex box drops the whitespace between an icon and the word beside
   it, so an icon in a menu item or a brand touched its text (4px of
   space became 0). These are flex boxes at some width: the brand, the
   row action and the back link at every width (the floors below make
   them inline-flex), the menu items and nav links on a phone (the
   touch query above makes them flex). About a space's width puts the
   space back. On a desktop a menu item is still a block, the gap does
   nothing, and its own space stays. :where() weighs nothing, so a
   component that sets its own gap (the index rows) keeps it. */
:where([rst-dropdown-menu] a, [rst-dropdown-menu] button, [rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-locale] button, [rst-scheme] button, [rst-modal-panel] > nav a, [rst-signin-providers] > a) { column-gap: 0.3em; }
/* The box is the target, and so is the input inside it: a tap focuses
   the input, so the input stretches to the box's full height. The one
   content-box floor: its block padding is zeroed, and the floor is the
   input's height, inside the box's 1px border. */
[rst-search] { min-block-size: var(--rst-target); padding-block: 0; }
[rst-search] input[type="search"] { align-self: stretch; }
[rst-search-clear] { box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-ftok] a { block-size: var(--rst-target); box-sizing: border-box; inline-size: var(--rst-target); }

[rst-dropdown] > summary { align-items: center; box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-dropdown-menu] [rst-menu-group] > summary { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); }
/* border-box: the dropdown's links were content-box, and their padding
   made each 44px row 57px. A menu item is a block, so the floor needs
   no display of its own, and align-content centres a block's content
   without turning the item into a flex box, which would drop the
   spaces between the inline pieces of its label. */
[rst-dropdown-menu] a, [rst-dropdown-menu] button, [rst-row-menu-panel] a, [rst-row-menu-panel] button, [rst-locale] button, [rst-scheme] button, [rst-combo-option] { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); }
[rst-dtp-row] { box-sizing: border-box; min-block-size: var(--rst-target); }

/* The date field's pick button and the calendar's controls. */
[rst-dtp-pick] { block-size: var(--rst-target); box-sizing: border-box; inline-size: var(--rst-target); }
[rst-cal-nav] { block-size: var(--rst-target); box-sizing: border-box; inline-size: var(--rst-target); }
[rst-cal-day] { block-size: var(--rst-target); box-sizing: border-box; }
[rst-row-menu] > summary { block-size: var(--rst-target); box-sizing: border-box; inline-size: var(--rst-target); }
[rst-selbox] { box-sizing: border-box; justify-content: center; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }

/* Blocks already (an inline-block chip, a tab in a flex row), centred
   the same way as a menu item. */
/* The chip's own minimum width is over the floor on a desktop; the
   touch query sets the phone's. */
[rst-pagination] > a, [rst-pagination] > span { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); }
[rst-seg-tabs] a, [rst-seg-tabs] > button { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
/* A side nav link is a menu row, centred as one; in the narrow row it
   is as wide as its label, so a short one gets the width floor too. */
[rst-side-nav] a { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-switch], [rst-tblock] > [rst-tblock-head] { box-sizing: border-box; min-block-size: var(--rst-target); }

/* flex: none because the bar is a flex row that, at 390, shrank the
   close link to 26px wide to make room for the escalate link's text. */
[rst-bulkbar-close] { block-size: var(--rst-target); box-sizing: border-box; flex: none; inline-size: var(--rst-target); }
[rst-bulkbar-escalate] { align-items: center; box-sizing: border-box; display: inline-flex; justify-content: center; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-modal-close] { align-items: center; box-sizing: border-box; display: inline-flex; justify-content: center; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-modal-panel] > nav a { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); }

/* Repeated from core.css by a pin in hack/split, so it comes after the rules above. */
.rst-sr-only {
  clip-path: inset(50%);
  block-size: 1px;
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

/* Repeated from core.css by a pin in hack/split, so it comes after the rules above. */
.rst-sr-only:focus-visible {
  background: var(--rst-accent);
  border: 0;
  border-radius: var(--rst-radius-sm);
  block-size: auto;
  clip-path: none;
  color: var(--rst-on-accent);
  cursor: pointer;
  font: inherit;
  font-size: var(--rst-fs-sm);
  inline-size: auto;
  overflow: visible;
  padding: 0.3rem 0.6rem;
  position: static;
  white-space: normal;
}
