/* ── 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-shell-brand], [rst-shell-nav] a, [rst-shell-menu] > summary, [rst-shell-chrome] > summary, [rst-shell-account] > summary, [rst-shell-back] > a, [rst-shell-up]) .icon {
  block-size: 1rem;
  inline-size: 1rem;
}

/* ── The structural idioms: box, list grid, row-menu, dropdown, ftok ── */
:where([rst-shell-main]) > :where([rst-card]) { margin-block: var(--rst-sp-4); }
:where([rst-shell-main]) > :where([rst-box-head]) + :where([rst-card]), :where([rst-shell-main]) > :where([rst-card]:first-child) { margin-block-start: 0; }
:where([rst-shell-main]) > :where([rst-card]:last-child) { margin-block-end: 0; }
:where([rst-shell-main]) > :where([rst-card]):has(+ :where([rst-count-line])) { margin-block-end: 0; }
[rst-shell-tail] [rst-dropdown], [rst-shell-rail-foot] [rst-dropdown] { inline-size: auto; }
/* The account summary carries two faces, as the console's Menu did: the
   avatar, and the word Account with its caret. Below 800px it is the
   avatar alone, the end of the phone's one header row; from 800px it
   is "Account" and the caret, the desktop bar's account menu as it
   was. Keyed on the label, so an account menu written before it, a
   plain "Account" summary, keeps its caret everywhere. */
[rst-shell-account] > summary [rst-shell-account-label] { display: inline; }
@media (max-width: 799.98px) {
  [rst-shell-account] > summary [rst-shell-account-label], [rst-shell-account] > summary:has([rst-shell-account-label]) > [rst-caret] { display: none; }
}
@media (min-width: 800px) {
  [rst-shell-account] > summary:has([rst-shell-account-label]) > [rst-shell-avatar] { display: none; }
}

