/* Contrast pairs (WCAG 2.1: text >= 4.5:1, large text/UI components >= 3:1). Computed with the
   standard relative-luminance formula (sRGB channel c: c<=0.03928 -> c/12.92, else
   ((c+0.055)/1.055)^2.4; L = 0.2126R + 0.7152G + 0.0722B; contrast = (L1+0.05)/(L2+0.05)).

   Light theme (bg #ffffff):
     --fg     #1a1f24 on --bg #ffffff  -> 16.60:1
     --muted  #54606b on --bg #ffffff  ->  6.44:1
     --link   #0b5cad on --bg #ffffff  ->  6.67:1
     --border #7c8894 on --bg #ffffff  ->  3.62:1 (UI/non-text)
     --danger #b3261e on --bg #ffffff  ->  6.54:1 (.admin-error)
     banner-preview  #5c4300 on #fff3cd -> 8.39:1
     banner-eol      #7a1319 on #fde2e1 -> 8.86:1
     banner-hidden   #3d3d3d on #e6e6e6 -> 8.70:1
     .badge          --muted #54606b on --code-bg #f6f8fa -> 6.05:1
     .hidden-badge   #5c4300 on #fff8e1 (banner-preview-fg on banner-bg) -> 8.75:1

   Dark theme (bg #121417):
     --fg     #e6e9ec on --bg #121417  -> 15.14:1
     --muted  #a9b2ba on --bg #121417  ->  8.58:1
     --link   #7cb4f5 on --bg #121417  ->  8.53:1
     --border #5c6773 on --bg #121417  ->  3.20:1 (UI/non-text)
     --danger #ff9d99 on --bg #121417  ->  9.26:1 (.admin-error)
     banner-preview  #ffd873 on #4a3900 -> 8.17:1
     banner-eol      #ff9d99 on #4a1416 -> 7.51:1
     banner-hidden   #d9d9d9 on #3a3a3a -> 8.06:1
     .badge          --muted #a9b2ba on --code-bg #1a1d21 -> 7.86:1
     .hidden-badge   #ffd873 on #3a2f10 (banner-preview-fg on banner-bg) -> 9.61:1

   Phase 3 (docs/a11y-checklist.md, review queue audit): the mockup's --ink-3 tertiary ink
   (#7C8894 light / #7F8C99 dark) failed color-contrast on .adminui-nav .sec, .rq-item .p small and
   .commits .small at 3.10-4.25:1 against the surfaces it sits on. Replaced with:
     Light --ink-3 #5A6572 on --surface-3 #E4E9E8 -> 4.84:1
                            on --accent-soft #E1F0F5 -> 5.08:1
                            on --surface #FFFFFF     -> 5.93:1
     Dark  --ink-3 #9AA6B2 on --accent-soft #163846  -> 4.80:1
                            on --surface-2 #1E2A36   -> 5.88:1

   Task 7 round-2 (search results, docs/design/docs-portal-mockup.html's "rd-search" crumb): the mandated
   ".result .crumb span{color:var(--line-2)}" rule was written for the "/" separators only, but with no
   separate selector for the entry text both painted the same colour:
     Light --line-2 #C5CDCF on --bg #ffffff -> 1.61:1 (fail)
     Dark  --line-2 #354555 on --bg #121417 -> 1.87:1 (fail)
   ".result .crumb .crumb-name" now carries the entry text at --ink-2, the mockup's intended colour for it
   (".crumb a" already used --ink-2 for a linked ancestor; plain-text entries get the same colour via this
   class instead, per the task's own controller ruling that breadcrumb entries stay plain text):
     Light --ink-2 #4B5A68 on --bg #ffffff -> 7.09:1
     Dark  --ink-2 #A9B5C0 on --bg #121417 -> 8.84:1
   The "/" separators are untouched and still measure 1.61:1 / 1.87:1 against --bg — acceptable because
   they are now aria-hidden and carry no information a screen reader needs; N-8's 4.5:1 floor applies to
   the entry text this replaces, not to a decorative separator.

   Task 8 round-2 (header typeahead, ".search-combobox li[role=\"option\"]"): the active and hovered
   suggestion were distinguished only by "background: var(--code-bg)" against --bg, and because the
   widget deliberately keeps DOM focus in the input there is no browser focus ring to fall back on:
     Light --code-bg #f6f8fa on --bg #ffffff -> 1.065:1 (fail — SC 1.4.11 wants 3:1 for a state fill)
     Dark  --code-bg #1a1d21 on --bg #121417 -> 1.091:1 (fail — SC 1.4.11 wants 3:1 for a state fill)
   The active option ("[aria-selected=\"true\"]") now carries "border-color: var(--link)" instead,
   reusing the version selector's own ".selected" precedent above rather than inventing a new pairing:
     Light --link #0b5cad on --bg #ffffff -> 6.67:1 (already recorded above; re-measured against this
                                                       pairing to confirm it still clears 3:1)
     Dark  --link #7cb4f5 on --bg #121417 -> 8.53:1 (already recorded above; re-measured against this
                                                       pairing to confirm it still clears 3:1)
   Hover keeps its own "background: var(--code-bg)" on a separate selector, so the two states stay
   visually distinct from each other even when both apply to the same option (a mouse resting on the
   keyboard-active item).

   Task 9 (search results, "mark" as a snippet highlight background): --ink-2 on --warn-soft was
   measured for the first time and passed with room to spare (6.31:1 light / 6.37:1 dark) -- full
   measurement lives in docs/a11y-checklist.md's "Phase 5: search" section, not here, because mark
   needed no change; this line exists so a reader of this ledger asking "has this been checked" gets
   an answer instead of a gap.

   Phase 6 task 8 (feedback widget, ".feedback"): four new pairings, measured live with getComputedStyle
   against the widget in every state that renders them (unsubmitted, both ratings pressed, both
   confirmations) -- full detail in docs/a11y-checklist.md's "Phase 6: feedback" section.
     ".send" text (--accent-ink) on its own fill (--accent):
       Light 5.69:1 / Dark 7.46:1 -- both pass (4.5:1 bar)
     Pressed rating button border (--accent) on --bg:
       Light 5.69:1 / Dark 7.76:1 -- both pass (3:1 bar, UI component)
     ".ok.success" (--good on --good-soft):
       Light 4.57:1 / Dark 6.32:1 -- both pass (4.5:1 bar)
     ".ok.failed" (--bad on --bad-soft):
       Light 5.13:1 / Dark 5.31:1 -- both pass (4.5:1 bar; matches Phase 4's ".badge.hidden" entry for the
       same token pair, since both are the codebase's one bad/bad-soft pairing)

   Fix round 1, Minor 2 (pairing missing from the checklist): the pressed rating button's own text,
   ".feedback .q button[aria-pressed=\"true\"]" (--ink, inherited from ".feedback .q button") against the
   button's pressed-state fill (--accent-soft, set on the [aria-pressed="true"] rule itself):
     Light --ink #17232E on --accent-soft #E1F0F5 -> 13.66:1 -- pass, no fix needed
     Dark  --ink #E6EBEF on --accent-soft #163846 -> 10.36:1 -- pass, no fix needed

   Phase 6 task 8, the --line-2 boundary question: the textarea and the unpressed rating buttons took their
   1px border from --line-2, inherited verbatim from the mockup. Measured against every background the
   border actually renders next to -- the control's own fill (--surface) as well as the page behind it
   (--bg) -- since in dark theme those differ and either could carry the boundary:
     Light --line-2 vs --bg/--surface (identical value in light theme): 1.61:1 -- fail (3:1 bar)
     Dark  --line-2 vs --bg:      1.87:1 -- fail
     Dark  --line-2 vs --surface: 1.68:1 -- fail (worse than vs --bg, since --surface sits between --bg and
                                              --line-2 in luminance)
   Fails in both themes against both adjacent colours -- not a borderline call. Fixed by reusing --ink-3
   (already AA-vetted for other surfaces, already used two rules below this pair for the widget's own
   "Anonymous..." line) rather than minting a new token:
     Light --ink-3 vs --bg/--surface: 5.93:1 -- pass
     Dark  --ink-3 vs --bg:      7.44:1 -- pass
     Dark  --ink-3 vs --surface: 6.65:1 -- pass

   Fix round 1, Minor 3 (why --ink-3 and not --border): --border is this codebase's nominal non-text/UI
   token, and reaching for it here first would have been the semantically tidier choice -- but it was
   checked against the alternative and fails. --border does not appear in the table above because it was
   never the codebase's border color for interactive controls generically, only for a handful of specific
   uses measured elsewhere in this file; measured here against the same dark --surface these buttons render
   on, it comes in under the 3:1 UI-component bar:
     Dark --border #5c6773 on --surface #16202A -> 2.86:1 -- fail
   --ink-3 was already AA-vetted (Phase 3, above) and already in use one property away in this same widget's
   muted line, and clears 3:1 against every background in both themes (table above) -- the better of the two
   candidates. This is the first place a text token is reused as a border color in this codebase; recorded
   so a later pass does not "correct" it back to --border and reintroduce the fail.

   Dark theme brightened (2026-09-10, on request: "for the dark theme, use a bit brighter text
   color"). Every dark ink and text token moved up one step; the light block is untouched. Brighter
   text on an unchanged dark background can only raise a text ratio, so every entry above still holds
   with margin -- but the ledger's numbers are the pre-change ones, so the new measurements are
   recorded here rather than edited into the entries above:
     --fg    #e6e9ec -> #F2F5F8  on --bg          15.14 -> 16.86:1
     --muted #a9b2ba -> #BCC6CF  on --bg           8.58 -> 10.65:1
     --ink   #E6EBEF -> #F2F6F9  on --bg          15.37 -> 16.98:1
                                 on --surface     13.73 -> 15.17:1
                                 on --accent-soft 10.36 -> 11.45:1 (the Task 8 entry above)
     --ink-2 #A9B5C0 -> #C2CDD7  on --bg           8.84 -> 11.43:1
                                 on --surface      7.89 -> 10.21:1
     --ink-3 #9AA6B2 -> #B2BDC8  on --bg           7.44 ->  9.67:1
                                 on --surface      6.65 ->  8.64:1
                                 on --surface-2    5.88 ->  7.64:1
                                 on --surface-3    5.20 ->  6.76:1
                                 on --accent-soft  5.02 ->  6.52:1 -- the tightest pairing in the
                                                   file, and the reason the Phase 3 entry exists.
                                                   (That entry records 4.80:1 for the old pair; a
                                                   straight sRGB computation of those two hex values
                                                   gives 5.02:1. The discrepancy is in the old
                                                   measurement, not this one -- the new figure was
                                                   taken both ways and agreed. Either way it passed
                                                   then and passes with more room now.)
   --ink-3 doubles as the control border colour (see the Fix round 1 note just above and admin.css's
   control rule), where the bar is 3:1 rather than 4.5:1; both its dark surface pairings clear it by
   more than 2x. AdminAccessibilityTests pins the new dark value in both dark blocks.

   Reader restyle, the nine --rd-* tokens (2026-09-10). Token values, so that the ledger a reader of
   this file expects is here; the FULL 25-row pairing table lives in docs/a11y-checklist.md's
   "Reader Retype restyle" section and is not duplicated here, the same split this file already uses
   for `mark` and the feedback widget. Every figure below was measured live with getComputedStyle on
   a rendered reader page in both themes, not computed from the plan -- the plan's own numbers have
   been wrong twice (see the F73 and dark-code-pill notes).

     token              light      dark
     --rd-ink           #2C3148    #C4C2C3    prose, headings, rail links, control text
     --rd-ink-muted     #5C6379    #A8B0BE    breadcrumb, TOC entries, section labels, "Previous"
     --rd-surface       #ffffff    #121417    topbar, rail and control fills
     --rd-line          #E4E8F1    #2C2C2C    structural hairlines only -- see the waiver below
     --rd-accent        #1266DE    #649FF2    links, active rail item, active TOC entry, prev/next
     --rd-accent-soft   #E8F1FE    #163846    the active rail item's pill fill
     --rd-code-bg       #F4F6FC    #1A1D21    inline-code pill fill, rail hover fill
     --rd-code-line     #E4E8F1    #2C2C2C    the pill's outline
     --rd-crumb-sep     #8C95A9    #5B646F    the breadcrumb chevron
     --rd-on-accent     #ffffff    #121417    text ON --rd-accent (the sign-in button)
       white on the light accent #1266DE is 5.27:1, but only 2.70:1 on the dark accent
       #649FF2 -- which is why this is a token and not a hard-coded white. Dark ink on the
       dark accent is 6.84:1.

   Five decisions worth not rediscovering:

   1. Retype's own accent #5495F1 is NOT used for light-theme link text. It measures 3.02:1 on white
      -- an SC 1.4.3 failure for body-size text. --rd-accent keeps Retype's exact 215 degree hue and
      clears the bar instead.

   2. The accent was chosen against the WORST surface a link lands on, not against the page. The
      obvious fix, darkening only until it cleared 4.5:1 on the page, gives #1B72EC -- which is
      4.17:1 on the code-pill fill and so would have shipped a real AA failure behind a plausible
      fix, because this content does contain links wrapped around inline code. Measured for the
      shipped value: page 5.27:1 / 6.84:1, code pill 4.88:1 / 6.27:1, active rail pill 4.63:1 /
      4.61:1. (The plan's table predicted 4.55:1 for the dark code pill; it had computed against
      Retype's own #353535 pill fill, which was never adopted -- --rd-code-bg is #1A1D21, so the
      real figure is 6.27:1. Better than planned, but the plan's number was still not a measurement.)

   3. Prose links carry text-decoration: underline as a REQUIREMENT, not a preference. --rd-accent
      against --rd-ink is 2.43:1 light / 1.52:1 dark, under the 3:1 WCAG technique F73 asks for when
      colour alone separates a link from the text around it. (Dark was 2.47:1 until --rd-ink was
      dimmed to #C4C2C3 on 2026-09-30, which moved the delta further under the bar, not over it --
      so the underline is more load-bearing now, not less.) Contrast against the page is fine; it is
      the link-vs-text delta that fails, and only the underline closes it. Anyone removing the
      underline reintroduces an AA failure that no page-contrast check will report.

   4. --rd-line is a decorative-hairline waiver, deliberately low-contrast. 1.23:1 light / 1.32:1
      dark, used ONLY for structural hairlines: the topbar's bottom edge, the rail's right edge, the
      footer's top edge, the prev/next box and the inline-code pill outline. It is never used for an
      interactive control's boundary -- --border (3.62:1 / 3.20:1) keeps the search input, the rail's
      filter input, table cells and the sign-out button. SC 1.4.11 governs identifying components and
      their states; a panel divider is neither. Recorded so a later contrast pass does not "fix" a
      non-problem, and so it is clear this is a different thing from the CONTROL borders Phases 7
      and 9 legitimately had to correct.

   5. --rd-crumb-sep announces nothing, because the separator is painted by content: ">" / "" -- the
      alternative-text form, whose second half gives assistive technology an empty alt string, which
      matters because a pseudo-element cannot carry aria-hidden. So SC 1.4.3 does not apply to it. It
      was still raised from #A9B0BF (2.18:1) to #8C95A9 (3.01:1 light, 3.07:1 dark) for legibility,
      not for compliance. Do not read that as a 3:1 requirement having been met.

   6. The topbar's own divider, --rd-topbar-line (rgba(255,255,255,.08)), is a second decorative-hairline
      waiver, added 2026-09-17 and recorded beside decision 4 above rather than folded into it because it
      protects a different token. The topbar's fill does not follow the theme, so against the dark page it
      measures 1.16:1 (docs/a11y-checklist.md's 2026-09-17 section has the full bar-against-page table) --
      deliberately far under any contrast bar, because none applies. The topbar's own divider is a
      decorative hairline, not a control boundary. SC 1.4.11 governs the identification of components and
      states; a panel edge is neither. Recorded beside the --rd-line waiver so a later contrast pass does
      not "fix" a non-problem.

   7. Syntax-highlight tokens, added 2026-10-29 (TODO #23). The vendored highlight.js palettes were made
      for a white page; on --rd-code-bg these are restated through --rd-hl-* (the rest pass as shipped):
        light, on #F4F6FC: keyword #d42b3b 4.62, built_in #b95007 4.61, comment #68707a 4.64,
                           name #218038 4.62 (4.83 on the addition fill #f0fff4)
        dark, on #1A1D21:  section #4084ee 4.63
      CodeHighlightContrastTests measures every vendored token as painted, in all three theme blocks.

   One thing three cues carry, not colour. The active rail item's own pill fill is only 1.14:1 light
   / 1.48:1 dark against the rail, so the fill alone identifies nothing. State is carried by three
   cues together -- accent text (4.63:1 / 4.61:1 on the pill), font-weight 600, and a 2px accent left
   bar (5.27:1 / 6.84:1 against the rail) -- plus aria-current="page" programmatically. SC 1.4.1 is
   satisfied by the weight and the bar, not by the colour. Removing either non-colour cue would make
   the state colour-only.

   Theme resolution: light tokens live on bare :root. Dark tokens are duplicated under
   `@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {…} }` (system preference,
   unless the visitor picked "light") and under `:root[data-theme="dark"] {…}` (explicit pick, wins
   regardless of system preference). theme.js sets the data-theme attribute. */

/* Reader shell: vendored Inter (wwwroot/lib/fonts, see VERSIONS.md), self-hosted because the CSP's
   font-src is 'self' -- no Google Fonts, no CDN. Both layouts load this stylesheet (admin.css is the
   admin's own font source, untouched here), but a @font-face rule whose family name no rendered text
   uses downloads nothing: the browser only fetches a face once something on the page resolves to it.
   The admin area never names "Inter" in any rule, so it pays only the cost of parsing these four
   declarations -- roughly 400 bytes -- and zero font bytes. Do not "optimise" this by splitting these
   rules into a separate stylesheet; that would add a second render-blocking request for the reader
   for no benefit, since the admin's cost here is already effectively nothing. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/inter-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/inter-regular-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/lib/fonts/inter-semibold.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lib/fonts/inter-bold.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #1a1f24;
  --muted: #54606b;
  --border: #7c8894;
  --link: #0b5cad;
  --danger: #b3261e;
  --banner-bg: #fff8e1;
  --banner-border: #f0c36d;
  --code-bg: #f6f8fa;
  --banner-preview-bg: #fff3cd;
  --banner-preview-fg: #5c4300;
  --banner-preview-border: #e6c766;
  --banner-eol-bg: #fde2e1;
  --banner-eol-fg: #7a1319;
  --banner-eol-border: #f0a8a5;
  --banner-hidden-bg: #e6e6e6;
  --banner-hidden-fg: #3d3d3d;
  --banner-hidden-border: #b8b8b8;

  /* Admin design tokens (docs-portal-mockup.html), copied verbatim. */
  --surface: #FFFFFF;
  --surface-2: #EEF1EE;
  --surface-3: #E4E9E8;
  --ink: #17232E;
  --ink-2: #4B5A68;
  --ink-3: #5A6572;
  --line: #D8DEDF;
  --line-2: #C5CDCF;
  --accent: #0E6F8F;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F0F5;
  --accent-line: #9CC8D8;
  --good: #2C7A4B;
  --good-soft: #E3F3E9;
  --warn: #9A6A0F;
  --warn-soft: #FBF1D9;
  --bad: #A83A3A;
  --bad-soft: #F8E3E3;
  --diff-add: #E6F4EA;
  --diff-del: #FBE7E7;
  --diff-add-ink: #1E5A34;
  --diff-del-ink: #8A2B2B;
  --code-ink: #E4EBF1;
  --shadow: 0 1px 2px rgba(23, 35, 46, .06), 0 6px 20px rgba(23, 35, 46, .08);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --callout-note: #1266DE;
  --callout-tip: #1C7544;
  --callout-important: #6B3FC4;
  --callout-warning: #8A5A00;
  --callout-caution: #B02A2A;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Reader (Retype-derived) tokens, docs/superpowers/plans/2026-09-10-reader-retype-restyle.md.
     Additive only -- no existing token above is edited. */
  --rd-ink: #2C3148;
  --rd-ink-muted: #5C6379;
  --rd-surface: #ffffff;
  --rd-line: #E4E8F1;
  --rd-accent: #1266DE;
  --rd-accent-soft: #E8F1FE;
  --rd-code-bg: #F4F6FC;
  --rd-code-line: #E4E8F1;
  /* Syntax-highlight tokens the vendored github.min.css colours under 4.5:1 on --rd-code-bg: the same
     hues, darkened just past it. See the token rules after ".rd .doc-content pre" for why. */
  --rd-hl-keyword: #d42b3b;
  --rd-hl-built-in: #b95007;
  --rd-hl-comment: #68707a;
  --rd-hl-name: #218038;
  --rd-hl-addition: #218038;
  --rd-hl-section: #005cc5;
  --rd-crumb-sep: #8C95A9;
  --rd-on-accent: #ffffff;
  /* Site notice bar: the same in every theme on purpose. It paints its own background, so the pair
     below is what is measured, not the page behind it. */
  --notice-bg: #9A6A0F;
  --notice-ink: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121417;
    --fg: #F2F5F8;
    --muted: #BCC6CF;
    --border: #5c6773;
    --link: #7cb4f5;
    --danger: #ff9d99;
    --banner-bg: #3a2f10;
    --banner-border: #7a5f1f;
    --code-bg: #1a1d21;
    --banner-preview-bg: #4a3900;
    --banner-preview-fg: #ffd873;
    --banner-preview-border: #7a5f1f;
    --banner-eol-bg: #4a1416;
    --banner-eol-fg: #ff9d99;
    --banner-eol-border: #7a2b2b;
    --banner-hidden-bg: #3a3a3a;
    --banner-hidden-fg: #d9d9d9;
    --banner-hidden-border: #5a5a5a;

    /* Admin design tokens (docs-portal-mockup.html), copied verbatim. */
    --surface: #16202A;
    --surface-2: #1E2A36;
    --surface-3: #253341;
    --ink: #F2F6F9;
    --ink-2: #C2CDD7;
    --ink-3: #B2BDC8;
    --line: #2A3744;
    --line-2: #354555;
    --accent: #5FB3CF;
    --accent-ink: #0B1A21;
    --accent-soft: #163846;
    --accent-line: #2E6478;
    --good: #6CC08B;
    --good-soft: #16321F;
    --warn: #E0B34A;
    --warn-soft: #3A2E12;
    --bad: #E07A7A;
    --bad-soft: #3A1C1C;
    --diff-add: #16321F;
    --diff-del: #3A1C1C;
    --diff-add-ink: #A9E3BD;
    --diff-del-ink: #F0B2B2;
    --code-ink: #E4EBF1;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --callout-note: #649FF2;
    --callout-tip: #5FC98C;
    --callout-important: #B79CF5;
    --callout-warning: #E0A33A;
    --callout-caution: #F08A8A;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Reader (Retype-derived) tokens -- identical to the explicit dark block below, since the file
       already duplicates every dark token across both dark blocks. */
    --rd-ink: #C4C2C3;
    --rd-ink-muted: #A8B0BE;
    --rd-surface: #121417;
    --rd-line: #2C2C2C;
    --rd-accent: #649FF2;
    --rd-accent-soft: #163846;
    --rd-code-bg: #1A1D21;
    --rd-code-line: #2C2C2C;
    /* github-dark.min.css's own values except --rd-hl-section, which it draws at 3.65:1. The
       others are restated only because the light theme overrides the same tokens. */
    --rd-hl-keyword: #ff7b72;
    --rd-hl-built-in: #ffa657;
    --rd-hl-comment: #8b949e;
    --rd-hl-name: #7ee787;
    --rd-hl-addition: #aff5b4;
    --rd-hl-section: #4084ee;
    --rd-crumb-sep: #5B646F;
    --rd-on-accent: #121417;
    /* Site notice bar: the same in every theme on purpose. It paints its own background, so the pair
       below is what is measured, not the page behind it. */
    --notice-bg: #9A6A0F;
    --notice-ink: #FFFFFF;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121417;
  --fg: #F2F5F8;
  --muted: #BCC6CF;
  --border: #5c6773;
  --link: #7cb4f5;
  --danger: #ff9d99;
  --banner-bg: #3a2f10;
  --banner-border: #7a5f1f;
  --code-bg: #1a1d21;
  --banner-preview-bg: #4a3900;
  --banner-preview-fg: #ffd873;
  --banner-preview-border: #7a5f1f;
  --banner-eol-bg: #4a1416;
  --banner-eol-fg: #ff9d99;
  --banner-eol-border: #7a2b2b;
  --banner-hidden-bg: #3a3a3a;
  --banner-hidden-fg: #d9d9d9;
  --banner-hidden-border: #5a5a5a;

  /* Admin design tokens (docs-portal-mockup.html), copied verbatim. */
  --surface: #16202A;
  --surface-2: #1E2A36;
  --surface-3: #253341;
  --ink: #F2F6F9;
  --ink-2: #C2CDD7;
  --ink-3: #B2BDC8;
  --line: #2A3744;
  --line-2: #354555;
  --accent: #5FB3CF;
  --accent-ink: #0B1A21;
  --accent-soft: #163846;
  --accent-line: #2E6478;
  --good: #6CC08B;
  --good-soft: #16321F;
  --warn: #E0B34A;
  --warn-soft: #3A2E12;
  --bad: #E07A7A;
  --bad-soft: #3A1C1C;
  --diff-add: #16321F;
  --diff-del: #3A1C1C;
  --diff-add-ink: #A9E3BD;
  --diff-del-ink: #F0B2B2;
  --code-ink: #E4EBF1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --callout-note: #649FF2;
  --callout-tip: #5FC98C;
  --callout-important: #B79CF5;
  --callout-warning: #E0A33A;
  --callout-caution: #F08A8A;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Reader (Retype-derived) tokens -- identical to the system-preference dark block above, since the
     file already duplicates every dark token across both dark blocks. */
  --rd-ink: #C4C2C3;
  --rd-ink-muted: #A8B0BE;
  --rd-surface: #121417;
  --rd-line: #2C2C2C;
  --rd-accent: #649FF2;
  --rd-accent-soft: #163846;
  --rd-code-bg: #1A1D21;
  --rd-code-line: #2C2C2C;
  /* github-dark.min.css's own values except --rd-hl-section, which it draws at 3.65:1. The
     others are restated only because the light theme overrides the same tokens. */
  --rd-hl-keyword: #ff7b72;
  --rd-hl-built-in: #ffa657;
  --rd-hl-comment: #8b949e;
  --rd-hl-name: #7ee787;
  --rd-hl-addition: #aff5b4;
  --rd-hl-section: #4084ee;
  --rd-crumb-sep: #5B646F;
  --rd-on-accent: #121417;
  /* Site notice bar: the same in every theme on purpose. It paints its own background, so the pair
     below is what is measured, not the page behind it. */
  --notice-bg: #9A6A0F;
  --notice-ink: #FFFFFF;
}

/* Reader-only geometry and font tokens. Theme-independent (a typeface and a rail width do not vary
   by theme), so --rd-sans is declared once here rather than tripled into the three colour blocks
   above. Consumed only by rules scoped under .rd (added to _DocsLayout.cshtml's <body>), never by
   the admin shell, which has its own --sans. Both now name Inter, but they stay separate tokens:
   the admin is free to diverge again without dragging the reader with it. */
.rd {
  --rd-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rd-topbar-h: 70px;
  /* How much of the site notice bar is still on screen above the topbar. Everything sized to "the
     viewport below the topbar" (the rail, the TOC column, the admin panel) subtracts it too, or a page
     with the bar up is always one bar-height taller than the screen and scrolls even when the article
     is one line. site-notice.ts keeps it current as the bar scrolls away; without script it stays 0 and
     the page scrolls by the bar's height, as it did before. */
  --rd-notice-h: 0px;
  /* The topbar is one fixed colour in BOTH themes, so these four are values, never var(--ink) and
     friends -- --ink is #17232E light and #E6EBEF dark, and a bar that inverts is not a constant bar.
     Declared here for the same reason --rd-sans is: they do not vary by theme, so tripling them into
     the three colour blocks above would be three chances to let one drift.
       white on #17232E        15.95:1
       #D1D3D5 on #17232E      10.63:1  (white at 80%, the version selector)
     --rd-topbar-line is derived from the BAR, not the page: against the light page the bar is
     15.95:1 and needs no edge, but against the dark page (--bg #121417) it is 1.16:1 and this
     hairline is the only thing separating them. A border from --rd-line would invert here. */
  --rd-topbar-bg: #17232E;
  --rd-topbar-ink: #FFFFFF;
  --rd-topbar-ink-muted: #D1D3D5;
  --rd-topbar-line: rgba(255, 255, 255, .08);
  --rd-rail-w: 300px;
  --rd-toc-w: 255px;
  --rd-gap: 64px;
  font-family: var(--rd-sans);
  color: var(--rd-ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

/* Form controls do not inherit the page font -- they keep the UA's own, and against Inter that
   mismatch is far more obvious than it was against system-ui. ".search-box" already spelled
   "font: inherit" out for its two controls; this closes the feedback textarea, the sign-out button,
   #sidebar-toggle and the copy button in one place.
   :where() so the whole rule stays at (0,1,0) -- the same specificity as ".copy-btn", which declares
   its own 0.75rem font-size. Placed HERE, before every one of those rules, so equal-specificity ties
   are broken by source order in favour of the more specific-intent rule further down the file. */
.rd :where(input, button, select, textarea) {
  font: inherit;
}

/* An author-origin "display" beats the user agent's own "[hidden] { display: none }", so any element
   that ships the hidden attribute AND matches a rule setting display renders anyway. This codebase has
   produced that defect four times -- the search listbox, the feedback Send button, the editor's Discard
   button and draft notice, and #st-drag-error on /admin/structure, which is a ".callout" (display:grid)
   and so rendered as an empty red box above the tree on every visit.
   The first three were each patched with their own narrow "<selector>[hidden]" rule; the fourth proves
   that approach does not hold, because it only ever protects the elements someone thought of. This is
   the rule the HTML spec's own suggested rendering prescribes, and it ends the whole class: hidden means
   hidden, whatever else matches. Loaded by both layouts, so it covers the admin area too.
   The three narrow rules are left in place -- they are now redundant, but each documents a real defect
   and one is pinned by a guard test. !important is warranted here and nowhere else in this file: there
   is no legitimate reason for an author rule to un-hide a [hidden] element. */
[hidden] {
  display: none !important;
}

a {
  color: var(--link);
}

/* The reader's link colour. Placed here, ahead of ".toc a": that one is (0,1,1) exactly as this rule
   is, so source order -- not specificity -- decides between them, and ".toc a" must keep its own
   colour. ".rd .rd-mark" is (0,2,0) and always outranks this on specificity alone, so it needs no such
   ordering. "#sidebar a" (1,0,1) outranks this outright.
   --rd-accent was chosen against the WORST surface a link lands on, not against the page: 4.88:1 on
   the inline-code pill and 4.63:1 on the active rail pill, both of which a link can sit on. See the
   plan's palette table. */
.rd a {
  color: var(--rd-accent);
}

:is(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* The admin area's own accent, so the ring matches the surface it sits on (deferred from Task 1). */
.adminui :is(a, button, summary, input, select, textarea):focus-visible {
  outline-color: var(--accent);
}

/* Same for the reader. Only outline-color, so the base rule above keeps owning the width and offset. */
.rd :is(a, button, summary, input, select, textarea):focus-visible {
  outline-color: var(--rd-accent);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0 0 0.3rem 0;
}

.skip-link:focus {
  left: 0;
}

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

/* Reader topbar: the shared flex base above still does the layout, this only restyles it. Scoped to
   .rd because _AdminLayout.cshtml has no <header> today but site.css is loaded by both layouts and a
   bare rule here would silently start applying the day one is added. z-index 40 sits above the sticky
   rail and below .skip-link's 100.
   The bar is one fixed colour in both themes -- see the --rd-topbar-* tokens on .rd above -- so its
   background, ink and divider come from those tokens rather than --rd-surface/--rd-line, which invert. */
.rd header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--rd-topbar-h);
  padding: 0 24px;
  gap: 12px;
  background: var(--rd-topbar-bg);
  color: var(--rd-topbar-ink);
  border-bottom: 1px solid var(--rd-topbar-line);
}

/* One identity unit, intrinsically sized. The old rule pinned this block to var(--rd-rail-w) so the
   title sat over the rail; the cluster now sizes to its contents so mark, name and version read as
   one thing rather than a title padded out to 300px. */
.rd .rd-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rd .rd-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rd-topbar-ink);
  text-decoration: none;
  white-space: nowrap;
}

.rd .rd-mark-glyph {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.rd .rd-mark-name {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}

/* The push-right moves from .search-box to the cluster: the box is no longer the first thing on the
   right, and hanging the only margin-left:auto off it would leave the bar left-packed once other
   controls sit beside it. */
.rd .rd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* The bar's controls. The search box's label matches this by hand in Task 3 rather than taking the
   class, because its sizing is entangled with undoing .visually-hidden. */
.rd .rd-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: none;
  color: var(--rd-topbar-ink);
  cursor: pointer;
  font-size: 16px;
}