/* ── 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. ─────────────────────────────────────── */
[rst-shell-brand] { color: inherit; font-weight: 650; text-decoration: none; }
[rst-shell-nav] { display: flex; gap: var(--rst-sp-4); }
[rst-shell-nav] a { border-block-end: 2px solid transparent; color: var(--rst-text-muted); font-size: var(--rst-fs-sm); padding-block: 0.3rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
[rst-shell-nav] a:hover { color: var(--rst-text); }
[rst-shell-nav] a[aria-current] { border-block-end-color: var(--rst-accent); color: var(--rst-text); font-weight: 550; }
[rst-shell-account] { margin-inline-start: auto; }
/* an account menu whose block was never overridden has an empty menu; hide the whole control rather than show a dead summary. */
[rst-shell-account]:has(> [rst-dropdown-menu]:empty) { display: none; }
[rst-shell-foot] { border-block-start: 1px solid var(--rst-line); color: var(--rst-text-muted); font-size: var(--rst-fs-xs); padding-block: var(--rst-sp-4); padding-inline: var(--rst-sp-4); text-align: center; }
/* the topbar shell emits a foot even when the block is un-overridden; an empty one is a stray rule and padding, so draw nothing. */
[rst-shell-foot]:empty { display: none; }

/* sidebar shell — a rail beside the page. Below 800px the rail is not
   shown on a content page and IS the page on the index (the index/back
   block after the console's). The main column carries min-inline-size:
   0 so a wide child (a list grid, a <pre>) scrolls itself instead of
   stretching the grid track.

   LEGACY, kept for layouts written before the phone index: the
   <details rst-shell-chrome> drawer, which opened the rail into the
   page flow. Its rules are the ones naming rst-shell-chrome, below and
   in the wide block. None of the index/back rules match an old
   layout's root (it has no view), so an app that re-vendors tokens.css
   but keeps its old layout still has its drawer. Delete these rules
   together once no layout and no gallery page writes rst-shell-chrome. */
[rst-shell-main] { min-inline-size: 0; }
[rst-shell-group] { color: var(--rst-text-faint); font-size: var(--rst-fs-xs); font-weight: 550; letter-spacing: 0.05em; margin-block: var(--rst-sp-3) 0.2rem; text-transform: uppercase; }
/* The rail's foot — the language switcher and the person, in the corner
   an app puts them in everywhere else. margin-block-start: auto is the
   whole mechanism: the rail is a column flex box, so the auto margin
   eats whatever height is left between the nav and the bottom.

   Below 800px the rail on the phone index is STILL a flex column, and
   it has a min-block-size of the whole screen there, so this auto
   margin would float the foot to the bottom of the screen, where the
   language menu would open off it. The index rules replace it with a
   fixed gap; the 390px leg of
   TestTheSidebarRailPutsThePersonAtItsFootAndTheLanguageMenuOpensUpward
   measures that gap for exactly that reason. */
[rst-shell-rail-foot] { display: flex; flex-direction: column; gap: var(--rst-sp-3); margin-block-start: auto; }
/* An un-overridden shell renders the wrapper with nothing in it; draw
   no gap for it, the same way .rst-shell__foot handles its own. Kept
   for layouts from before the profile menu, whose foot held the two
   blocks bare. */
[rst-shell-rail-foot]:empty { display: none; }
/* The profile menu: the rail foot's one control, an avatar button
   whose card holds the person's name, the language and the account's
   links. It is an rst-dropdown, so rastrillo.js already closes it on an
   outside click and on Escape, and the anchored-menu rules already keep
   its card on screen; these rules are its shape.

   The foot goes only for the layout's placeholder (the empty avatar
   named Account, marked placeholder) when there is also nothing to
   choose: a button opening an empty card. A real person stays even
   with no language and no links, because the signed-in person must not
   vanish from the rail. Without :has() the placeholder stays, a button
   opening a card that holds "Account", which is harmless. */
[rst-shell-rail-foot]:has([rst-shell-who]:only-child [rst-person-av~="placeholder"]) { display: none; }
/* The avatar is the person partial's own circle at its own size. The
   name stays in the summary, clipped rather than hidden, because it is
   the button's accessible name: the circle is aria-hidden decoration.
   The email is out of the name, display: none, so a screen reader hears
   who, not their address. */
[rst-shell-avatar] { align-items: center; display: inline-flex; justify-content: center; }
[rst-shell-avatar] [rst-person-name] { block-size: 1px; clip-path: inset(50%); inline-size: 1px; overflow: hidden; position: absolute; white-space: nowrap; }
[rst-shell-avatar] [rst-person-email] { display: none; }
/* inline-flex, not the dropdown summary's flex: a summary as wide as
   the rail would draw the round hover fill as a long oval. */
[rst-shell-profile] > summary { border-radius: 50%; color: var(--rst-text); display: inline-flex; justify-content: center; padding: 4px; }
[rst-shell-profile] > summary:hover, [rst-shell-profile][open] > summary { background: var(--rst-accent-soft); }
[rst-shell-profile] > summary:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
[rst-shell-profile] > [rst-dropdown-menu] { box-sizing: border-box; inline-size: min(17rem, calc(100vw - 1.5rem)); }
/* CLOSING ON AN OUTSIDE TAP with scripts off, the topbar card's way:
   while open the summary grows an invisible layer over the viewport,
   under the card, so a tap outside the card is a click on the summary
   and closes it natively. On a desktop the rail is lifted while the
   menu is open (the wide block below). */
[rst-shell-profile][open] > summary::before { content: ""; cursor: default; inset: 0; position: fixed; z-index: 1; }
/* The card's head: the name and the email the summary keeps out of
   sight. The avatar is already on screen as the button. The console
   writes the same head into its tail, where it shows only on the phone
   index; hidden here so the wide bar's display: contents cannot make
   it a flex item of the bar. */
[rst-shell-who] { border-block-end: 1px solid var(--rst-line); margin-block-end: 0.25rem; min-inline-size: 0; padding-block: 0.35rem 0.55rem; padding-inline: 0.65rem; }
[rst-shell-who] [rst-person-av] { display: none; }
[rst-shell-tail] > [rst-shell-who] { display: none; }
/* A menu inside the card (the language switcher) opens IN PLACE, as
   the topbar card's do: a popover inside a popover has nowhere good to
   go on a phone, and on a desktop it would cover the card it came
   from. Its summary reads as one of the card's rows. */
[rst-shell-profile] [rst-dropdown-menu] [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.5rem 0; position: static; }
[rst-shell-profile] [rst-dropdown-menu] [rst-dropdown] > summary { border-radius: var(--rst-radius-sm); color: var(--rst-text); font-size: var(--rst-fs-sm); justify-content: space-between; padding: 0.4rem 0.65rem; }
[rst-shell-profile] [rst-dropdown-menu] [rst-dropdown] > summary:hover { background: var(--rst-accent-soft); }
@media (min-width: 800px) {
  /* A menu at the foot of a full-height rail is a DROPUP: the same
     <details> panel, opened block-start-ward instead of block-end-ward,
     because below it there is only the window's edge. No script — this
     is one pair of inset values. Only inside this query: below 800px
     the rail is a content-height column with the whole page under it,
     so the same menu opens downward there like every other menu in the
     system. */
  [rst-shell-rail-foot] [rst-dropdown-menu] { inset-block-end: calc(100% + 4px); inset-block-start: auto; margin-block-start: 0; }
  /* Where anchor positioning is available the hand-written inset pair
     has to be handed back, and not because it stopped being right: the
     insets above are measured against .rst-dropdown's own box, and
     position-area replaces that box with the region beside the anchor,
     so calc(100% + 4px) would be 100% of the free space under the foot
     — the panel launched up the rail. The flip does this case anyway
     and does it by measuring: there is no room below the rail's foot,
     so flip-block turns the menu upward on its own, and it turns back
     down again in a layout where there IS room, which a fixed pair of
     insets cannot. Specificity is why this is written here rather than
     left to the generic rule: .rst-shell__rail-foot .rst-dropdown__menu
     is (0,2,0) and would otherwise outrank it. */
  @supports (position-area: block-end) and (position-try-fallbacks: flip-block) {
    [rst-shell-rail-foot] [rst-dropdown-menu] { inset: auto; margin-block-start: 4px; }
  }
  /* The profile card is a drop-up anchored at the button's inline
     start, so it grows from the rail's edge across the page rather than
     off the side of the window. Written out rather than left to the
     flip above, which turns a menu upward only when below is full: the
     card is meant to open upward from the foot whatever the room, and
     flip-block still turns it down in a window too short for it.
     Without anchor positioning the card is absolute in the rail, which
     scrolls, so it takes the rail's width rather than overhanging it. */
  [rst-shell-rail-foot] [rst-shell-profile] > [rst-dropdown-menu] { inline-size: auto; inset-inline: 0; }
  @supports (position-area: block-end) and (position-try-fallbacks: flip-block) {
    [rst-shell-rail-foot] [rst-shell-profile] > [rst-dropdown-menu] { inline-size: min(17rem, calc(100vw - 1.5rem)); inset: auto; margin-block: 0 4px; position-area: block-start span-inline-end; }
  }
}
/* The Menu summary carries both faces: the icon and its word, and the
   person's avatar, which only the phone index shows (the index block
   below). display: contents keeps the icon and the word flex items of
   the summary, laid out exactly as they were before the span wrapped
   them. */
[rst-shell-menu-label] { display: contents; }
[rst-shell-menu] [rst-shell-avatar] { display: none; }
@keyframes rst-shell-drop { from { opacity: 0; transform: translateY(-4px); } }

/* ── Sidebar and console on a phone: the index and the back control ──
   Below 800px these two shells are two views of every URL, and the page
   says which with the view block the layout writes into the root:
   [rst-shell-sidebar~="index"] is the rail as a full-screen page of
   sections at a real URL; [rst-shell-sidebar~="page"] is the content,
   with a back control at the top inline-start whose href is the page's
   up block. No hamburger. The console is the same for its rail, under
   its bar.

   An old layout's root has no view, so none of these rules match it and
   it keeps its drawer (the legacy rules above). Scoped below 800px, like
   the card: at 800 and up both views are the rail beside the page, the
   back strip and the title are hidden by the rule just below, and
   nothing here needs undoing. ─────────────────────────────────────── */
[rst-shell-back], [rst-shell-title] { display: none; }
/* The up link, the one-row shells' way back: only a content page on a
   phone shows it (each shell's own block). Hidden everywhere else,
   the index included, which writes it all the same. */
[rst-shell-up] { display: none; }
/* The heading's two spans: the brand, then the page's title, which
   shows only when the brand's span rendered nothing, so an app that
   blanks its brand still has a heading. Each elides on its one line.
   The brand link is a line the tap floor's height, centred in the
   header row, so a tap on the heading's line is a tap on it. */
[rst-shell-title] > * { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[rst-shell-title] > :not(:empty) + * { display: none; }
/* A brand drawn from data that has none usually renders whitespace,
   which :empty does not match, and a template cannot trim another
   template's output. So where :has() is known, a brand span with no
   element in it counts as blank: it is hidden and the title shows. The
   cost is a brand written as bare text, with no link or element round
   it, which reads as blank too; every shipped brand is a link. */
[rst-shell-title] > :first-child:not(:has(*)) + * { display: block; }
[rst-shell-title] > :first-child:not(:has(*)) { display: none; }
[rst-shell-title] [rst-shell-brand] { color: inherit; display: block; font-weight: inherit; line-height: 2.75rem; overflow: hidden; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 799.98px) {
  /* The strip's own link only, by the child combinator: anything else
     a page puts in the strip (a menu at its inline end) is not a back
     control, and would otherwise get the accent colour and a chevron. */
  [rst-shell-back] > a { align-items: center; border-radius: var(--rst-radius-sm); color: var(--rst-accent); display: inline-flex; font-size: 1rem; font-weight: 500; gap: 0.5rem; min-block-size: 2.75rem; padding-inline: 0.75rem; text-decoration: none; }
  /* The chevron is drawn, not an icon: there is no left chevron in the
     set and no icon mirroring, and a drawn one stays out of the
     accessible name. Two borders of a small square, turned; physical on
     purpose, like the switch's knob, because it is a drawing, and
     mirrored by the rule after it. */
  [rst-shell-back] > a::before { block-size: 0.55rem; border-left: 2px solid currentColor; border-top: 2px solid currentColor; content: ""; flex: none; inline-size: 0.55rem; transform: rotate(-45deg); }
  [dir="rtl"] [rst-shell-back] > a::before { transform: rotate(135deg); }
  [rst-shell-back] > a:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
}

/* ── The console on one row ─────────────────────────────────────────
   A console whose root holds [rst-shell-up] is the one-row console.
   Below 800px its bar is the phone's one header row: the up link at
   the inline start, the app's name at the centre, the account's avatar
   at the inline end, and nothing else above the page. The back strip,
   the Menu and its tail are gone: the up link is in the bar, and the
   account card holds the person, the scheme, the language and the
   account's links. From 800px it is the 1.3 bar less the language
   menu, which moved into the card: the brand at the start, "Account"
   at the end. Every rule names [rst-shell-up], in the root's :has()
   or as the element itself, so a 1.3 console (Menu, tail, back strip)
   matches none of them and draws as it did. The card is as tall as
   the window less the row, as the 1.3 card was: it holds four kinds
   of thing now, and the Language menu opens inside it.

   The row is a grid of three columns, the two sides equal shares of
   what the name leaves, each at least its own content, so the name is
   on the row's true centre whenever it can be and moves toward the
   shorter side only as far as it must. The name's column shrinks when
   the three do not fit, and the name keeps to one line, cut with an
   ellipsis, so the up link and the avatar never give up any of their
   width to it. The up link's own label is cut with an ellipsis too,
   at the screen's width less the avatar's column, so a long parent
   title never pushes the avatar off the row; its aria-label keeps the
   whole title. A name is shown whole or not at all, never cut: shell.js
   measures it and, where it is cut, marks it hidden, which the [hidden]
   rule takes out of the row, out of reach of a tap and of Tab. Only a
   script can tell that a name is cut, so with scripts off the cut name
   stays, the one place the ellipsis shows: a tap or Tab there lands on
   a name the reader can see, never on an invisible link. */
@media (max-width: 799.98px) {
  [rst-shell-up] > .icon { margin-inline-end: 0.25rem; vertical-align: middle; }
}

/* ── The topbar on one row ──────────────────────────────────────────
   A topbar whose root holds [rst-shell-up] is the one-row topbar, and
   below 800px a topbar app is a tree: /menu, the index, is the nav as
   rows; every other page is a content page one level down from its
   row there. The row is the console's (above): its grid, its up link
   (labelled Menu, or the page's parent), its name and its avatar are
   the console's rules, which name the topbar too. The index rows look
   like the sidebar's and the console's, restated below in rules of
   their own. The nav is in the bar, between the brand and the
   account card: on a content page it is hidden, and on the index it
   hangs from the bar's foot, out of the row's grid, so the row stays
   the strip's height while its nav is the page, and the shell's foot
   is anchored under it. main and its skip link go: the page is
   navigation. The avatar is read after the rows, the order the bar
   writes them in, the second recorded exception to "focus order is
   visual order". Every rule here names [rst-shell-up].

   From 800px the bar is 1.3's: the brand at the start, the nav inline,
   Account at the end. The language menu has moved into the card, and
   the up link and the title are hidden there as everywhere else. A
   1.3 topbar (a bare root, the Menu and its tail) has no
   [rst-shell-up] and no view, so it matches none of these rules nor
   the shared ones, and keeps its Menu card on a phone. */
@keyframes rst-shell-flash { from { background: var(--rst-accent-soft); } }

/* ── 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. ─────── */
:where([rst-shell-nav] a, [rst-shell-brand]) { column-gap: 0.3em; }

[rst-shell-brand] { align-items: center; box-sizing: border-box; display: inline-flex; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-shell-profile] > summary { box-sizing: border-box; }
/* The back control: its own 2.75rem is already the floor, centred in
   its strip; the link is the target. */
[rst-shell-back] > a { box-sizing: border-box; min-inline-size: var(--rst-target); }

/* Repeated from extras.css by a pin in hack/split, so it comes after the rules above. */
[rst-dropdown-menu] [rst-menu-row] > [rst-dropdown] > summary { font-size: 12.5px; font-weight: inherit; }

/* 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;
}

/* ── 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. ─────────────────────────────────────── */


/* console shell — a brand-and-account bar across the top AND a
   navigation rail down the side. topbar without the rail is topbar;
   sidebar without the bar is sidebar; this is the admin shape both of
   them were half of, and the one an app used to hand-write.

   TWO CHROMES, ONE PATTERN EACH. Below 800px the bar's tail (the account
   and language menus) folds behind the one <details rst-shell-menu> and
   opens as a card over the page (the card block after this one); the
   rail is an index page, like the sidebar's (the index/back block after
   that). The :has() pair below is LEGACY: the rail gated on the Menu's
   [open], kept for console layouts written before the phone index,
   whose root has no view.

   The legacy gate is written HIDE-WHEN-CLOSED rather than
   show-when-open: in an engine without :has() its hide rule never
   matches and the rail renders as a column of links under the bar,
   longer page, navigation intact. */
[rst-shell-console] [rst-shell-bar] { align-items: center; background: var(--rst-surface); border-block-end: 1px solid var(--rst-line); display: flex; flex-wrap: wrap; gap: var(--rst-sp-4); padding-block: 0.5rem; padding-inline: var(--rst-sp-4); }
[rst-shell-console] [rst-shell-menu] { margin-inline-start: auto; }
[rst-shell-console] [rst-shell-menu] > summary { align-items: center; border: 1px solid var(--rst-line); border-radius: var(--rst-radius-sm); cursor: pointer; display: flex; font-size: var(--rst-fs-sm); font-weight: 550; gap: 0.35rem; list-style: none; min-block-size: 24px; padding-block: 0.3rem; padding-inline: 0.55rem; }
[rst-shell-console] [rst-shell-menu] > summary::-webkit-details-marker { display: none; }
/* The rail, narrow: a full-width column under the bar, disclosed. It
   holds navigation and nothing else — the language switcher and the
   person are on the bar — so there is no rail-foot here and nothing
   pinned to a bottom edge. box-sizing all the same, because the wide
   query below sizes something in this subtree against the viewport and
   a viewport promise has to be kept by the border box. */
[rst-shell-console] > [rst-shell-rail] { background: var(--rst-rail-bg, var(--rst-surface)); border-block-end: 1px solid var(--rst-line); box-sizing: border-box; display: flex; flex-direction: column; gap: var(--rst-sp-3); padding: var(--rst-sp-4); }
[rst-shell-console] [rst-shell-nav] { flex-direction: column; gap: 2px; }
/* The items are the sidebar's (the thumb comment above its nav rules),
   spelled for the console. */
[rst-shell-console] [rst-shell-nav] a { border-block-end: 0; border-radius: var(--rst-radius-sm); display: block; padding-block: 0.35rem; padding-inline: 0.55rem; -webkit-tap-highlight-color: transparent; }
[rst-shell-console] [rst-shell-nav] a:not([aria-current]):active { background-color: var(--rst-tint-tap, transparent); box-shadow: inset 0 1px 2px var(--rst-depth-ambient, transparent); transition: none; }
@media (hover: hover) {
  [rst-shell-console] [rst-shell-nav] a:not([aria-current]):hover { --rst-hover: 100%; --rst-pressed: 0%; background-color: color-mix(in srgb, var(--rst-tint-press, var(--rst-accent-soft)) var(--rst-pressed), color-mix(in srgb, var(--rst-tint-hover, var(--rst-accent-soft)) var(--rst-hover), transparent)); box-shadow: inset var(--rst-hl-x) 1px 0 color-mix(in srgb, var(--rst-depth-hl, transparent) var(--rst-hover), transparent), 0 0 0 1px color-mix(in srgb, color-mix(in srgb, var(--rst-depth-contact, transparent) 60%, transparent) var(--rst-hover), transparent), var(--rst-shadow-x) var(--rst-shadow-y) 1px color-mix(in srgb, var(--rst-depth-ambient, transparent) var(--rst-hover), transparent); color: var(--rst-text); transition: --rst-hover 0.2s ease, --rst-pressed 0.2s ease; }
  [rst-shell-console] [rst-shell-nav] a:not([aria-current]):hover:active { --rst-pressed: 100%; background-color: var(--rst-tint-press, var(--rst-accent-soft)); box-shadow: inset 0 1px 2px var(--rst-depth-ambient, transparent); transition: none; }
}
[rst-shell-console] [rst-shell-nav] a[aria-current] { background-color: var(--rst-nav-current-bg, var(--rst-accent-soft)); box-shadow: inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), 0 0 0 1px var(--rst-depth-contact, transparent), var(--rst-shadow-x) var(--rst-shadow-y) 2px var(--rst-depth-contact, transparent); color: var(--rst-nav-current-fg, var(--rst-accent)); font-weight: 600; }
[rst-shell-console] [rst-shell-menu]:not([open]) + [rst-shell-tail] { display: none; }
/* LEGACY: the rail gated on the Menu's [open], for console layouts
   written before the phone index. A root with a view is new markup,
   where the rail follows the view and no :has() decides it; the :not()
   keeps this rule out of that fight entirely. */
[rst-shell-console]:not([rst-shell-console~="page"], [rst-shell-console~="index"]):has([rst-shell-menu]:not([open])) > [rst-shell-rail] { display: none; }
/* Disclosed, the tail is a column across the full width of the wrapped
   bar. The account's margin-inline-start: auto has to be undone by
   hand and stretch does not do it: in a column flex box the inline
   axis is the CROSS axis, and an item with an auto cross-axis margin
   is exempt from stretching — the same trap the topbar documents. */
[rst-shell-console] [rst-shell-menu][open] + [rst-shell-tail] { display: flex; flex-basis: 100%; flex-direction: column; gap: var(--rst-sp-3); }
[rst-shell-console] [rst-shell-tail] > [rst-shell-account] { margin-inline-start: 0; }
@media (min-width: 800px) {
  /* The frame: bar across the top, rail beside the page, footer under
     the page and not under the rail. Named areas rather than DOM
     order, because the DOM order is the reading order and must not be
     spent on layout — and areas map to the block and inline axes, so
     an RTL locale gets the rail on the other side with no second rule.
     min-block-size, never block-size: the rail reaches the foot of a
     short page, and a long one still scrolls the document. */
  [rst-shell-console] { display: grid; grid-template-areas: "bar bar" "rail main" "rail foot"; grid-template-columns: 15rem 1fr; grid-template-rows: auto 1fr auto; min-block-size: 100dvh; }
  [rst-shell-console] > [rst-shell-bar] { grid-area: bar; }
  [rst-shell-console] > [rst-shell-main] { grid-area: main; }
  [rst-shell-console] > [rst-shell-foot] { grid-area: foot; }
  [rst-shell-console] [rst-shell-menu] { display: none; }
  /* Every undo below repeats the narrow rule's own selector, because a
     media query adds no specificity: without the :has() spelling here
     a reader who opened the menu and then widened the window would
     keep a hidden rail. */
  [rst-shell-console] [rst-shell-tail],
  [rst-shell-console] [rst-shell-menu]:not([open]) + [rst-shell-tail],
  [rst-shell-console] [rst-shell-menu][open] + [rst-shell-tail] { display: contents; }
  [rst-shell-console] [rst-shell-tail] > [rst-shell-account] { margin-inline-start: auto; }
  /* The language menu is first in the tail, ahead of the account
     (see the layout), so the auto margin that pushes the pair to the
     bar's inline end goes on whichever comes first after the card's
     head, and the account after it sits beside it. A layout from
     before the head keeps the margin on its account. */
  [rst-shell-console] [rst-shell-tail] > [rst-shell-who] + * { margin-inline-start: auto; }
  [rst-shell-console] [rst-shell-tail] > [rst-shell-who] + * ~ [rst-shell-account] { margin-inline-start: 0; }
  [rst-shell-console] > [rst-shell-rail] { border-block-end: 0; border-inline-end: 1px solid var(--rst-line); display: flex; grid-area: rail; }
  /* The undo is a rule of ITS OWN, and this is the whole reason: a
     selector list is invalid as a whole if any selector in it is
     invalid, so an engine that cannot parse :has() drops every
     declaration in the list — including grid-area: rail, which has
     nothing to do with :has() and which this shell's wide layout is
     built on. Co-listed, the four selectors above cost the legacy
     engine its declared frame and left the rail in the right cell only
     because grid auto-placement happened to put it there. Split, the
     plain pair always applies and only the fight over `display` — the
     one declaration the narrow hide rule contests — rides on :has().
     That is the failure direction this shell chose, actually chosen
     rather than nearly chosen. */
  [rst-shell-console]:not([rst-shell-console~="page"], [rst-shell-console~="index"]):has([rst-shell-menu]:not([open])) > [rst-shell-rail] { display: flex; }
  /* THE VIEWPORT. The rail itself is a grid item stretched to the row,
     which can be taller than the window — that is what makes the
     background reach the foot of a long page. So the thing that has to
     fit the window is the nav, and it is the nav that is sized against
     it: sticky, capped at the viewport MINUS the two gaps it is inset
     by, measured as a border box, scrolling itself when an app's
     navigation is longer than that.
     This is the shipped regression, avoided by construction rather
     than by care: block-size: 100dvh on a content box that also
     carried padding gave a border box 32px taller than the window, and
     the gate that missed it asked where the person sat inside the rail
     — a question that stayed true while the rail hung off the screen.
     TestTheConsoleRailFitsTheViewport asks the other question, and
     carries a control page that must answer it the other way.
     THE RING. overflow-y: auto clips the nav at its padding box on
     both axes, which cut the current item's ring and contact shadow
     off at the nav's edges. The 5px of padding is room for the shadow
     at any light position, and the negative margin, inset and cap give
     it back so nothing moves (TestTheConsoleRailDrawsTheCurrentItemWhole). */
  [rst-shell-console] > [rst-shell-rail] > [rst-shell-nav] { box-sizing: border-box; inset-block-start: calc(var(--rst-sp-4) - 5px); margin-block: -5px; margin-inline: -5px; max-block-size: calc(100dvh - 2 * var(--rst-sp-4) + 10px); overflow-y: auto; padding-block: 5px; padding-inline: 5px; position: sticky; }
}
@media (max-width: 799.98px) {
  [rst-shell-console~="page"] [rst-shell-bar], [rst-shell-console~="index"] [rst-shell-bar] { box-sizing: border-box; min-block-size: var(--rst-shell-strip); padding-block: 0; position: relative; }
  [rst-shell-console~="page"] [rst-shell-bar]:has(> [rst-shell-menu][open]), [rst-shell-console~="index"] [rst-shell-bar]:has(> [rst-shell-menu][open]) { z-index: 45; }
  [rst-shell-console~="page"] [rst-shell-menu][open] > summary, [rst-shell-console~="index"] [rst-shell-menu][open] > summary { background: var(--rst-accent-soft); border-color: var(--rst-accent); }
  [rst-shell-console~="page"] [rst-shell-menu][open] > summary::before, [rst-shell-console~="index"] [rst-shell-menu][open] > summary::before { content: ""; cursor: default; inset: 0; position: fixed; z-index: 1; }
  [rst-shell-console~="page"] [rst-shell-menu][open] + [rst-shell-tail], [rst-shell-console~="index"] [rst-shell-menu][open] + [rst-shell-tail] { animation: rst-shell-drop 0.14s ease-out; background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 9px; box-shadow: var(--rst-shadow-pop); box-sizing: border-box; flex-basis: auto; gap: 0; inline-size: min(20rem, calc(100% - 1.5rem)); inset-block-start: calc(100% + 6px); inset-inline-end: 0.75rem; max-block-size: calc(100dvh - 5rem); overflow-y: auto; overscroll-behavior: contain; padding: 0.35rem; position: absolute; z-index: 2; }
  [rst-shell-console~="page"] [rst-shell-tail] > [rst-shell-account] > summary, [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-account] > summary { justify-content: space-between; padding-inline: 0.75rem; }
  [rst-shell-console~="page"] [rst-shell-tail] [rst-dropdown-menu], [rst-shell-console~="index"] [rst-shell-tail] [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.5rem 0; position: static; }
}
@media (prefers-reduced-motion: reduce) {
  [rst-shell-console~="page"] [rst-shell-menu][open] + [rst-shell-tail], [rst-shell-console~="index"] [rst-shell-menu][open] + [rst-shell-tail] { animation: none; }
  [rst-shell-console] [rst-shell-nav] a:not([aria-current]):hover { transition: none; }
}

/* ── Sidebar and console on a phone: the index and the back control ──
   Below 800px these two shells are two views of every URL, and the page
   says which with the view block the layout writes into the root:
   [rst-shell-sidebar~="index"] is the rail as a full-screen page of
   sections at a real URL; [rst-shell-sidebar~="page"] is the content,
   with a back control at the top inline-start whose href is the page's
   up block. No hamburger. The console is the same for its rail, under
   its bar.

   An old layout's root has no view, so none of these rules match it and
   it keeps its drawer (the legacy rules above). Scoped below 800px, like
   the card: at 800 and up both views are the rail beside the page, the
   back strip and the title are hidden by the rule just below, and
   nothing here needs undoing. ─────────────────────────────────────── */
@media (max-width: 799.98px) {
  [rst-shell-console~="page"] > [rst-shell-back] { align-items: center; background: var(--rst-surface); border-block-end: 1px solid var(--rst-line); box-sizing: border-box; display: flex; inset-block-start: 0; min-block-size: var(--rst-shell-strip); padding-inline: var(--rst-sp-1); position: sticky; z-index: 9; }
  :root:has([rst-shell-console~="page"]) { scroll-padding-block-start: var(--rst-shell-strip); }
  [rst-shell-console~="page"] > [rst-shell-rail] { display: none; }
  [rst-shell-console~="index"] > [rst-shell-main], [rst-shell-console~="index"] > [rst-skip], [rst-shell-console~="index"] [rst-shell-title] + [rst-shell-brand] { display: none; }
  /* The console's index is the bar, then the rail, then the foot. The
     three share the window: the root is a column at least the window
     tall and the rail takes what the bar and the foot leave, so a short
     nav does not scroll at all. A rail a whole window tall made every
     index scroll by the bar's and the foot's height, however short its
     nav; a long nav still grows the rail and the page scrolls. The
     console rail is already border-box. */
  [rst-shell-console~="index"] { display: flex; flex-direction: column; min-block-size: 100dvh; }
  [rst-shell-console~="index"] > [rst-shell-rail] { background: var(--rst-bg); border-block-end: 0; display: flex; flex: 1 0 auto; gap: 0; padding: var(--rst-sp-5) var(--rst-sp-4); }
  [rst-shell-console~="index"] [rst-shell-title] { align-items: center; display: flex; font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 var(--rst-sp-2); min-block-size: 2.75rem; min-inline-size: 0; padding-inline: 0.25rem; }
  [rst-shell-console~="index"] [rst-shell-bar] > [rst-shell-title] { flex: 1 1 0; margin: 0; }
  [rst-shell-console~="index"] [rst-shell-nav] { gap: 0; }
  [rst-shell-console~="index"] [rst-shell-nav] > a, [rst-shell-console~="index"] [rst-shell-nav] > a[aria-current] { align-items: center; background: var(--rst-surface); border: 1px solid var(--rst-line); border-block-start-width: 0; border-radius: 0; box-shadow: none; box-sizing: border-box; color: var(--rst-text); display: flex; font-size: 1rem; font-weight: 450; gap: var(--rst-sp-3); min-block-size: 3rem; padding-block: 0; padding-inline: 1rem 0.75rem; transition: none; }
  [rst-shell-console~="index"] [rst-shell-nav] > a:first-child, [rst-shell-console~="index"] [rst-shell-nav] > [rst-shell-group] + a { border-block-start-width: 1px; border-start-end-radius: var(--rst-radius); border-start-start-radius: var(--rst-radius); }
  [rst-shell-console~="index"] [rst-shell-nav] > a:last-child { border-end-end-radius: var(--rst-radius); border-end-start-radius: var(--rst-radius); }
  [rst-shell-console~="index"] [rst-shell-nav] > a:has(+ [rst-shell-group]) { border-end-end-radius: var(--rst-radius); border-end-start-radius: var(--rst-radius); }
  [rst-shell-console~="index"] [rst-shell-nav] > a::after { block-size: 0.5rem; border-right: 2px solid var(--rst-text-faint); border-top: 2px solid var(--rst-text-faint); content: ""; flex: none; inline-size: 0.5rem; margin-inline-start: auto; transform: rotate(45deg); }
  [dir="rtl"] [rst-shell-console~="index"] [rst-shell-nav] > a::after { transform: rotate(-135deg); }
  [rst-shell-console][rst-shell-console~="index"] [rst-shell-nav] > a:hover { background: var(--rst-tint-hover, var(--rst-accent-soft)); box-shadow: none; }
  [rst-shell-console][rst-shell-console~="index"] [rst-shell-nav] > a:active, [rst-shell-console][rst-shell-console~="index"] [rst-shell-nav] > a:hover:active { background: var(--rst-tint-press, var(--rst-accent-soft)); box-shadow: none; }
  [rst-shell-console~="index"] [rst-shell-nav] > a:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
  [rst-shell-console~="index"] [rst-shell-nav] > a:target { animation: rst-shell-flash 1.4s ease-out; }
  [rst-shell-console~="index"] [rst-shell-group] { margin-block: var(--rst-sp-5) var(--rst-sp-2); padding-inline: 1rem; }
  /* The console's Menu becomes the profile menu on its index: the
     avatar instead of the icon and its word, a round button like the
     sidebar's, and the card headed by the person's name. Its open state
     keeps the card's pressed ring. */
  [rst-shell-console~="index"] [rst-shell-menu-label] { display: none; }
  [rst-shell-console~="index"] [rst-shell-menu] [rst-shell-avatar] { display: inline-flex; }
  [rst-shell-console~="index"] [rst-shell-menu] > summary { border-color: transparent; border-radius: 50%; justify-content: center; padding: 4px; }
  [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-who] { display: block; }
  /* The account's links laid out flat in the index card, as the
     sidebar's are: the Account summary goes and the closed menu's
     content is shown, through ::details-content. An engine without it
     keeps the Account menu, one tap deeper. */
  @supports selector(::details-content) {
    [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-account] > summary { display: none; }
    [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-account]::details-content { content-visibility: visible; }
    [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-account] > [rst-dropdown-menu] { padding-inline: 0; }
  }
}
/* ── The console on one row ─────────────────────────────────────────
   A console whose root holds [rst-shell-up] is the one-row console.
   Below 800px its bar is the phone's one header row: the up link at
   the inline start, the app's name at the centre, the account's avatar
   at the inline end, and nothing else above the page. The back strip,
   the Menu and its tail are gone: the up link is in the bar, and the
   account card holds the person, the scheme, the language and the
   account's links. From 800px it is the 1.3 bar less the language
   menu, which moved into the card: the brand at the start, "Account"
   at the end. Every rule names [rst-shell-up], in the root's :has()
   or as the element itself, so a 1.3 console (Menu, tail, back strip)
   matches none of them and draws as it did. The card is as tall as
   the window less the row, as the 1.3 card was: it holds four kinds
   of thing now, and the Language menu opens inside it.

   The row is a grid of three columns, the two sides equal shares of
   what the name leaves, each at least its own content, so the name is
   on the row's true centre whenever it can be and moves toward the
   shorter side only as far as it must. The name's column shrinks when
   the three do not fit, and the name keeps to one line, cut with an
   ellipsis, so the up link and the avatar never give up any of their
   width to it. The up link's own label is cut with an ellipsis too,
   at the screen's width less the avatar's column, so a long parent
   title never pushes the avatar off the row; its aria-label keeps the
   whole title. A name is shown whole or not at all, never cut: shell.js
   measures it and, where it is cut, marks it hidden, which the [hidden]
   rule takes out of the row, out of reach of a tap and of Tab. Only a
   script can tell that a name is cut, so with scripts off the cut name
   stays, the one place the ellipsis shows: a tap or Tab there lands on
   a name the reader can see, never on an invisible link. */
[rst-shell-console]:has([rst-shell-up]) [rst-shell-account] > [rst-dropdown-menu] { box-sizing: border-box; inline-size: min(17rem, calc(100vw - 1.5rem)); max-block-size: calc(100dvh - 5rem); }
@media (max-width: 799.98px) {
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] { align-items: center; block-size: var(--rst-shell-strip); display: grid; gap: 0 var(--rst-sp-1); grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr); padding-inline: var(--rst-sp-1); }
  /* A content page's row stays at the top as the back strip did,
     above the sticky form bar (5) and below a modal's scrim (10). */
  [rst-shell-console~="page"]:has([rst-shell-up]) > [rst-shell-bar] { inset-block-start: 0; position: sticky; z-index: 9; }
  [rst-shell-console~="page"] > [rst-shell-bar] > [rst-shell-up] { border-radius: var(--rst-radius-sm); box-sizing: border-box; color: var(--rst-accent); display: block; font-size: 1rem; font-weight: 500; grid-column: 1; grid-row: 1; justify-self: start; line-height: 2.75rem; max-inline-size: calc(100vw - 5rem); min-block-size: 2.75rem; min-inline-size: var(--rst-target); overflow: hidden; padding-inline: 0.25rem 0.5rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
  [dir="rtl"] [rst-shell-console~="page"] > [rst-shell-bar] > [rst-shell-up] .icon { transform: scaleX(-1); }
  [rst-shell-console~="page"] > [rst-shell-bar] > [rst-shell-up]:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: -2px; }
  /* The name: the brand on a page, the title (which holds the brand)
     on the index. One face for both, so the row does not change as the
     slide goes between them. */
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-brand],
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-title] { block-size: 2.75rem; color: var(--rst-text); font-size: var(--rst-fs-lg); font-weight: 650; grid-column: 2; grid-row: 1; justify-content: center; letter-spacing: normal; line-height: 2.75rem; margin: 0; min-block-size: 0; min-inline-size: 0; overflow: hidden; padding: 0; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  [rst-shell-console~="page"]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-brand] { display: block; }
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-brand][hidden],
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-title][hidden] { display: none; }
  /* The avatar: a round 44px button, as the sidebar's profile is. */
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-account] { grid-column: 3; grid-row: 1; justify-self: end; margin-inline-start: 0; }
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-account] > summary { border-radius: 50%; box-sizing: border-box; color: var(--rst-text); display: inline-flex; justify-content: center; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); padding: 4px; }
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar]:has(> [rst-shell-account][open]) > [rst-shell-account] > summary { background: var(--rst-accent-soft); }
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-account] > summary:focus-visible { outline: 2px solid var(--rst-accent); outline-offset: 2px; }
  /* CLOSING ON AN OUTSIDE TAP with scripts off, the 1.3 card's way:
     while open the summary grows an invisible layer over the viewport,
     under the card, and the bar is lifted above the page (45, as the
     1.3 bar was) only while it is. The open state is read off the bar,
     so these stay rules of the account summary the tap inventory
     names. */
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar]:has(> [rst-shell-account][open]) > [rst-shell-account] > summary::before { content: ""; cursor: default; inset: 0; position: fixed; z-index: 1; }
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar]:has(> [rst-shell-account][open]) { z-index: 45; }
}
@media (max-width: 799.98px) and (hover: hover) {
  [rst-shell-console]:has([rst-shell-up]) > [rst-shell-bar] > [rst-shell-account] > summary:hover { background: var(--rst-accent-soft); }
}