.rd .rd-icon-btn:hover {
  background: rgba(255, 255, 255, .10);
}

/* Stated against the BAR, not against --bg: the bar does not follow the theme, so an outline colour
   tuned for the page is not guaranteed 3:1 on it. Measured in Task 7. */
.rd header :is(a, button, summary, input, label):focus-visible {
  outline: 2px solid var(--rd-topbar-ink);
  outline-offset: 2px;
}

/* Collapsed by CSS, not replaced by a link. The label -- already in _SearchBox.cshtml, previously
   .visually-hidden -- becomes the visible circular control: clicking it focuses the input, which is
   what expands the field, so the whole interaction works with no script. The input is narrowed, never
   hidden, so Tab still reaches it and a screen reader still finds a labelled search field. */
.rd header .search-box {
  display: flex;
  align-items: center;
  gap: 0;
}

.rd header .search-box label {
  /* relative, not static: it still undoes .visually-hidden's "position: absolute", and it gives
     the ::before below a containing block to centre itself in. */
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0;
  clip: auto;
  clip-path: none;
  overflow: visible;
  white-space: normal;
  display: grid;
  place-items: center;
  border-radius: 24px;
  cursor: pointer;
  font-size: 0;
}

.rd header .search-box label::before {
  content: "\f002"; /* magnifying-glass, Font Awesome solid -- confirmed present in FaIconNames.cs */
  font: var(--fa-font-solid);
  font-size: 16px;
  color: var(--rd-topbar-ink);
  /* Taken OUT of the label's grid flow, which is the whole point. The label is a grid, and its own
     text node ("Search {version} documentation", shrunk to font-size: 0 so it does not show) is a
     second, anonymous grid item. Two items means two rows, so "place-items: center" centred this
     glyph in row ONE rather than in the 40px box -- about 3px high next to the theme and account
     icons, which have no such sibling. Measured at 5x zoom against .rd-icon-btn, before and after.
     Positioned over the whole label instead, the glyph centres itself and the hidden text cannot
     move it. */
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  line-height: 1;
}

.rd header .search-box input[type="search"] {
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  transition: width .15s ease, opacity .15s ease, padding .15s ease;
}

/* Never shown in the bar, at any width or focus state. The typeahead lists matches as the reader
   types and Enter submits, so a visible button is a third way to do what two already do, taking
   header width to say it.

   It stays in the DOM rather than being removed from _SearchBox.cshtml, and that is the whole
   point: a form carrying a submit button submits on Enter unambiguously, in every browser,
   with no script. Delete the button and implicit submission starts depending on the form
   having exactly one field that blocks it -- true today, and quietly untrue the moment anyone
   adds a second input.

   Enter itself is NOT verified here and could not be: this browser pane cannot deliver a key
   press that triggers implicit submission. Proven by a control run -- with the button visible,
   exactly as it shipped and worked before, Enter did not submit either. So the mechanism rests
   on the spec and on the button staying in the DOM, and wants one real-browser check before
   anyone relies on it.

   The search PAGE keeps its visible button; this rule is scoped to the bar. */
.rd header .search-box button[type="submit"] {
  display: none;
}

.rd header .search-box:focus-within input[type="search"] {
  width: 240px;
  padding: 6px 10px;
  opacity: 1;
  border: 1px solid var(--rd-topbar-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: var(--rd-topbar-ink);
}

header nav[aria-label="Version"] ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

header nav[aria-label="Version"] li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
}

header nav[aria-label="Version"] a {
  display: inline-block;
  min-height: 24px;
  padding: 0.25rem 0.5rem;
  line-height: 1.4;
}

header nav[aria-label="Version"] li.selected {
  border-color: var(--link);
}

/* The version switcher as a dropdown.
   ---------------------------------------------------------------------------------------------------
   New rules carry the ".rd" scope the rest of the reader uses; the four rules above predate that
   convention and are left as they are. Neither set can reach the admin: "header nav[aria-label=...]"
   needs a <nav> inside a <header>, and the admin's own version pickers (Feedback.cshtml,
   Structure.cshtml) are <select name="version" aria-label="Version"> elements in a page body.

   Specificity, since the two sets overlap on <ul> and <li>: ".rd .version-pick li" is (0,2,1) and
   "header nav[aria-label="Version"] li" is (0,1,3). Classes outrank elements, so the new rules win
   regardless of which comes first in the file.

   The panel is ABSOLUTE, not in flow. ".rd header" is a fixed 70px sticky bar, so a panel that took
   part in layout would either stretch the bar or be clipped by it. */
.rd .version-pick {
  position: relative;
}

/* The trigger. --border (3.62:1), not --rd-line: this is an interactive control's boundary, which
   SC 1.4.11 governs, and --rd-line is reserved for the decorative hairlines the ledger waives.
   min-height 24px is the target size the rest of the reader navigation keeps (SC 2.5.8). */
.rd .version-pick > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

/* The version switcher keeps its markup and its behaviour; only its colour and size change here. */
.rd header .version-pick > summary {
  color: var(--rd-topbar-ink-muted);
  font-size: 15px;
}

/* Both are needed: "list-style: none" above covers Firefox and current WebKit, this covers older
   Safari, which still paints the marker through its own pseudo-element. */
.rd .version-pick > summary::-webkit-details-marker {
  display: none;
}

/* The chevron is drawn from two borders rather than set as text content: a glyph such as U+25BE is
   outside the vendored Inter latin subset, so it would silently fall back to a system font and could
   land as a missing-glyph box. currentColor keeps it correct in both themes with no second token. */
.rd .version-pick > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -2px);
  opacity: 0.65;
}

.rd .version-pick[open] > summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.rd .version-pick > ul {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1;
  display: block;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--rd-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}

/* Rows, not chips: the bordered box each entry carries above is the flat header layout's look and
   reads as a stack of buttons once they are inside a panel. */
.rd .version-pick li {
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  white-space: nowrap;
}

.rd .version-pick li.selected {
  border-color: transparent;
}

/* Weight AND colour, so the current version is not marked by colour alone (SC 1.4.1) -- the same
   three-cue reasoning as "#sidebar a.active", which keeps font-weight for this reason. The link's
   aria-current="true" carries it programmatically. */
.rd .version-pick li.selected > a {
  font-weight: 600;
  color: var(--rd-accent);
}

/* The link is the whole row, badges included (_VersionSelector.cshtml puts them inside it), so the row
   highlights and navigates wherever it is pointed at. The gap is the one the badge used to keep from
   the link as its sibling. */
.rd .version-pick li a {
  flex: 1 1 auto;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--rd-ink);
}

.rd .version-pick li a:hover,
.rd .version-pick li a:focus-visible {
  background: var(--rd-code-bg);
}

/* A status badge's fill is --code-bg, which is all but the row's hover fill in light (#F6F8FA on
   #F4F6FC) and exactly it in dark, so on a highlighted row the pill dissolved into the row. It takes the
   panel's surface instead while its row is highlighted. The text is --muted either way: 6.4:1 on the
   light surface, 10.6:1 on the dark one. The hidden badge has a fill of its own and keeps it. */
.rd .version-pick li a:is(:hover, :focus-visible) .badge:not(.hidden-badge) {
  background: var(--rd-surface);
}

/* The selected row's link is set in 600 to mark the version being read; inside the link, a badge would
   inherit that and read as part of the mark. The weight belongs to the number alone. */
.rd .version-pick li a .badge {
  font-weight: 400;
}

.rd .account-pick {
  position: relative;
}

.rd .account-pick > summary {
  list-style: none;
}

.rd .account-pick > summary::-webkit-details-marker {
  display: none;
}

/* The hover fill held while the panel is open, so it is plain which control the panel belongs to. */
.rd .account-pick[open] > summary {
  background: rgba(255, 255, 255, .10);
}

/* Drawn as the page-actions menu is (.page-actions-panel) -- the same surface, line, radius and shadow --
   so the reader's two menus read as one kind of thing. Its entries are .account-item rows, which share
   .page-action's rules further down. */
.rd .account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--rd-surface);
  color: var(--rd-ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

/* Who is signed in, above the entries. A heading row, not an entry: no hover, no target. Wraps rather
   than truncating, because an email cut short with an ellipsis is a name nobody can check. */
.rd .account-name {
  margin: 0 0 6px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--rd-line);
  color: var(--rd-ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Sign out is set apart from the entries above it, so it is not hit on the way to something else. */
.rd .account-panel .signout-form {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--rd-line);
}

.rd .account-panel .signout-form .account-item {
  width: 100%;
}

/* The panel sits inside <header>, so it inherits the bar's white ring -- 1.00:1 on the light surface.
   Restated in the reader's accent, the colour every other focus ring on the surface uses. */
.rd header .account-panel :is(a, button):focus-visible {
  outline-color: var(--rd-accent);
}

.badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--muted);
}

/* Round-2 finding (Minor): Search.cshtml's "from {version}" badge used the "neutral" modifier, which
   admin.css defines (".badge.neutral") but the reader layout never loads admin.css — so it was inert on
   this page. Reusing admin.css's own colours (--surface-3/--ink-2) rather than inventing a new pairing. */
.badge.neutral {
  background: var(--surface-3);
  color: var(--ink-2);
}

.hidden-badge {
  background: var(--banner-bg);
  color: var(--banner-preview-fg);
}

/* Two swatches previewing the two themes. Their fills are the literal light and dark --bg values
   rather than tokens on purpose: they show what you would be switching *to*, so they must not follow
   the theme currently in force -- token fills would make the light swatch invisible in light mode.
   That fixes the fills, so the border carries the whole shape and has to clear 3:1 (SC 1.4.11,
   non-text) against four neighbours: both fills, and the --surface-2 the swatches sit on in each
   theme. A white circle on the light theme's near-white rail is the binding case -- nothing but the
   border separates them. Measured live for #767f88:
     vs light --surface-2 #EEF1EE: 3.57:1 -- pass    vs dark --surface-2 #1E2A36: 3.59:1 -- pass
     vs the light fill #FFFFFF:    4.07:1 -- pass    vs the dark fill #121417:    4.54:1 -- pass
   (#8a949e, tried first, was 2.71:1 against the light rail -- a fail, and invisible in exactly the
   case that matters.)
   Selection is a ring, not a colour change, so it is not carried by colour alone (SC 1.4.1), and the
   state is also on aria-pressed, which theme-picker.js keeps in sync. The ring is --accent, measured
   against the fill it encircles in the theme that can actually show it -- a ringed light swatch means
   the theme is light, so the light row is the only reachable one:
     light theme, ring on light fill: 5.69:1 -- pass
     dark  theme, ring on dark fill:  7.76:1 -- pass */
.theme-pick {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.theme-swatch {
  /* 20px of swatch inside a 26px target -- padding does the work so the circle stays 20px. */
  width: 26px;
  height: 26px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.theme-swatch::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #767f88;
  box-sizing: border-box;
}

.theme-swatch[data-theme-choice="light"]::before {
  background: #ffffff;
}

.theme-swatch[data-theme-choice="dark"]::before {
  background: #121417;
}

.theme-swatch[aria-pressed="true"]::before {
  box-shadow: 0 0 0 2px var(--accent);
}

.signout-form {
  display: inline;
}

.signout-form button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  color: inherit;
}

/* The site notice: a solid dark-amber bar above the header on every reader page. It paints its own
   background from --notice-bg / --notice-ink, which are identical in every theme, so the theme behind
   it cannot change its contrast (white on #9A6A0F, recorded in docs/a11y-checklist.md). Deliberately
   not .banner*: those are the per-version status lines. */
.site-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--notice-bg);
  color: var(--notice-ink);
}

.site-notice-text {
  flex: 1;
  margin: 0;
}

/* The bar's own selectors are raised to (0,2,0) and above so they beat ".rd a" (0,1,1), ".adminui a" and the
   ".rd/.adminui :is(...):focus-visible" ring colours (0,2,1), wherever the bar sits, the admin preview included. */
.site-notice .site-notice-link {
  margin-left: 0.5rem;
  color: var(--notice-ink);
  font-weight: 600;
  text-decoration: underline;
}

.site-notice-close {
  margin: 0;
}

.site-notice .site-notice-x {
  flex: none;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--notice-ink);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1.2;
  cursor: pointer;
}

.site-notice :is(.site-notice-x, .site-notice-link):focus-visible {
  outline: 2px solid var(--notice-ink);
  outline-offset: 2px;
}

.banner {
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--banner-bg);
  border-bottom: 1px solid var(--banner-border);
}

.banner-preview {
  background: var(--banner-preview-bg);
  color: var(--banner-preview-fg);
  border-bottom-color: var(--banner-preview-border);
}

.banner-eol {
  background: var(--banner-eol-bg);
  color: var(--banner-eol-fg);
  border-bottom-color: var(--banner-eol-border);
}

.banner-hidden {
  background: var(--banner-hidden-bg);
  color: var(--banner-hidden-fg);
  border-bottom-color: var(--banner-hidden-border);
}

/* The reader's banners moved into <main>, so the full-bleed treatment above is wrong for them: a strip
   with square corners and a bottom border only reads as chrome, and inside the article it reads as a
   rule under a stray paragraph. The child combinator is deliberate -- it matches the layout's own
   partial and not a .banner that some future page content might carry deeper in the tree.

   Scoped, not edited in place: Areas/Admin/Pages/Structure.cshtml renders the same _Banners partial
   inside .adminui-main, and admin.css declares nothing for .banner, so the rules above are that page's only
   styling and moving the radius into them would restyle it too.

   The shorthand "border" replaces the base rule's border-bottom outright (0,2,1) beats (0,1,0), so the
   three variants below restate their line colour for all four sides. No colour value changes, so every
   banner pairing in the ledger at the top of this file still holds. */
.rd main > .banner {
  border: 1px solid var(--banner-border);
  border-radius: 8px;
  margin: 0 0 24px;
  padding: 12px 16px;
}

.rd main > .banner-preview {
  border-color: var(--banner-preview-border);
}

.rd main > .banner-eol {
  border-color: var(--banner-eol-border);
}

.rd main > .banner-hidden {
  border-color: var(--banner-hidden-border);
}

/* Edited in place at flat (0,1,0) on purpose. A ".rd .layout" override would be (0,2,0) and would then
   silently beat both print.css's own .layout rule and the 768px block's, because a media query adds no
   specificity of its own. The three columns carry their own padding instead. */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* The left rail is its own full-height sticky scroller with its own surface and divider, so the border
   stays put while the tree moves. 100dvh, not 100vh, for the same reason the admin rail uses it: on
   mobile 100vh is the *largest* viewport height, so the bottom of the rail would sit under the browser
   chrome. visibility:visible is load-bearing -- it is the above-1024px reset for the drawer state the
   1024px block sets. #sidebar is reader-only markup (the admin rail is .adminui-nav). */
#sidebar {
  flex: 0 0 var(--rd-rail-w);
  width: var(--rd-rail-w);
  position: sticky;
  top: var(--rd-topbar-h);
  height: calc(100dvh - var(--rd-topbar-h) - var(--rd-notice-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 12px;
  background: var(--rd-surface);
  border-right: 1px solid var(--rd-line);
  visibility: visible;
}

/* Task 6 -- the rail's own "Filter" box (_Sidebar.cshtml). The markup SHIPS the hidden attribute and
   sidebar-filter.js removes it only once every element is found and every listener wired, so nothing
   here needs a no-JavaScript variant.
   "display: flex" on an element that ships hidden is exactly the shape of the four defects the [hidden]
   comment further up this file enumerates -- it is safe here, and only here, because that rule's
   !important out-ranks any author display. Which is also why this file must never grow a
   ".sidebar-filter[hidden]" escape hatch, and why this box is never hidden with visibility or opacity
   instead: those do not remove it from the tab order.
   Filtering itself needs NO css at all -- the module sets the hidden attribute on non-matching <li>
   elements and the global rule does the hiding.
   Prefixed with #sidebar rather than left as a bare class: site.css is loaded by _AdminLayout too, and
   while ".sidebar-filter" appears in no admin markup today, ".badge" and ".icon" are both standing proof
   that a bare reader class does leak eventually. #sidebar is reader-only markup (the admin rail is
   .adminui-nav), so this is the same guard the rules above and below already rely on. */
#sidebar .sidebar-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  /* Matches "#sidebar li a"'s own 10px inline padding, so the box's edges line up with the labels of
     the tree it filters rather than with the rail's outer padding. */
  padding: 0 10px;
}

/* --border, not --rd-line: this is an interactive control's boundary (3.62:1), and the plan's own note
   is explicit that --rd-line's structural hairlines are not to be used for one. */
#sidebar .sidebar-filter input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 20px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--rd-surface);
  color: var(--rd-ink);
}

#sidebar .sidebar-filter-empty {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--rd-ink-muted);
}

/* (1,1,1), which beats "#sidebar a" (1,0,1): rail links are chrome and drop the underline, but this one
   is prose inside a sentence, so it needs to read as a link. */
#sidebar .sidebar-filter-empty a {
  color: var(--rd-accent);
  text-decoration: underline;
}

#sidebar ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}

#sidebar > ul,
#sidebar nav > ul {
  padding-left: 0;
}

#sidebar summary {
  cursor: pointer;
}

/* Rail links are navigation chrome, not prose, so they drop the underline and the link colour and
   read as plain ink -- which is what stopped them rendering as --link blue. (1,0,1) beats ".rd a"
   (0,1,1) outright, so no source-order dependency here.
   #sidebar is reader-only markup (the admin rail is .adminui-nav), so these rules need no .rd prefix. */
#sidebar a {
  color: var(--rd-ink);
  text-decoration: none;
}

/* min-height: 24px is the target-size fix Phase 2 measured and ThemeAndPrintTests greps for the
   literal -- it stays, spelling and spacing included, even though 6px+20px+6px already exceeds it.
   Keeping it explicit means a later padding change cannot silently drop below 24px. */
/* flex, not block: the leading icon is an inline box inside the link, and under "display: block" a long
   title wrapped UNDER it rather than staying in its own column, so the second line started beneath the
   glyph instead of lining up with the first. Aligned to the first baseline so a one-line and a two-line
   entry put their icons at the same height, and the icon is held at its natural width so it cannot be
   squeezed by a long title. The gap is .icon's own margin-right, not a "gap" here -- that class is shared
   with the admin UI, so its spacing stays the one place either shell changes it. */
#sidebar li a,
#sidebar summary {
  display: flex;
  align-items: baseline;
  min-height: 24px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 20px;
  border-radius: 6px;
  /* Every entry at every level, folders and pages alike, so the rail reads as one list rather than
     one whose casing depends on how deep a thing happens to sit. Note what capitalize does and does
     not do: it uppercases the first letter of each WORD and leaves the rest of each word alone, so
     an acronym in a title ("ON-API", "GDPR") survives intact, while a lowercase joining word does
     not -- "Installation, Administration and Maintenance" renders with "And". */
  text-transform: capitalize;
}

#sidebar li a > .icon,
#sidebar summary > .icon {
  flex: 0 0 auto;
}

/* One line per entry: a title too long for the rail ends in an ellipsis instead of wrapping, so every
   entry is the same height and the tree reads as a list rather than a column of paragraphs. The title
   is a span of its own (_Sidebar.cshtml) because text-overflow needs a box to act on, and a bare text
   run inside the flex link is an anonymous item no rule can reach. min-width: 0 is what lets it shrink
   at all: a flex item will not go below its own text's width by default, and would push past the rail
   instead of clipping. The full title is still the link's accessible name, and the span's title
   attribute shows it to a reader who hovers a cut one. */
#sidebar .sidebar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rail links carry no underline any more, so hover is the affordance that says "this is clickable".
   A fill rather than a colour change, so it cannot be confused with the active state. */
#sidebar li a:hover,
#sidebar summary:hover {
  background: var(--rd-code-bg);
}

/* Top-level folders are Retype's section headings, but they are set at the same size and weight as
   everything else in the rail: one type scale from top to bottom, so the eye reads the list as a
   list rather than as a stack of differently-sized things. Only the top level was ever different --
   a nested folder has always been a peer of the links around it.
   What is left to mark them is colour and the letter-spacing. That is enough here and is not a
   colour-alone cue of the F73 kind: these are <summary> elements inside <details>, so the disclosure
   triangle and the nesting carry the hierarchy structurally, for a screen reader as much as for a
   sighted reader. They were uppercased once too, and casing is now shared by every entry (see
   "#sidebar li a, #sidebar summary" above); adding text-transform back would single them out again.
   The contrast pairing is unchanged by dropping to the shared size and weight -- a11y-checklist row
   15 measures --rd-ink-muted on the rail at 5.97:1 light / 8.45:1 dark, and 14px normal needs the
   same 4.5:1 that 13px bold did; the large-text relaxation applies to neither. */
#sidebar nav > ul > li > details > summary {
  letter-spacing: 0.04em;
}

#sidebar li + li {
  margin-top: 2px;
}

/* THREE cues, not one (SC 1.4.1): weight, colour and a 2px accent bar. font-weight: 600 was the whole
   rule before and is deliberately kept -- dropping it while adding colour would have made the state
   weaker, not stronger. aria-current="page" carries it programmatically as well.
   border-left plus a matching 8px padding-left, rather than an inset box-shadow: the bar then prints,
   survives forced-colors, and the label still lines up with the inactive items above and below it.
   (1,1,1) here beats "#sidebar li a" (1,0,2), so the padding override lands. */
#sidebar a.active {
  font-weight: 600;
  color: var(--rd-accent);
  background: var(--rd-accent-soft);
  border-left: 2px solid var(--rd-accent);
  padding-left: 8px;
}

/* Only the spacing is ours now. The sprite's <svg> needed an explicit 1em box; a Font Awesome <i>
   is a glyph, so it takes its size from font-size and its baseline from the font. Kept as a separate
   class rather than folded into the fa-* classes so the gap survives an icon changing family. */
.icon {
  margin-right: 0.35rem;
}

/* Left bare deliberately: this is the fallback for _AdminLayout's <main id="main" class="ad-main">
   (admin.css re-caps it to max-width:none) and for any layout-less page. Reader geometry goes on
   ".rd main" below and NEVER here -- both "main" and "#main" match the admin shell. */
main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 48rem;
}

/* "max-width: none", NOT a missing max-width: the article fills whatever the rail and the TOC column
   leave it. Deleting the declaration is not enough and measures as a bug -- the bare "main" rule
   above still caps at 48rem, and it out-ranks nothing here, it simply applies once ".rd main" stops
   declaring the property, so the reader silently lands on a 768px column. Measured live: 768px at a
   1400px viewport, one gutter short of the TOC.

   The uncapping is a deliberate DEVIATION from the reference -- Retype caps its own measure at
   537-700px, and a long line length is genuinely harder to read -- so it is recorded here rather
   than left to look like an oversight.

   flex-basis 0, not auto: both free-space distribution and flex line breaking are decided from the
   hypothetical main size, which for "flex-basis: auto" is the content size. Uncapped that is the
   article's max-content width -- wide enough that in the wrapping block below 1280px the rail plus
   this column stopped fitting on one line and the content dropped underneath the rail. flex-shrink
   cannot rescue it: shrinking only runs once the items are already on the same line. */
.rd main {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0 var(--rd-gap);
  padding: 40px 0 20px;
}

/* Search, /docs/none and Login define no Sidebar section, so there is no rail to sit next to. That
   used to need a rule here, ".rd .layout.no-rail > main { margin: 0 auto }", which centred the capped
   column. With the cap gone there is nothing left to centre and that rule would do harm: "0 auto"
   resolves both gutters to zero and puts the prose against the viewport edge, while the base rule
   already spans the full width with one --rd-gap each side. The class stays in _DocsLayout.cshtml
   (ReaderShellTests pins the markup) as the hook if these pages ever want a measure of their own. */

/* The "On this page" column. Sticky below the topbar and its own scroller, so a long TOC does not
   drag the page. Reader-only markup, so no .rd prefix is needed for correctness. */
.toc-col {
  flex: 0 0 var(--rd-toc-w);
  margin-left: auto;
  position: sticky;
  top: var(--rd-topbar-h);
  max-height: calc(100dvh - var(--rd-topbar-h) - var(--rd-notice-h));
  overflow-y: auto;
  padding: 40px 24px 40px 0;
}

/* The "On this page" controls exist only where the column becomes a drawer. Above 1280px the column
   is always on screen, so neither control has anything to toggle -- and #toc-toggle must stay hidden
   even after docs.js removes its hidden attribute, which is why this is a rule and not just markup.
   Same specificity as the 1279px block's counterpart, so that block wins on source order alone. */
.rd .toc-dock,
.rd .toc-toggle-label,
.rd #toc-toggle {
  display: none;
}

/* The column's own visible label (the <p> _DocsLayout renders above nav.toc). Same treatment as the
   rail's section headings, and the same 20px left inset as the entries below it so the whole column
   shares one text edge. */
.toc-label {
  margin: 0 0 8px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rd-ink-muted);
}

.toc {
  font-size: 0.875rem;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.toc li {
  margin: 0.15rem 0;
}

/* border-left on every entry, transparent until the entry is current, so the bar costs no layout
   shift when it appears. ".toc a" is (0,1,1) and sits after ".rd a" on purpose -- see the note there.
   ⚠ min-height: 24px is the literal ThemeAndPrintTests greps for. It stays. */
.toc a {
  display: block;
  min-height: 24px;
  padding: 4px 20px;
  line-height: 20px;
  color: var(--rd-ink-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.toc a:hover {
  color: var(--rd-ink);
}

/* Driven by docs.js's scroll spy, which sets BOTH the class and aria-current="location" -- until now
   the class had no visual effect at all, so the spy was running and marking nothing. The bar is the
   non-colour half of the cue; aria-current carries it programmatically.
   After ":hover", which is the same (0,2,1): otherwise hovering the current entry would drop it back
   to plain ink and read as if the highlight had moved. */
.toc a.active {
  color: var(--rd-accent);
  border-left-color: var(--rd-accent);
}

.toc .toc-level-3 {
  padding-left: 1rem;
}

.toc .toc-level-4 {
  padding-left: 2rem;
}

.toc .toc-level-5,
.toc .toc-level-6 {
  padding-left: 3rem;
}

/* ---- Reader type scale -------------------------------------------------------------------------
   ".rd main > h1", CHILD combinator, and the reason is STRUCTURAL rather than a specificity contest.
   Search.cshtml renders its own <h1> inside <div class="results">, which is a child of <main>, so the
   search title is main's GRANDCHILD and a child combinator simply does not reach it. Specificity
   would not have saved it: ".rd main h1" and ".rd main > h1" are both (0,1,2) and both outrank
   ".results h1" (0,1,1), so a descendant selector would blow the search title up to 40px no matter
   how it were ordered. (An earlier version of this comment claimed (0,2,1) and implied the
   descendant form could be made safe. Both were wrong.)

   The admin editor's preview is named alongside it: Edit.cshtml.cs emits
   "<div class=\"doc-content\"><h1>" -- its title is INSIDE doc-content, not a child of main -- so
   ".rd main > h1" alone left it on the UA's 2em with .adminui's own line-height, which rendered
   indistinguishable from an h2 and nothing like the reader. */
.rd main > h1,
.adminui .doc-content > h1 {
  font-size: 40px;
  line-height: 50px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

/* Explicit margins throughout: the UA's own are in em, so at 40px and 32px they grow with the type
   and the vertical rhythm stops being a rhythm. */
.rd .doc-content h2,
.adminui .doc-content h2 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
}

.rd .doc-content h3,
.adminui .doc-content h3 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.rd .doc-content h4,
.adminui .doc-content h4 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  margin: 24px 0 8px;
}

/* h5/h6 continue the scale below h4. Without them the browser default applied, and an h5 came out at
   13.28px: smaller than the body text it introduces. */
.rd .doc-content h5,
.adminui .doc-content h5 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.rd .doc-content h6,
.adminui .doc-content h6 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  margin: 24px 0 8px;
}

/* Bold written inside a heading ("### **Title**") takes the heading's own weight. Otherwise <strong>'s
   "bolder" pushed a 600 heading to 900, heavier than any heading on the page. */
.rd .doc-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b),
.adminui .doc-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
  font-weight: inherit;
}

.rd .doc-content :is(p, li),
.adminui .doc-content :is(p, li) {
  line-height: 28px;
}

.rd .doc-content p,
.adminui .doc-content p {
  margin: 0 0 16px;
}

/* Prose links keep an underline, and that is a requirement rather than a preference: --rd-accent
   against --rd-ink is 2.46:1 light / 2.47:1 dark (measured live; the plan text quoted 2.87/2.77,
   computed against an earlier, lighter accent candidate), under the 3:1 WCAG technique F73 asks for when
   colour is the only thing separating a link from the text around it. Contrast against the PAGE is
   fine (5.27:1 / 6.84:1) -- it is the link-vs-text delta that fails, and the underline is what
   answers it. Do not "tidy" this away. */
.rd .doc-content a,
.adminui .doc-content a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* ---- Breadcrumb -------------------------------------------------------------------------------
   Styled by attribute selector because _Breadcrumb.cshtml is NOT edited: PageRenderTests matches the
   literal `<nav aria-label="Breadcrumb">`, so a class on that tag breaks it. list-style: none is the
   fix for the rail of browser-numbered "1. 2. 3." the trail rendered as until now.
   content: ">" / "" is the alternative-text form -- it paints the chevron and hands assistive tech an
   EMPTY alt string, which matters because a pseudo-element cannot take aria-hidden. On an engine that
   does not know the "/" half, the declaration's alt is ignored and the chevron still paints. No
   element is added, so the classless <span> and the single <a> the test pins are untouched.
   The separator lives inside the li, which is why the li is a flex box with its own gap: the ol's gap
   only spaces the ITEMS, so without this the chevron would butt against the following title. */
.rd nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--rd-ink-muted);
}

.rd nav[aria-label="Breadcrumb"] li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rd nav[aria-label="Breadcrumb"] li + li::before {
  content: ">" / "";
  color: var(--rd-crumb-sep);
}

/* Trail links keep --rd-accent from ".rd a" and lose the underline. F73 does not bite here the way it
   does in prose: in a breadcrumb every item except the last IS a link, so it is position -- not
   colour -- that identifies the one plain item, and 1.4.1 is satisfied without an underline. Hover
   restores one anyway. */
.rd nav[aria-label="Breadcrumb"] a {
  text-decoration: none;
}

.rd nav[aria-label="Breadcrumb"] a:hover {
  text-decoration: underline;
}

.doc-content {
  line-height: 1.6;
}

/* Tables.

   border-collapse is SEPARATE, and that is not a preference: collapse discards border-radius
   outright, so a collapsed table cannot have rounded corners at all. With separate, the outer edge
   is the table's own border, each cell draws only its bottom and right rule, the last column and
   last row drop theirs, and the two top corners are rounded on the header cells themselves --
   without that last part the header fill paints square over the radius. Do not "simplify" this
   back to collapse.

   The rules are --line, not --border. --border measures 3.62:1 against the page and is a CONTROL
   boundary -- the token for an input or a button, where SC 1.4.11 applies. A table rule is
   structure, and at that weight it made every table read as a spreadsheet. --line is 1.36:1 light
   / 1.52:1 dark against the page: quiet, and still visible against the header fill (1.20:1 both
   themes) where --rd-line would have vanished at 1.04:1.

   Text pairings this introduces, measured both themes, recorded in docs/a11y-checklist.md:
   prose ink on the header fill 11.38:1 light / 13.33:1 dark, a link on it 4.63:1 / 5.41:1. */
.doc-content table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-content th,
.doc-content td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.doc-content thead th {
  background: var(--surface-2);
  font-weight: 600;
}

/* The table's own border is the outer edge, so the edge cells must not draw a second one. */
.doc-content tr > *:last-child {
  border-right: 0;
}

.doc-content tr:last-child > * {
  border-bottom: 0;
}

/* 7px, one inside the table's 8px, so the fill does not bleed past the border on the curve. */
.doc-content thead tr:first-child th:first-child {
  border-top-left-radius: 7px;
}

.doc-content thead tr:first-child th:last-child {
  border-top-right-radius: 7px;
}

/* The scroll container MarkdownRenderer.ScrollableTableRenderer wraps every table in. The table keeps
   its own border and radius; this only clips and scrolls, so a wide table scrolls itself instead of
   dragging the page sideways. The focus ring matters: the wrapper carries tabindex="0" so a keyboard
   reader can reach and arrow-scroll it, and a focusable thing with no visible focus state fails
   SC 2.4.7 -- :focus-visible only, so a mouse click does not ring it. */
.doc-content .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.doc-content .table-wrap:focus-visible {
  outline: 2px solid var(--rd-accent, var(--link));
  outline-offset: 2px;
  border-radius: 8px;
}

/* The wrapper owns the vertical rhythm now; a second margin here would double it. */
.doc-content .table-wrap > table {
  margin: 0;
}