/* ── The topbar on one row ──────────────────────────────────────────
   A topbar whose root holds [rst-shell-up] is the one-row topbar, and
   below 800px a topbar app is a tree: /menu, the index, is the nav as
   rows; every other page is a content page one level down from its
   row there. The row is the console's (above): its grid, its up link
   (labelled Menu, or the page's parent), its name and its avatar are
   the console's rules, which name the topbar too. The index rows look
   like the sidebar's and the console's, restated below in rules of
   their own. The nav is in the bar, between the brand and the
   account card: on a content page it is hidden, and on the index it
   hangs from the bar's foot, out of the row's grid, so the row stays
   the strip's height while its nav is the page, and the shell's foot
   is anchored under it. main and its skip link go: the page is
   navigation. The avatar is read after the rows, the order the bar
   writes them in, the second recorded exception to "focus order is
   visual order". Every rule here names [rst-shell-up].

   From 800px the bar is 1.3's: the brand at the start, the nav inline,
   Account at the end. The language menu has moved into the card, and
   the up link and the title are hidden there as everywhere else. A
   1.3 topbar (a bare root, the Menu and its tail) has no
   [rst-shell-up] and no view, so it matches none of these rules nor
   the shared ones, and keeps its Menu card on a phone. */
@media (prefers-reduced-motion: reduce) {
  [rst-shell-console~="index"] [rst-shell-nav] > a:target { animation: none; }
}