.doc-content blockquote {
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

.doc-content code {
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
  font-size: 0.9em;
}

.doc-content img {
  max-width: 100%;
}

.doc-content pre {
  position: relative;
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.4rem;
}

.doc-content pre code {
  background: none;
  padding: 0;
  border: 0;
}

/* ---- Inline code, code blocks and blockquotes (reader) ----------------------------------------
   Retype's inline code is a bordered pill rather than a bare tinted run. --rd-code-line is a
   structural hairline (1.23:1 light / 1.32:1 dark) and is not an interactive control boundary, so
   SC 1.4.11 does not apply to it -- see the plan's palette note. */
.rd .doc-content code,
.adminui .doc-content code {
  background: var(--rd-code-bg);
  border: 1px solid var(--rd-code-line);
  border-radius: 4px;
  padding: 4px 5px;
  font-size: 0.925em;
  font-family: var(--mono);
}

/* The pill rule above is (0,2,1) and outranks ".doc-content pre code" (0,1,2), so its border and its
   0.925em would land on every fenced block's <code> -- a 1px inner ring inside the block, and a font
   size compounded against the <pre>'s own 13px. Restating both at (0,2,2) is what actually stops it;
   the "border: 0" added to the bare rule above alone would not, and this is easy to miss. */
.rd .doc-content pre code,
.adminui .doc-content pre code {
  border: 0;
  padding: 0;
  font-size: inherit;
}

.rd .doc-content pre,
.adminui .doc-content pre {
  padding: 16px 20px;
  font-size: 13px;
  line-height: 20.8px;
}

/* Syntax highlighting (TODO #23). The vendored highlight.js themes (wwwroot/lib/highlight, hash-pinned in
   VERSIONS.md, so not edited) were made for a white page, and the reader paints code on --rd-code-bg.
   There, five light token colours fell under the 4.5:1 that 13px text needs -- keyword 4.23, built_in
   3.23, comment 4.46, name 4.28, addition 4.48 on its own fill -- and the dark theme's bold section
   heading drew at 3.65. Each is restated through a --rd-hl-* token so theme.js's swap of the two
   vendored sheets and site.css's theme blocks stay in step. The selector lists are the vendored rules'
   own, verbatim: CodeHighlightContrastTests matches on them, measuring every vendored token as painted
   here against the fill under it, in all three theme blocks.

   (0,4,0) here against the vendored (0,1,0)/(0,2,0), so load order does not matter. Not .adminui:
   the admin shell does not load highlight.js. */
.rd .doc-content :is(.hljs-doctag, .hljs-keyword, .hljs-meta .hljs-keyword, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_) {
  color: var(--rd-hl-keyword);
}

.rd .doc-content :is(.hljs-built_in, .hljs-symbol) {
  color: var(--rd-hl-built-in);
}

.rd .doc-content :is(.hljs-code, .hljs-comment, .hljs-formula) {
  color: var(--rd-hl-comment);
}

.rd .doc-content :is(.hljs-name, .hljs-quote, .hljs-selector-pseudo, .hljs-selector-tag) {
  color: var(--rd-hl-name);
}

.rd .doc-content :is(.hljs-addition) {
  color: var(--rd-hl-addition);
}

.rd .doc-content :is(.hljs-section) {
  color: var(--rd-hl-section);
}

/* Retype's own alert/callout components could not be verified -- its component docs 404'd -- so this
   is a reasonable interpretation of a markdown blockquote in that style, NOT a claimed match. */
/* The editor preview's remaining two divergences from the reader. .adminui sets font-size:14px on the
   admin shell and .adminui a paints links with the admin accent, and both cascade into the preview, so a
   preview at 14px wraps its lines somewhere the reader will not -- which is the one thing a preview
   exists to get right (R-43). Scoped to .adminui .doc-content so nothing else in the admin moves: the
   editor's own chrome, its commit-message field and every other admin screen keep the admin scale
   and the admin accent. */
.adminui .doc-content,
.adminui .doc-content :is(p, li) {
  font-size: 16px;
}

.adminui .doc-content a {
  color: var(--rd-accent);
}

/* Blockquotes are callouts in this corpus, not quotations, and that is a measured claim rather than
   a stylistic one: all 167 blockquotes under docs/ are notes, tips or warnings ("NOTE:", "Note!",
   "Please note that...", "It is highly recommended..."). None is a quotation. That is what makes an
   information icon on every one of them correct instead of merely decorative -- and it is also the
   thing that would stop being true if someone later wrote a genuine quote as a blockquote.

   Full --rd-ink rather than --rd-ink-muted. The fill, the accent bar and the icon already say "this
   is an aside" three times over; dimming the text as well only made the notes harder to read than
   the prose they qualify. Measured on this fill: 11.85:1 light / 9.55:1 dark.

   The grid is what puts the icon beside the first line and keeps every following paragraph aligned
   under it: the pseudo-element takes row 1 of column 1, and every real child is forced into column
   2 so it cannot flow back under the icon. */
/* A disclosure an author writes as ":::details Title" -- see CollapsibleExtension. Styled as a
   quieter sibling of the callout below so the two read as one family, with one difference that is
   not cosmetic: summary is a real control, so it needs a hit area and a visible focus ring. The
   native marker triangle is kept rather than replaced with an icon, because it is the affordance
   every browser already draws and screen readers already announce. */
.rd .doc-content details.collapsible,
.adminui .doc-content details.collapsible {
  margin: 24px 0;
  background: var(--rd-code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--rd-ink);
}

.rd .doc-content details.collapsible > summary,
.adminui .doc-content details.collapsible > summary {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--rd-ink);
  border-radius: 8px;
}

/* Keyboard users have nothing else to aim at in this component, so the ring is a requirement and
   not a preference -- removing it would leave the only control in the block unfocusable to the eye. */
.rd .doc-content details.collapsible > summary:focus-visible,
.adminui .doc-content details.collapsible > summary:focus-visible {
  outline: 2px solid var(--rd-accent);
  outline-offset: -2px;
}

/* Open: the summary becomes a header with a rule under it, and the body is inset to match. */
.rd .doc-content details.collapsible[open] > summary,
.adminui .doc-content details.collapsible[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.rd .doc-content details.collapsible > :not(summary),
.adminui .doc-content details.collapsible > :not(summary) {
  margin-left: 20px;
  margin-right: 20px;
}

.rd .doc-content details.collapsible > summary + *,
.adminui .doc-content details.collapsible > summary + * {
  margin-top: 16px;
}

.rd .doc-content details.collapsible > :last-child,
.adminui .doc-content details.collapsible > :last-child {
  margin-bottom: 16px;
}

.rd .doc-content blockquote,
.adminui .doc-content blockquote {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--rd-code-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rd-accent);
  border-radius: 8px;
  color: var(--rd-ink);
}

/* content: "glyph" / "" is the alternative-text form -- it paints the icon and hands assistive tech
   an EMPTY alt string, which matters because a pseudo-element cannot carry aria-hidden. The same
   trick the breadcrumb separator uses. On an engine that does not support the "/" half the glyph
   still paints, so nothing is lost by it. */
.rd .doc-content blockquote::before,
.adminui .doc-content blockquote::before {
  grid-column: 1;
  grid-row: 1;
  content: "\f05a" / ""; /* circle-info, Font Awesome solid -- present in FaIconNames.cs */
  font: var(--fa-font-solid);
  font-size: 16px;
  line-height: inherit;
  color: var(--rd-accent);
}

/* Every real child in column 2. Without this a second paragraph flows into column 1 and sits under
   the icon, half a line out of alignment with the first. */
.rd .doc-content blockquote > *,
.adminui .doc-content blockquote > * {
  grid-column: 2;
}

.rd .doc-content blockquote > :first-child,
.adminui .doc-content blockquote > :first-child {
  margin-top: 0;
}

.rd .doc-content blockquote > :last-child,
.adminui .doc-content blockquote > :last-child {
  margin-bottom: 0;
}

/* Typed callouts, written "> [!WARNING]" -- see CalloutExtension. The same shape as the blockquote
   above, because they are the same thing with a name on it: an untyped aside stays a blockquote and
   keeps the information icon, and these add a word and a colour to it.

   The title is TEXT, so each kind's colour is held to 4.5:1 against the callout's own fill rather
   than the 3:1 a graphical element would need. Measured on --rd-code-bg, light / dark:
     note       #1266DE  4.88   #649FF2  6.27    (the accent the blockquote already uses)
     tip        #1C7544  5.28   #5FC98C  8.23
     important  #6B3FC4  6.20   #B79CF5  7.32
     warning    #8A5A00  5.49   #E0A33A  7.63
     caution    #B02A2A  6.05   #F08A8A  7.01
   Body text is unchanged --rd-ink: 11.85 light, 9.55 dark, as recorded for the blockquote. The icon
   repeats the word beside it and the left border carries no information of its own, so neither is
   doing work a ratio would have to protect. */
.rd .doc-content .doc-callout,
.adminui .doc-content .doc-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--rd-code-bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--callout-ink);
  border-radius: 8px;
  color: var(--rd-ink);
}

/* content: "glyph" / "" paints the icon and hands assistive tech an empty alt string -- a
   pseudo-element cannot carry aria-hidden, and the title says the word anyway. Same technique as
   the blockquote's icon and the breadcrumb separator. */
.rd .doc-content .doc-callout::before,
.adminui .doc-content .doc-callout::before {
  grid-column: 1;
  grid-row: 1;
  content: var(--callout-glyph) / "";
  font: var(--fa-font-solid);
  font-size: 16px;
  line-height: inherit;
  color: var(--callout-ink);
}

.rd .doc-content .doc-callout > *,
.adminui .doc-content .doc-callout > * {
  grid-column: 2;
}

.rd .doc-content .doc-callout-title,
.adminui .doc-content .doc-callout-title {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--callout-ink);
}

.rd .doc-content .doc-callout > :last-child,
.adminui .doc-content .doc-callout > :last-child {
  margin-bottom: 0;
}

/* One rule per kind: the glyph and the colour, nothing else. Every glyph is in the vendored Font
   Awesome solid set -- checked, because only the vendored stylesheet renders one. */
.rd .doc-content .doc-callout-note,
.adminui .doc-content .doc-callout-note {
  --callout-glyph: "\f05a"; /* circle-info */
  --callout-ink: var(--callout-note);
}

.rd .doc-content .doc-callout-tip,
.adminui .doc-content .doc-callout-tip {
  --callout-glyph: "\f0eb"; /* lightbulb */
  --callout-ink: var(--callout-tip);
}

.rd .doc-content .doc-callout-important,
.adminui .doc-content .doc-callout-important {
  --callout-glyph: "\f06a"; /* circle-exclamation */
  --callout-ink: var(--callout-important);
}

.rd .doc-content .doc-callout-warning,
.adminui .doc-content .doc-callout-warning {
  --callout-glyph: "\f071"; /* triangle-exclamation */
  --callout-ink: var(--callout-warning);
}

.rd .doc-content .doc-callout-caution,
.adminui .doc-content .doc-callout-caution {
  --callout-glyph: "\f05e"; /* ban */
  --callout-ink: var(--callout-caution);
}

/* The page-actions menu (_PageActions.cshtml): a <details> disclosure above the article. Relative so
   the panel can hang off it, and the panel itself absolute so opening the menu does not reflow the
   prose underneath. */
.rd .page-actions {
  position: relative;
  float: right;
  margin: 0 0 8px 16px;
}

/* The colours, and ONLY the colours, are restated here. The summary wears .rd-icon-btn for its
   geometry -- the 40px circle, the centred glyph, the 24px minimum -- but that class is the TOPBAR's
   control: it paints "color: var(--rd-topbar-ink)", which is #FFFFFF in both themes because the bar
   is #17232E in both and does not follow the page. Worn inside the article it put white on
   --rd-surface, which is #ffffff on the light theme: 1.00:1, an icon that was simply not there. Dark
   hid the defect at ~18:1, which is why it shipped.

   --rd-ink-muted rather than --rd-ink, to match the glyphs on the panel's own entries below:
   5.97:1 on the light surface, 8.45:1 on the dark one, both far past the 3:1 SC 1.4.11 asks of a UI
   component. The hover fill is the panel entries' own --rd-code-bg for the same reason; the inherited
   rgba(255, 255, 255, .10) was a second invisible-on-white declaration from the same class.

   The "On this page" toggle is the other control that wears .rd-icon-btn inside <main>, and it
   already carries its own colour for exactly this reason (see the 1279px block). This is that trap a
   second time. Anything else that borrows .rd-icon-btn off the bar must restate its colours too. */
.rd .page-actions > summary {
  list-style: none;
  cursor: pointer;
  color: var(--rd-ink-muted);
}

.rd .page-actions > summary:hover {
  background: var(--rd-code-bg);
}

/* Safari draws its own triangle through ::-webkit-details-marker, which list-style does not reach. */
.rd .page-actions > summary::-webkit-details-marker {
  display: none;
}

.rd .page-actions-panel {
  position: absolute;
  right: 0;
  z-index: 30;
  min-width: 230px;
  margin-top: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: var(--rd-surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

/* The answer to Copy page / Copy link (_PageActions.cshtml), drawn as a toast. Fixed to the viewport
   because the menu it answers has already closed by the time it appears; bottom centre because that is
   the one edge no other fixed chrome uses. z-index 30, the panels' own: below the topbar's 40 and the
   phone drawers' 50, so it never covers a way out.

   Empty, it is still rendered, only zero-sized. A live region taken out of the accessibility tree while
   empty (display:none, visibility:hidden) is often not announced when its text arrives, which is the one
   moment it exists for. So the box gets its padding, fill and border only once there is text in it.
   Inverted -- the page's ink as the fill, its surface as the text -- because the toast has to be seen
   to do its job: in the panel's own colours its fill WAS the dark page (1.00:1) and only a 1.52:1
   border told them apart. The text keeps the body-text pairing's ratio, just the other way round. */
/* Centred between two 16px gutters (left + right, fit-content width, auto margins) rather than with
   left: 50% and a transform: that leaves the box only the right half of the viewport to size into, and
   on a phone the longest message wrapped to four lines in half the screen. */
.rd .page-actions-result {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  z-index: 30;
  width: fit-content;
  margin: 0 auto;
}

.rd .page-actions-result:not(:empty) {
  padding: 10px 16px;
  background: var(--rd-ink);
  color: var(--rd-surface);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

/* Embedded media (MediaEmbedExtension). The renderer deliberately emits no width/height attributes:
   a fixed 640x360 was what the Document360 markup carried and it overflowed the content column on a
   narrow window. An unsized iframe defaults to 300x150, so the size lives here instead, as a ratio.

   max-width rather than a fixed width so the player never outgrows the prose it sits in, and
   aspect-ratio so it keeps 16:9 at every width without the old padding-top box trick. */
.rd .media-embed {
  display: block;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 16px 0;
  border: 0;
  border-radius: 8px;
  background: var(--rd-code-bg);
}

/* A video element paints its own letterboxing, and --rd-code-bg behind it reads as a rendering fault
   on the light theme. */
.rd video.media-embed {
  background: #000;
}

/* The reader's admin drawer (_AdminPanel.cshtml). Built like .page-actions above -- a <details> whose
   summary is the control and whose panel is absolute, so opening it never reflows the prose -- but
   fixed to the viewport rather than floated into the article, because it belongs to the shell.

   z-index 30: above the article and the sticky "On this page" column (which has no z-index of its own
   at these widths), and BELOW the topbar's 40. The .rd .toc-dock comment records what happens when a
   panel outranks the bar -- it covers the bar's controls and, in that case, its own way out.

   ABOVE 1280px ONLY. The @media (max-width: 1279px) block near the end of this file takes it out
   entirely, because .toc-col is itself an off-canvas drawer in this exact slot from there down and two
   scriptless disclosures cannot be made mutually exclusive without script. */
.rd .rd-admin-panel {
  position: fixed;
  top: calc(var(--rd-topbar-h) + var(--rd-notice-h) + 16px);
  right: 16px;
  z-index: 30;
}

/* The colour, and only the colour, is restated -- the same correction .page-actions > summary carries
   and for the same reason. .rd-icon-btn is the TOPBAR's control and paints var(--rd-topbar-ink), which
   is #FFFFFF in both themes; worn inside the page that is white on --rd-surface (#ffffff light), an
   icon that is simply not there. */
.rd .rd-admin-panel > summary {
  list-style: none;
  cursor: pointer;
  color: var(--rd-ink-muted);
}

/* Safari draws its own triangle through ::-webkit-details-marker, which list-style does not reach. */
.rd .rd-admin-panel > summary::-webkit-details-marker {
  display: none;
}

.rd .rd-admin-panel > summary:hover {
  background: var(--rd-code-bg);
}

.rd .rd-admin-panel-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 22rem;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--rd-topbar-h) - var(--rd-notice-h) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--rd-surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
  font-size: 14px;
}

.rd .rd-admin-panel-head {
  margin: 16px 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.rd .rd-admin-panel-head:first-child {
  margin-top: 0;
}

.rd .rd-admin-prov,
.rd .rd-admin-note,
.rd .rd-admin-warn,
.rd .rd-admin-msg {
  margin: 0 0 10px;
  line-height: 1.45;
}

.rd .rd-admin-prov span {
  display: block;
}

/* --muted on --rd-surface: 6.44:1 light, 10.65:1 dark (docs/a11y-checklist.md). */
.rd .rd-admin-note,
.rd .rd-admin-fm {
  color: var(--muted);
}

/* The confirmation for a cut-off that removes the page being read. --border, not --rd-line, for the
   rule down its edge: this one is load-bearing rather than decorative. */
.rd .rd-admin-warn {
  padding-left: 10px;
  border-left: 3px solid var(--border);
}

/* --warn as plain text, 4.73:1 light and 9.42:1 dark on --rd-surface (docs/a11y-checklist.md). The
   light figure is the tightest margin in the stylesheet; do not darken the background under it. */
.rd .rd-admin-drift {
  font-size: 12px;
  font-weight: 700;
  color: var(--warn);
}

/* Field name, the file's own front-matter value, then the override input -- the Documents drawer's
   three columns, stacked, because this one is 22rem wide. */
.rd .rd-admin-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.rd .rd-admin-fields label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.rd .rd-admin-fm {
  font-size: 12px;
}

/* --border (3.62:1), not --rd-line (1.23:1): these are interactive controls' boundaries, which
   SC 1.4.11 holds to 3:1. The same distinction the version selector's trigger records. */
.rd .rd-admin-fields input,
.rd .rd-admin-cutoff select {
  width: 100%;
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--rd-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.rd .rd-admin-cutoff label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}

.rd .rd-admin-save {
  margin-top: 12px;
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--rd-topbar-ink);
  background: var(--rd-topbar-bg);
  /* --border (3.62:1), not the fill colour: --rd-topbar-bg against --rd-surface is 15.95:1 on the light
     theme but 1.16:1 on the dark one, where the button would have had no edge a reader could see.
     SC 1.4.11 wants 3:1 for the boundary that identifies a control. */
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.rd .rd-admin-edit {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
}

/* 36px rather than the 24px minimum: these are targets in a floating panel, where a near-miss
   dismisses the menu instead of doing nothing. The account menu's entries (.account-item,
   _AccountMenu.cshtml) are the same rows. */
.rd .page-action,
.rd .account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--rd-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rd .page-action:hover,
.rd .account-item:hover {
  background: var(--rd-code-bg);
}

.rd .page-action i,
.rd .account-item i {
  color: var(--rd-ink-muted);
  width: 1em;
}


.heading-anchor {
  opacity: 0;
  margin-left: 0.35em;
  text-decoration: none;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
h5:hover .heading-anchor,
h6:hover .heading-anchor,
.heading-anchor:focus,
:is(h2, h3, h4, h5, h6):focus-within .heading-anchor {
  opacity: 1;
}

/* Touch devices have no hover state to reveal the anchor with, so show it unconditionally there. */
@media (hover: none) {
  .heading-anchor {
    opacity: 1;
  }
}

.inherited-note,
.hidden-banner,
.from-missing {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: var(--code-bg);
  color: var(--muted);
}

.last-updated {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---- Release notes (reader) --------------------------------------------------------------------

   A generated build note is up to forty entries of "<sentence> *(NA-17292)*" under two headings. As
   an ordinary bulleted list that is a wall: sentence and issue reference interleave down the page,
   and a reader looking for the case they reported has to read every line to find a number. The
   renderer writes each entry as an issue cell, a case cell and the text (ReleaseNoteRows), and what
   follows lays those out as two columns ahead of the text, with a rule between the entries.

   It changes no markdown. Every note already in the repository gets this. The mailed release note is
   the same markdown and none of this stylesheet: MailSafeHtml gives it these same columns as a table,
   with the values below written inline, so a change to the widths, gap, type or rule here needs the
   same change there.

   Keyed to ul.relnote, the class the renderer puts on a release note's own top-level lists, and not
   to the reader shell: the admin's previews of a note -- editor, review queue, compare -- load this
   stylesheet without .rd around them, and R-43 is that they look like the reader. A nested list
   inside a hand-edited note never gets the class, because it is prose, not an entry.

   list-style-type: "" rather than "none", and that is an accessibility decision rather than a
   stylistic one: WebKit drops the list role from a <ul> whose list-style-type computes to "none", so
   VoiceOver stops announcing "list, 35 items" -- which on this page is the structure a reader most
   needs. An empty string draws no marker and does not trip that heuristic. Where the string value is
   not supported the declaration is simply dropped and the bullets stay, which is what the page looks
   like today. */
.rd .relnote-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 0 0 28px;
  padding: 12px 0;
  border-top: 1px solid var(--rd-line);
  border-bottom: 1px solid var(--rd-line);
  color: var(--rd-ink-muted);
  font-size: 15px;
  line-height: 24px;
}

/* The counts belong to the title, so they sit against it rather than a title-sized gap below it. The
   h1's own 24px bottom margin is the thing in the way, and :has() is the only way to reach it from
   here -- a stylesheet cannot see a previous sibling. Unsupported, the rule drops and the strip sits
   24px lower, which is untidy rather than broken. */
.rd main > h1:has(+ .relnote-counts) {
  margin-bottom: 12px;
}

.rd .relnote-counts b {
  color: var(--rd-ink);
  font-weight: 600;
}

/* Empty alt text on the separator, the same construction as the breadcrumb's: a middot announced
   between every pair of counts is noise, and they are separate elements already. */
.rd .relnote-counts > span + span::before {
  content: "\00B7" / "";
  margin-right: 10px;
}

.doc-content ul.relnote {
  list-style-type: "";
  padding-left: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) minmax(5.5rem, max-content) minmax(0, 1fr);
  column-gap: 20px;
}

/* Each entry spans the list's three columns and takes them over with subgrid, so the issue and case
   columns are as wide as the widest key and case anywhere in the list: a reference never wraps, and
   every row's text starts at the same place. The minimums keep the text lined up from one section to
   the next, including a Features section that has no cases at all. Without subgrid the fixed widths
   on the line before it apply instead, and a longer key runs into the gap rather than wrapping.

   The text is a cell of its own (ReleaseNoteRows wraps it) because a grid makes an item of every
   child, and an entry with a <code> span and a link in it would otherwise break into five columns.
   align-items: baseline puts the 13px references on the first line of the text, however many lines
   the text runs to. */
.doc-content ul.relnote > li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 4.5rem 5.5rem minmax(0, 1fr);
  grid-template-columns: subgrid;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rd-line);
}

.doc-content ul.relnote > li:last-child {
  border-bottom: 0;
}

.doc-content .relnote-issue,
.doc-content .relnote-case {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--rd-ink-muted);
}

/* Narrow enough that two columns ahead of the text would leave the sentence a gutter: the issue and
   case share a line above the text instead. The query is on the viewport rather than the content
   column because below this width the reader has already dropped the rail and the "On this page"
   column, so the two measurements have converged. An entry with neither has two empty cells, which
   take no height.

   The second track is 1fr and not max-content because the text spans both: a spanning item sizes
   every intrinsic track it crosses, so two max-content tracks grow to hold the whole sentence on one
   line and push the page sideways. An item that spans a flexible track is left out of that sizing. */
@media (max-width: 720px) {
  .doc-content ul.relnote {
    display: block;
  }

  .doc-content ul.relnote > li {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 16px;
  }

  .doc-content .relnote-text {
    grid-column: 1 / -1;
  }
}

/* Retype's page foot, measured at 1236px: a two-up Previous/Next pair, 82px tall, padding 16px 20px,
   a 1px hairline and the accent at weight 500, 56px clear of the content above it.
   Scoped under .rd like every other reader rule even though ".page-nav" is reader-only markup --
   _PageNav.cshtml renders only from Page.cshtml's Model.Doc branch, which the admin never serves. The
   convention is worth more than the two saved characters.
   Only the OUTER corners are rounded: 8px on all four would read as two detached cards rather than one
   control pair, which is not what Retype does. */
.rd .page-nav {
  display: flex;
  margin-top: 56px;
}

.rd .page-nav a {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 82px;
  padding: 16px 20px;
  border: 1px solid var(--rd-line);
  color: var(--rd-accent);
  font-weight: 500;
  text-decoration: none;
}

/* A lone link takes half the row, not all of it — Retype's first page shows a half-width Next on the
   right, and a single box stretched to the full measure reads as a banner rather than as one half of a
   pair. With ":only-child" the alignment then falls out of the margin-left: auto below.

   The radius has to be restated here, and missing it left the defect half-fixed: the per-direction
   rules are (0,3,0) and set three-sided radii, so the first page's lone Next rendered as a floating
   half-width box with SQUARE LEFT CORNERS (measured: 0px 8px 8px 0px) and the last page's lone Prev
   with square right ones. This selector is (0,3,1) and wins. */
.rd .page-nav a:only-child {
  flex: 0 1 50%;
  border-radius: 8px;
}

.rd .page-nav a:hover .page-nav-title {
  text-decoration: underline;
}

.rd .page-nav .page-nav-prev {
  border-radius: 8px 0 0 8px;
}

/* margin-left: auto is what puts a LONE Next on the right. _PageNav.cshtml always writes Prev first so
   tab order follows reading direction, so the alignment has to come from here rather than from the DOM. */
.rd .page-nav .page-nav-next {
  align-items: flex-end;
  border-radius: 0 8px 8px 0;
  margin-left: auto;
  text-align: right;
}

/* When both are present the two boxes share one hairline instead of stacking two into a 2px seam.
   Higher specificity than the margin-left: auto above, which this must beat. */
.rd .page-nav .page-nav-prev + .page-nav-next {
  margin-left: -1px;
}

.rd .page-nav .page-nav-dir {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--rd-ink-muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* The shared ".icon" rule adds margin-right for the sidebar's leading icons; here the flex gap above
   already spaces the arrow, and on Next the arrow trails the word, so the inherited margin is wrong on
   both sides. */
.rd .page-nav .page-nav-dir .icon {
  margin: 0;
}

/* Phase 9 Task 6: the reader page's edit link, rendered only for a docs admin (Page.cshtml). Deliberately
   quiet — it sits above the page title on a screen whose job is reading, not editing. */
.admin-edit {
  font-size: 0.875rem;
  margin: 0 0 0.25rem;
}

.link-warnings {
  border: 1px solid var(--banner-preview-border);
  background: var(--banner-preview-bg);
  color: var(--banner-preview-fg);
  border-radius: 0.3rem;
  padding: 0.4rem 0.75rem;
}

/* docs.js injects this button INSIDE the <pre>, so ".rd :where(button)"'s "font: inherit" inherits the
   <pre>'s monospace rather than the page font -- measured live, it came out as 12px monospace. Naming
   the family explicitly is the fix; font-size stays 0.75rem, which wins by source order over that
   same-specificity rule. .copy-btn is reader-only markup (docs.js is only loaded by _DocsLayout). */
.copy-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-family: var(--rd-sans);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: var(--bg);
  color: inherit;
  cursor: pointer;
}

/* The drawer control, in both its forms. Hidden above 1024px, where the rail is always on screen.

   Styled at all because the two have to be indistinguishable: the <button> was carrying the browser's
   default chrome (measured: 2px outset, square corners, a grey fill), and a <label> cannot be made to
   look like that. Rather than fake it, both now take the same treatment the version switcher's summary
   uses -- one control that changes tag underneath the reader should not change appearance. */
#sidebar-toggle,
.sidebar-toggle-label {
  display: none;
  align-items: center;
  min-height: 24px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: none;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

footer {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

/* The rail is a full-height sticky box outside the footer's own flow, so margin-left is what keeps the
   footer from running underneath it. Reset to 0 in the 1024px block, where the rail becomes a drawer. */
/*.rd footer {*/
/*  margin-left: var(--rd-rail-w);*/
/*  border-top: 1px solid var(--rd-line);*/
/*}*/

/* ---------------------------------------------------------------------------------------------
   The customer sign-in card (/login, Areas/Docs/Pages/Login.cshtml).

   Everything here is .rd-scoped and named .signin-*, so none of it can reach the admin sign-in page
   (Areas/Admin/Pages/SignIn.cshtml), which is Layout = null and loads this same stylesheet.

   Colours are the existing reader tokens, so the card follows light and dark with the rest of the
   reader and nothing new had to be measured except the button. Contrast, measured against the
   painted surfaces rather than assumed:
     heading / body on --rd-surface   12.96:1 light, 16.86:1 dark
     .signin-lead (--rd-ink-muted)     5.97:1 light,  8.45:1 dark
     button text (--rd-on-accent)      5.27:1 light,  6.84:1 dark  -- see the token's own note
     input border (--border)           3.62:1, a UI component against 3:1
     .signin-help / .signin-staff text (--rd-ink-muted on --rd-code-bg)  5.53:1 light, 7.75:1 dark
     their links (--rd-accent on --rd-code-bg)                           4.88:1 light, 6.27:1 dark
       (measured 2026-11-04 at the card's foot, where the accent wash has faded out)
     failed sign-in (.callout.bad, --bad on its own opaque --bad-soft)   5.13:1 light, 5.31:1 dark
       (measured 2026-11-04)
   --------------------------------------------------------------------------------------------- */
.rd .signin {
  display: flex;
  justify-content: center;
  padding: 48px 0 96px;
}

/* The accent wash is on the CARD, not the page: a full-bleed gradient reads as a banner and fights
   the topbar directly above it. Two stops of the accent at low alpha over --rd-surface, so it tints
   in both themes without needing a second colour -- the accent itself is already theme-aware. */
.rd .signin-card {
  width: 100%;
  max-width: 26rem;
  padding: 40px 32px;
  border: 1px solid var(--rd-line);
  border-radius: 14px;
  /* --rd-code-bg, not --rd-surface: in BOTH themes --rd-surface is the same colour as the page
     (#ffffff on #ffffff light, #121417 on #121417 dark), so a card filled with it is distinguished
     only by its border. This lifts it off the page -- 1.08:1 light, 1.09:1 dark, decorative
     separation rather than a UI boundary, with --rd-line's hairline still doing the real edge.
     Text on it stays well clear: 11.99:1 light and 15.46:1 dark for the heading, 5.53:1 and 7.75:1
     for the lead. */
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--rd-accent) 12%, transparent), transparent 70%),
    var(--rd-code-bg);
  box-shadow: var(--shadow);
  text-align: center;
}

/* The Netadmin logo: ribbon N plus wordmark, one PNG (570 px wide, shown at 190). The wordmark is dark
   grey (#3C3C3B), which nearly vanishes on the dark card, so in dark mode the image is cut to the ribbon
   and an overlay painted --rd-ink is masked by the same PNG and cut to the wordmark. The artwork's
   transparent gap between the two runs from 29.1% to 33.3% of the width; both cuts fall inside it
   (ribbon kept to 31%, wordmark from 32%), so neither half is drawn twice at the seam. Light mode shows
   the image whole and the overlay is not displayed. */
.rd .signin-logo {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.rd .signin-logo img {
  display: block;
  width: 190px;
  height: auto;
}

.rd .signin-logo-word {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rd .signin-logo img {
    clip-path: inset(0 69% 0 0);
  }

  :root:not([data-theme="light"]) .rd .signin-logo-word {
    display: block;
    position: absolute;
    inset: 0;
    background: var(--rd-ink);
    -webkit-mask: url("/img/netadmin-logo.png") no-repeat 0 0 / 100% 100%;
    mask: url("/img/netadmin-logo.png") no-repeat 0 0 / 100% 100%;
    clip-path: inset(0 0 0 32%);
  }
}

:root[data-theme="dark"] .rd .signin-logo img {
  clip-path: inset(0 69% 0 0);
}

:root[data-theme="dark"] .rd .signin-logo-word {
  display: block;
  position: absolute;
  inset: 0;
  background: var(--rd-ink);
  -webkit-mask: url("/img/netadmin-logo.png") no-repeat 0 0 / 100% 100%;
  mask: url("/img/netadmin-logo.png") no-repeat 0 0 / 100% 100%;
  clip-path: inset(0 0 0 32%);
}

/* The page h1 is 40px/700 (the article scale). At the top of a 26rem card that is too loud for two
   words, and the child combinator on ".rd main > h1" does not reach this one anyway -- it is nested
   two levels deep -- so this sets the size rather than overriding it. */
.rd .signin-card h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 34px;
  letter-spacing: -0.01em;
}