/* ── 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) {
  [rst-shell-console] [rst-shell-nav] a { align-items: center; display: flex; }
}
@media (forced-colors: active) {
  [rst-shell-console] [rst-shell-nav] a[aria-current] { background: Highlight; box-shadow: none; color: HighlightText; }
  [rst-shell-console][rst-shell-console~="index"] [rst-shell-nav] > a[aria-current]:hover, [rst-shell-console][rst-shell-console~="index"] [rst-shell-nav] > a[aria-current]:active { background: Highlight; color: HighlightText; }
}
@media print {
  [rst-shell-console] [rst-shell-nav] a[aria-current] { box-shadow: none; }
}

/* ── 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. ─────── */
[rst-shell-console] [rst-shell-nav] a { align-content: center; box-sizing: border-box; min-block-size: var(--rst-target); }
[rst-shell-console] [rst-shell-menu] > summary { box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-shell-console~="page"] [rst-shell-menu][open] > summary, [rst-shell-console~="index"] [rst-shell-menu][open] > summary { box-sizing: border-box; min-block-size: var(--rst-target); min-inline-size: var(--rst-target); }
[rst-shell-console~="page"] [rst-shell-tail] > [rst-shell-account] > summary, [rst-shell-console~="index"] [rst-shell-tail] > [rst-shell-account] > summary { box-sizing: border-box; min-block-size: var(--rst-target); }
@media (max-width: 799.98px) {
  [rst-shell-console~="index"] [rst-shell-nav] > a { min-block-size: 3rem; }
}