.rd .signin-lead {
  margin: 0 0 24px;
  color: var(--rd-ink-muted);
  font-size: 15px;
  line-height: 22px;
}

/* Where accounts are managed, and the staff way in. Muted text with the reader's ordinary accent links;
   contrast against the painted card is in the ledger at the top of this block. */
.rd .signin-help {
  margin: 20px 0 0;
  text-align: left;
  color: var(--rd-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.rd .signin-staff {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rd-line);
  color: var(--rd-ink-muted);
  font-size: 13px;
  line-height: 18px;
}

.rd .signin-card .callout {
  margin: 0 0 20px;
  text-align: left;
}

/* The failed sign-in. It was plain body text in a row of plain body text, easy to miss -- the reader has
   no .callout style of its own; the admin one is .adminui-scoped. --bad on --bad-soft is the codebase's
   one measured bad pairing (5.13:1 light, 5.31:1 dark, see the ledger at the top), and the left rule
   and the icon carry it for anyone who does not see the red. */
.rd .signin-card .callout.bad {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border-left: 4px solid var(--bad);
  border-radius: 8px;
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.rd .signin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

/* The label is the block; its <span> is the caption above the field. Wrapping labels mean no "for"
   to keep in sync, and the whole caption stays a click target for the input. */
.rd .signin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.rd .signin-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--rd-surface);
  color: var(--rd-ink);
  font: inherit;
  font-weight: 400;
}

.rd .signin-form input:focus-visible {
  outline: 2px solid var(--rd-accent);
  outline-offset: 1px;
  border-color: var(--rd-accent);
}

.rd .signin-form button {
  margin-top: 4px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--rd-accent);
  /* Not white: white on the DARK accent is 2.70:1. See --rd-on-accent in the ledger above. */
  color: var(--rd-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.rd .signin-form button:hover {
  /* Darkened toward the page ink rather than by a second hard-coded colour, so it stays derived from
     whichever accent the theme resolved. */
  background: color-mix(in srgb, var(--rd-accent) 85%, var(--rd-ink));
}

/* "AI assistant access" (Areas/Docs/Pages/AssistantAccess.cshtml). Inside .doc-content, so headings,
   tables and code blocks are the reader's own; only the form, its messages and the revoke button are
   styled here, on the sign-in form's input and button rules. */
.rd .assistant-create {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.rd .assistant-create label {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.rd .assistant-create input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--rd-surface);
  color: var(--rd-ink);
  font: inherit;
  font-weight: 400;
}

.rd .assistant-create input:focus-visible {
  outline: 2px solid var(--rd-accent);
  outline-offset: 1px;
  border-color: var(--rd-accent);
}

.rd .assistant-create button {
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--rd-accent);
  color: var(--rd-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.rd .doc-content .assistant-help {
  margin-top: 8px;
  color: var(--rd-ink-muted);
  font-size: 14px;
}

.rd .doc-content .assistant-error {
  color: var(--danger);
  font-weight: 600;
}

.rd .assistant-revoke {
  margin: 0;
}

.rd .assistant-revoke button {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--rd-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* The one appearance of a new key: set apart from the page so it is not missed. */
.rd .assistant-created {
  margin: 24px 0;
  padding: 4px 20px 8px;
  border: 1px solid var(--rd-accent);
  border-radius: 8px;
}

/* The "found in other versions" band on a zero-result search (Areas/Docs/Pages/Search.cshtml).
   Quiet on purpose: it is a pointer away from this page, not a second set of results, so it does not
   borrow .result's card treatment. Separated from the "no results" line by a rule rather than a fill,
   which would read as another panel. */
.rd .elsewhere {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rd-line);
}

.rd .elsewhere-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rd-ink-muted);
}

.rd .elsewhere-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd .elsewhere-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.rd .elsewhere-item + .elsewhere-item {
  border-top: 1px solid var(--rd-line);
}

/* Without this every in-page anchor jump parks its target underneath the sticky topbar. Covers both
   the heading-anchor links and the TOC, and follows --rd-topbar-h down to 56px at 768px. */
.rd :is(h1, h2, h3, h4, h5, h6)[id],
.rd :target {
  scroll-margin-top: calc(var(--rd-topbar-h) + 16px);
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.admin-nav a {
  text-decoration: none;
}

.admin-view-docs {
  margin-left: auto;
}

.admin-main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
}

.admin-runs {
  width: 100%;
  border-collapse: collapse;
}

.admin-runs th,
.admin-runs td {
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.admin-message {
  padding: 0.5rem 1rem;
  background: var(--code-bg);
  border-radius: 0.3rem;
}

.admin-message-list {
  margin: 0;
  padding-left: 1.25rem;
}

.admin-error {
  color: var(--danger);
}

/* Below Retype's 1280px three-column threshold the TOC column no longer fits beside the content.
   Retype simply hides its own table of contents here; this reflows it instead, because the portal's
   TOC is visible today at every width and silently dropping it on a 1200px laptop would be a
   regression rather than a restyle. Recorded as a deliberate deviation from the reference.

   It reflows BELOW the content, and there is deliberately no "order" property anywhere in this file.
   An earlier version used "order: -1" to lift it above the content, which read better but put the
   column visually first while it stays third in the DOM -- a focus order that no longer matches the
   visual order (SC 2.4.3) and a reading sequence that no longer matches the markup (SC 1.3.2). It
   also dragged the rail 329px down the page at 1200px, because a 100%-basis item ordered first
   occupies the whole first flex line. Without "order", DOM order and visual order agree at every
   width -- rail, content, TOC across three columns, and rail+content then TOC when it wraps -- and
   the rail stays where it belongs. A TOC under the article is worth less than one beside it; a
   mismatched focus order costs more.
   This block MUST stay ahead of the drawer block below, and must not spell that block's own query
   out: ThemeAndPrintTests locates it by IndexOf on the raw (NOT comment-stripped) file text and then
   brace-matches from there, so the literal appearing earlier -- in a rule or in prose like this one --
   moves the slice onto the wrong block. "1279px" shares no substring with it.
   width:100% as well as flex-basis, because the 768px block turns .layout into a column: flex-basis
   always sizes the MAIN axis, which in column mode is the block axis, so it stops constraining the
   width and align-items:flex-start would otherwise shrink this block to its content. */
@media (max-width: 1279px) {
  .layout {
    flex-wrap: wrap;
  }

  /* "On this page" is a right-hand drawer from here down, not a block reflowed under the article.
     It follows Retype, which does the same below its own breakpoint (measured on retype.com at 900px:
     position:fixed, pinned right, translated off-canvas, sliding back in on a toggle).

     Construction deliberately mirrors the rail's drawer in the 1024px block rather than Retype's:
     off-canvas by offset plus visibility:hidden, so the slide can animate AND a closed panel's links
     leave both the tab order and the accessibility tree. Retype's own panel does neither -- measured
     with it closed, all 174 of its links were still tabbable -- so the pattern copied here is this
     codebase's, and only the visual design is theirs.

     No scrim, again matching the rail: this portal's drawers do not dim the page behind them, and
     giving one of the two a scrim would make them inconsistent with each other. */
  .toc-col {
    position: fixed;
    top: 0;
    right: -100%;
    z-index: 50;
    width: 20rem;
    /* The rail's drawer can hard-code 18rem because its content is one tree; a TOC's longest entry is
       a heading the author wrote, so this also has to survive a narrow phone. */
    max-width: 85vw;
    height: 100%;
    max-height: none;
    margin-left: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 20px;
    background: var(--rd-surface);
    border-left: 1px solid var(--rd-line);
    border-top: 0;
    flex: 0 0 auto;
    visibility: hidden;
    transition: right 0.2s ease, visibility 0s linear 0.2s;
  }

  .toc-col.open {
    right: 0;
    visibility: visible;
    transition: right 0.2s ease, visibility 0s linear 0s;
  }

  /* The same open state driven by the checkbox, for a reader with no JavaScript. Declared separately
     rather than grouped with the rule above for the reason the rail's equivalent is: a grouped
     selector puts a second ".toc-col {"-shaped string into a raw-text slice. */
  body:has(#toc-open:checked) .toc-col {
    right: 0;
    visibility: visible;
    transition: right 0.2s ease, visibility 0s linear 0s;
  }

  /* The dock rides with the article instead of sitting in the topbar, where an open panel (z-index 50)
     covered the bar (40) and so covered its own button -- leaving no way to shut it.

     Zero height on purpose: it paints over the top-right corner of the content column and contributes
     nothing to the flow, so the first heading does not move down and no band of empty space opens
     above the prose.

     z-index 30 sits under the topbar (40), so the button passes beneath the bar rather than over it,
     and under the panel (50), so an open panel still covers it -- by then the outside-press and
     choose-an-entry handlers in docs.js are what close the drawer, and the button is not needed. */
  .rd .toc-dock {
    display: flex;
    justify-content: flex-end;
    position: sticky;
    top: calc(var(--rd-topbar-h) + 16px);
    z-index: 30;
    height: 0;
  }

  /* #949494: the lightest neutral grey that still clears the 3:1 SC 1.4.11 asks of a UI component,
     measured at 3.03:1 on the light page and 6.08:1 on the dark one. It replaced #999, which looked
     the same but measured 2.85:1 on light -- under the floor. Do not lighten it again without
     re-measuring; the margin here is three hundredths. */
  .rd .toc-toggle-label,
  .rd #toc-toggle {
    display: inline-flex;
    color: #949494;
  }

  /* The checkbox is visually hidden, so its own focus ring is invisible -- without this a keyboard
     reader with no JavaScript tabs onto an unmarked control (SC 2.4.7). Adjacency is why the markup
     keeps the input and its label together. */
  #toc-open:focus-visible + .toc-toggle-label {
    outline: 2px solid var(--rd-accent);
    outline-offset: 2px;
  }

  /* The admin drawer does not exist here. .toc-col below is itself a fixed, right-pinned off-canvas
     drawer in this slot, and two scriptless disclosures cannot be made mutually exclusive without
     script -- both open at once is the panel-covers-its-own-dismiss failure .rd .toc-dock records.
     display:none, not visibility or an offset, so it leaves the tab order and the accessibility tree
     too. An admin on a narrower window uses Admin -> Documents, as they do today. */
  .rd .rd-admin-panel {
    display: none;
  }
}

@media (max-width: 1024px) {
  #sidebar-toggle,
  .sidebar-toggle-label {
    display: inline-flex;
    margin-left: auto;
  }

  /* Closed: moved off-screen AND visibility:hidden -- visibility:hidden (unlike display:none)
     still allows the left transition to run, but also removes the subtree from the tab order and
     the accessibility tree, so a closed drawer's links can't be tabbed or read into while invisible.
     The visibility transition is delayed on close (so it stays visible throughout the slide-out)
     and instant on open (so it's immediately visible/focusable as it slides in). */
  #sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    z-index: 50;
    width: 18rem;
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
    background: var(--rd-surface);
    border-right: 1px solid var(--rd-line);
    flex: 0 0 auto;
    visibility: hidden;
    transition: left 0.2s ease, visibility 0s linear 0.2s;
  }

  #sidebar.open {
    left: 0;
    visibility: visible;
    transition: left 0.2s ease, visibility 0s linear 0s;
  }

  /* The same open state, driven by the checkbox instead of the class, for a reader with no JavaScript.
     Declared separately rather than grouped into the selector above: ThemeAndPrintTests walks this
     block for "#sidebar {" -> "visibility: hidden" -> "#sidebar.open {" -> "visibility: visible" by
     raw-text index, and a grouped selector would put a second "#sidebar {"-shaped string in its way.

     ":has()" and not a sibling combinator because the checkbox lives beside its label in the <header>
     and #sidebar is inside .layout -- no sibling or descendant relationship connects them. Moving the
     checkbox out to a body-level sibling would buy an older-browser selector at the cost of the focus
     ring below (which needs adjacency) and of a tab stop landing three controls away from the thing it
     highlights. A browser without :has() is left where it is today -- the drawer does not open -- so
     this degrades to the current bug rather than to something worse, and every browser that still gets
     security updates has had :has() since 2023.

     No CSS transition worth having on this path: without JS there is nothing to coordinate the
     visibility delay with, and the instant-open timing is what the .open rule already uses. */
  body:has(#sidebar-open:checked) #sidebar {
    left: 0;
    visibility: visible;
    transition: left 0.2s ease, visibility 0s linear 0s;
  }

  /* The checkbox is visually hidden, so its own focus ring is invisible -- without this a keyboard
     reader with no JavaScript would be tabbing onto an unmarked control (SC 2.4.7). Adjacency is what
     makes this possible with a plain combinator, which is why the markup keeps the two together. */
  #sidebar-open:focus-visible + .sidebar-toggle-label {
    outline: 2px solid var(--rd-accent);
    outline-offset: 2px;
  }

  /* ".rd main", not bare "main": the base ".rd main" rule is (0,1,1) and would outrank a bare "main"
     (0,0,1) here regardless of source order, so leaving this bare would keep the 64px gutters and the
     desktop padding on every phone. Behaviourally neutral for the admin shell, which caps itself with
     .adminui-main{max-width:none} anyway. New rules go AFTER #sidebar.open so ThemeAndPrintTests's
     #sidebar -> visibility:hidden -> #sidebar.open -> visibility:visible sequence stays intact. */
  .rd main {
    width: 100%;
    margin: 0;
    padding: 24px 20px 20px;
  }

  .rd footer {
    margin-left: 0;
  }

  /* order: -1 makes the toggle the FIRST flex item in the bar (spec section 6: far left, before the
     mark), with its own margin-left cancelled to 0 below. Exactly one auto margin must exist in
     this bar -- two SPLIT the free space instead of one collecting all of it -- and with the
     toggle contributing none, .rd-actions's own margin-left: auto (site.css ~626) is that one
     margin, and it is what pushes the trailing controls to the bar's right edge. Do not add a
     competing auto margin, or zero out .rd-actions's, here. */
  .rd header .sidebar-toggle-label,
  .rd header #sidebar-toggle {
    order: -1;
    margin-left: 0;
    display: grid;
    place-items: center;
    /* Containing block for the glyph below, which is positioned rather than laid out. */
    position: relative;
    width: 40px;
    height: 40px;
    min-height: 24px;
    border-radius: 24px;
    color: var(--rd-topbar-ink);
    font-size: 0;
  }

  /* Taken OUT of the grid, exactly as the search magnifier had to be. These controls carry the word
     "Menu" as real text -- it is what a no-JS reader and a screen reader get -- zeroed to font-size: 0.
     A zeroed text node is still a text node, so in a grid container it is a SECOND grid item, and
     "place-items: center" then centres this glyph inside row one rather than inside the button. That
     is what left the hamburger sitting high in its circle. Absolute + inset: 0 makes the button's own
     box the reference, so nothing else in the control can move the glyph again. */
  .rd header .sidebar-toggle-label::before,
  .rd header #sidebar-toggle::before {
    content: "\f0c9"; /* bars */
    font: var(--fa-font-solid);
    font-size: 16px;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    line-height: 1;
  }
}

/* The :has() rules have to be named too, not just the class ones. Both drawers re-declare transition
   in their open state (to flip the visibility delay), and the no-JS rule does so at a HIGHER
   specificity than the class rule -- so listing only "#sidebar, #sidebar.open" left a reader who asked
   for reduced motion still getting the 0.2s slide on the scripting-off path. Found while verifying the
   TOC drawer; the rail's half of it was already there and is fixed in the same place. */
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  #sidebar,
  #sidebar.open,
  body:has(#sidebar-open:checked) #sidebar {
    transition: none;
  }
}

@media (max-width: 1279px) and (prefers-reduced-motion: reduce) {
  .toc-col,
  .toc-col.open,
  body:has(#toc-open:checked) .toc-col {
    transition: none;
  }
}

@media (max-width: 768px) {
  /* The "#" beside every heading is a copy-a-link affordance revealed on hover. A phone has no hover,
     so the (hover: none) rule pins it to opacity 1 -- which on a narrow screen reads as a stray hash
     after every headline. display:none and not opacity:0 deliberately: an opacity-0 link is still a
     tap target, so hiding it that way would leave an invisible thing to hit beside every heading.
     Larger touch screens keep the reveal; only this width loses it. */
  .rd .heading-anchor {
    display: none;
  }

  /* Declared here and not in a block of its own: a second "@media (max-width: 768px)" earlier in the
     file would become the FIRST one, and ReaderShellTests locates this block by first match -- the
     same trap ThemeAndPrintTests documents for the 1024px block. One block per breakpoint. */
  .rd .signin {
    padding: 24px 0 64px;
  }

  .rd .signin-card {
    padding: 32px 20px;
  }

  header {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  /* On .rd, not :root. A second ":root {" literal in this file would land between the three block
     literals AdminAccessibilityTests and AdminShellTests locate by IndexOf and truncate their slices.
     Overriding the token rather than the rules keeps the rail's top, its height calc() and
     scroll-margin-top all in step with the shorter bar. */
  .rd {
    --rd-topbar-h: 56px;
  }

  /* The bare "header" rule above tightens the padding for mobile, but ".rd header" (0,1,1) outranks it
     whatever the source order, so the reader needs its own narrower value. */
  .rd header {
    padding: 0 12px;
  }

  .layout {
    flex-direction: column;
    padding: 0.5rem;
  }

  /* Two 82px boxes side by side leave nothing for a real page title at phone widths, so the pair
     stacks. Stacked, "outer corners" means all four on each box, and the shared hairline moves from
     the left edge to the top one. */
  .rd .page-nav {
    flex-direction: column;
  }

  /* Both classes named rather than ".rd .page-nav a": a media query adds no specificity, so (0,2,1)
     would lose to the (0,3,0) per-direction rules above and the corners would stay half-rounded.
     Measured at 375px before the fix: "8px 0 0 8px" on a stacked box. */
  .rd .page-nav .page-nav-prev,
  .rd .page-nav .page-nav-next {
    border-radius: 8px;
  }

  /* Stacked, "flex-basis: 50%" is 50% of the HEIGHT, which would halve a lone box. Same specificity as
     the base rule, so source order (this block is later in the file) is what settles it. */
  .rd .page-nav a:only-child {
    flex: 1 1 auto;
  }

  .rd .page-nav .page-nav-next {
    margin-left: 0;
  }

  .rd .page-nav .page-nav-prev + .page-nav-next {
    margin-top: -1px;
    margin-left: 0;
  }

  /* Fallout from the reader control-font rule, found live at 700px and fixed here rather than left as
     a known regression. "font: inherit" lifts the search input from the UA's 13.3px to the page's
     16px, and an <input>'s intrinsic width is measured in characters -- so, before the collapsed
     circular control existed, the box grew from ~240px to 313px and the signed-in topbar tipped into
     overflow: scrollWidth 754 against a 700px client width, with .rd-mark-name crushed to 0 and its
     text spilling across the version selector.
     min-width:0 on the FORM is what still matters: a flex item's automatic minimum size is its content
     size, so without this the form would refuse to shrink below the search box's own content -- and
     since the collapsed input above is the only state below 768px (the expanded state overlays the bar
     instead of living in flow), that content is now just the 40px circular label. Kept here rather than
     folded into the base .search-box rule because it is breakpoint-specific: above 768px the search box
     is expected to hold its content width. */
  .rd header .search-box {
    min-width: 0;
  }

  /* No input[type="search"] rule here any more. There used to be one, forcing "min-width: 6rem; width:
     100%" on every phone-width input regardless of focus -- an identical selector to the collapse rule
     above (site.css:689) at identical specificity, so source order alone decided the winner and this
     one, being later, always did: a transparent ~96px control with no border or padding, eating a
     quarter of the bar, on every phone. The collapse must hold at every width; the breakpoint's only
     remaining job is the expanded (:focus-within) state below. */

  /* The bar wraps instead of overflowing. Measured at 375px signed in: the non-shrinkable items alone
     -- version selector, Menu, theme swatches, user name, Sign out -- came to 441px against a 375px
     client width, so the row overflowed by 66px, the search box collapsed to 0 and .rd-mark-name
     vanished entirely. Wrapping is the honest answer at this width; pinning a height and letting the
     content spill is not.
     min-height rather than height so --rd-topbar-h still describes the single-row case. Note the rail
     does not depend on it here: below 1024px it is a fixed drawer at top:0/height:100%. The one thing
     that does go slightly stale on a wrapped bar is scroll-margin-top, which is computed from the
     token -- an anchor jump lands a row's worth high. Acceptable; a phone topbar carrying seven
     controls is a design question, not a CSS one. */
  .rd header {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--rd-topbar-h);
    row-gap: 8px;
    padding: 8px 12px;
  }

  /* Clipped, NOT display:none. The glyph beside this text is aria-hidden (the visible text is what
     names the link), so display:none left "a.rd-mark" with no accessible name at all below 768px --
     a link in the tab order that a screen reader can only announce as its href. Lighthouse's mobile
     run found this at 95/100 "Links do not have a discernible name"; the desktop run scores 100 and
     never sees it, and the contrast pass that signed this breakpoint off checked the link was still
     REACHABLE without checking it was still NAMED.
     Same declarations as the .visually-hidden utility, inlined rather than adding the class in markup
     so the name is a normal visible heading at every other width. */
  .rd .rd-mark-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* The expanded field overlays the identity cluster rather than compressing it: a version number and
     a product name squeezed to fit are worse than temporarily covered. Positioning .search-combobox
     itself, not the input: an absolutely positioned element's containing block is its nearest
     POSITIONED ancestor, and .search-combobox (position: relative, needed below for the typeahead
     listbox) sits directly between the input and .rd header. Positioning the input left it contained
     by .search-combobox instead -- which, once the input left flow, had only a hidden <ul> and a
     .visually-hidden <div> left in flow and collapsed to 0 width, so "left: 16px; right: 16px; width:
     auto" resolved to 0 - 16 - 16, clamped to 0: an unusable, invisible search field. .rd header is
     sticky, which counts as positioned, and neither .rd-actions nor .search-box sets a position of its
     own, so lifting the absolute positioning one level up finds .rd header directly. */
  .rd header .search-box:focus-within .search-combobox {
    position: absolute;
    left: 16px;
    right: 16px;
  }

  .rd header .search-box:focus-within input[type="search"] {
    width: 100%;
  }
}

/* Standard clip-to-nothing technique: present in the DOM and the accessibility tree (unlike
   display:none/visibility:hidden, which both remove a node from it), but drawn nowhere. Used by
   _SearchBox.cshtml's <label> so the header search box has a real, associated accessible name without
   spending header width on visible label text next to the box's own submit button. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-box input[type="search"] {
  font: inherit;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: var(--bg);
  color: inherit;
  min-width: 10rem;
}

.search-box button {
  font: inherit;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* Task 8 (R-10 continued, N-8) — the header typeahead's popup. .search-combobox is the positioning
   context for #docs-search-listbox, which search-typeahead.js shows/hides via the "hidden" attribute
   (never display:none directly, so the [hidden] rule below is the only thing that has to agree with the
   script about what "closed" looks like). */
.search-combobox {
  position: relative;
}

.search-combobox #docs-search-listbox {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg);
  /* Stated with the background, not inherited: this list sits inside the header, whose text is white in
     both themes, so a suggestion's title came out white on white in light mode. */
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  box-shadow: var(--shadow);
  max-height: 20rem;
  overflow-y: auto;
}

.search-combobox #docs-search-listbox[hidden] {
  display: none;
}

.search-combobox li[role="option"] {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  /* Transparent by default so picking up border-color on [aria-selected="true"] below doesn't shift
     the row's box size when the active option changes. */
  border: 1px solid transparent;
}

.search-combobox li[role="option"] .th-page {
  font-size: 0.8em;
  color: var(--muted);
}

.search-combobox li[role="option"]:hover {
  background: var(--code-bg);
}

/* Round-2 finding (Critical): see the contrast-pair block at the top of this file. background alone
   measured 1.065:1 (light) / 1.091:1 (dark) against --bg — nowhere near the 3:1 SC 1.4.11 wants for a
   state indicator, and there is no focus ring to compensate since DOM focus never leaves the input.
   border-color carries the active state instead, at 6.67:1 / 8.53:1. */
.search-combobox li[role="option"][aria-selected="true"] {
  border-color: var(--link);
}

/* Task 7 (R-10) — the reader search results page, scoped under .results/.result rather than left bare:
   .t and .crumb are short, generic names that will collide with something else eventually. Copied
   verbatim from the approved mockup (id="rd-search" in docs/design/docs-portal-mockup.html). */
.results h1 { font-size: 22px; margin-bottom: 4px; }
.results .count { color: var(--ink-3); margin-bottom: 18px; }
.result { padding: 14px 0; border-bottom: 1px solid var(--line); max-width: 72ch; }
.result .crumb { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.result .crumb a { color: var(--ink-2); text-decoration: none; }
.result .crumb span { color: var(--line-2); }
.result .t { font-size: 16px; font-weight: 700; }
/* Underlined, and not as a matter of taste. A result title sits beside a "— section" span, which is
   the surrounding text WCAG technique F73 needs in order to apply at all, and the link measures
   2.45:1 light / 2.46:1 dark against it -- under the 3:1 F73 asks when colour is the only cue. The
   mockup this block was copied from said text-decoration: none, and that carried a real AA failure
   with it; the counterfactual audits in docs/a11y-checklist.md show the pre-restyle colours were
   worse still (1.94:1), so this was never a restyle regression and was never going to be fixed by
   another colour. Same treatment as prose links, for the same reason. */
.result .t a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.result .t .sub { font-weight: 400; color: var(--ink-3); }
.result .sn { color: var(--ink-2); margin-top: 4px; line-height: 1.55; }
.result .tags { margin-top: 6px; display: flex; gap: 6px; }
.result .tags span { font-size: 11px; background: var(--surface-2); border-radius: 4px; padding: 1px 6px; color: var(--ink-2); }
mark { background: var(--warn-soft); color: inherit; padding: 0 1px; border-radius: 2px; }

/* Not part of the mockup's copy-pasted rules above: SnippetHighlighter bounds .sn's content by *visible*
   units (600), not raw characters — an adversarial page of CJK text with no word-break opportunities can
   still measure over 12,000 raw characters (see that class's doc comment). Sizing .sn on the assumption
   that it is short would let one such snippet blow out every .result's height; clamping here is what
   keeps the layout correct regardless of how long the underlying string is. */
.result .sn {
  max-height: 4.65em;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
}

/* Round-2 finding (Critical): also not part of the mockup's copy-pasted rules above, and deliberately not
   folded into them — ".result .crumb span" (mandated, unchanged) was written for the "/" separators only;
   giving the entry text its own class here, rather than editing that rule, is what keeps this a strictly
   additive fix. See the contrast-checklist comment at the top of this file for the measured ratios. */
.result .crumb .crumb-name {
  color: var(--ink-2);
}

/* Round-2 finding (Important): not part of the mockup's copy-pasted rules either — the mockup's own markup
   never used a <ul>, so it never needed this reset. ".result" itself is unaffected: it matches an <li>
   exactly as it matched the <div> it replaces. */
.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Task 3 (R-11), the reader's feedback widget at the bottom of every document page. The box itself and
   its confirmation are copied verbatim from the mockup's own ".feedback"/".ok" rules
   (docs/design/docs-portal-mockup.html lines 184-189), reformatted to this file's one-property-per-line
   style; the mockup's own values (spacing, radii, colours) are unchanged. The mockup styles its own
   rating/send buttons with its general-purpose ".chipbtn" class -- not reused verbatim here because this
   widget's markup names them ".rate-yes"/".rate-no"/".send" instead (see _Feedback.cshtml's doc comment on
   why: they double as data-feedback-yes/-no/-send hooks for feedback.ts) -- so the button rules below
   reproduce ".chipbtn"'s visual result under those selectors instead. */
/* One line in the steady state. This was a bordered block: a heading, two buttons, a three-row textarea
   and a meta line, all drawn under a rule at the foot of every page — and a second such block appeared
   above it on release notes once the subscribe control shipped, which is what made the weight obvious.
   The rating itself is the only part a reader acts on most of the time, so it is the only part that
   stays: the comment area ships inside ".more" and feedback.ts collapses it until a rating is picked.
   Without the module nothing collapses and the full form renders exactly as before, because that path
   posts on the rating click and a comment typed afterwards would be lost.

   The top rule goes with it. Two stacked "border-top" blocks is what read as clutter, more than the
   content did; the margin alone separates this from the prose, and ".rel-sub" above keeps its rule as
   the single divider at the foot of a release note. */
.feedback {
  margin-top: 28px;
}

.feedback .q {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback .q strong {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

/* Only the gap above the collapsed-away comment area. Shown, it needs the spacing the block had. */
.feedback .more {
  margin-top: 12px;
}

/* Task 8: the mockup's own boundary token, --line-2, measures under 3:1 against every background this
   control actually renders on (its own --surface fill and the page's --bg behind it -- see the contrast
   block's Task 8 entry for both numbers, in both themes), and in light theme --surface *is* --bg, so the
   border is the only way this button's extent is ever visible at all. Genuinely inherited from the
   mockup, genuinely a control boundary (not text), and genuinely fails SC 1.4.11 -- fixed rather than
   accepted, reusing --ink-3 (already AA-vetted, already used two rules down for this same widget's
   "Anonymous..." muted line) rather than minting a new token. */
.feedback .q button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--ink-3);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* Pairing measured (Task 8): border+background on --accent/--accent-soft for the pressed rating button --
   see the contrast block's Task 8 entry. */
.feedback .q button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.feedback textarea {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ink-3);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  min-height: 64px;
  resize: vertical;
}

.feedback .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.feedback .muted {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* Pairing measured (Task 8): --accent-ink text on an --accent fill -- see the contrast block's Task 8 entry. */
.feedback .send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.feedback .send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Round-1 Critical 1: an author-origin "display" beats the user agent's own "[hidden] { display: none }",
   so ".feedback .send { display: inline-flex }" above was rendering this button, visible and dead (a
   type="button" with no handler) whenever the module never ran. This is the same hazard the
   ".search-combobox #docs-search-listbox[hidden]" rule (above, Task 8) already guards against, and the
   fix is the same shape: an explicit "[hidden]" rule that wins the specificity fight site.css itself set up. */
.feedback .send[hidden] {
  display: none;
}

/* Base box shared by both outcomes; the palette itself is state-specific (below) so a refusal is never
   painted in the success colour (round-1 Important 6). Deliberately beyond the mockup: ".ok" there only
   ever appears already-filled by a submission. Here it is a permanently present role="status" live
   region (so it exists to be announced on both the plain-form and the module paths). */
.feedback .ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 700;
}

.feedback .ok.success {
  background: var(--good-soft);
  color: var(--good);
}

.feedback .ok.failed {
  background: var(--bad-soft);
  color: var(--bad);
}

/* ".ok:empty" is defense in depth: the steady state renders no content between the tags (_Feedback.cshtml
   computes the string outside the markup precisely so there is no whitespace child to break this), and
   this rule is the second thing that would have to break for an empty box to paint. */
.feedback .ok:empty {
  display: none;
}

/* R-90's subscribe control, on release notes only (_ReleaseSubscribe.cshtml).

   Scoped under ".rd" because site.css is loaded by the ADMIN layout too, and ".rel-sub" is a new name
   with no admin counterpart to collide with today -- which is exactly how ".ad" became a problem before
   it was renamed. The reader's own conventions are not on this side of the stylesheet either: there is
   no ".chipbtn", ".muted" or ".mono" in the reader's half (".ok" itself is scoped to ".feedback"), so
   this block carries its own, rather than promoting four admin classes into shared space for one widget.

   The button reproduces ".chipbtn"'s visual result under this widget's own selector, the same choice
   ".feedback" made and for the same reason. */
.rd .rel-sub {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rd .rel-sub > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.rd .rel-sub .muted {
  margin: 0 0 10px;
  color: var(--rd-ink-muted);
  font-size: 14px;
  line-height: 20px;
}

.rd .rel-sub .mono {
  font-family: var(--mono);
  font-size: .925em;
}

.rd .rel-sub button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

/* --accent-ink, not a literal white: it flips with the theme (#FFFFFF light, #0B1A21 dark) and
   --rd-accent flips the same way (a dark blue light, a light blue dark), so the pairing holds in both.
   A hardcoded white would be 2.3:1 on the dark theme's #649FF2. Measured in both themes. */
.rd .rel-sub button.primary {
  border-color: var(--rd-accent);
  background: var(--rd-accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.rd .rel-sub button i {
  flex: none;
}

/* Same shape and the same ":empty" reasoning as ".feedback .ok" above: the partial builds the string
   outside the markup so the steady state has no whitespace child, and this rule is the second thing
   that would have to break for an empty box to paint. */
.rd .rel-sub .ok {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 700;
}

.rd .rel-sub .ok.success {
  background: var(--good-soft);
  color: var(--good);
}

.rd .rel-sub .ok.failed {
  background: var(--bad-soft);
  color: var(--bad);
}

.rd .rel-sub .ok:empty {
  display: none;
}