/* 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;
}

/* shell.css — the slide between the index and a page on a phone, for
   the sidebar, console and one-row topbar shells (the topbar's index
   is /menu), the only layouts that link it.

   It is a file of its own because the opt-in cannot be scoped: written
   in tokens.css, @view-transition would opt every page of every shell
   into cross-document transitions at narrow widths, the sign-in page
   included. Both documents must opt in, and a stylesheet only these
   three shells link is exactly that set. A 1.3 topbar layout does not
   link it, and keeps navigating without a slide. Delete it (and its <link>) and
   navigation is instant; nothing else changes.

   shell.js types a transition between an index and a page "forward" or
   "back" in pagereveal, and skips any other. Each :active-view-transition-type() selector is a rule of its own: an
   engine that does not know the pseudo-class drops the whole rule, and a
   co-listed selector would take its neighbours with it (the trap the
   console's rules in tokens.css record). The slide is a physical
   translateX, so a right-to-left page has four rules of its own that
   slide the other way. Under reduced motion nothing opts in and
   navigation is instant; the block at the end sets every animation here
   to none as well, which is the form the motion gate reads. */
@media (max-width: 799.98px) and (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  /* No cross-fade: a transition no type names (page to page, or with no
     shell.js) is an instant swap. The typed rules below outweigh these.
     The root group now has no animation for its timing (1.9.0's) to
     time; the slide is its old and new images, which carry their own. */
  ::view-transition-group(*) { animation: none; }
  ::view-transition-old(*) { animation: none; }
  ::view-transition-new(*) { animation: none; }
  ::view-transition-group(root) { animation-duration: 0.32s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
  html:active-view-transition-type(forward)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-start; }
  html:active-view-transition-type(forward)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-end; }
  html:active-view-transition-type(back)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-end; z-index: 1; }
  html:active-view-transition-type(back)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-start; }
  html[dir="rtl"]:active-view-transition-type(forward)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-start-rtl; }
  html[dir="rtl"]:active-view-transition-type(forward)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-end-rtl; }
  html[dir="rtl"]:active-view-transition-type(back)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-end-rtl; z-index: 1; }
  html[dir="rtl"]:active-view-transition-type(back)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-start-rtl; }
  /* The console's bar holds still while the page under it slides. */
  [rst-shell-console] > [rst-shell-bar] { view-transition-name: rst-shell-bar; }
}
@keyframes rst-shell-in-end { from { transform: translateX(100%); } }
@keyframes rst-shell-out-start { to { opacity: 0.7; transform: translateX(-25%); } }
@keyframes rst-shell-in-start { from { opacity: 0.7; transform: translateX(-25%); } }
@keyframes rst-shell-out-end { to { transform: translateX(100%); } }
@keyframes rst-shell-in-end-rtl { from { transform: translateX(-100%); } }
@keyframes rst-shell-out-start-rtl { to { opacity: 0.7; transform: translateX(25%); } }
@keyframes rst-shell-in-start-rtl { from { opacity: 0.7; transform: translateX(25%); } }
@keyframes rst-shell-out-end-rtl { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  html:active-view-transition-type(forward)::view-transition-old(root) { animation: none; }
  html:active-view-transition-type(forward)::view-transition-new(root) { animation: none; }
  html:active-view-transition-type(back)::view-transition-old(root) { animation: none; }
  html:active-view-transition-type(back)::view-transition-new(root) { animation: none; }
  html[dir="rtl"]:active-view-transition-type(forward)::view-transition-old(root) { animation: none; }
  html[dir="rtl"]:active-view-transition-type(forward)::view-transition-new(root) { animation: none; }
  html[dir="rtl"]:active-view-transition-type(back)::view-transition-old(root) { animation: none; }
  html[dir="rtl"]:active-view-transition-type(back)::view-transition-new(root) { animation: none; }
}
