/* The styles of the Pelladrin web interface.
   Uses only the --pd-* semantic tokens and the .pd-* text classes of tokens.css.
   No new colors. Two kinds of data bring their own colors: the code themes
   (assets/code-themes.css, only inside .lumis) and the hex color of a
   label (the fill of an SVG dot). The appearance previews in the settings use
   ramp primitives, as an exception. */

@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-Variable.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Italic-Variable.ttf") format("truetype"); font-weight: 100 900; font-style: italic; font-display: swap; }
/* Fira Code. It has no italic face, so an italic in code is the upright face, slanted. */
@font-face { font-family: "Fira Code"; src: url("../fonts/FiraCode-VF.ttf") format("truetype"); font-weight: 300 700; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
/* A sticky bar, as the header of a list or of a file of a diff, does not hide
   the element that gets the focus or the target of a link (WCAG 2.4.11). */
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: var(--pd-space-8); }
body { margin: 0; background: var(--pd-bg); color: var(--pd-text); font: var(--pd-body); }
a { color: var(--pd-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
/* The programming ligatures of Fira Code stay on: the default, normal, keeps its contextual alternates. */
code, kbd, pre, .mono { font-family: var(--pd-font-mono); font-variant-ligatures: normal; }
/* Chinese, Japanese and Korean. The bundled fonts have no CJK glyphs, so each
   language names the fonts of the systems: macOS and iOS, Windows, then Linux and Android.
   No web font: one CJK font is several megabytes. The brand font stays first, so Latin
   text in a CJK sentence keeps Inter or Fraunces. The code font does not change. The
   list ends with a comma, because the stacks below put it in front of other names. */
:lang(zh) { --pd-font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans SC",; }
:lang(zh-Hant), :lang(zh-TW), :lang(zh-HK), :lang(zh-MO) { --pd-font-cjk: "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans CJK TC", "Source Han Sans TC", "Noto Sans TC",; }
:lang(ja) { --pd-font-cjk: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo UI", Meiryo, "Noto Sans CJK JP", "Source Han Sans JP", "Noto Sans JP",; }
:lang(ko) { --pd-font-cjk: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Source Han Sans KR", "Noto Sans KR",; }
/* A heading in Fraunces takes the CJK sans for CJK text, as Wikipedia takes sans-serif
   for the headings in Japanese and Korean. With no CJK language, the stacks are the
   stacks of tokens.css. */
:root, [lang] {
  --pd-font-display: "Fraunces", Georgia, "Times New Roman", var(--pd-font-cjk,) serif;
  --pd-font-sans: "Inter", var(--pd-font-cjk,) system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* A custom property takes the value of var() where it is declared. So an element with
   its own lang, below the root, declares the text styles of tokens.css again, with its
   own stacks. A test checks that these lines are the same as the lines of tokens.css. */
[lang]:not(:root) {
  --pd-display-xl: 600 60px/64px var(--pd-font-display);
  --pd-display-lg: 600 48px/54px var(--pd-font-display);
  --pd-display-md: 600 36px/42px var(--pd-font-display);
  --pd-display-sm: 600 28px/34px var(--pd-font-display);
  --pd-heading-lg: 600 24px/32px var(--pd-font-sans);
  --pd-heading-md: 600 20px/28px var(--pd-font-sans);
  --pd-heading-sm: 600 16px/24px var(--pd-font-sans);
  --pd-body-lg: 400 18px/28px var(--pd-font-sans);
  --pd-body: 400 16px/24px var(--pd-font-sans);
  --pd-body-sm: 400 14px/20px var(--pd-font-sans);
  --pd-caption: 500 12px/16px var(--pd-font-sans);
}
/* Line breaks. Chinese and Japanese break between characters by default. Korean puts
   spaces between words, so a line breaks only at a space, as CSS Text 3 tells for
   word-break: keep-all. A word that is longer than its box still breaks. Japanese breaks
   at phrases where the browser can (word-break: auto-phrase). The rule is for the element
   that has the language. A child gets the value by inheritance, so a rule of a child, as
   overflow-wrap: anywhere or word-break: break-word, still wins. */
:lang(ko):is(:root, [lang]) { word-break: keep-all; overflow-wrap: break-word; }
:lang(ja):is(:root, [lang]) { word-break: auto-phrase; }
img { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* The margin of -1px takes back the 1px of the box, as the
   .visually-hidden of Bootstrap does. So a hidden <p>, as the live
   region, adds no blank band below the footer. */
.visually-hidden { position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The skip link (WCAG 2.4.1): hidden until it has the focus. */
.skip { position: absolute; inset-inline-start: var(--pd-space-2); inset-block-start: var(--pd-space-2); z-index: 100; padding: var(--pd-space-2) var(--pd-space-4); background: var(--pd-surface); color: var(--pd-link); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
/* The skip link moves the focus to main (tabindex -1). main shows no ring. */
main:focus { outline: none; }
.skip:not(:focus) { inline-size: 1px; block-size: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tnum, time, .count { font-variant-numeric: tabular-nums; }
.muted { color: var(--pd-text-secondary); }
/* The text in place of the summary of a commit with a blank message. --pd-text-secondary has a contrast of 4.5:1 or more on each surface of a row, also on hover. */
.nomsg { color: var(--pd-text-secondary); font-style: italic; }
a:hover > .nomsg { color: inherit; }

/* Focus: 2 px focus-ring outline, 2 px offset, on every interactive element. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
/* The calendar button of a date field is a stop of its own. There the field matches only :focus-within (WCAG 2.4.7). */
input[type="date"]:focus-within { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Icons: Lucide, currentColor. */
.i { flex: none; vertical-align: middle; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pd-space-6); }
.wrap.wide { max-width: none; }

/* ---------- The top band: global header, project header, tabs ---------- */
.top { background: var(--pd-surface); border-bottom: 1px solid var(--pd-border); }
.gbar { display: flex; align-items: center; gap: var(--pd-space-3); height: 64px; }
.gbar .brand { display: flex; align-items: center; padding: var(--pd-space-2); margin-inline-start: calc(-1 * var(--pd-space-2)); border-radius: var(--pd-radius-md); }
.gbar .brand img { height: 32px; width: auto; }
.gbar .grow { flex: 1; }
.gsearch { display: flex; align-items: center; gap: var(--pd-space-2); width: 360px; height: 36px; padding: 0 var(--pd-space-3); background: var(--pd-bg); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); color: var(--pd-text-secondary); font: var(--pd-body-sm); cursor: text; text-align: start; }
.gsearch span { flex: 1; }
.gsearch:hover { border-color: var(--pd-text-secondary); }
kbd { display: inline-block; min-width: 20px; padding: 0 var(--pd-space-1); font: var(--pd-caption); font-family: var(--pd-font-mono); text-align: center; color: var(--pd-text-secondary); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); }

/* Theme switch for artwork and icons: only display:none toggles here.
   The light lockup goes on light grounds, the dark lockup on dark grounds.
   Exactly one of the two shows for each value of data-theme. A missing value or
   a value other than light and dark follows the system, as tokens.css does. */
:root[data-theme="dark"] .on-light, :root[data-theme="light"] .on-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .on-light { display: none !important; } }
@media not all and (prefers-color-scheme: dark) { :root:not([data-theme="dark"]) .on-dark { display: none !important; } }
.gbar .brand .mk { display: none; }

/* Buttons. Standard buttons use the guideline padding (space-3 by space-4).
   Dense toolbars use .btn-sm, at the 32 px minimum. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--pd-space-2); padding: calc(var(--pd-space-3) - 1px) calc(var(--pd-space-4) - 1px); min-height: 44px; font: var(--pd-body-sm); font-weight: 500; color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.btn:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.btn-sm { min-height: 32px; padding: 5px 11px; gap: 6px; }
.btn-primary { background: var(--pd-accent); border-color: var(--pd-accent); color: var(--pd-on-accent); }
.btn-primary:hover { background: var(--pd-accent-hover); border-color: var(--pd-accent-hover); }
.btn-quiet { background: transparent; border-color: transparent; }
.btn-quiet:hover { background: var(--pd-surface-sunken); }
.btn-danger { color: var(--pd-danger); }
.btn[disabled], .btn[aria-disabled="true"] { color: var(--pd-text-disabled); cursor: not-allowed; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: var(--pd-surface); }
.btn-icon { width: 32px; height: 32px; min-height: 32px; padding: 0; background: transparent; border-color: transparent; color: var(--pd-text-secondary); }
.btn-icon:hover { color: var(--pd-text); background: var(--pd-surface-sunken); }
.btn-icon.boxed { border-color: var(--pd-border-strong); background: var(--pd-surface); }
.btn .count, .tab .count { font: var(--pd-caption); padding: 0 6px; min-width: 20px; line-height: 18px; text-align: center; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); }
.btn-split { display: inline-flex; }
.btn-split > .btn:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.btn-split > .btn + .btn { border-start-start-radius: 0; border-end-start-radius: 0; padding-inline-start: 10px; padding-inline-end: 10px; border-inline-start: 1px solid var(--pd-on-accent); }
.btn-split > .btn:not(.btn-primary) + .btn { border-inline-start-color: var(--pd-border-strong); margin-inline-start: -1px; }

.notif { position: relative; }
.notif .dot { position: absolute; top: 5px; inset-inline-end: 5px; width: 8px; height: 8px; border-radius: var(--pd-radius-full); background: var(--pd-accent); border: 2px solid var(--pd-surface); box-sizing: content-box; }

/* Avatars: initials. Agent accounts take a rounded square, as bots on GitHub do. */
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: var(--pd-radius-full); background: var(--pd-accent-subtle); color: var(--pd-accent); font: var(--pd-caption); font-size: 10px; letter-spacing: 0.02em; border: 1px solid var(--pd-border); }
.av.lg { width: 32px; height: 32px; font-size: 12px; }
.av.xl { width: 40px; height: 40px; font-size: 14px; }
.av.sm { width: 20px; height: 20px; font-size: 9px; }
.av.agent { border-radius: var(--pd-radius-sm); background: var(--pd-surface-sunken); color: var(--pd-text); }
.av.org { border-radius: var(--pd-radius-sm); }
.avs { display: inline-flex; }
.avs .av + .av { margin-inline-start: -6px; box-shadow: 0 0 0 2px var(--pd-surface); }
.tag-agent { font: var(--pd-caption); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 0 4px; line-height: 16px; }

/* Menus: float over content, so they take shadow-md. */
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 30; min-width: 240px; padding: var(--pd-space-2); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-md); font: var(--pd-body-sm); }
.menu.left { inset-inline-end: auto; inset-inline-start: 0; }
.menu .mh { padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); }
.menu a, .menu button.mi { display: flex; align-items: center; gap: var(--pd-space-3); width: 100%; min-height: 32px; padding: 6px var(--pd-space-3); border: 0; background: none; border-radius: var(--pd-radius-md); color: var(--pd-text); text-align: start; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button.mi:hover { background: var(--pd-surface-sunken); }
.menu .mh a { display: inline; width: auto; min-height: 0; padding: 0; font-weight: 500; color: var(--pd-link); }
.menu .mh a:hover { background: none; text-decoration: underline; }
.menu .i { color: var(--pd-text-secondary); }
.menu .sep { height: 1px; margin: var(--pd-space-2) 0; background: var(--pd-border); }
.menu .sel { background: var(--pd-accent-subtle); color: var(--pd-accent); }
.menu .sel .i { color: var(--pd-accent); }
.menu .desc { display: block; color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; }
.menu .mi[aria-disabled="true"] { color: var(--pd-text-disabled); cursor: not-allowed; }
.menu .mi[aria-disabled="true"]:hover { background: none; }
.menu .mi[aria-disabled="true"] .desc { color: var(--pd-text-disabled); }
.menu .filter { margin: 0 0 var(--pd-space-2); }
/* A menu of the header is a disclosure (details and summary), as in the header of GitHub,
   so it opens with no script. */
details.menu-wrap > summary { list-style: none; cursor: pointer; }
details.menu-wrap > summary::-webkit-details-marker { display: none; }
/* The page below an open menu. The edge of a menu can cut
   a link or a button of the page, and leave a strip of 1 to 23 px open, a
   target below 24 px (WCAG 2.5.8). Without the layer, a click on the strip
   would close the menu and also follow the link. While a menu is open, a
   clear layer covers the page, as the overlay of an open details menu of
   Primer CSS (.details-overlay[open] > summary::before). A click on the
   layer is a click on the summary, so it only closes the menu, also with no
   script. The menu (.menu, z-index 30) is above the layer. One rule for
   each menu. */
details.menu-wrap[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 29; cursor: default; }
/* A sticky box is a stacking context, so the layer of a menu in it is only
   as high as the box. The file tree (.ftree) has no z-index, so the summary
   of the code theme and of the language menu would stay above the layer of
   the branch picker. While the tree holds an open menu, it is above the page. */
.ftree:has(details.menu-wrap[open]) { z-index: 30; }
.gbar summary.acct { width: 36px; height: 36px; }
.menu form { margin: 0; }
.menu .theme-pick { padding: 0 var(--pd-space-3) var(--pd-space-2); }
.menu .theme-pick .seg { width: 100%; }
.menu .theme-pick .seg button { flex: 1; justify-content: center; }

/* Project header */
.phead { display: flex; align-items: center; gap: var(--pd-space-3); padding-top: var(--pd-space-2); padding-bottom: var(--pd-space-3); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-1); font: var(--pd-body); }
.crumbs a { color: var(--pd-text); padding: 2px var(--pd-space-1); border-radius: var(--pd-radius-sm); }
.crumbs a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.crumbs .slash { color: var(--pd-text-secondary); }
.crumbs .here { font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 1px 6px; line-height: 16px; white-space: nowrap; }
.chip.mono { font-family: var(--pd-font-mono); }
.chip.planned { border-style: dashed; }

/* Project tabs. Selected nav item: accent-subtle background, accent text. */
/* The tabs wrap when they do not fit, so that no tab hides. A row that scrolls with no
   scrollbar can hide the current tab. */
.ptabs { display: flex; flex-wrap: wrap; gap: var(--pd-space-1); padding-bottom: var(--pd-space-2); }
.tab { display: inline-flex; align-items: center; gap: var(--pd-space-2); min-height: 36px; padding: 0 var(--pd-space-3); border-radius: var(--pd-radius-md); color: var(--pd-text-secondary); font: var(--pd-body-sm); font-weight: 500; white-space: nowrap; text-decoration: none; border: 0; background: none; cursor: pointer; }
.tab:hover { background: var(--pd-surface-sunken); color: var(--pd-text); text-decoration: none; }
.tab[aria-current="page"], .tab[aria-selected="true"] { background: var(--pd-accent-subtle); color: var(--pd-accent); }
.tab[aria-current="page"] .count, .tab[aria-selected="true"] .count { color: var(--pd-accent); border-color: transparent; background: var(--pd-surface); }
.ptabs .push { margin-inline-start: auto; }

/* ---------- Page content ---------- */
main { padding: var(--pd-space-6) 0 var(--pd-space-8); }
.card { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.panel { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); }
.card-h { display: flex; align-items: center; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); background: var(--pd-surface-sunken); border-bottom: 1px solid var(--pd-border); border-radius: var(--pd-radius-md) var(--pd-radius-md) 0 0; font: var(--pd-body-sm); }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--pd-space-6); align-items: start; }
.side h2, .side h3 { font: var(--pd-heading-sm); margin: 0 0 var(--pd-space-2); }
.side section { padding-bottom: var(--pd-space-5); margin-bottom: var(--pd-space-5); border-bottom: 1px solid var(--pd-border); }
.side section:last-child { border-bottom: 0; }
.side .row { display: flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); min-height: 28px; }
.side .row .i { color: var(--pd-text-secondary); }
.side .row a { color: var(--pd-text-secondary); }
.side .row a:hover { color: var(--pd-link); }
.side .row strong { color: var(--pd-text); font-weight: 600; }
.side p { font: var(--pd-body-sm); margin: 0 0 var(--pd-space-3); }
.side .head { display: flex; align-items: center; justify-content: space-between; }
.side .head :is(h2, h3) { margin: 0; }
.side .empty { font: var(--pd-body-sm); color: var(--pd-text-secondary); }

input.text, textarea.text, .text-input { width: 100%; min-height: 36px; padding: 7px var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); }
textarea.text { min-height: 96px; resize: vertical; font: var(--pd-body-sm); }
input.text::placeholder, textarea.text::placeholder { color: var(--pd-text-secondary); }
.field-label { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); margin: 0 0 var(--pd-space-1); }
.check { display: inline-flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-body-sm); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--pd-accent); }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.seg button { min-height: 28px; padding: 0 var(--pd-space-3); border: 0; border-radius: 6px; background: none; color: var(--pd-text-secondary); font: var(--pd-body-sm); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--pd-text); }
/* The slide sits inside the well. Its edge is inset, so the well shows between the
   edge of the well and the edge of the slide. */
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--pd-surface); color: var(--pd-text); box-shadow: inset 0 0 0 1px var(--pd-border), var(--pd-shadow-sm); }
/* A radio group in the look of a segmented control: the choice is in the accent color
   (the guidelines: selected is accent-subtle with accent text). */
.seg.seg-radio button[aria-checked="true"] { background: var(--pd-accent-subtle); color: var(--pd-accent); box-shadow: inset 0 0 0 1px var(--pd-accent); }

/* Branch names, SHAs: things the user may copy. */
.ref { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-code-sm); color: var(--pd-text); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 0 6px; line-height: 20px; white-space: nowrap; }
a.ref { color: var(--pd-link); }
.sha { font: var(--pd-code-sm); color: var(--pd-text-secondary); }
a.sha:hover { color: var(--pd-link); }

/* State badges. Each carries a word and an icon, not color alone. */
.state { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--pd-space-3); min-height: 32px; border-radius: var(--pd-radius-full); font: var(--pd-body-sm); font-weight: 600; color: var(--pd-on-accent); }
.state.open { background: var(--pd-state-open); }
.state.merged { background: var(--pd-state-merged); }
.state.closed { background: var(--pd-state-closed); }
.state.draft { background: var(--pd-state-draft); }
.c-open { color: var(--pd-state-open); }
.c-merged { color: var(--pd-state-merged); }
.c-closed { color: var(--pd-state-closed); }
.c-draft { color: var(--pd-state-draft); }
.c-success { color: var(--pd-success); }
.c-danger { color: var(--pd-danger); }
.c-warning { color: var(--pd-warning); }
.c-info { color: var(--pd-info); }
.c-growth { color: var(--pd-growth); }
.c-accent { color: var(--pd-accent); }
.c-2 { color: var(--pd-text-secondary); }

/* Labels: a dot in the color of the label, and the name in text, on the
   surface. So each label meets AA in both themes, with any color. */
.label { display: inline-flex; align-items: center; gap: 6px; font: var(--pd-caption); color: var(--pd-text); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-full); padding-block: 1px; padding-inline: 6px 8px; line-height: 16px; white-space: nowrap; background: var(--pd-surface); }
/* The dot is an SVG circle with the color of the label in its fill attribute,
   so the Content-Security-Policy needs no inline style. A label with
   no color has no fill attribute, and the rule below gives the color. */
.label .dot { flex: none; display: block; }
.label .dot circle:not([fill]) { fill: var(--pd-text-secondary); }
/* A label chip is 20 px. A label that is a link meets
   WCAG 2.5.8 by its spacing: no other target is within the circle of 24 px
   around its center. axe-core target-size finds no fault. */
a.label:hover { text-decoration: none; border-color: var(--pd-border-strong); }
/* A scoped label (exclusive): the scope, then the value. */
.label.scoped { padding: 0; gap: 0; overflow: hidden; }
.label.scoped .dot { margin-inline-start: 6px; }
.label.scoped .sc { padding: 1px 6px 1px 6px; color: var(--pd-text-secondary); }
.label.scoped .sv { padding-block: 1px; padding-inline: 6px 8px; border-inline-start: 1px solid var(--pd-border); background: var(--pd-surface-sunken); align-self: stretch; display: inline-flex; align-items: center; }
.labels { display: flex; gap: 6px; flex-wrap: wrap; }

/* Status: the icon of the category and the name. */
.status { display: inline-flex; align-items: center; gap: 6px; font: var(--pd-caption); color: var(--pd-text); background: var(--pd-surface-sunken); border-radius: var(--pd-radius-sm); padding-block: 2px; padding-inline: 6px 8px; line-height: 16px; white-space: nowrap; }
.status.triage .i, .status.to_do .i { color: var(--pd-text-secondary); }
.status.in_progress .i { color: var(--pd-warning); }
.status.done .i { color: var(--pd-success); }
.status.canceled .i { color: var(--pd-state-draft); }

/* Banners */
.banner { display: flex; align-items: flex-start; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); border: 1px solid var(--pd-border); }
.banner.info { background: var(--pd-info-subtle); }
.banner.info > .i { color: var(--pd-info); }
.banner.warning { background: var(--pd-warning-subtle); }
.banner.warning > .i { color: var(--pd-warning); }
.banner.danger { background: var(--pd-danger-subtle); }
.banner.danger > .i { color: var(--pd-danger); }
.banner.success { background: var(--pd-growth-subtle); }
.banner.success > .i { color: var(--pd-success); }
.banner .grow { flex: 1; }

/* ---------- Project home ---------- */
.home-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--pd-space-5); margin-bottom: var(--pd-space-6); }
.home-title h1 { margin: 0; color: var(--pd-text); }
.home-title > div { min-width: 0; overflow-wrap: anywhere; }
.home-title p { margin: var(--pd-space-2) 0 0; color: var(--pd-text-secondary); max-width: 72ch; }
.files-bar { display: flex; align-items: center; gap: var(--pd-space-3); margin-bottom: var(--pd-space-3); flex-wrap: wrap; }
.files-bar .links { display: flex; gap: var(--pd-space-4); font: var(--pd-body-sm); }
.files-bar .links a { color: var(--pd-text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.files-bar .links a strong { color: var(--pd-text); }
.files-bar .grow { flex: 1; }
.files-bar .go { width: 220px; display: flex; align-items: center; gap: var(--pd-space-2); padding: 0 var(--pd-space-3); height: 32px; border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); background: var(--pd-surface); color: var(--pd-text-secondary); font: var(--pd-body-sm); }
.files-bar .go input { border: 0; background: none; outline: none; font: inherit; color: var(--pd-text); width: 100%; }
.files-bar .go:focus-within { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.files .last { display: flex; align-items: center; gap: var(--pd-space-3); }
.files .last .msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pd-text-secondary); }
.files .last .msg a { color: var(--pd-text); }
.files .last .meta { display: flex; align-items: center; gap: var(--pd-space-3); color: var(--pd-text-secondary); white-space: nowrap; }
.ftable { width: 100%; border-collapse: collapse; font: var(--pd-body-sm); }
.ftable td { padding: 0 var(--pd-space-4); height: 40px; border-top: 1px solid var(--pd-border); }
.ftable tr:first-child td { border-top: 0; }
.ftable tr:hover td { background: var(--pd-surface-sunken); }
.ftable .name { width: 30%; white-space: nowrap; }
.ftable .name a { color: var(--pd-text); display: inline-flex; align-items: center; gap: var(--pd-space-2); }
.ftable .name .i { color: var(--pd-text-secondary); }
.ftable .name .dir .i { color: var(--pd-accent); }
.ftable .cmsg { color: var(--pd-text-secondary); max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftable .cmsg a { color: var(--pd-text-secondary); }
.ftable .cmsg a:hover { color: var(--pd-link); }
/* WCAG 2.5.8: a commit title that its box cuts is a block link, as in blame, so the
   box of the link ends where the text ends. An inline link keeps the width of the full title,
   and its box then covers the targets next to it. */
.ftable .cmsg a, .files .last .msg a, .lastc .msg a, .hrow .msg a { display: block; overflow: hidden; text-overflow: ellipsis; }
.ftable .when { width: 1%; white-space: nowrap; text-align: end; color: var(--pd-text-secondary); }
.readme { margin-top: var(--pd-space-5); }
.readme .card-h { justify-content: space-between; }
.readme .card-h .t { display: flex; align-items: center; gap: var(--pd-space-2); font-weight: 600; }
.clone .seg { width: 100%; margin-bottom: var(--pd-space-3); }
.clone .seg button { flex: 1; justify-content: center; }
.copybox { display: flex; align-items: center; gap: var(--pd-space-1); padding-inline-start: var(--pd-space-3); height: 36px; background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.copybox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--pd-code-sm); }
.copybox .btn-icon { width: 34px; height: 34px; }
/* The clone URL is a read-only field, as on GitHub, Gitea and GitLab. A drag
   scrolls the field and selects the whole URL. A cut with an ellipsis would look
   like a selection of the visible part only. The box draws the focus ring
   of the field, so the ring needs :has() (each current browser has it). */
.copybox input.copyurl { flex: 1; min-inline-size: 0; block-size: 100%; padding: 0; border: 0; background: transparent; color: var(--pd-text); font: var(--pd-code-sm); }
.copybox input.copyurl:focus-visible { outline: 0; }
.copybox:has(input.copyurl:focus-visible) { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.clone .hint { font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); margin: var(--pd-space-2) 0 0; }
.clone .downloads { display: flex; gap: var(--pd-space-2); margin-top: var(--pd-space-3); }

/* ---------- Markdown (GFM) ---------- */
.md { font: var(--pd-body-lg); color: var(--pd-text); }
.md.long { max-width: 72ch; }
.md.sm { font: var(--pd-body); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { color: var(--pd-text); margin: 1.6em 0 0.6em; }
.md h1 { font: var(--pd-heading-lg); }
.md h2 { font: var(--pd-heading-md); padding-bottom: var(--pd-space-2); border-bottom: 1px solid var(--pd-border); }
.md h3 { font: var(--pd-heading-sm); }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md table { margin: 0 0 1em; }
.md ul, .md ol { padding-inline-start: 1.5em; }
.md li + li { margin-top: 0.25em; }
.md blockquote { padding: 0 var(--pd-space-4); border-inline-start: 3px solid var(--pd-border); color: var(--pd-text-secondary); }
.md code { font: var(--pd-code-sm); background: var(--pd-surface-sunken); border-radius: var(--pd-radius-sm); padding: 1px 5px; overflow-wrap: anywhere; }
.md pre { font: var(--pd-code); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); padding-block: var(--pd-space-4); padding-inline: var(--pd-space-4) 52px; overflow-x: auto; position: relative; }
.md pre code { font: inherit; background: none; padding: 0; }
.md pre .btn-icon { position: absolute; top: var(--pd-space-2); inset-inline-end: var(--pd-space-2); }
.md table { border-collapse: collapse; font: var(--pd-body-sm); display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--pd-border); padding: 6px var(--pd-space-3); text-align: start; }
.md th { background: var(--pd-surface-sunken); font-weight: 600; }
.md a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.md .ref-issue { text-decoration: none; font-weight: 500; }
.md .task { list-style: none; margin-inline-start: -1.5em; display: flex; gap: var(--pd-space-2); align-items: baseline; }
.md .task input { accent-color: var(--pd-accent); }
/* The task lists, the alerts and the heading anchors of GitHub. comrak gives
   the classes of GitHub. A task list has boxes and no bullets. */
.md .contains-task-list { list-style: none; padding-inline-start: 0; }
.md .contains-task-list .contains-task-list { padding-inline-start: 1.5em; }
.md .task-list-item-checkbox { margin-block: 0 0.2em; margin-inline: 0 0.4em; vertical-align: middle; accent-color: var(--pd-accent); }
/* An alert: a bar in the color of its kind, and the title in the same color. */
.md .markdown-alert { margin: 0 0 1em; padding: var(--pd-space-2) var(--pd-space-4); border-inline-start: 4px solid var(--alert, var(--pd-border)); }
.md .markdown-alert > :last-child { margin-bottom: 0; }
.md .markdown-alert-title { display: flex; align-items: center; gap: var(--pd-space-2); margin: 0 0 var(--pd-space-2); font-weight: 600; color: var(--alert); }
.md .markdown-alert-note { --alert: var(--pd-info); }
.md .markdown-alert-tip { --alert: var(--pd-success); }
.md .markdown-alert-important { --alert: var(--pd-accent); }
.md .markdown-alert-warning { --alert: var(--pd-warning); }
.md .markdown-alert-caution { --alert: var(--pd-danger); }
/* The link to a heading shows on hover and on keyboard focus. */
.md .anchor { margin-inline-start: 0.3em; color: var(--pd-text-secondary); text-decoration: none; opacity: 0; }
.md .anchor::before { content: "#"; }
.md :is(h1, h2, h3, h4, h5, h6):hover .anchor, .md .anchor:focus-visible { opacity: 1; }
/* Code blocks take the code theme of the user, on the ground of the theme. */
.md pre.lumis { background: var(--ct-bg); color: var(--ct-fg); }
.md pre.lumis .btn-icon { color: var(--pd-text-secondary); }

/* ---------- Issue list ---------- */
.qbar { display: flex; gap: var(--pd-space-3); align-items: center; margin-bottom: var(--pd-space-4); }
.qbox { position: relative; flex: 1; }
.qinput { display: flex; align-items: center; gap: var(--pd-space-2); height: 40px; padding-block: 0; padding-inline: var(--pd-space-3) var(--pd-space-2); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); }
.qinput:focus-within { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.qinput > .i { color: var(--pd-text-secondary); }
.qinput input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--pd-text); font: var(--pd-code); }
.qinput .clear { color: var(--pd-text-secondary); }
.qsuggest { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: calc(100% + 6px); z-index: 25; background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-md); padding: var(--pd-space-2); font: var(--pd-body-sm); }
.qsuggest .mh { padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); }
.qsuggest a[role="option"] { display: grid; grid-template-columns: 180px 1fr; gap: var(--pd-space-3); padding: 6px var(--pd-space-3); border-radius: var(--pd-radius-md); color: var(--pd-text); }
.qsuggest a[role="option"]:hover, .qsuggest a.sel { background: var(--pd-accent-subtle); text-decoration: none; }
.qsuggest a[role="option"] code { font: var(--pd-code-sm); color: var(--pd-accent); }
.qsuggest a[role="option"] span { color: var(--pd-text-secondary); }
.qsuggest .foot { display: flex; justify-content: space-between; align-items: center; padding: var(--pd-space-2) var(--pd-space-3) var(--pd-space-1); margin-top: var(--pd-space-2); border-top: 1px solid var(--pd-border); color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; }
.qsuggest .foot code { font: var(--pd-code-sm); }
.qerror { margin-top: var(--pd-space-2); }
.ilist { overflow: visible; }
.ilist .card-h { padding: var(--pd-space-2) var(--pd-space-4); gap: var(--pd-space-2); flex-wrap: wrap; }
/* The filter bar of a list stays at the top of the window while the list scrolls.
   It gets a shadow only while it floats over the rows. */
.ilist .card-h { position: sticky; top: 0; z-index: 5; transition: box-shadow 150ms ease-out; }
.ilist .card-h.stuck { border-radius: 0; box-shadow: var(--pd-shadow-md); }
.ilist .states { display: flex; gap: var(--pd-space-1); }
.ilist .states .tab { min-height: 32px; }
.ilist .states .tab .i { color: inherit; }
.ilist .filters { display: flex; gap: var(--pd-space-1); margin-inline-start: auto; flex-wrap: wrap; }
.ilist .filters .wide-only { display: contents; }
.ilist .filters .btn { color: var(--pd-text-secondary); }
.ilist .filters .btn:hover { color: var(--pd-text); }
.irow { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); align-items: start; }
.irow:first-of-type { border-top: 0; }
.irow:hover { background: var(--pd-surface-sunken); }
.irow > .i { margin-top: 2px; }
.irow .t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--pd-space-2); }
.irow .t a.title { color: var(--pd-text); font: var(--pd-body); font-weight: 600; min-inline-size: 0; overflow-wrap: anywhere; }
.irow .t a.title:hover { color: var(--pd-link); }
.irow .m { margin-top: 2px; font: var(--pd-body-sm); color: var(--pd-text-secondary); display: flex; flex-wrap: wrap; gap: 0 var(--pd-space-2); align-items: center; }
.irow .m .refn { font: var(--pd-code-sm); color: var(--pd-text-secondary); }
.irow .m a { color: var(--pd-text-secondary); }
.irow .m a:hover { color: var(--pd-link); }
.irow .r { display: flex; align-items: center; gap: var(--pd-space-4); padding-top: 2px; }
.irow .r .cmt { display: inline-flex; align-items: center; gap: 4px; color: var(--pd-text-secondary); font: var(--pd-body-sm); min-width: 40px; }
.irow .r .cmt.zero { visibility: hidden; }
.irow .r .avs { width: 44px; justify-content: flex-end; }
.irow .r .st { width: 112px; display: flex; justify-content: flex-start; }
.pager { display: flex; justify-content: center; align-items: center; gap: var(--pd-space-1); margin-top: var(--pd-space-5); font: var(--pd-body-sm); }
.pager a, .pager span.cur, .pager span.dis { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 var(--pd-space-2); border-radius: var(--pd-radius-md); color: var(--pd-text); }
.pager a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.pager span.cur { background: var(--pd-accent-subtle); color: var(--pd-accent); font-weight: 600; }
.pager span.dis { color: var(--pd-text-disabled); }
.list-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--pd-space-4); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.list-foot code { font: var(--pd-code-sm); }
.empty-state { padding: var(--pd-space-8) var(--pd-space-5); text-align: center; color: var(--pd-text-secondary); }
/* Only the large icon of the empty state. An icon in a button keeps the button layout. */
.empty-state > .i { color: var(--pd-text-secondary); margin: 0 auto var(--pd-space-3); display: block; }
.empty-state h1, .empty-state h2, .empty-state h3 { font: var(--pd-heading-sm); color: var(--pd-text); margin: 0 0 var(--pd-space-1); }
/* A link in the text of an empty state has a line below it, not only its
   color (WCAG 1.4.1). */
.empty-state p a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pull request ---------- */
.prhead h1 { font: var(--pd-heading-lg); margin: 0; overflow-wrap: anywhere; }
.prhead h1 .num { color: var(--pd-text-secondary); font-weight: 400; }
.prhead .titlerow { display: flex; align-items: flex-start; gap: var(--pd-space-4); }
.prhead .titlerow h1 { flex: 1; min-inline-size: 0; }
.prhead .metarow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2) var(--pd-space-3); margin-top: var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.prhead .metarow strong { color: var(--pd-text); font-weight: 600; }
/* A long branch name wraps in its chip when it is wider than the row, so a narrow page does
   not scroll to the side. The copy button next to it gives the full name. */
.prhead .metarow .ref { white-space: normal; overflow-wrap: anywhere; }
.prtabs { display: flex; align-items: center; gap: var(--pd-space-1); margin: var(--pd-space-5) 0 var(--pd-space-5); padding-bottom: var(--pd-space-2); border-bottom: 1px solid var(--pd-border); }
.prtabs { flex-wrap: wrap; }
.prtabs > .tab { white-space: nowrap; }
.prtabs .diffstat { margin-inline-start: auto; display: flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-code-sm); }
.blocks { display: inline-flex; gap: 2px; }
.blocks i { width: 8px; height: 8px; border-radius: 2px; background: var(--pd-border); }
.blocks i.a { background: var(--pd-success); }
.blocks i.d { background: var(--pd-danger); }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; inset-inline-start: 19px; top: 0; bottom: 0; width: 2px; background: var(--pd-border); }
.tl > * { position: relative; }
.cbox { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--pd-space-3); margin-bottom: var(--pd-space-5); }
.cbox .av.xl { box-shadow: 0 0 0 4px var(--pd-bg); }
.comment { background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.comment.author > .card-h { background: var(--pd-accent-subtle); }
.comment .card-h { gap: var(--pd-space-2); color: var(--pd-text-secondary); }
.comment .card-h strong { color: var(--pd-text); font-weight: 600; }
.comment .card-h .grow { flex: 1; }
.comment .body { padding: var(--pd-space-4); }
.reacts { display: flex; gap: var(--pd-space-2); padding: 0 var(--pd-space-4) var(--pd-space-4); }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-full); background: var(--pd-surface); font: var(--pd-caption); color: var(--pd-text-secondary); cursor: pointer; font-variant-numeric: tabular-nums; }
/* Reactions are emoji, the one place for emoji. The system emoji font draws them. */
.emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-size: 15px; line-height: 1; font-style: normal; }
.react.add { padding: 0 8px; }
.rmenu { min-width: 0; width: max-content; display: grid; grid-template-columns: repeat(5, 36px); gap: 2px; padding: var(--pd-space-2); }
.rpick { width: 36px; height: 36px; border: 0; border-radius: var(--pd-radius-md); background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rpick:hover { background: var(--pd-surface-sunken); }
.rpick .emoji { font-size: 18px; }
.react:hover { background: var(--pd-surface-sunken); }
.react.mine { background: var(--pd-accent-subtle); color: var(--pd-accent); border-color: transparent; }
.ev { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--pd-space-3); align-items: start; margin: 0 0 var(--pd-space-4); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.ev .dotc { width: 32px; height: 32px; margin-inline-start: 4px; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--pd-bg); color: var(--pd-text-secondary); }
.ev .dotc.ok { background: var(--pd-growth-subtle); color: var(--pd-success); border-color: transparent; }
.ev .dotc.bad { background: var(--pd-danger-subtle); color: var(--pd-danger); border-color: transparent; }
.ev .dotc.acc { background: var(--pd-accent-subtle); color: var(--pd-accent); border-color: transparent; }
.ev .txt { padding-top: 6px; line-height: 22px; }
.ev .txt > .av { vertical-align: -6px; margin-inline-end: 6px; }
.ev .txt code { font: var(--pd-code-sm); }
.ev .txt strong { color: var(--pd-text); font-weight: 600; }
.ev .commits { grid-column: 2; margin-top: var(--pd-space-2); display: grid; gap: 2px; }
.ev .commits div { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; padding: 2px 0; }
.ev .commits div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pd-text); }
.folio-tag { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); color: var(--pd-accent); background: var(--pd-accent-subtle); border-radius: var(--pd-radius-sm); padding: 1px 6px; line-height: 16px; white-space: nowrap; }
.thread { margin: 0 var(--pd-space-4) var(--pd-space-4); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); overflow: hidden; }
.thread .th { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface-sunken); border-bottom: 1px solid var(--pd-border); font: var(--pd-code-sm); }
.thread .th .grow { flex: 1 1 auto; }
.thread .tc { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--pd-space-3); padding: var(--pd-space-3); border-top: 1px solid var(--pd-border); font: var(--pd-body-sm); }
.thread .tc:first-of-type { border-top: 0; }
.thread .tc .who { color: var(--pd-text-secondary); margin-bottom: 2px; }
.thread .tc .who strong { color: var(--pd-text); }
.thread .tc p { margin: 0; }
.thread .tc code { font: var(--pd-code-sm); background: var(--pd-surface-sunken); border-radius: var(--pd-radius-sm); padding: 1px 4px; }
.thread .reply { display: flex; gap: var(--pd-space-2); align-items: center; padding: var(--pd-space-3); border-top: 1px solid var(--pd-border); background: var(--pd-surface); }
.thread .reply .text-input { flex: 1; color: var(--pd-text-secondary); display: flex; align-items: center; cursor: text; }
.thread.resolved .th { color: var(--pd-text-secondary); }

/* Merge box */
.mbox { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--pd-space-3); margin-bottom: var(--pd-space-5); }
.mbox .bigicon { width: 40px; height: 40px; border-radius: var(--pd-radius-md); display: flex; align-items: center; justify-content: center; color: var(--pd-on-accent); background: var(--pd-state-open); box-shadow: 0 0 0 4px var(--pd-bg); }
.mbox[data-state="conflict"] .bigicon, .mbox[data-state="blocked"] .bigicon { background: var(--pd-state-draft); }
.mreq { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--pd-space-3); align-items: center; padding: var(--pd-space-4); border-top: 1px solid var(--pd-border); }
.mreq:first-child { border-top: 0; }
.mreq .ic { width: 32px; height: 32px; border-radius: var(--pd-radius-full); display: flex; align-items: center; justify-content: center; }
.mreq .ic.ok { background: var(--pd-growth-subtle); color: var(--pd-success); }
.mreq .ic.bad { background: var(--pd-danger-subtle); color: var(--pd-danger); }
.mreq .ic.wait { background: var(--pd-warning-subtle); color: var(--pd-warning); }
.mreq .ic.neutral { background: var(--pd-surface-sunken); color: var(--pd-text-secondary); }
.mreq h3, .mreq h4 { margin: 0; font: var(--pd-body-sm); font-weight: 600; }
.mreq p { margin: 2px 0 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.mreq ul.paths { margin: var(--pd-space-2) 0 0; padding: 0; list-style: none; font: var(--pd-code-sm); }
.mreq ul.paths li { display: flex; gap: var(--pd-space-2); align-items: center; padding: 2px 0; }
.mact { padding: var(--pd-space-4); border-top: 1px solid var(--pd-border); background: var(--pd-surface-sunken); border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); }
.mact .row1 { display: flex; align-items: center; gap: var(--pd-space-4); flex-wrap: wrap; }
.mact .row1 .grow { flex: 1; }
.mform { display: grid; gap: var(--pd-space-3); margin-top: var(--pd-space-4); }
.mcli { display: flex; align-items: center; gap: var(--pd-space-2); margin-top: var(--pd-space-3); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.mcli code { font: var(--pd-code-sm); color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); padding: 1px 6px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

.stack { display: grid; gap: 2px; }
.stack a, .stack div { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--pd-space-2); align-items: center; padding: 4px var(--pd-space-2); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); color: var(--pd-text); }
.stack .cur { background: var(--pd-accent-subtle); color: var(--pd-accent); font-weight: 600; }
.stack .base { color: var(--pd-text-secondary); }
.stack .tail { padding-inline-start: var(--pd-space-2); }

/* Commits tab */
.cgroup h3 { display: flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); margin: var(--pd-space-5) 0 var(--pd-space-2); }
.cgroup:first-child h3 { margin-top: 0; }
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pd-space-3); align-items: center; padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); }
.crow:first-child { border-top: 0; }
.crow:hover { background: var(--pd-surface-sunken); }
.crow .msg a { color: var(--pd-text); font-weight: 600; font: var(--pd-body-sm); font-weight: 600; }
.crow .by { display: flex; gap: var(--pd-space-2); align-items: center; margin-top: 4px; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.crow .acts { display: flex; gap: var(--pd-space-1); align-items: center; }
.fdiv { display: flex; align-items: center; gap: var(--pd-space-2); margin: 0; padding: var(--pd-space-2) var(--pd-space-4); background: var(--pd-surface-sunken); border-top: 1px solid var(--pd-border); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.fdiv:first-child { border-top: 0; border-radius: var(--pd-radius-md) var(--pd-radius-md) 0 0; }

/* Folios tab */
.ftbl { width: 100%; border-collapse: collapse; font: var(--pd-body-sm); }
.ftbl th { text-align: start; font: var(--pd-caption); color: var(--pd-text-secondary); background: var(--pd-surface-sunken); padding: var(--pd-space-2) var(--pd-space-4); border-bottom: 1px solid var(--pd-border); }
.ftbl th:first-child { border-start-start-radius: var(--pd-radius-md); }
.ftbl th:last-child { border-start-end-radius: var(--pd-radius-md); }
.ftbl td { padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); vertical-align: top; }
.ftbl tr:nth-child(2) td { border-top: 0; }
.ftbl .fno { font-weight: 600; white-space: nowrap; }
.ftbl .fno small { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); font-weight: 400; margin-top: 2px; }
.ftbl .shas { display: grid; grid-template-columns: auto auto; gap: 2px var(--pd-space-3); justify-content: start; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.ftbl .acts { white-space: nowrap; text-align: end; }
.ftbl .flags { display: flex; gap: var(--pd-space-1); flex-wrap: wrap; margin-top: var(--pd-space-1); }
.ftbl tbody th { padding: var(--pd-space-3) var(--pd-space-4); border-block-start: 1px solid var(--pd-border); border-block-end: 0; background: none; color: var(--pd-text); font: var(--pd-body-sm); font-weight: 600; text-align: start; vertical-align: top; border-radius: 0; }
.ftbl tbody tr:first-child > * { border-block-start: 0; }
.ftbl-scroll { position: relative; overflow-x: auto; border-radius: var(--pd-radius-md); }
.ftbl-scroll .ftbl { min-width: 720px; }
.ftbl tbody tr:nth-child(n + 2) > * { border-block-start: 1px solid var(--pd-border); }
.ftbl .shas dt, .ftbl .shas dd { margin: 0; min-block-size: 24px; display: flex; align-items: center; gap: var(--pd-space-1); }
/* Each sha link is a target of at least 24 px (WCAG 2.5.8). */
.ftbl .shas a { display: inline-flex; align-items: center; min-block-size: 24px; }
.ftbl .shas .mono { font: var(--pd-code-sm); }
.ftbl .fpush { display: flex; align-items: center; gap: var(--pd-space-2); }
.ftbl .ftime { margin-block-start: 2px; }
.folios-banner { margin-block-end: var(--pd-space-4); flex-wrap: wrap; align-items: center; }
/* The text keeps a useful width. When the button does not fit beside it,
   the button goes to a row of its own. */
.folios-banner > .grow { flex: 1 1 16rem; min-inline-size: 0; }
/* A folio menu can hold 100 folios. It scrolls, and the focus stays in
   view: the arrow keys move the focus, and the focus scrolls the menu. */
.menu.scroll { max-block-size: min(60vh, 480px); overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: var(--pd-space-2); }
.compare { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; padding: var(--pd-space-4); font: var(--pd-body-sm); }
.select { display: inline-flex; align-items: center; gap: var(--pd-space-2); min-height: 32px; padding: 0 10px; font: var(--pd-body-sm); color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); cursor: pointer; }
.select:hover { background: var(--pd-surface-sunken); }

/* Files tab and diffs */
.ftool { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; margin-bottom: var(--pd-space-4); font: var(--pd-body-sm); }
.ftool .grow { flex: 1; }
.fgrid { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: var(--pd-space-5); align-items: start; }
.ftree { position: sticky; top: var(--pd-space-4); font: var(--pd-body-sm); }
.ftree .filt { margin-bottom: var(--pd-space-2); }
.ftree ul { list-style: none; margin: 0; padding: 0; }
.ftree ul ul { padding-inline-start: var(--pd-space-4); }
.ftree li > a, .ftree li > span { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 var(--pd-space-2); border-radius: var(--pd-radius-md); color: var(--pd-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftree li > span { color: var(--pd-text-secondary); }
.ftree li > a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.ftree li > a.sel { background: var(--pd-accent-subtle); color: var(--pd-accent); }
.ftree li > a .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ftree .i { color: var(--pd-text-secondary); }
.ftree .add { color: var(--pd-diff-added-text); font: var(--pd-code-sm); font-size: 11px; }
.ftree .del { color: var(--pd-diff-removed-text); font: var(--pd-code-sm); font-size: 11px; }
.dfile { margin-bottom: var(--pd-space-4); }
/* The header of a file card wraps when its parts do not fit, as at 320
   px. Then no part goes past the edge of the window (WCAG 1.4.10). A line
   of the header breaks before the path is less than 8rem wide, so the
   path does not shrink to one letter on each line. The path takes the
   free space of its line before the spacer, and grows to its text and no
   more. Thus a short path keeps its place, and a long path is one line
   where it fits. The path is 24 px high (WCAG 2.5.8). When the parts fit,
   the header is one line. */
.dfile .card-h { position: sticky; top: 0; z-index: 2; font: var(--pd-code-sm); gap: var(--pd-space-2); flex-wrap: wrap; }
.dfile .card-h .path { color: var(--pd-text); font-weight: 600; flex: 1000 1 8rem; max-inline-size: max-content; min-block-size: 24px; display: inline-flex; align-items: center; }
.dfile .card-h .grow { flex: 1; }
.dfile.collapsed .card-h { border-bottom: 0; border-radius: var(--pd-radius-md); }
.dstat { display: inline-flex; gap: 6px; font: var(--pd-code-sm); }
.dstat .a { color: var(--pd-diff-added-text); }
.dstat .d { color: var(--pd-diff-removed-text); }
.diff { width: 100%; border-collapse: collapse; table-layout: fixed; font: var(--pd-code); }
.diff td { padding: 0 var(--pd-space-2); vertical-align: top; white-space: pre-wrap; word-break: break-word; }
.diff td.ln { width: 52px; text-align: end; color: var(--pd-text-secondary); user-select: none; font: var(--pd-code-sm); line-height: 20px; cursor: pointer; }
.diff td.ln:hover { color: var(--pd-link); }
.diff td.mk { width: 20px; padding: 0; text-align: center; user-select: none; }
.diff tr.hunk td { background: var(--pd-surface-sunken); color: var(--pd-text-secondary); font: var(--pd-code-sm); line-height: 20px; padding-top: 4px; padding-bottom: 4px; }
.diff tr.hunk td.hx { text-align: center; color: var(--pd-text-secondary); }
.diff .add { background: var(--pd-diff-added-bg); color: var(--pd-diff-added-text); }
.diff .del { background: var(--pd-diff-removed-bg); color: var(--pd-diff-removed-text); }
.diff .emp { background: var(--pd-surface-sunken); }
.diff.split td.ln.r { border-inline-start: 1px solid var(--pd-border); }
.diff tr.tline td { padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface-sunken); border-top: 1px solid var(--pd-border); border-bottom: 1px solid var(--pd-border); white-space: normal; font: var(--pd-body-sm); }
.diff tr.tline .thread { margin: 0; background: var(--pd-surface); max-width: 760px; }
.diff tr.tline .thread .th { font: var(--pd-body-sm); }
.lnplus { position: relative; }
.diff tr:hover td.ln.can::after { content: "+"; }
.loadmore { padding: var(--pd-space-5); text-align: center; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.loadmore p { margin: 0 0 var(--pd-space-3); }
/* The diff view. A line number is in data-n, so a copy of the code leaves it out.
   The counts outside the code take the brand tokens growth and danger. */
.diff td.ln a[data-n] { display: block; color: inherit; text-decoration: none; }
.diff td.ln a[data-n]::before { content: attr(data-n); }
.diff tr[id], .diff td[id] { scroll-margin-top: 56px; }
/* The header row of a diff table names the columns for a screen reader only. */
.diff thead th { padding: 0; height: 0; border: 0; }
/* The threads of a file above its body, and a thread in its row. */
.dthreads { padding-block-start: var(--pd-space-4); border-block-end: 1px solid var(--pd-border); border-radius: 0; }
.dthreads .thread .th { font: var(--pd-body-sm); }
.thread .tc .md > :first-child { margin-block-start: 0; }
.thread .tc .md > :last-child { margin-block-end: 0; }
.thread .tmore { padding: var(--pd-space-2) var(--pd-space-3); border-block-start: 1px solid var(--pd-border); font: var(--pd-caption); color: var(--pd-text-secondary); }
.dfile [data-collapse] svg { transition: transform 0.1s; }
.dfile [data-collapse][aria-expanded="false"] svg { /* rtl: rotate(90deg), so that the closed chevron points to the inline end. */ transform: rotate(-90deg); }
.dfile .card-h a.path { overflow-wrap: anywhere; }
.dstat .a, .ftree .add { color: var(--pd-growth); }
.dstat .d, .ftree .del { color: var(--pd-danger); }
.blocks i.a { background: var(--pd-growth); }
.dimg { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--pd-space-5); padding: var(--pd-space-5); background: var(--pd-surface-sunken); }
.dimg figure { margin: 0; text-align: center; font: var(--pd-caption); color: var(--pd-text-secondary); }
.dimg img { display: block; max-width: 100%; max-height: 480px; margin-bottom: var(--pd-space-2); border: 2px solid var(--pd-border); background: var(--pd-surface); }
.dimg figure.del img { border-color: var(--pd-danger); }
.dimg figure.add img { border-color: var(--pd-growth); }
.cparent { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-3); margin-bottom: var(--pd-space-4); font: var(--pd-body-sm); }
.chead .sha.full { color: var(--pd-text); min-width: 0; word-break: break-all; }
.chead .cmeta .kv { min-width: 0; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--pd-border); padding: var(--pd-space-5) 0 var(--pd-space-6); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.foot .wrap { display: flex; align-items: center; gap: var(--pd-space-5); flex-wrap: wrap; }
.foot .who { display: flex; align-items: center; gap: var(--pd-space-2); }
.foot nav { display: flex; gap: var(--pd-space-4); flex-wrap: wrap; }
.foot a { color: var(--pd-text-secondary); }
.foot a:hover { color: var(--pd-link); }
.foot .tagline { margin-inline-start: auto; font-style: italic; }
/* Chinese, Japanese and Korean have no italic. A browser only slants the glyphs. */
.foot .tagline:is(:lang(zh), :lang(ja), :lang(ko)) { font-style: normal; }

/* The language menu, in the footer and below the sign-in column. It opens up,
   because the footer is the end of the page. The summary and the items are 32 px
   high, above the 24 px of WCAG 2.5.8. */
.langbtn { gap: 6px; font: var(--pd-caption); font-weight: 500; color: var(--pd-text-secondary); }
.langbtn .nm { white-space: nowrap; }
.foot .langmenu { margin-inline-start: calc(var(--pd-space-3) * -1); }
.langmenu > .menu { inset-block-start: auto; inset-block-end: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: auto; min-inline-size: 220px; max-inline-size: calc(100vw - 2 * var(--pd-space-4)); }
.langmenu .menu .mi:not(.sel) .i { visibility: hidden; }
.langmenu .menu .mi.sel { background: var(--pd-accent-subtle); color: var(--pd-accent); font-weight: 500; }
.langmenu .menu .mh { padding-block: var(--pd-space-2); }
/* Below the sign-in column the links are in the center, so a menu from the start of the
   summary can pass the edge of a 320 px screen. There the menu is in the center of the foot.
   It opens down, because a menu that opens up covers part of the sign-in form (WCAG 2.5.8). */
.authfoot { position: relative; }
.authfoot .langmenu { position: static; }
.authfoot .langmenu > .menu { inset-block-start: calc(100% + 6px); inset-block-end: auto; inset-inline: 0; margin-inline: auto; inline-size: max-content; }

/* ---------- Narrow screens (390 px check) ---------- */
@media (max-width: 860px) {
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .ftree { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--pd-space-4); }
  .gbar { height: 56px; gap: var(--pd-space-1); }
  .gbar .brand .lk { display: none; }
  .gbar .brand .mk { display: block; }
  .gsearch { display: none; }
  .gbar .wide-only { display: none; }
  .gbar .narrow-only { display: inline-flex; }
  .phead { padding-top: 0; flex-wrap: wrap; }
  .crumbs { font: var(--pd-body-sm); }
  main { padding-top: var(--pd-space-5); }
  .card-h, .comment .body { padding-inline-start: var(--pd-space-3); padding-inline-end: var(--pd-space-3); }
  .qbar { flex-wrap: wrap; }
  .qbar .qbox { flex-basis: 100%; order: 3; }
  .qbar > .btn-primary { margin-inline-start: auto; }
  .ilist .filters .wide-only { display: none; }
  .ilist .filters .narrow-only { display: inline-flex; }
  .irow { grid-template-columns: 20px minmax(0, 1fr); padding: var(--pd-space-3); }
  .irow .r { grid-column: 2; gap: var(--pd-space-3); padding-top: 0; }
  .irow .r .st { width: auto; order: -1; }
  .irow .r .avs { width: auto; }
  .irow .r .cmt.zero { display: none; }
  .home-title { flex-direction: column; align-items: flex-start; }
  .foot .tagline { margin-inline-start: 0; }
  .list-foot { flex-direction: column; gap: var(--pd-space-2); align-items: flex-start; }
  /* The short ID and the time of the last commit go on two lines when they do not fit, so they
     do not cover the History button. */
  .lastc .meta, .files .last .meta { flex-wrap: wrap; row-gap: 0; white-space: normal; }
}
.narrow-only { display: none; }

/* Merge box states, from data-state on .mbox */
.mbox:not([data-state="clean"]) .only-clean,
.mbox:not([data-state="checking"]) .only-checking,
.mbox:not([data-state="conflict"]) .only-conflict,
.mbox[data-state="conflict"] .not-conflict { display: none; }
.mbox:not([data-state="clean"]) .only-clean-inline,
.mbox:not([data-state="clean"]) .only-clean-inline + .btn,
.mbox[data-state="clean"] .not-clean-inline { display: none; }
.mform-d summary { list-style: none; width: max-content; }
.mform-d summary::-webkit-details-marker { display: none; }

/* Diff views, from data-view on #files-root */
#files-root[data-view="split"] .diff.uni { display: none; }
#files-root:not([data-view="split"]) .diff.split { display: none; }
#files-root .thread .diff.uni { display: table; }
.md pre .btn-icon { opacity: 0; background: var(--pd-surface); border-color: var(--pd-border); transition: opacity 150ms ease-out; }
.md pre:hover .btn-icon, .md pre .btn-icon:focus-visible { opacity: 1; }




/* ---------- Code in the code theme of the user ----------
   Inside .lumis, the colors come from the --ct-* variables of code-themes.css.
   The interface around the code keeps the brand tokens. */
.lumis { font-family: var(--pd-font-mono); font-variant-ligatures: normal; }
.diff.lumis td.ln, .diff.lumis td.mk { color: var(--ct-ln); }
.diff.lumis td.ln:hover { color: var(--ct-fg); }
.diff.lumis tr.add td, .diff.lumis td.add { background: var(--ct-add-bg); color: var(--ct-fg); }
.diff.lumis tr.del td, .diff.lumis td.del { background: var(--ct-del-bg); color: var(--ct-fg); }
.diff.lumis tr.add td.ln, .diff.lumis td.ln.add { background: var(--ct-add-ln); color: var(--ct-fg); }
.diff.lumis tr.del td.ln, .diff.lumis td.ln.del { background: var(--ct-del-ln); color: var(--ct-fg); }
.diff.lumis tr.add td.mk, .diff.lumis td.mk.add, .diff.lumis tr.del td.mk, .diff.lumis td.mk.del { color: var(--ct-fg); }
.diff.lumis tr.hunk td { background: var(--ct-hunk-bg); color: var(--ct-hunk-fg); }
.diff.lumis .emp { background: var(--ct-empty); }
.diff.lumis.split td.ln.r { border-inline-start-color: var(--ct-rule); }
.diff.lumis tr.tline td, .diff.lumis tr.tline td.emp { background: var(--pd-surface-sunken); color: var(--pd-text); font-family: var(--pd-font-sans); border-color: var(--pd-border); }
.dbody { overflow-x: auto; border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); }
.thread .diff.lumis { border-bottom: 1px solid var(--pd-border); }
/* The line of #{file}L{n} or #{file}R{n} takes the target color of the code theme.
   It comes after the colors of the added and removed lines, so it wins over them. */
.diff.lumis tr:target td, .diff.lumis td.ln:target, .diff.lumis td.ln:target + td, .diff.lumis td.ln:target + td + td { background: var(--ct-target); color: var(--ct-fg); }

/* The code of a file. The rows are 24 px high, so that each line number link
   is a target of 24 px (WCAG 2.5.8). The font of the code stays 14 px. */
.codewrap { overflow-x: auto; padding: var(--pd-space-2) 0; border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); }
.codeview { border-collapse: collapse; font: var(--pd-code); min-width: 100%; }
.codeview td { padding-block: 0; padding-inline: var(--pd-space-3) var(--pd-space-4); vertical-align: top; white-space: pre; line-height: 24px; }
.codeview td.ln { width: 1%; min-width: 64px; text-align: end; color: var(--ct-ln); user-select: none; padding-block: 0; padding-inline: var(--pd-space-4) var(--pd-space-3); font: var(--pd-code-sm); line-height: 24px; }
.codeview td.ln a { color: inherit; display: block; }
.codeview td.ln a:hover { color: var(--ct-fg); text-decoration: none; }
.codeview tr.target td { background: var(--ct-target); }
/* The line of #L{n} with no script. pelladrin.js marks a range with .target. */
.codeview:not(.js-lines) tr:target td { background: var(--ct-target); }
.codeview tr.target td.ln, .codeview:not(.js-lines) tr:target td.ln { color: var(--ct-fg); }
.codecut { padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); background: var(--pd-surface-sunken); font: var(--pd-body-sm); color: var(--pd-text-secondary); display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--pd-space-5); }
.field { display: grid; gap: var(--pd-space-1); align-content: start; }
.flabel { font: var(--pd-body-sm); font-weight: 600; color: var(--pd-text); }
.flabel .opt { font-weight: 400; color: var(--pd-text-secondary); }
.help { font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); margin: 0; }
.help code { font: var(--pd-code-sm); }
.ferr { display: flex; align-items: center; gap: 6px; font: var(--pd-caption); font-weight: 500; color: var(--pd-danger); margin: 0; }
input.text[aria-invalid="true"] { border-color: var(--pd-danger); }
select.text { width: 100%; min-height: 36px; padding: 0 var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); }
input.text.mono { font: var(--pd-code-sm); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pd-space-4); }
.actions { display: flex; gap: var(--pd-space-2); align-items: center; flex-wrap: wrap; }
.actions .grow { flex: 1; }
.radio-list { display: grid; gap: var(--pd-space-3); border: 0; margin: 0; padding: 0; }
.radio-list legend { padding: 0; margin-bottom: var(--pd-space-2); }
.radio-list label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--pd-space-2); align-items: start; cursor: pointer; font: var(--pd-body-sm); }
.radio-list input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--pd-accent); }
.radio-list strong { display: block; font-weight: 600; }
.radio-list .desc { display: block; color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; margin-top: 2px; }
.radio-list label.dis { color: var(--pd-text-disabled); cursor: not-allowed; }
.radio-list label.dis .desc { color: var(--pd-text-secondary); }
/* Forced colors replace the token of a disabled text, so a disabled
   choice looks like the others. GrayText marks it again. A button that
   data-once marks with aria-disabled gets no GrayText from the browser,
   as a disabled button does. */
@media (forced-colors: active) {
  .radio-list label.dis, .radio-list label.dis .desc, .btn[aria-disabled="true"] { color: GrayText; border-color: GrayText; }
}

/* A Markdown editor with Write and Preview */
.editor { border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); background: var(--pd-surface); }
.editor .etop { display: flex; align-items: center; gap: var(--pd-space-1); padding: var(--pd-space-1) var(--pd-space-2); border-bottom: 1px solid var(--pd-border); background: var(--pd-surface-sunken); border-radius: var(--pd-radius-md) var(--pd-radius-md) 0 0; flex-wrap: wrap; }
.editor .etop .seg { background: transparent; border-color: transparent; }
.editor .etop .grow { flex: 1; }
.editor .etop .btn-icon { width: 32px; height: 32px; }
/* The comment editor writes Markdown in the monospace face, by default. */
.editor textarea.text { display: block; border: 0; border-radius: 0; min-height: 180px; background: transparent; font: var(--pd-code); padding: var(--pd-space-3); }
.editor textarea.text:focus-visible { outline: 2px solid var(--pd-focus-ring); outline-offset: -2px; }
.editor .epre { padding: var(--pd-space-4); min-height: 180px; }
.editor .efoot { display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); border-top: 1px dashed var(--pd-border); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.editor .efoot .grow { flex: 1; }
/* The control Attach files: the input is hidden, and its label is
   the button. The label shows the focus of the input. */
.editor .efoot { flex-wrap: wrap; }
.editor .eattach { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2); margin-inline-start: auto; }
.editor .eattach[hidden] { display: none; }
.editor .eattach-lbl { display: inline-flex; align-items: center; gap: 4px; min-block-size: 24px; color: var(--pd-link); font-weight: 500; cursor: pointer; border-radius: var(--pd-radius-sm); }
.editor .eattach-lbl:hover { text-decoration: underline; }
.editor .eattach input:focus-visible + .eattach-lbl { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.editor.edrop { outline: 2px dashed var(--pd-focus-ring); outline-offset: 2px; }
.editor .eups { list-style: none; margin: 0; padding: var(--pd-space-2) var(--pd-space-3); border-top: 1px solid var(--pd-border); display: flex; flex-direction: column; gap: var(--pd-space-2); font: var(--pd-caption); font-weight: 400; }
.editor .eups[hidden] { display: none; }
.editor .eups li { display: flex; align-items: center; gap: var(--pd-space-2); flex-wrap: wrap; }
.editor .eups .eup-name { font-weight: 600; overflow-wrap: anywhere; }
.editor .eups .eup-err { color: var(--pd-danger); font-weight: 500; flex: 1 1 16rem; }
.editor .eups .eup-busy { color: var(--pd-text-secondary); flex: 1 1 16rem; }
/* The use and the quota of the attachments in the settings. */
.q-use { display: flex; flex-direction: column; gap: var(--pd-space-1); margin-block-start: var(--pd-space-3); }
.q-line { margin: 0; font: var(--pd-body-sm); }
.q-meter { inline-size: 100%; max-inline-size: 28rem; block-size: 10px; }
.q-row { display: flex; gap: var(--pd-space-2); align-items: center; max-inline-size: 20rem; }
.q-row input.text { flex: 1 1 8rem; min-inline-size: 0; }
.q-row select.q-unit { flex: 0 0 auto; inline-size: auto; }

/* ---------- Sign-in ---------- */
body.auth { min-height: 100vh; display: flex; flex-direction: column; }
.authbar { display: flex; justify-content: flex-end; padding: var(--pd-space-3) var(--pd-space-4); }
.auth main { flex: 1; display: flex; justify-content: center; padding: var(--pd-space-4) var(--pd-space-4) var(--pd-space-8); }
.authcol { width: 100%; max-width: 400px; }
.authcol .brandmark { display: flex; justify-content: center; margin: 0 0 var(--pd-space-5); }
.authcol .brandmark img { height: 112px; width: auto; }
.authcol h1 { text-align: center; margin: 0 0 var(--pd-space-2); color: var(--pd-text); }
.authcol .sub { text-align: center; margin: 0 0 var(--pd-space-6); color: var(--pd-text-secondary); font: var(--pd-body); }
.authpanel { padding: var(--pd-space-6); }
.authpanel > .banner { margin-bottom: var(--pd-space-4); }
.authpanel .form { gap: var(--pd-space-4); }
.authpanel .btn-primary.full { width: 100%; }
.authpanel .lrow { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pd-space-3); }
.authpanel .lrow a { font: var(--pd-caption); font-weight: 500; }
.authalt { margin-top: var(--pd-space-4); padding: var(--pd-space-4); text-align: center; font: var(--pd-body-sm); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.authfoot { display: flex; justify-content: center; align-items: center; gap: var(--pd-space-4); flex-wrap: wrap; margin-top: var(--pd-space-6); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.authfoot a { color: var(--pd-text-secondary); }
.authfoot a:hover { color: var(--pd-link); }
.or { display: flex; align-items: center; gap: var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--pd-border); }
input.text.otp { font: var(--pd-code); font-size: 22px; letter-spacing: 0.4em; text-align: center; height: 52px; padding-inline-start: 0.4em; }
.factor-ic { width: 48px; height: 48px; margin: 0 auto var(--pd-space-3); border-radius: var(--pd-radius-full); background: var(--pd-accent-subtle); color: var(--pd-accent); display: flex; align-items: center; justify-content: center; }
.authpanel h2 { font: var(--pd-heading-md); margin: 0 0 var(--pd-space-1); text-align: center; }
.authpanel .who-line { text-align: center; font: var(--pd-body-sm); color: var(--pd-text-secondary); margin: 0 0 var(--pd-space-5); }
#auth[data-step="password"] .step-2fa, #auth[data-step="error"] .step-2fa, #auth[data-step="2fa"] .step-password { display: none; }
#auth:not([data-step="error"]) .only-error { display: none; }
.factors { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.factors a { display: flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-body-sm); padding: 6px var(--pd-space-2); border-radius: var(--pd-radius-md); }
.factors a:hover { background: var(--pd-surface-sunken); text-decoration: none; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: var(--pd-space-7); align-items: start; }
.dside h2 { font: var(--pd-heading-sm); margin: 0; }
.dside .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--pd-space-3); }
.dside .seg { display: flex; margin-bottom: var(--pd-space-3); }
.dside .seg button { flex: 1; justify-content: center; }
.dside .filter { margin-bottom: var(--pd-space-2); }
.dside section { margin-bottom: var(--pd-space-6); }
.plist { list-style: none; margin: 0 0 var(--pd-space-2); padding: 0; display: grid; gap: 2px; }
.plist a { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; padding: 6px var(--pd-space-2); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); color: var(--pd-text); }
.plist a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.plist .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .path b { font-weight: 600; }
.plist .role { font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.dsec { margin-bottom: var(--pd-space-6); }
.dsec > .head { display: flex; align-items: center; gap: var(--pd-space-3); margin-bottom: var(--pd-space-3); flex-wrap: wrap; }
.dsec > .head h2 { font: var(--pd-heading-md); margin: 0; }
.dsec > .head .count { font: var(--pd-caption); padding: 0 6px; min-width: 20px; line-height: 18px; text-align: center; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); }
.dsec > .head .grow { flex: 1; }
.dsec > .head > a { font: var(--pd-body-sm); }
.dsec .empty-state { padding: var(--pd-space-6) var(--pd-space-5); }
/* The lists come first in the source, so that the focus reaches them
   first. On a wide screen, the projects take the column at the start. */
.dash-page { padding-block-start: var(--pd-space-6); }
.dash > .dmain { grid-column: 2; grid-row: 1; }
.dash > .dside { grid-column: 1; grid-row: 1; }
.dsec > .head h1 { font: var(--pd-heading-md); margin: 0; }
.dsec > .head > a { display: inline-flex; align-items: center; min-block-size: 24px; }
.dpart { margin: var(--pd-space-2) 0 0; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
/* A status stays in the accessibility tree while it is empty, so that a
   screen reader says its next text (WCAG 4.1.3). */
.dpart:not([role="status"]):empty { display: none; }
.dpart[role="status"]:empty { margin: 0; }
.dside .empty-state { padding: var(--pd-space-5) var(--pd-space-3); }
.plist .row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; padding: 6px var(--pd-space-2); font: var(--pd-body-sm); }
.plist[data-scope="own"] > li:not(.own), .plist[data-scope="member"] > li.own { display: none; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed .day { font: var(--pd-caption); color: var(--pd-text-secondary); padding: var(--pd-space-4) 0 var(--pd-space-2); }
.feed .day:first-child { padding-top: 0; }
.feed li.ev2 { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--pd-space-3); align-items: start; padding: var(--pd-space-3) 0; border-top: 1px solid var(--pd-border); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.feed .day + li.ev2 { border-top: 0; }
.feed li.ev2 .fic { width: 32px; height: 32px; border-radius: var(--pd-radius-full); background: var(--pd-surface); border: 1px solid var(--pd-border); display: flex; align-items: center; justify-content: center; color: var(--pd-text-secondary); }
.feed li.ev2 .fic.merged { background: var(--pd-state-merged); color: var(--pd-on-accent); border-color: transparent; }
.feed li.ev2 .fic.ok { background: var(--pd-growth-subtle); color: var(--pd-success); border-color: transparent; }
.feed li.ev2 .fic.bad { background: var(--pd-danger-subtle); color: var(--pd-danger); border-color: transparent; }
.feed li.ev2 strong { color: var(--pd-text); font-weight: 600; }
.feed li.ev2 .what { margin-top: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); background: var(--pd-surface); color: var(--pd-text); }
.feed li.ev2 .what .t { font-weight: 600; color: var(--pd-text); }
.feed li.ev2 .what .s { color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; margin-top: 2px; }
.feed li.ev2 .what p { margin: 2px 0 0; }
.feed li.ev2 time { white-space: nowrap; padding-top: 6px; }
.feed li.ev2 .txt { padding-top: 6px; min-width: 0; }
.feed li.ev2 .txt code { font: var(--pd-code-sm); }

/* ---------- Repository browse ---------- */
.browse { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: var(--pd-space-5); align-items: start; }
.browse .ftree { max-height: calc(100vh - 32px); overflow: auto; padding-block: 2px; padding-inline: 2px 4px; }
.browse .ftree .bsel { display: flex; gap: var(--pd-space-2); margin-bottom: var(--pd-space-2); }
.browse .ftree .bsel .menu-wrap { flex: 1; }
.browse .ftree .bsel .select { width: 100%; }
.browse .ftree .bsel .select .mono { flex: 1; text-align: start; font-size: 13px; }
.ftree li > a.dir .i:first-child { color: var(--pd-accent); }
.ftree li > a.cur-dir { color: var(--pd-text); font-weight: 600; }
.pathbar { display: flex; align-items: center; gap: var(--pd-space-2); flex-wrap: wrap; margin-bottom: var(--pd-space-3); min-height: 32px; }
.pathcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font: var(--pd-body); }
.pathcrumbs a { font-weight: 600; padding: 0 2px; border-radius: var(--pd-radius-sm); }
.pathcrumbs .sep { color: var(--pd-text-secondary); padding: 0 2px; }
.pathcrumbs .here { font-weight: 600; color: var(--pd-text); padding: 0 2px; }
.pathbar .grow { flex: 1; }
.lastc { display: flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); min-width: 0; }
.lastc .msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lastc .msg a { color: var(--pd-text-secondary); }
.lastc .msg a:hover { color: var(--pd-link); }
.lastc .names strong { color: var(--pd-text); }
.lastc .meta { display: flex; align-items: center; gap: var(--pd-space-3); white-space: nowrap; }
.btool { display: flex; align-items: center; gap: var(--pd-space-2); flex-wrap: wrap; padding: var(--pd-space-2) var(--pd-space-3); border-bottom: 1px solid var(--pd-border); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.btool .grow { flex: 1; }
.btool .sz { font-variant-numeric: tabular-nums; }
.seg a.seglink { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 var(--pd-space-3); border-radius: 6px; color: var(--pd-text-secondary); font: var(--pd-body-sm); font-weight: 500; }
.seg a.seglink:hover { color: var(--pd-text); text-decoration: none; }
.seg a.seglink[aria-current="page"] { background: var(--pd-surface); color: var(--pd-text); box-shadow: inset 0 0 0 1px var(--pd-border), var(--pd-shadow-sm); }
@media (max-width: 720px) {
  #files-root .seg a.seglink { min-block-size: 36px; }
}
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; margin-inline-start: -1px; }
.btn-group > .btn:first-child { border-start-start-radius: var(--pd-radius-md); border-start-end-radius: 0; border-end-end-radius: 0; border-end-start-radius: var(--pd-radius-md); margin-inline-start: 0; }
.btn-group > .btn:last-child { border-start-start-radius: 0; border-start-end-radius: var(--pd-radius-md); border-end-end-radius: var(--pd-radius-md); border-end-start-radius: 0; }
.btn-group > .btn:focus-visible { position: relative; z-index: 1; }
/* The branch picker: a details menu, as the menus of the header. */
.picker .select .lbl { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker.full > summary { width: 100%; }
.picker.full .select .lbl { max-width: none; flex: 1; text-align: start; font-size: 13px; }
.pmenu { width: 320px; max-width: calc(100vw - 32px); max-height: min(60vh, 480px); overflow-y: auto; }
.pmenu a .mono { overflow-wrap: anywhere; }
/* The file tree: a flat list. An SVG spacer before the link of an item shows its depth.
   The list scrolls, and not the
   tree, so that the menu of the picker can be wider than the tree. */
.browse .ftree { max-height: none; overflow: visible; }
.browse .ftree > ul { max-height: calc(100vh - 140px); overflow: auto; padding: 2px; }
/* The depth of an item is the width of an SVG spacer before its link, so the
   page needs no style attribute. */
.browse .ftree li[data-item] { display: flex; }
.browse .ftree li[data-item] > .ind { flex: none; }
.browse .ftree li[data-item] > a { flex: 1 1 auto; min-inline-size: 0; }
.ftree .nochev { width: 14px; flex: none; }
/* A copy button says "Copied" for a moment. */
.copy.done { color: var(--pd-success); }
/* The rendered Markdown of a file or a README, the image of a file, and the code theme menu. */
.readme-b { padding: var(--pd-space-5) var(--pd-space-6); }
.imgview { padding: var(--pd-space-5); text-align: center; }
.imgview img { max-width: 100%; height: auto; }
.ctheme .menu { width: 280px; }
.ctrow { display: flex; flex-direction: column; gap: var(--pd-space-1); padding: var(--pd-space-1) var(--pd-space-3) var(--pd-space-2); font: var(--pd-caption); color: var(--pd-text-secondary); }
.ctheme .desc { margin: 0; padding: 0 var(--pd-space-3) var(--pd-space-2); }

/* History, with the commit graph */
.hist-head { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; margin-bottom: var(--pd-space-4); }
.hist-head h1 { font: var(--pd-heading-lg); margin: 0; }
.hist-head .grow { flex: 1; }
.hrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 var(--pd-space-3); align-items: stretch; padding-block: 0; padding-inline: var(--pd-space-2) var(--pd-space-4); }
.hrow > .hc, .hrow > .ha { display: flex; align-items: center; border-top: 1px solid var(--pd-border); min-width: 0; }
.hrow:first-child > .hc, .hrow:first-child > .ha { border-top: 0; }
.hrow:hover { background: var(--pd-surface-sunken); }
.hrow .hc > div { min-width: 0; }
.hrow .msg { font: var(--pd-body-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .msg a { color: var(--pd-text); }
.hrow .msg a:hover { color: var(--pd-link); }
.hrow .by { display: flex; gap: var(--pd-space-2); align-items: center; margin-top: 2px; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); white-space: nowrap; }
.hrow .by .names strong { color: var(--pd-text); font-weight: 600; }
.hrow .ha { gap: var(--pd-space-2); justify-content: flex-end; }
.hrow .fc { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); min-width: 64px; white-space: nowrap; }
.hrow .chip { flex: none; }
.graph { display: block; flex: none; }
.graph path { fill: none; stroke-width: 2; stroke-linecap: round; }
.graph .g0 { stroke: var(--pd-accent); }
.graph .g1 { stroke: var(--pd-growth); }
.graph .g2 { stroke: var(--pd-info); }
.graph .g3 { stroke: var(--pd-warning); }
.graph circle { stroke-width: 2; }
.graph .n0 { fill: var(--pd-accent); stroke: var(--pd-accent); }
.graph .n1 { fill: var(--pd-growth); stroke: var(--pd-growth); }
.graph .n2 { fill: var(--pd-info); stroke: var(--pd-info); }
.graph .n3 { fill: var(--pd-warning); stroke: var(--pd-warning); }
.graph circle.m { fill: var(--pd-surface); }
.hrow:hover .graph circle.m { fill: var(--pd-surface-sunken); }
.hist.card { overflow: hidden; }
/* The list of the history has no graph, and a header for each day, as GitHub. */
.hist.list .hrow { grid-template-columns: minmax(0, 1fr) auto; padding-inline-start: var(--pd-space-4); }
.hist.list .hrow > .hc, .hist.list .hrow > .ha { min-height: 56px; }
.hist .fdiv + .hrow > .hc, .hist .fdiv + .hrow > .ha { border-top: 0; }
/* On a narrow screen a row keeps the graph, the message, the people and the short ID,
   as the commit list of GitHub on a phone. The other actions are on the page of the commit. */
@media (max-width: 720px) {
  .hrow { padding-inline-end: var(--pd-space-3); }
  .hrow .ha .fc, .hrow .ha .copy, .hrow .ha .btn-icon, .hrow .ha .chip { display: none; }
  .hrow .by { min-width: 0; }
  .hrow .by .names { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  /* A time that is wider than the row wraps, as in a language with long words. */
  .hrow .by > span:last-child { flex: none; max-inline-size: 100%; white-space: normal; }
}
.hist-renamed { display: flex; align-items: center; gap: var(--pd-space-2); flex-wrap: wrap; margin: var(--pd-space-3) 0 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }

/* One commit */
.chead { margin-bottom: var(--pd-space-5); }
.chead .top1 { display: flex; align-items: flex-start; gap: var(--pd-space-4); padding: var(--pd-space-4) var(--pd-space-5) var(--pd-space-3); }
.chead h1 { font: var(--pd-heading-lg); margin: 0; flex: 1; min-width: 0; }
.chead pre.body { margin: 0; padding: 0 var(--pd-space-5) var(--pd-space-4); font: var(--pd-code-sm); white-space: pre-wrap; color: var(--pd-text); max-width: 80ch; }
.chead .trailers { padding: 0 var(--pd-space-5) var(--pd-space-4); display: flex; gap: var(--pd-space-2); flex-wrap: wrap; font: var(--pd-body-sm); align-items: center; }
.chead .cmeta { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; padding: var(--pd-space-3) var(--pd-space-5); border-top: 1px solid var(--pd-border); background: var(--pd-surface-sunken); border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.chead .cmeta .names strong { color: var(--pd-text); }
.chead .cmeta .grow { flex: 1; }
.chead .cmeta .kv { display: inline-flex; align-items: center; gap: var(--pd-space-2); }

/* Blame */
.blame { border-collapse: collapse; width: 100%; font: var(--pd-code); table-layout: fixed; }
/* The rows are 24 px high, as in .codeview. */
.blame td { vertical-align: top; line-height: 24px; }
.blame td.bi { width: 380px; background: var(--pd-surface); color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; line-height: 20px; padding: 0 var(--pd-space-3); border-inline-end: 1px solid var(--pd-border); border-inline-start: 4px solid var(--age, var(--pd-border)); }
.blame tr.gs td { border-top: 1px solid var(--pd-border); }
.blame tr.gs td.bi { padding-top: 6px; }
.blame tr.gs td.ln, .blame tr.gs td.code { padding-top: 6px; }
.blame .bline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; }
.blame .bline .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pd-text); font: var(--pd-body-sm); }
/* The link of the commit is a target of 24 px, as the line of code beside it. */
.blame .bline .msg a { color: var(--pd-text); display: block; line-height: 24px; overflow: hidden; text-overflow: ellipsis; }
.blame .bline .msg a:hover { color: var(--pd-link); }
.blame .bline time { white-space: nowrap; }
.blame td.ln { width: 56px; text-align: end; color: var(--ct-ln); user-select: none; padding: 0 var(--pd-space-3); font: var(--pd-code-sm); line-height: 24px; }
.blame td.code { white-space: pre; padding-block: 0; padding-inline: var(--pd-space-2) var(--pd-space-4); overflow: hidden; }
.age-1 { --age: var(--pd-growth); }
.age-2 { --age: var(--pd-text-secondary); }
.age-3 { --age: var(--pd-border-strong); }
.age-4 { --age: var(--pd-border); }
.agekey { display: inline-flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.agekey i { width: 12px; height: 12px; border-radius: 2px; background: var(--age); display: inline-block; border: 1px solid var(--pd-border); }
/* The blame page. The column of commits is 380 px wide, 220 px on a narrow screen.
   The rows take #L{n} as on the file page. */
.blamewrap { overflow-x: auto; border-radius: 0 0 var(--pd-radius-md) var(--pd-radius-md); }
.blame col.bic { width: 380px; }
.blame .bmeta { display: flex; gap: var(--pd-space-2); align-items: center; margin-top: 2px; min-height: 24px; white-space: nowrap; }
.blame .bmeta .names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.blame .bmeta .grow { flex: 1; }
/* The button keeps its 24 px in the narrow bar of 220 px. */
.blame .bmeta .btn-icon { width: 24px; height: 24px; min-height: 24px; padding: 0; flex-shrink: 0; }
.blame td.ln a { color: inherit; display: block; }
.blame td.ln a:hover { color: var(--ct-fg); text-decoration: none; }
.blame tr.target td.ln, .blame tr.target td.code, .blame:not(.js-lines) tr:target td.ln, .blame:not(.js-lines) tr:target td.code { background: var(--ct-target); color: var(--ct-fg); }
/* A selected line range of the file view and of blame keeps its band, and each row
   gets a bar of 3 px in the accent color at its start. The bar has 3:1 or more on the band
   (WCAG 1.4.11). An inset shadow does not move the layout. The comment range of the review
   page keeps its own mark. */
.codeview tr.target td.ln, .codeview:not(.js-lines) tr:target td.ln, .blame tr.target td.ln, .blame:not(.js-lines) tr:target td.ln { box-shadow: inset 3px 0 0 var(--pd-accent); }
.codeview tr.target td.ln:dir(rtl), .codeview:not(.js-lines) tr:target td.ln:dir(rtl), .blame tr.target td.ln:dir(rtl), .blame:not(.js-lines) tr:target td.ln:dir(rtl) { box-shadow: inset -3px 0 0 var(--pd-accent); }
.agekeys { display: inline-flex; gap: 6px; align-items: center; }
.card > .pager { margin: 0; padding: var(--pd-space-2); border-top: 1px solid var(--pd-border); }
@media (max-width: 860px) { .blame col.bic { width: 220px; } }

/* Compare */
.cmpbar { display: flex; align-items: center; gap: var(--pd-space-2); flex-wrap: wrap; padding: var(--pd-space-3) var(--pd-space-4); font: var(--pd-body-sm); }
.cmpbar .ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--pd-success); margin-inline-start: var(--pd-space-3); }
.cmpbar .ok .muted { font-weight: 400; }
.cmpbar .ok.bad { color: var(--pd-danger); }
.cmp-note { font: var(--pd-body-sm); margin: 0 0 var(--pd-space-2); }
.sums { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--pd-border); }
.sums > * { display: flex; align-items: center; justify-content: center; gap: var(--pd-space-2); padding: var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); border-inline-start: 1px solid var(--pd-border); }
.sums > :first-child { border-inline-start: 0; }
.sums strong { color: var(--pd-text); }
#cmp[data-pr="open"] .only-nopr, #cmp[data-pr="none"] .only-pr { display: none; }
.cmp-sec { font: var(--pd-heading-sm); margin: var(--pd-space-6) 0 var(--pd-space-3); display: flex; align-items: center; gap: var(--pd-space-2); }
/* A section that folds: a details element with the heading in its summary. */
.fold > summary { list-style: none; cursor: pointer; border-radius: var(--pd-radius-md); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { font: inherit; margin: 0; display: flex; align-items: center; gap: var(--pd-space-2); }
.fold > summary .count { font: var(--pd-caption); padding: 0 6px; min-width: 20px; line-height: 18px; text-align: center; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); }
.fold > summary .fold-i { color: var(--pd-text-secondary); transition: transform 150ms ease-out; }
.fold:not([open]) > summary .fold-i { /* rtl: rotate(90deg), so that the closed chevron points to the inline end. */ transform: rotate(-90deg); }
.fold > summary .fold-hint { margin-inline-start: auto; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.fold > summary:hover .fold-hint { color: var(--pd-text); }
.fold:not([open]) > summary .only-open, .fold[open] > summary .only-closed { display: none; }
.fold:not([open]) > summary.cmp-sec { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .fold > summary .fold-i { transition: none; } }

/* Branches and tags */
.brow { display: grid; grid-template-columns: minmax(0, 1fr) 150px 132px 150px 96px; gap: var(--pd-space-4); align-items: center; padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); font: var(--pd-body-sm); }
.brow.hdr { border-top: 0; background: var(--pd-surface-sunken); font: var(--pd-caption); color: var(--pd-text-secondary); padding-top: var(--pd-space-2); padding-bottom: var(--pd-space-2); border-radius: var(--pd-radius-md) var(--pd-radius-md) 0 0; }
.brow .bn { display: flex; align-items: center; gap: var(--pd-space-2); min-width: 0; flex-wrap: wrap; }
/* A long name of a branch breaks, so the page does not scroll to the side at
   320 px (WCAG 1.4.10). */
.brow .bn a.ref { white-space: normal; overflow-wrap: anywhere; min-inline-size: 0; }
.brow .upd { color: var(--pd-text-secondary); display: flex; align-items: center; gap: var(--pd-space-2); }
.ab { display: grid; grid-template-columns: 1fr 1fr; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); font-variant-numeric: tabular-nums; }
.ab .b { text-align: end; padding-inline-end: 6px; border-inline-end: 1px solid var(--pd-border-strong); }
.ab .a { padding-inline-start: 6px; }
.ab .bar { height: 4px; margin-top: 3px; border-radius: 2px; background: var(--pd-border-strong); }
.ab .b .bar { margin-inline-start: auto; }
.ab .a .bar { background: var(--pd-accent); }
.brow .acts { display: flex; align-items: center; gap: var(--pd-space-1); justify-content: flex-end; }
.state-sm { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); padding-block: 1px; padding-inline: 6px 8px; line-height: 18px; border-radius: var(--pd-radius-full); color: var(--pd-on-accent); white-space: nowrap; }
.state-sm.open { background: var(--pd-state-open); }
.state-sm.merged { background: var(--pd-state-merged); }
.state-sm.closed { background: var(--pd-state-closed); }
.state-sm .i { color: inherit; }
/* The chip of a pull request links to it. The link is 24 px high (WCAG 2.5.8). */
a.state-sm { min-block-size: 24px; }
/* The column "Pull request" holds the chip and the link to a new pull request. The
   link text wraps in a long language, so the row does not get wider. */
.brow .pr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); min-inline-size: 0; }
.brow .bnew { white-space: normal; text-align: start; }
/* The branches page has no actions column yet, and the tags page has no release column. */
.brows .brow { grid-template-columns: minmax(0, 1fr) 150px 132px 168px; }
.brows.tags .brow { grid-template-columns: minmax(0, 1fr) 150px 96px auto; }
.refs .pager { justify-content: flex-end; gap: var(--pd-space-2); }
#tags-root[data-tags="none"] .only-tags, #tags-root[data-tags="some"] .only-notags { display: none; }

/* ---------- Issue ---------- */
.ihead h1 { font: var(--pd-heading-lg); margin: 0; overflow-wrap: anywhere; }
.ihead h1 .num { color: var(--pd-text-secondary); font-weight: 400; }
.ihead .titlerow { display: flex; align-items: flex-start; gap: var(--pd-space-3); }
.ihead .titlerow h1 { flex: 1; min-width: 0; }
.ihead .metarow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2) var(--pd-space-3); margin: var(--pd-space-3) 0 var(--pd-space-5); padding-bottom: var(--pd-space-5); border-bottom: 1px solid var(--pd-border); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.ihead .metarow strong { color: var(--pd-text); font-weight: 600; }
.ihead .metarow .status { font: var(--pd-body-sm); padding-block: 5px; padding-inline: 8px 10px; }
.side .fv { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--pd-space-2); align-items: center; font: var(--pd-body-sm); min-height: 28px; }
.side .fv > span:first-child { color: var(--pd-text-secondary); }
/* A custom field with its form: the name, the value, and the button of the menu. */
.side .fv.fedit { grid-template-columns: 88px minmax(0, 1fr) auto; }
.side .fv > span { overflow-wrap: anywhere; }
.menu .side-link fieldset { display: grid; gap: var(--pd-space-1); margin: 0; padding: 0; border: 0; min-width: 0; }
.menu .side-link legend { padding: 0; font: var(--pd-caption); font-weight: 500; }
.menu .side-link textarea { resize: vertical; }
.side .lgroup h3 { font: var(--pd-caption); color: var(--pd-text-secondary); margin: var(--pd-space-3) 0 2px; }
.side .lgroup h3:first-child { margin-block-start: var(--pd-space-2); }
.side .lrow { display: grid; grid-template-columns: 16px auto minmax(0, 1fr); gap: var(--pd-space-2); align-items: center; font: var(--pd-body-sm); min-height: 26px; }
.side .lrow .k { font: var(--pd-code-sm); color: var(--pd-text-secondary); }
.side .lrow .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pd-text); }
.side .lrow a.t:hover { color: var(--pd-link); }
.side .head .btn-icon { margin-inline-end: -6px; }
.side .mile { font: var(--pd-body-sm); }
.side .mile a { color: var(--pd-text); font-weight: 600; }
.side .meter { height: 8px; border-radius: 4px; background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); overflow: hidden; margin: 6px 0 4px; }
.side .meter i { display: block; height: 100%; background: var(--pd-success); }
.ev .txt .label, .ev .txt .status { vertical-align: 1px; }
.ev .txt a.k { font: var(--pd-code-sm); }
.ev .dotc.closed { background: var(--pd-state-closed); color: var(--pd-on-accent); border-color: transparent; }
.ev .dotc.merged { background: var(--pd-state-merged); color: var(--pd-on-accent); border-color: transparent; }
.ev .dotc.done { background: var(--pd-growth-subtle); color: var(--pd-success); border-color: transparent; }
.ev .dotc.bad2 { background: var(--pd-danger-subtle); color: var(--pd-danger); border-color: transparent; }
.ev .txt .del-word { text-decoration: line-through; }
#issue-root[data-mode="view"] .only-edit, #issue-root[data-mode="edit"] .only-view { display: none; }
.edit-title { display: flex; gap: var(--pd-space-2); align-items: center; flex-wrap: wrap; }
.edit-title input.text { font: var(--pd-heading-md); min-height: 44px; flex: 1; min-width: 240px; }

/* ---------- Issue pages, the read side ----------
   The parts of the read side: a read-only reaction, the gap of a long
   timeline, the gap of the pager, and the long filter menus. */
.react.ro { cursor: default; }
.react.ro:hover { background: var(--pd-surface); }
.tl-gap { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--pd-space-2); margin: 0 0 var(--pd-space-5); }
.pager .gap { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 32px; color: var(--pd-text-secondary); }
.imenu { max-height: 420px; overflow: auto; }
.menu.imenu a { flex-direction: column; align-items: flex-start; gap: 2px; }
.side .side-v { margin-top: var(--pd-space-2); }
.side .side-n { margin: var(--pd-space-2) 0 0; }
.qerror code { font: var(--pd-code-sm); }

/* The new issue form */
.newgrid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--pd-space-6); align-items: start; }
.newhead { display: flex; align-items: center; gap: var(--pd-space-3); margin-bottom: var(--pd-space-5); flex-wrap: wrap; }
.newhead h1 { margin: 0; font: var(--pd-heading-lg); }
.newhead .grow { flex: 1; }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: var(--pd-space-7); align-items: start; }
.snav { position: sticky; top: var(--pd-space-4); display: grid; gap: 2px; }
.snav .who { display: flex; align-items: center; gap: var(--pd-space-3); padding: 0 var(--pd-space-2) var(--pd-space-4); }
.snav .who strong { display: block; font: var(--pd-heading-sm); }
.snav .who > div { min-width: 0; overflow-wrap: anywhere; }
.snav .who span { font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
/* A long name of a part wraps in the column. On a narrow screen the list scrolls. */
.snav .tab { justify-content: flex-start; width: 100%; white-space: normal; }
.snav .tab .i { color: inherit; }
.snav .grp { font: var(--pd-caption); color: var(--pd-text-secondary); padding: var(--pd-space-4) var(--pd-space-3) var(--pd-space-1); }
/* A subcategory of the item above it, as the defaults under Projects. */
.snav .tab.sub { padding-inline-start: calc(var(--pd-space-3) + 20px); min-height: 32px; font: var(--pd-body-sm); }
.snav .tab.sub .i { width: 14px; height: 14px; }
/* The access of a member to the projects: a summary with the list in a popover. */
.accc .menu-wrap { display: inline-block; }
.accc .accbtn { min-height: 28px; padding: 2px 6px; margin-inline-start: -6px; font-weight: 600; color: var(--pd-text); }
.accmenu { min-width: 280px; }
.accmenu .acclist { max-height: 240px; overflow-y: auto; padding: 0 var(--pd-space-1); }
.accmenu .accrow { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-3); padding: 6px var(--pd-space-2); font: var(--pd-code-sm); }
.accmenu .mfoot { display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-2); font: var(--pd-body-sm); }
.chips { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); margin: 0; padding: 0; list-style: none; }
.spanel > :is(h1, h2) { font: var(--pd-heading-lg); margin-block: 0 var(--pd-space-1); overflow-wrap: anywhere; }
/* The account settings: the notice of a change under the heading of a part,
   and the username, which the page shows with no change. */
.spanel > .banner { margin: var(--pd-space-3) 0 var(--pd-space-4); }
.uname { margin: 0; }
textarea.text.mono { font: var(--pd-code-sm); }
textarea.text[aria-invalid="true"] { border-color: var(--pd-danger); }
/* A part with one form around its sections: no rule under the lead. */
.spanel > .lead + form > .ssec:first-of-type { border-top: 0; padding-top: 0; }
/* On a narrow screen the list of parts wraps, so that each part shows. */
@media (max-width: 860px) { .snav { flex-wrap: wrap; } }
.card > .nothing { margin: 0; padding: var(--pd-space-4); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.stable .who-c > .i { flex: none; color: var(--pd-text-secondary); }
/* A deletion asks to confirm in a disclosure, so it works with no script. */
.confirm .menu { min-width: 280px; white-space: normal; text-align: start; }
.confirm .menu .mh { margin: 0; font: var(--pd-body-sm); color: var(--pd-text); }
.confirm .menu form { padding: 0 var(--pd-space-3) var(--pd-space-2); }
/* A new access token shows once, in the notice. The token wraps, so the
   page shows all of it, and a drag or a triple click selects all of it. An
   ellipsis would cut the token, and a selection would get only the
   visible part.
   GitHub and Gitea show the full token as text, with a copy
   button. The copy button reads the text of #new-token, so the token stays
   text, not the value of a field. tests/settings.rs reads this rule. */
.copybox.newtoken { margin-block-start: var(--pd-space-2); background: var(--pd-surface); block-size: auto; min-block-size: 36px; padding-block: 4px; align-items: flex-start; }
.copybox.newtoken code { white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; padding-block: 5px; }
.stable .expired { color: var(--pd-danger); }
input.text.t-date { max-width: 220px; }
.spanel > .lead { margin: 0 0 var(--pd-space-5); color: var(--pd-text-secondary); font: var(--pd-body-sm); max-width: 80ch; }
.spanel code { font: var(--pd-code-sm); }
.ssec { padding: var(--pd-space-5) 0; border-top: 1px solid var(--pd-border); }
.spanel > .lead + .ssec { border-top: 0; padding-top: 0; }
.ssec > :is(h2, h3) { font: var(--pd-heading-md); margin-block: 0 var(--pd-space-1); display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; }
.ssec > :is(h2, h3) .grow { flex: 1; }
.ssec > p.d { margin: 0 0 var(--pd-space-4); font: var(--pd-body-sm); color: var(--pd-text-secondary); max-width: 80ch; }
.ssec .form { max-width: 640px; }
.inh { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.stable { width: 100%; border-collapse: collapse; font: var(--pd-body-sm); }
.stable th { text-align: start; font: var(--pd-caption); color: var(--pd-text-secondary); background: var(--pd-surface-sunken); padding: var(--pd-space-2) var(--pd-space-4); border-bottom: 1px solid var(--pd-border); white-space: nowrap; }
.stable th:first-child { border-start-start-radius: var(--pd-radius-md); }
.stable th:last-child { border-start-end-radius: var(--pd-radius-md); }
.stable td { padding: var(--pd-space-3) var(--pd-space-4); border-top: 1px solid var(--pd-border); vertical-align: middle; }
.stable tbody tr:first-child td { border-top: 0; }
.stable .t1 { font-weight: 600; color: var(--pd-text); }
.stable .sub { display: block; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); margin-top: 2px; }
.stable .acts { text-align: end; white-space: nowrap; }
.stable .num { text-align: end; font-variant-numeric: tabular-nums; color: var(--pd-text-secondary); white-space: nowrap; }
.stable select.text { width: auto; min-height: 32px; }
.stable .who-c { display: flex; align-items: center; gap: var(--pd-space-2); }
.stable .nw { white-space: nowrap; }
/* WCAG 1.4.10: a long word of user content, as a project name, a description or a member
   name, breaks inside the cell, so that the table fits 390 px. A short word does not break. */
.stable td { overflow-wrap: anywhere; }
.stable .who-c > div { min-width: 0; }
.stable .status { white-space: normal; }
.keyfp { font: var(--pd-code-sm); color: var(--pd-text-secondary); word-break: break-all; }
/* An SSH key: its type and its fingerprint, each with a label. */
.kmeta { display: flex; flex-wrap: wrap; gap: 2px var(--pd-space-4); margin-top: 2px; }
.kpart { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.kpart .kl { font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); flex: none; }
.kpart code { font: var(--pd-code-sm); color: var(--pd-text); word-break: break-all; }
/* The picture of an account: initials on a color, Gravatar, or an upload. */
.av.xxl { width: 64px; height: 64px; font-size: 22px; }
.avpick { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--pd-space-3) var(--pd-space-5); align-items: start; }
.avpick .avopts { display: grid; gap: var(--pd-space-3); }
.avpick .avsub { padding-inline-start: 28px; margin-top: calc(-1 * var(--pd-space-1)); }
.avpick .avi { background: color-mix(in srgb, var(--avc) 24%, var(--pd-surface)); color: var(--pd-text); border-color: var(--avc); font-weight: 600; }
.avpick .avg { overflow: hidden; padding: 0; background: none; }
.avpick .avu { background: var(--pd-surface-sunken); color: var(--pd-text-secondary); border-style: dashed; border-color: var(--pd-border-strong); }
.avpick:not([data-src="initials"]) .only-initials, .avpick:not([data-src="gravatar"]) .only-gravatar, .avpick:not([data-src="upload"]) .only-upload { display: none; }
.avpick .chip .i { color: var(--pd-success); }
.avpick label strong { display: inline-block; margin-inline-end: var(--pd-space-2); }
.dangerzone { border: 1px solid var(--pd-danger); border-radius: var(--pd-radius-md); background: var(--pd-surface); }
.dangerzone .dz { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pd-space-4); align-items: center; padding: var(--pd-space-4); border-top: 1px solid var(--pd-border); }
.dangerzone .dz:first-child { border-top: 0; }
.dangerzone h4 { margin: 0; font: var(--pd-body-sm); font-weight: 600; }
.dangerzone p { margin: 2px 0 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pd-space-3) var(--pd-space-5); }
.scopes .check { align-items: flex-start; }
.scopes .check input { margin-top: 2px; flex: none; }
.scopes .check .desc { display: block; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.scopes .check code { font: var(--pd-code-sm); }

/* Theme cards. The previews draw each theme with the ramp primitives of tokens.css,
   because a preview must show a theme that is not the theme of the page. */
.optcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pd-space-4); }
.optcard { position: relative; display: block; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); background: var(--pd-surface); cursor: pointer; overflow: hidden; }
.optcard:hover { border-color: var(--pd-border-strong); }
.optcard:has(input:checked) { border-color: var(--pd-accent); box-shadow: inset 0 0 0 1px var(--pd-accent); }
.optcard:has(input:focus-visible) { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.optcard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.optcard .cap { display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-3); font: var(--pd-body-sm); font-weight: 600; border-top: 1px solid var(--pd-border); }
.optcard .cap .desc { font-weight: 400; color: var(--pd-text-secondary); margin-inline-start: auto; font: var(--pd-caption); }
.optcard .rdot { width: 16px; height: 16px; flex: none; border-radius: var(--pd-radius-full); border: 1px solid var(--pd-border-strong); display: inline-flex; align-items: center; justify-content: center; }
.optcard:has(input:checked) .rdot { border-color: var(--pd-accent); }
.optcard:has(input:checked) .rdot::after { content: ""; width: 8px; height: 8px; border-radius: var(--pd-radius-full); background: var(--pd-accent); }
.pv { height: 104px; display: grid; grid-template-columns: 34% 1fr; }
.pv .pvs, .pv .pvm { padding: 10px; display: grid; gap: 6px; align-content: start; }
.pv i { display: block; height: 8px; border-radius: 4px; }
.pv .pvcard { border-radius: 6px; padding: 8px; display: grid; gap: 6px; }
.pv .w60 { width: 60%; } .pv .w80 { width: 80%; } .pv .w40 { width: 40%; }
.pv.light, .pv .light { background: var(--pd-neutral-50); }
.pv.light .pvs, .pv .light .pvs { background: var(--pd-neutral-0); border-inline-end: 1px solid var(--pd-neutral-200); }
.pv.light .pvcard, .pv .light .pvcard { background: var(--pd-neutral-0); border: 1px solid var(--pd-neutral-200); }
.pv.light i, .pv .light i { background: var(--pd-neutral-200); }
.pv.light i.a, .pv .light i.a { background: var(--pd-mulberry-700); }
.pv.light i.t, .pv .light i.t { background: var(--pd-neutral-600); }
.pv.dark, .pv .dark { background: var(--pd-neutral-950); }
.pv.dark .pvs, .pv .dark .pvs { background: var(--pd-neutral-900); border-inline-end: 1px solid var(--pd-neutral-800); }
.pv.dark .pvcard, .pv .dark .pvcard { background: var(--pd-neutral-900); border: 1px solid var(--pd-neutral-800); }
.pv.dark i, .pv .dark i { background: var(--pd-neutral-800); }
.pv.dark i.a, .pv .dark i.a { background: var(--pd-mulberry-300); }
.pv.dark i.t, .pv .dark i.t { background: var(--pd-neutral-400); }
.pv.sys { grid-template-columns: 1fr 1fr; }
.pv.sys > * { display: grid; grid-template-columns: 34% 1fr; }
.ctgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pd-space-5); }
.ctgrid .ctcol { display: grid; gap: var(--pd-space-2); align-content: start; min-width: 0; }
.ctprev { margin: 0; padding: var(--pd-space-3) var(--pd-space-4); font: var(--pd-code-sm); line-height: 20px; border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); overflow-x: auto; white-space: pre; }
.ctaa { display: flex; align-items: center; gap: 6px; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); margin: 0; min-height: 20px; }
.ctaa .i { flex: none; }
.ctaa.ok .i { color: var(--pd-success); }
.ctaa.low .i { color: var(--pd-warning); }
.ctnote { margin-top: var(--pd-space-4); }
/* The notice of a save of the appearance that failed (pelladrin.js). */
.savenote { margin-top: var(--pd-space-3); }

/* Labels in the settings */
.swatches { display: flex; gap: var(--pd-space-2); flex-wrap: wrap; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: var(--pd-radius-full); border: 1px solid var(--pd-border); padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; background: var(--pd-surface); }
.swatch .sw { display: block; }
.swatch[aria-pressed="true"] { border: 2px solid var(--pd-text); }
.hexin { display: flex; align-items: center; gap: var(--pd-space-2); }
.hexin input.text { width: 120px; }
.lprev { display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; padding: var(--pd-space-3) var(--pd-space-4); background: var(--pd-bg); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.lform { padding: var(--pd-space-4); border-bottom: 1px solid var(--pd-border); display: grid; gap: var(--pd-space-4); }
.lform .grid3 { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--pd-space-4); align-items: start; }

/* ---------- Pull request: reviews ---------- */
.rstate { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); font-weight: 500; white-space: nowrap; color: var(--pd-text-secondary); }
.rstate.approved .i { color: var(--pd-success); }
.rstate.changes .i { color: var(--pd-danger); }
.rstate.pending .i { color: var(--pd-warning); }
.chip.pending { color: var(--pd-text); border-color: var(--pd-warning); border-style: dashed; background: var(--pd-warning-subtle); }
.chip.pending .i { color: var(--pd-warning); }
.side .rv { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--pd-space-2); align-items: center; min-height: 32px; font: var(--pd-body-sm); }
.side .rv .nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.side .rv .nm a { color: var(--pd-text); font-weight: 600; }
.side .decision { display: flex; align-items: flex-start; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); margin-bottom: var(--pd-space-3); border: 1px solid var(--pd-border); }
.side .decision strong { display: block; }
.side .decision span.s { color: var(--pd-text-secondary); font: var(--pd-caption); font-weight: 400; }
.side .decision.changes { background: var(--pd-danger-subtle); }
.side .decision.changes > .i { color: var(--pd-danger); margin-top: 2px; }
.side .rv-sub { font: var(--pd-caption); color: var(--pd-text-secondary); margin: var(--pd-space-3) 0 var(--pd-space-1); }
.comment .card-h .rstate { font: var(--pd-body-sm); font-weight: 600; color: var(--pd-text); }
/* The review box: a dialog with the script, else a page. */
.rbox { display: grid; gap: var(--pd-space-4); }
.rbox h2 { margin: 0; font: var(--pd-heading-sm); }
.rbox form { display: grid; gap: var(--pd-space-4); margin: 0; }
.rbox .pend { border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); max-block-size: 40vh; overflow-y: auto; }
.rbox .pend .card-h { display: flex; align-items: flex-start; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-caption); }
.rbox .pend .card-h .i { flex: none; color: var(--pd-warning); }
.rbox .pend a { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text); align-items: start; overflow-wrap: anywhere; }
.rbox .pend a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.rbox .pend a code { font: var(--pd-code-sm); color: var(--pd-text-secondary); }
.rbox .pend-empty { margin: 0; padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.rbox .slab { display: block; margin-block-end: var(--pd-space-2); font: var(--pd-body-sm); font-weight: 600; }
.rbox .editor textarea.text { min-block-size: 96px; }
.rbox .vwhy { display: flex; align-items: flex-start; gap: var(--pd-space-2); margin: 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.rbox .vwhy .i { flex: none; margin-block-start: 2px; }
.rbox .mcli { margin: 0; flex-wrap: wrap; }
.rbox .df { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); }
.rbox .df .grow { flex: 1; }
.rbox .rdiscard > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--pd-space-2); }
.rbox .rdiscard > summary::-webkit-details-marker { display: none; }
.rbox .rdiscard form { display: grid; gap: var(--pd-space-2); justify-items: start; margin-block-start: var(--pd-space-2); padding: var(--pd-space-3); border: 1px solid var(--pd-danger); border-radius: var(--pd-radius-md); }
.rbox .rdiscard p { margin: 0; font: var(--pd-body-sm); }
.rvpage .rbox { max-inline-size: 760px; }
dialog.rdlg { inline-size: min(640px, calc(100vw - 32px)); max-block-size: calc(100vh - 32px); padding: var(--pd-space-5); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); background: var(--pd-surface); color: var(--pd-text); box-shadow: var(--pd-shadow-md); overflow-y: auto; }
dialog.rdlg::backdrop { background: rgb(0 0 0 / 40%); }
/* The page behind a modal dialog does not scroll, also with the wheel
   over the backdrop. The gutter keeps the place of the scroll bar, so
   the page does not move to the side. A browser with no :has() or no
   :modal scrolls the page. */
html:has(dialog:modal) { overflow: hidden; scrollbar-gutter: stable; }
/* The bar of a review sticks to the bottom of the window. Its wrapper
   #rbar-w makes no box, so the bar sticks in the content of the tab and
   not in a wrapper of its own size. The scroll padding keeps a control
   with the focus above the bar (WCAG 2.4.11). The script sets
   --pd-rbar-h to the height of the bar. With no script, the padding is
   the height of the highest bar that a test measured, with a margin. A
   narrow screen has the short text, and the bar can take three lines. */
#rbar-w { display: contents; }
html:has(.rbar) { scroll-padding-block-end: calc(var(--pd-rbar-h, 96px) + var(--pd-space-4)); }
.rbar { position: sticky; inset-block-end: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2) var(--pd-space-3); min-block-size: 56px; margin-block-start: var(--pd-space-4); padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface); border: 1px solid var(--pd-warning); border-radius: var(--pd-radius-md) var(--pd-radius-md) 0 0; font: var(--pd-body-sm); }
.rbar > .i { color: var(--pd-warning); flex: none; }
.rbar .grow { flex: 1; }
.rbar .rb-short { display: none; }
.mbox[data-state="blocked"] .bigicon { background: var(--pd-danger); }
.mbox:not([data-state="blocked"]) .only-blocked,
.mbox:not([data-state="ready"]) .only-ready,
.mbox:not([data-state="checking"]) .only-checking,
.mbox:not([data-state="conflict"]) .only-conflict,
.mbox[data-state="ready"] .not-ready,
.mbox[data-state="conflict"] .not-conflict,
.mbox[data-state="checking"] .not-checking,
.mbox[data-state="blocked"] .not-blocked { display: none; }
.mhead { display: flex; align-items: center; gap: var(--pd-space-3); padding: var(--pd-space-4); border-bottom: 1px solid var(--pd-border); }
.mhead h2, .mhead h3 { margin: 0; font: var(--pd-heading-sm); }
.mhead p { margin: 2px 0 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.mreq .acts2 { display: flex; gap: var(--pd-space-1); flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .brow { grid-template-columns: minmax(0, 1fr) 132px 150px 96px; }
  .brow .upd { display: none; }
  .brows .brow { grid-template-columns: minmax(0, 1fr) 132px 168px; }
  .brows.tags .brow { grid-template-columns: minmax(0, 1fr) 96px auto; }
}
@media (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: var(--pd-space-5); }
  .dash > .dmain, .dash > .dside { grid-column: auto; grid-row: auto; }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .browse .ftree { display: none; }
  /* With no file tree, the picker goes in the path bar. */
  .pathbar .narrow-only { display: inline-flex; }
  .settings { grid-template-columns: minmax(0, 1fr); gap: var(--pd-space-5); }
  .snav { position: static; display: flex; overflow-x: auto; gap: var(--pd-space-1); }
  .snav .who, .snav .grp { display: none; }
  .snav .tab { width: auto; white-space: nowrap; }
  .newgrid { grid-template-columns: minmax(0, 1fr); }
  .optcards, .ctgrid { grid-template-columns: minmax(0, 1fr); }
  .blame td.bi { width: 220px; }
}
@media (max-width: 720px) {
  .authcol .brandmark img { height: 88px; }
  .authpanel { padding: var(--pd-space-5) var(--pd-space-4); }
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .ihead .titlerow { flex-wrap: wrap; }
  .ihead .titlerow h1 { font: var(--pd-heading-md); flex: 1 1 100%; }
  .cbox { grid-template-columns: minmax(0, 1fr); }
  .cbox > .av.xl { display: none; }
  .comment .card-h { flex-wrap: wrap; row-gap: 0; }
  .feed li.ev2 { grid-template-columns: 32px minmax(0, 1fr); }
  .feed li.ev2 time { grid-column: 2; padding-top: 0; }
  .sums { grid-template-columns: 1fr 1fr; }
  /* The two pickers of compare fit 390 px, and the merge check takes its own line. */
  .cmpbar .picker .select .lbl { max-width: 140px; }
  /* A longer word in front of the name makes the name shorter, not the page wider. */
  .cmpbar .picker, .cmpbar .picker > summary { max-inline-size: 100%; }
  .cmpbar .ok { display: block; flex-basis: 100%; margin-inline-start: 0; }
  .cmpbar .ok svg { vertical-align: -3px; margin-inline-end: 6px; }
  .brow { grid-template-columns: minmax(0, 1fr) auto; }
  /* The column "Pull request" stays, so the links to the pull requests stay. */
  .brow .ab { display: none; }
  .brows .brow, .brows.tags .brow { grid-template-columns: minmax(0, 1fr) auto; }
  .brows .brow > :nth-child(3) { display: none; }
  /* The file table fits 390 px. As on GitHub, a narrow screen shows the name
     and the time of each entry, and no commit message. */
  .ftable .cmsg { display: none; }
  .ftable .name { width: auto; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .ftable .name a { display: flex; min-width: 0; }
  /* The three tabs of a project fit 390 px. */
  .ptabs .tab { padding: 0 var(--pd-space-2); }
  .readme-b { padding: var(--pd-space-4); }
  .rbar .rb-long { display: none; }
  .rbar .rb-short { display: inline; }
  html:has(.rbar) { scroll-padding-block-end: calc(var(--pd-rbar-h, 192px) + var(--pd-space-4)); }
  .scopes, .lform .grid3 { grid-template-columns: minmax(0, 1fr); }
  .stable .hide-narrow { display: none; }
}

/* The settings of a project: the form of a label in the menu of
   its row, and the role of a member with its button. */
.ledit .menu { width: min(520px, calc(100vw - 2 * var(--pd-space-4))); }
.ledit .menu .lform { padding: var(--pd-space-2); border-bottom: 0; }
.ledit .menu .lform .grid3 { grid-template-columns: minmax(0, 1fr); }
.confirm .menu .form { max-width: none; gap: var(--pd-space-4); padding: var(--pd-space-2); }
.rolef { display: inline-flex; align-items: center; gap: var(--pd-space-2); }
/* The menu of a label opens from the right edge of its cell, so that it
   stays on a narrow screen. */
.stable .acts:has(> .ledit) { position: relative; }
.stable .acts > .ledit { position: static; }
@media (max-width: 720px) {
  /* A column heading wraps when a language makes it longer, so the table fits. */
  .stable th { white-space: normal; }
  /* A member on two lines: the name and Remove, then the role. */
  .mtable thead { display: none; }
  .mtable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .mtable td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding-top: 0; border-top: 0; }
  /* The cells of a row have different heights, so the row draws the line. Then the line is straight. */
  .mtable td { border-top: 0; }
  .mtable tbody tr + tr { border-block-start: 1px solid var(--pd-border); }
}

/* ---------- Issue pages, the write side ----------
   .slot keeps the place of a part that an edit in place swaps (htmx): the
   part stays, and its content changes. */
.slot { display: contents; }
.newgrid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: var(--pd-space-6); align-items: start; }
.newhead { display: flex; align-items: center; gap: var(--pd-space-3); margin-block-end: var(--pd-space-5); flex-wrap: wrap; }
.newhead h1 { margin: 0; font: var(--pd-heading-lg); }
.newnote, .inote { margin-block-end: var(--pd-space-4); }
input.text.ntitle { font: var(--pd-body); min-height: 44px; }
.ihead > .slot > .ferr { margin-block-start: var(--pd-space-2); }
.comment .cedit { padding: var(--pd-space-4); }
.cactions { justify-content: flex-end; margin-block-start: var(--pd-space-3); }
.cnote { display: flex; align-items: center; gap: var(--pd-space-2); margin: 0 0 var(--pd-space-5); padding: var(--pd-space-4); border: 1px dashed var(--pd-border-strong); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.newtext { margin-block-start: var(--pd-space-3); font: var(--pd-body-sm); }
.newtext summary { display: flex; align-items: center; min-height: 24px; cursor: pointer; font-weight: 600; }
.newtext pre { margin: var(--pd-space-2) 0 0; padding: var(--pd-space-3); max-block-size: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--pd-code-sm); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.menu.cmenu, .menu.smenu { min-width: 260px; }
.menu .mconfirm > summary { display: flex; align-items: center; gap: var(--pd-space-3); min-height: 32px; padding: 6px var(--pd-space-3); border-radius: var(--pd-radius-md); color: var(--pd-danger); cursor: pointer; list-style: none; }
.menu .mconfirm > summary::-webkit-details-marker { display: none; }
.menu .mconfirm > summary:hover { background: var(--pd-surface-sunken); }
.menu .mconfirm > summary .i { color: var(--pd-danger); }
.menu .mconfirm form { padding: var(--pd-space-2) var(--pd-space-3); }
.menu .mconfirm p { margin: 0 0 var(--pd-space-2); font: var(--pd-caption); color: var(--pd-text-secondary); }
form[aria-busy="true"] button[type="submit"] { opacity: 0.6; cursor: progress; }
@media (max-width: 860px) {
  .newgrid { grid-template-columns: minmax(0, 1fr); }
}
/* The reactions of the viewer: the form, the picker and a pressed reaction. */
.reacts .menu.rmenu { inset-inline-start: 0; inset-inline-end: auto; }
.rpick.mine { background: var(--pd-accent-subtle); }
.rerr { margin: 0 var(--pd-space-4) var(--pd-space-4); }
/* The menus of the side panel: checkboxes, and an Apply button that stays in view. */
.menu.pmenu { min-width: 280px; max-height: 420px; overflow: auto; padding-block-end: 0; }
.menu.pmenu fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.menu label.mcheck { display: flex; align-items: center; gap: var(--pd-space-3); min-height: 32px; padding: 6px var(--pd-space-3); border-radius: var(--pd-radius-md); cursor: pointer; }
.menu label.mcheck:hover { background: var(--pd-surface-sunken); }
.menu label.mcheck input { flex: none; margin: 0; accent-color: var(--pd-accent); }
.menu label.mcheck .desc { margin-inline-start: auto; text-align: end; }
.menu .mfoot { position: sticky; inset-block-end: 0; display: flex; justify-content: flex-end; margin: var(--pd-space-2) calc(-1 * var(--pd-space-2)) 0; padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface); border-block-start: 1px solid var(--pd-border); }
.side .side-self { margin-block-start: var(--pd-space-2); }
.side section > .ferr { margin-block-start: var(--pd-space-2); }
/* The lock and the pin of the side panel. */
.side .side-act { margin-block-start: var(--pd-space-2); }
.side details.side-act > summary { list-style: none; cursor: pointer; }
.side details.side-act > summary::-webkit-details-marker { display: none; }
.side .side-lock { display: grid; gap: var(--pd-space-2); margin-block-start: var(--pd-space-2); }
.side .side-lock .hint { margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.side .side-lock button { justify-self: start; }
/* The links of the side panel: the add form, and a remove button on each link. */
.menu .side-link { display: grid; gap: var(--pd-space-2); padding: var(--pd-space-2); }
.menu .side-link label { font: var(--pd-caption); font-weight: 500; }
.menu .side-link .hint { margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.menu .side-link button { justify-self: end; }
.side .side-saved { display: flex; align-items: center; gap: 6px; font: var(--pd-caption); margin: 0; margin-block-start: var(--pd-space-2); }
.side .side-saved > .i { color: var(--pd-success); }
.side .side-saved:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.side .lrow:has(.lremove) { grid-template-columns: 16px auto minmax(0, 1fr) auto; }
/* The labels and the assignees of a new issue: lists of checkboxes, so they work with no script. */
.side .nchecks { margin: 0; padding: 0; border: 0; min-width: 0; }
.side .nchecks legend { padding: 0; }
.side .nlist { max-height: 240px; overflow: auto; margin-block-start: var(--pd-space-2); }
.side .nlist label.mcheck, .side .nfields label.mcheck { display: flex; align-items: center; gap: var(--pd-space-2); min-height: 28px; padding: 2px var(--pd-space-1); border-radius: var(--pd-radius-md); cursor: pointer; font: var(--pd-body-sm); }
.side .nlist label.mcheck:hover, .side .nfields label.mcheck:hover { background: var(--pd-surface-sunken); }
.side .nlist label.mcheck input, .side .nfields label.mcheck input { flex: none; margin: 0; accent-color: var(--pd-accent); }
.side .nlist .desc { color: var(--pd-text-secondary); font: var(--pd-caption); }
.side .nchecks .filter { margin-block-start: var(--pd-space-2); }
/* The links of a new issue: the name and the references, one below the other. */
.side .nlinks { display: grid; gap: var(--pd-space-2); }
.side .nlinks label { font: var(--pd-caption); font-weight: 500; }
.side .nlinks .empty { margin: 0; }
/* The custom fields of a new issue: a section for each field, as
   the type. The input fills the panel. The button of a page with no
   script is below the type. */
.side .nfields fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; display: grid; gap: var(--pd-space-1); }
.side .nfields legend { padding: 0; }
.side .nfields .text { inline-size: 100%; }
.side .nfields textarea { resize: vertical; }
.side .nfields .hint { margin-block: var(--pd-space-1) 0; margin-inline: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.side .nfields > .empty { margin-block: 0 var(--pd-space-3); margin-inline: 0; }
.side .nshow { margin-block-start: var(--pd-space-2); }

/* Reflow at 320 px (WCAG 1.4.10). On a narrow screen, a menu that
   opens at the start of its button, as the branch picker and the reactions,
   takes the width of the page below its button. The block start stays
   auto, so the menu stays at its place in the flow. The block at the
   end of this file does the same for each menu in main, with a higher
   specificity. Change the two blocks together. */
@media (max-width: 480px) {
  .menu-wrap:has(> .menu.left, > .menu.rmenu) { position: static; }
  .menu-wrap > .menu.left, .reacts .menu-wrap > .menu.rmenu { inset-inline: var(--pd-space-4); inset-block-start: auto; margin-block-start: 6px; inline-size: auto; min-inline-size: 0; max-inline-size: none; }
}

/* ---------- Open a pull request ---------- */
.pn-sub { margin: 0 0 var(--pd-space-4); color: var(--pd-text-secondary); font: var(--pd-body-sm); }
.pn-bar { margin-block-end: var(--pd-space-4); }
.cmpbar .ok.pn-info { color: var(--pd-text); }
.cmpbar .ok.pn-info .i { color: var(--pd-info); }
/* Conflicts do not stop the create, so the status has the color of the
   text and a warning icon. */
.cmpbar .ok.pn-warn { color: var(--pd-text); }
.cmpbar .ok.pn-warn .i { color: var(--pd-warning); }
.pn-stack { display: grid; gap: var(--pd-space-4); margin-block-end: var(--pd-space-4); }
.pn-stack:not(:has(*)) { display: none; }
.pn-exists { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--pd-space-4); align-items: center; padding: var(--pd-space-4); }
.pn-exists h2 { margin: 0; font: var(--pd-heading-sm); }
.pn-exists p { margin: 2px 0 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.pn-exists .t { font: var(--pd-body-sm); font-weight: 600; }
.pn-rule { margin: var(--pd-space-3) auto 0; font: var(--pd-caption); }
.pn-titlein { font: var(--pd-body); min-block-size: 44px; }
.banner .mcli { flex-wrap: wrap; margin-block: var(--pd-space-2) 0; }
.btn-split > .btn:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.btn-split > .menu-wrap > summary.btn { border-start-start-radius: 0; border-end-start-radius: 0; padding-inline: 10px; border-inline-start: 1px solid var(--pd-on-accent); }
.pn-create > .menu { min-inline-size: 320px; max-inline-size: min(380px, calc(100vw - 32px)); }
.pn-create .draftpick { text-align: start; }
.pn-create .draftpick .desc { max-inline-size: 36ch; white-space: normal; }
.pn-side-note { display: flex; gap: 6px; align-items: flex-start; margin: var(--pd-space-2) 0 0; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.pn-side-note .i, .side .lockedrow .i { flex: none; margin-block-start: 1px; }
.side .lockedrow { display: flex; gap: var(--pd-space-2); align-items: flex-start; margin: var(--pd-space-2) 0 0; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.pn-below { min-inline-size: 0; max-inline-size: 100%; }
.pn-sums { margin-block: var(--pd-space-5) var(--pd-space-4); }
@media (max-width: 720px) {
  .pn-exists { grid-template-columns: auto minmax(0, 1fr); }
  .pn-exists > :last-child { grid-column: 1 / -1; justify-self: stretch; }
  .pn-below { overflow-x: clip; }
}
/* The comments on the lines and the files of a pull request: the form of a
   new thread, the menu of a comment, the reply box and the resolve, the
   pending frame and the fold of a resolved thread. */
.tw + .tw, .cmpw + .tw, .tw + .cmpw { margin-block-start: var(--pd-space-3); }
.dthreads .cmpw { margin: 0 var(--pd-space-4) var(--pd-space-4); }
/* The note before the outdated threads of older folios, under the header
   of their file. */
.onote { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2) var(--pd-space-3); margin: 0 var(--pd-space-4) var(--pd-space-3); padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-info-subtle); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); }
.onote .i { color: var(--pd-info); flex: none; }
.onote .grow { flex: 1; min-inline-size: 0; }
.diff tr.tline .cmpw .thread { margin: 0; }
.composer { max-inline-size: 760px; background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); overflow: hidden; }
.composer .chead { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface-sunken); border-block-end: 1px solid var(--pd-border); font: var(--pd-body-sm); font-weight: 600; overflow-wrap: anywhere; }
.composer .chead .i { color: var(--pd-accent); }
.composer .chead .grow { flex: 1; min-inline-size: 0; }
.composer .rng { display: flex; flex-wrap: wrap; gap: var(--pd-space-3) var(--pd-space-5); padding: var(--pd-space-3) var(--pd-space-3) 0; }
.composer .rf { display: grid; gap: var(--pd-space-1); font: var(--pd-body-sm); font-weight: 500; }
.composer .rf input.text { inline-size: 8em; }
.composer .rf select.text { inline-size: auto; }
.composer .hint { margin: var(--pd-space-2) var(--pd-space-3) var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); }
/* A link in the text of a hint has a line below it, as each link in a text
   (WCAG 1.4.1). Its color alone is not enough. */
.composer .hint a { text-decoration: underline; text-underline-offset: 2px; }
.composer .editor { border-inline: 0; border-radius: 0; }
.composer .editor textarea.text, .thread .tfoot textarea.text, .thread .cedit textarea.text { min-block-size: 112px; }
.composer .ferr { padding: var(--pd-space-2) var(--pd-space-3) 0; }
.composer .cfoot, .thread .cacts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--pd-space-2); padding: var(--pd-space-3); }
.thread .cacts { padding: var(--pd-space-2) 0 0; }
.thread .tcb { min-inline-size: 0; }
.thread .tch { display: flex; align-items: flex-start; gap: var(--pd-space-2); }
.thread .tch .who { flex: 1; min-inline-size: 0; }
.thread:has(.tch details.menu-wrap[open]) { overflow: visible; }
.dbody.dthreads, .dbody:has(.tch details.menu-wrap[open]) { overflow: visible; }
.thread:has(.tch details.menu-wrap[open]) > :first-child { border-start-start-radius: inherit; border-start-end-radius: inherit; }
.thread .tch .menu-wrap > summary { min-inline-size: 24px; min-block-size: 24px; margin-block-start: -4px; }
.thread .tc .reacts { margin-block-start: var(--pd-space-2); }
.thread .tfoot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--pd-space-2); padding: var(--pd-space-3); border-block-start: 1px solid var(--pd-border); background: var(--pd-surface); }
.thread .tfoot .rform { flex: 1 1 320px; min-inline-size: 0; }
.thread .tfoot .rform[open] > summary { display: none; }
.thread .tfoot .rform > summary { list-style: none; display: inline-flex; }
.thread .tfoot .rform > summary::-webkit-details-marker { display: none; }
.thread .tfoot form { margin: 0; max-inline-size: 100%; }
.thread .tfoot .btn, .thread .cacts .btn { max-inline-size: 100%; white-space: normal; }
.thread .tnote, .tw > .tnote, .cmpw > .tnote { display: flex; align-items: center; gap: var(--pd-space-2); margin: 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.tw > .tnote, .cmpw > .tnote { padding: var(--pd-space-3); }
.thread > .ferr { padding: var(--pd-space-2) var(--pd-space-3) var(--pd-space-3); }
.thread.is-pending { border-style: dashed; border-color: var(--pd-warning); }
/* A suggested change in a comment: a diff that only reads. */
.sugg { margin-block: var(--pd-space-2); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); overflow: hidden; }
.sugg-h { padding: var(--pd-space-1) var(--pd-space-3); background: var(--pd-surface-sunken); border-block-end: 1px solid var(--pd-border); font: var(--pd-caption); font-weight: 600; }
.sugg-b { overflow-x: auto; }
/* The suggestion is in a comment, and the comment is in a row of the diff.
   So these rules win over the tables of the Markdown (.md table, .md td)
   and over the rows of the diff (.diff tr.tline td, .diff.lumis tr.del td). */
.md .sugg-t { display: table; margin: 0; border-collapse: collapse; inline-size: 100%; font: var(--pd-code-sm); }
.md .sugg .sugg-t tr.del > td, .md .sugg .sugg-t tr.add > td { border: 0; padding-block: 0; padding-inline: var(--pd-space-2); font: var(--pd-code-sm); white-space: pre; word-break: normal; vertical-align: top; }
.md .sugg .sugg-t tr.del > td { background: var(--pd-diff-removed-bg); color: var(--pd-diff-removed-text); }
.md .sugg .sugg-t tr.add > td { background: var(--pd-diff-added-bg); color: var(--pd-diff-added-text); }
.md .sugg .sugg-t tr > td.sg { inline-size: 1.5em; text-align: center; user-select: none; }
/* The note under a suggestion that is too long, and the note before the
   later suggestions of a comment (they show as code). */
.md .sugg .sugg-more { margin: 0; padding: var(--pd-space-1) var(--pd-space-3); border-block-start: 1px solid var(--pd-border); background: var(--pd-surface-sunken); font: var(--pd-caption); color: var(--pd-text-secondary); }
.md .sugg-note { font: var(--pd-caption); color: var(--pd-text-secondary); }
.chip.pending { border-style: dashed; border-color: var(--pd-warning); color: var(--pd-text); }
details.thread.resolved > summary { list-style: none; cursor: pointer; border-block-end: 0; }
details.thread.resolved > summary::-webkit-details-marker { display: none; }
details.thread.resolved[open] > summary { border-block-end: 1px solid var(--pd-border); }
details.thread.resolved > summary:focus-visible { outline-offset: -2px; }
.diff tr.sel > td { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--pd-accent) 10%, transparent); }
.dfile[data-composer] td.ln a { cursor: pointer; }
.dfile .card-h .btn-icon { flex: none; }
.rhint { margin: 0 0 var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.rhint .h-coarse { display: none; }
@media (pointer: coarse) { .rhint .h-fine { display: none; } .rhint .h-coarse { display: inline; } }
.thread .cfolio { white-space: nowrap; }
.thread .th[tabindex]:focus-visible { outline: 2px solid var(--pd-focus-ring); outline-offset: -2px; }
.kept { display: grid; gap: var(--pd-space-2); padding: var(--pd-space-3); }
.kept > label { font: var(--pd-body-sm); font-weight: 500; }
.kept .ferr { padding: 0; }
.kept textarea.text { min-block-size: 112px; }
.rvpage h1 { font: var(--pd-heading-md); overflow-wrap: anywhere; }
.rvpage h1 code { font: var(--pd-code-sm); }
.rvpage .back { margin-block: var(--pd-space-4) var(--pd-space-2); }
.rvpage .back a { display: inline-flex; align-items: center; gap: var(--pd-space-2); min-block-size: 24px; }
.rvpage .thread, .rvpage .composer { margin: 0 0 var(--pd-space-6); }
@media (max-width: 480px) {
  .composer .cfoot .btn, .thread .cacts .btn { flex: 1 1 auto; min-block-size: 40px; }
  .composer .rng { gap: var(--pd-space-3); }
}

/* The language of the appearance page: the order of choice of the language
   (account setting, cookie, Accept-Language, en-US), with the mark on the step
   in use, and the section "Where else you change it". */
.sx-sel { max-inline-size: 420px; }
.sx-h3 { margin-block: 0 var(--pd-space-2); font: var(--pd-heading-sm); }
.sx-prechead { margin-block-start: var(--pd-space-5); }
.sx-prechead .sx-h3 { margin-block-end: 2px; }
.sx-prechead p.d { margin-block: 0 var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.sx-prec { list-style: none; margin-block: 0 var(--pd-space-4); padding: 0; display: grid; gap: var(--pd-space-2); max-inline-size: 640px; }
.sx-prec > li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--pd-space-3); align-items: start; padding: var(--pd-space-3); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.sx-prec > li.on { border-color: var(--pd-accent); background: var(--pd-accent-subtle); }
.sx-n { flex: none; inline-size: 24px; block-size: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-full); font: var(--pd-caption); color: var(--pd-text-secondary); }
.sx-t { font: var(--pd-body-sm); overflow-wrap: anywhere; }
.chip.ok { color: var(--pd-text); border-color: var(--pd-success); background: var(--pd-growth-subtle); }
.chip.ok .i { color: var(--pd-success); }
.sx-now { max-inline-size: 640px; margin: 0; padding: var(--pd-space-3) var(--pd-space-4); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); overflow-wrap: anywhere; }
#language > .banner, #time-zone > .banner { margin-block-end: var(--pd-space-4); max-inline-size: 760px; }
/* The example line of the time zone. */
.sx-tzprev { margin: 0; margin-block-start: var(--pd-space-1); padding-block: var(--pd-space-2); padding-inline: var(--pd-space-3); background: var(--pd-surface-sunken); border-radius: var(--pd-radius-sm); font: var(--pd-body-sm); overflow-wrap: anywhere; }
.sx-tzprev > span { color: var(--pd-text-secondary); }
.sx-where { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: var(--pd-space-5); align-items: start; max-inline-size: 760px; }
.sx-where p { margin: 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.sx-fig { margin: 0; }
.sx-fig figcaption { margin-block-start: var(--pd-space-2); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.sx-fakemenu { padding: var(--pd-space-2); background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-sm); font: var(--pd-body-sm); }
.sx-fakemenu .mh { padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.sx-mitem { display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); border-radius: var(--pd-radius-md); }
.sx-mitem .i { flex: none; }
.sx-mitem.new { background: var(--pd-accent-subtle); color: var(--pd-accent); font-weight: 600; }
/* Forced colors take the background of the step in use away, so a thick border marks it. */
@media (forced-colors: active) {
  .sx-prec > li.on, .sx-mitem.new { border: 2px solid Highlight; }
  .langmenu .menu .mi.sel { outline: 1px solid Highlight; }
}
@media (max-width: 720px) {
  .sx-where { grid-template-columns: minmax(0, 1fr); }
  .sx-prec > li { grid-template-columns: 24px minmax(0, 1fr); }
  .sx-prec .sx-inuse { grid-column: 2; }
}

/* The leave of a project: the project actions menu in the header, the
   confirm in its page and in a dialog, the line below the members list,
   and the notice after the leave. */
.phead .pacts { margin-inline-start: auto; }
.menu .lv-menudanger, .menu .lv-menudanger .i { color: var(--pd-danger); }
/* The filled danger button: the primary action of a destructive confirm.
   The danger token with the on-accent text: 5.5:1 in the light theme and
   8.0:1 in the dark theme. */
.btn-danger-solid { background: var(--pd-danger); border-color: var(--pd-danger); color: var(--pd-on-accent); font-weight: 600; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--pd-danger) 86%, var(--pd-text)); border-color: color-mix(in srgb, var(--pd-danger) 86%, var(--pd-text)); }
.btn-danger-solid .i { color: currentColor; }
.lvpage { padding-block: var(--pd-space-6); }
.lvbox { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pd-space-4); max-inline-size: 640px; overflow-wrap: anywhere; }
/* A button can name a long project or organization, so its text wraps. */
.lvbox .btn { white-space: normal; text-align: center; }
.lvbox > :is(h1, h2) { margin: 0; font: var(--pd-heading-md); }
.lvbox > h1 { font: var(--pd-heading-lg); }
.lv-who { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); }
.lv-who > .i { flex: none; color: var(--pd-text-secondary); }
.lv-role, .lv-path { font: var(--pd-code-sm); color: var(--pd-text); overflow-wrap: anywhere; }
.lv-body { display: grid; gap: var(--pd-space-3); }
.lv-body > * { margin-block: 0; }
.lv-body > p { font: var(--pd-body-sm); }
.lv-note { display: flex; align-items: flex-start; gap: var(--pd-space-2); padding: var(--pd-space-3); border-radius: var(--pd-radius-md); background: var(--pd-surface-sunken); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.lv-note > .i { flex: none; margin-block-start: 1px; }
/* The rule for a paragraph of the body must not make the note larger. */
.lv-body > p.lv-note { font: var(--pd-caption); font-weight: 400; }
.lvbox form { margin: 0; }
.lvbox .actions { justify-content: flex-end; }
.lvbox .mcli { margin: 0; flex-wrap: wrap; }
/* The dialog does not close on a click on the backdrop, because the action
   destroys a role. Escape and Cancel close it. */
dialog.lvdlg { inline-size: min(560px, calc(100vw - 2 * var(--pd-space-4))); max-block-size: calc(100dvh - 2 * var(--pd-space-4)); margin: auto; padding: var(--pd-space-5); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-lg); background: var(--pd-surface); color: var(--pd-text); box-shadow: var(--pd-shadow-md); overflow-y: auto; }
dialog.lvdlg::backdrop { background: color-mix(in srgb, var(--pd-text) 55%, transparent); }
/* The ring shows also when the script sets the focus. */
dialog.lvdlg :focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.lv-hint { display: flex; align-items: flex-start; gap: var(--pd-space-2); margin-block: var(--pd-space-3) 0; font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); }
.lv-hint > .i { flex: none; margin-block-start: 1px; }
/* A link in a sentence has a line below it, so color is not the only sign
   (1.4.1), and a target of 24 px (2.5.8). */
.lv-hint a { display: inline-flex; align-items: center; min-block-size: 24px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.left-notice { margin-block: var(--pd-space-4); }
.frame-notice { margin-block-start: var(--pd-space-4); }
@media (max-width: 860px) {
  .lvbox .actions { flex-direction: column; align-items: stretch; }
  .lvbox .actions .btn { justify-content: center; }
}
/* On a phone, the longest text of the confirm must fit with no scroll. */
@media (max-width: 480px) {
  dialog.lvdlg { padding: var(--pd-space-4); }
  dialog.lvdlg .lvbox { gap: var(--pd-space-3); }
  dialog.lvdlg .banner { gap: var(--pd-space-2); padding-inline: var(--pd-space-3); }
}
@media (forced-colors: active) {
  .btn-danger-solid { border-color: ButtonText; }
}

/* The owner page, its members tab and the owner settings. */
.op-title { flex-wrap: wrap; margin-block-end: var(--pd-space-5); }
.op-title > div { min-inline-size: 0; }
.op-title h1, .op-title p { overflow-wrap: anywhere; }
.op-sec > h2 { margin-block-end: var(--pd-space-3); }
.op-sec > .d { margin-block: 0 var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.op-sec > .d a, .op-pointer a { text-decoration: underline; }
.op-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--pd-border); border-radius: var(--pd-radius-md); overflow: hidden; }
.op-row { display: flex; align-items: center; gap: var(--pd-space-4); padding-block: var(--pd-space-3); padding-inline: var(--pd-space-4); background: var(--pd-surface); min-block-size: 56px; }
.op-main { flex: 1; min-inline-size: 0; display: grid; gap: 2px; }
.op-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0; }
.op-line > .i { flex: none; }
.op-name { font-weight: 600; overflow-wrap: anywhere; min-inline-size: 0; }
.op-pre { color: var(--pd-text-secondary); font-weight: 400; }
.op-desc { font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.op-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--pd-space-4); flex: none; font: var(--pd-caption); color: var(--pd-text-secondary); }
.op-nothing { margin: 0; padding-block: var(--pd-space-6); padding-inline: var(--pd-space-4); text-align: center; color: var(--pd-text-secondary); font: var(--pd-body-sm); overflow-wrap: anywhere; }
.op-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--pd-space-3); margin-block-start: var(--pd-space-5); font: var(--pd-body-sm); }
.op-pager .muted { color: var(--pd-text-secondary); }
.mtable td, .mtable th { overflow-wrap: anywhere; }
.mtable .who-c, .mtable .who-c > div { min-inline-size: 0; }
.mtable .t1 { overflow-wrap: anywhere; }
.mtable th:last-child, .mtable td:last-child { white-space: nowrap; }
@media (min-width: 721px) {
  .mtable th:last-child, .mtable td:last-child { inline-size: 1%; }
}
.op-pointer { margin-block-end: var(--pd-space-5); }
.op-pointer code { font: var(--pd-code-sm); font-weight: 600; overflow-wrap: anywhere; }
.settings > div { min-inline-size: 0; }
.spanel .card { min-inline-size: 0; }
/* The words wrap, and they do not break inside a word. A button in this cell stays on one line. */
.stable .acts .muted { white-space: normal; overflow-wrap: normal; }
/* Forced colors remove the background that draws the lines of the list. */
@media (forced-colors: active) {
  .op-row + .op-row { border-block-start: 1px solid CanvasText; }
}
.mcli { flex-wrap: wrap; }
.mcli code { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  /* A longer translation fits: the two buttons of a label stack, the words of Save wrap at a
     space, and the table of the deleted projects has less space between its columns. A button
     in a table stays on one line. */
  .stable .acts:has(> .ledit) { white-space: normal; }
  .dtable th, .dtable td { padding-inline: var(--pd-space-2); }
  .mf-actions .btn { white-space: normal; }
  .op-row { flex-wrap: wrap; align-items: flex-start; gap: var(--pd-space-2); }
  .op-meta { inline-size: 100%; justify-content: flex-start; gap: var(--pd-space-3); }
}

/* The pages "New project" and "New organization", and the create
   menu of the global bar. */
.gcreate > summary { inline-size: auto; padding-inline: var(--pd-space-2); gap: 2px; }
/* At 320 px the button ends at 228 px, so a menu of 240 px starts off the
   screen. */
@media (max-width: 480px) { .gcreate > .menu { min-inline-size: 200px; } }
.side p.empty a { text-decoration: underline; text-underline-offset: 2px; }
.os-wrap { padding-block: var(--pd-space-5) var(--pd-space-8); }
.os-back { margin-block-end: var(--pd-space-3); font: var(--pd-body-sm); }
.os-back a { display: inline-flex; align-items: center; gap: 6px; min-block-size: 24px; }
.os-lead { color: var(--pd-text-secondary); max-inline-size: 70ch; margin-block: var(--pd-space-2) var(--pd-space-5); font: var(--pd-body); }
.os-grid { align-items: start; }
.os-aside { display: grid; gap: var(--pd-space-4); }
.os-sum { padding: var(--pd-space-4); }
.os-sum h2, .os-h2 { font: var(--pd-heading-sm); margin: 0 0 var(--pd-space-2); }
.os-h2 { margin-block: var(--pd-space-5) var(--pd-space-2); }
.os-sum dl { display: grid; gap: var(--pd-space-2); margin: 0 0 var(--pd-space-3); }
.os-sum dl > div { display: grid; gap: 2px; }
.os-sum dt { font: var(--pd-caption); color: var(--pd-text-secondary); }
.os-sum dd { margin: 0; font: var(--pd-body-sm); overflow-wrap: anywhere; }
/* The README choice and the import card of the page "New project". */
.os-readme { gap: var(--pd-space-2); }
.os-import { padding: var(--pd-space-4); }
.os-import h2 { font: var(--pd-heading-sm); margin-block: 0 var(--pd-space-2); }
.os-import p { margin-block: 0 var(--pd-space-2); }
.os-import .mcli { margin-block: var(--pd-space-3) 0; }
.os-form { max-inline-size: 720px; min-inline-size: 0; }
.os-fs { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; gap: var(--pd-space-4); }
.os-leg { font: var(--pd-heading-sm); padding: 0; margin-block-end: var(--pd-space-3); }
.os-show { justify-self: start; }
.os-path, .os-suggest { font: var(--pd-caption); color: var(--pd-text-secondary); margin: var(--pd-space-1) 0 0; }
.os-path code { font: var(--pd-code-sm); color: var(--pd-text); overflow-wrap: anywhere; }
.os-why { display: flex; gap: 6px; align-items: flex-start; }
.os-why > .i { flex: none; margin-block-start: 2px; }
.os-start { display: grid; gap: var(--pd-space-4); }
.os-start:has(input[name="content"][value="none"]:checked) .os-branch { display: none; }
.os-submit { display: flex; flex-wrap: wrap; gap: var(--pd-space-3); align-items: center; }
.os-send > span { display: inline-flex; align-items: center; gap: var(--pd-space-2); }
.os-send > .os-sending { display: none; }
form[aria-busy="true"] .os-send > .os-idle { display: none; }
form[aria-busy="true"] .os-send > .os-sending { display: inline-flex; }
form[aria-busy="true"] .os-send { cursor: progress; }
.os-busy-note { font: var(--pd-caption); color: var(--pd-text-secondary); }
.os-spin { animation: os-spin 900ms linear infinite; }
@keyframes os-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .os-spin { animation: none; } }
.os-errsum ul { margin: var(--pd-space-2) 0 0; padding-inline-start: var(--pd-space-5); }
.os-errsum li a { display: inline-block; min-block-size: 24px; padding-block: 2px; }
.os-errsum li + li { margin-block-start: 2px; }
.os-quick { padding: var(--pd-space-4); display: grid; gap: var(--pd-space-3); grid-template-columns: minmax(0, 1fr); }
.os-quick h2 { font: var(--pd-heading-sm); margin: 0; }
.os-quick h3 { font: var(--pd-body-sm); font-weight: 600; margin: 0; }
.os-quick .help { margin: 0; }
.os-quick .clone .seg { margin: 0; }
.os-quick-set { display: grid; gap: var(--pd-space-2); min-inline-size: 0; }
.os-quick-set[hidden] { display: none; }
.os-quick-set h3:not(:first-of-type) { margin-block-start: var(--pd-space-3); }
.os-quick-with { margin: 0; font: var(--pd-caption); font-weight: 600; color: var(--pd-text-secondary); }
.os-quick .copybox { height: auto; min-block-size: 36px; padding-block: 4px; align-items: flex-start; }
.os-quick .copybox code { white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; padding-block: 5px; }
.os-cli { align-items: baseline; }
.os-cli > span { min-inline-size: 0; }
.os-cli .btn-icon { flex: none; align-self: center; }
.os-flag { white-space: nowrap; }
@media (max-width: 480px) {
  .os-cli > span { flex-basis: 100%; }
  .os-cli code { flex: 1 1 0; }
}
.os-denied { max-inline-size: 720px; }
.os-denied-help { margin-block-start: var(--pd-space-3); }
.os-denied-help a { text-decoration: underline; }
.os-places { list-style: none; margin: 0; padding: 0; }
.os-places li + li { border-block-start: 1px solid var(--pd-border); }
.os-places a { display: flex; align-items: center; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); min-block-size: 44px; color: var(--pd-text); }
.os-places a:hover { background: var(--pd-surface-sunken); text-decoration: none; }
.os-places a > span:nth-child(2) { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.os-places .sub { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.os-places .os-plain { padding: var(--pd-space-3) var(--pd-space-4); overflow-wrap: anywhere; }
.os-owner { display: flex; align-items: center; gap: var(--pd-space-3); }
.os-owner > div { min-inline-size: 0; overflow-wrap: anywhere; }
.os-owner .sub { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.radio-list label.dis { color: var(--pd-text-secondary); }
.dside .head .btn { margin-inline-start: auto; }

/* A long name of a label stays inside its row of the labels
   settings. The name wraps inside the cell, and the title of the chip keeps
   the full name. A wrapped chip gets a large radius, so that its corners do
   not cut the text, and a one-line chip stays a pill. The fields of the
   label forms keep their width, so that the edit menu of a long name fits a
   narrow screen. */
.stable .label { max-inline-size: 100%; min-inline-size: 0; }
.lname { white-space: normal; overflow-wrap: anywhere; border-radius: var(--pd-radius-lg); }
.stable .label .sv { min-inline-size: 0; overflow-wrap: anywhere; }
.stable .label.scoped .sc { min-inline-size: 0; overflow-wrap: anywhere; }
.lprev .label { max-inline-size: 100%; min-inline-size: 0; white-space: normal; overflow-wrap: anywhere; }
.lform { grid-template-columns: minmax(0, 1fr); }

/* A long label name on an issue page wraps inside its chip, as it
   does in the labels settings. The parts of a scoped chip shrink too. */
.lname { max-inline-size: 100%; min-inline-size: 0; }
.lname .sv, .lname.scoped .sc { min-inline-size: 0; overflow-wrap: anywhere; }

/* The banner of a comparison wraps its button below the text on a
   narrow screen, as .folios-banner does. Thus the compare page stays inside
   320 px (WCAG 1.4.10). The text keeps a useful width, and it can shrink. The
   icon stays beside the text. The counts of the comparison can be wider than
   a cell at 320 px, so their items wrap. */
.compare-banner { flex-wrap: wrap; }
.compare-banner > .grow { flex: 1 1 min(16rem, calc(100% - 20px - var(--pd-space-3))); min-inline-size: 0; }
.sums > * { flex-wrap: wrap; min-inline-size: 0; }

/* The header of a file card is sticky. The scroll padding at the top
   follows its height, which the script measures, so the header does not hide
   a control with the focus (WCAG 2.4.11). The padding stops at 40 percent of
   the window, and the fallback stops at 30 percent, so a long path cannot
   push the focus out of a short window. The path shows at most two lines,
   and its full text stays in the page and in its title. */
html:has(.dfile .card-h) { scroll-padding-block-start: min(calc(var(--pd-dfile-h, min(224px, 30dvh)) + var(--pd-space-2)), 40dvh); }
.dfile .card-h .path { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dfile .card-h .path:focus-visible { outline-offset: -2px; }
/* In a short window a tall header would leave no room for the content. The
   header does not stick there, and the padding stops at 30 percent. */
@media (max-height: 420px) {
  .dfile .card-h { position: static; }
  html:has(.dfile .card-h) { scroll-padding-block-start: min(calc(var(--pd-dfile-h, min(224px, 30dvh)) + var(--pd-space-2)), 30dvh); }
}

/* The edit pages of the issue settings of an owner. */
.ise-wrap { padding-block: var(--pd-space-5) var(--pd-space-8); }
.ise-back { margin-block-end: var(--pd-space-3); font: var(--pd-body-sm); min-inline-size: 0; }
.ise-back a { display: inline-flex; align-items: center; gap: 6px; min-block-size: 24px; min-inline-size: 0; overflow-wrap: anywhere; }
.ise-ytabs { margin-block-end: var(--pd-space-4); max-inline-size: 100%; }
.ise-lead { color: var(--pd-text-secondary); max-inline-size: 70ch; margin-block: var(--pd-space-2) var(--pd-space-5); font: var(--pd-body); overflow-wrap: anywhere; }
.ise-lead code { font: var(--pd-code-sm); }
.ise-wrap > .banner { margin-block-end: var(--pd-space-4); }
.ise-errsum { margin-block-end: var(--pd-space-4); }
.ise-errsum:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.ise-errsum ul { margin: var(--pd-space-2) 0 0; padding-inline-start: var(--pd-space-5); }
.ise-errsum a { overflow-wrap: anywhere; }
.ise-errtext { margin: var(--pd-space-2) 0 0; overflow-wrap: anywhere; }
.ise-formview { max-inline-size: 720px; }
.ise-formview > h1 { margin-block: 0 var(--pd-space-4); overflow-wrap: anywhere; }
.ise-iform { display: grid; gap: var(--pd-space-5); max-inline-size: 720px; }
.ise-fs { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; gap: var(--pd-space-2); }
.ise-fs legend { padding: 0; margin-block-end: var(--pd-space-2); }
.ise-submit { display: flex; flex-wrap: wrap; gap: var(--pd-space-3); align-items: center; }
.ise-submit .btn { white-space: normal; text-align: center; }
.ise-cdot { display: inline-block; flex: none; inline-size: 12px; block-size: 12px; border-radius: var(--pd-radius-full); background: var(--dot, transparent); box-shadow: 0 0 0 1px var(--pd-border-strong); }
.ise-cdot.none { background: transparent; border: 1px dashed var(--pd-border-strong); box-shadow: none; }
/* The shades of the colors of the server. A class for each, so the page
   needs no style attribute. */
.ise-dot-gray { --dot: #887f8e; }
.ise-dot-blue { --dot: #5185c7; }
.ise-dot-green { --dot: #3d9289; }
.ise-dot-yellow { --dot: #c9952c; }
.ise-dot-orange { --dot: #eb725a; }
.ise-dot-red { --dot: #cf5942; }
.ise-dot-pink { --dot: #be6fa4; }
.ise-dot-purple { --dot: #a5578a; }
.ise-sws { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); }
.ise-sw { position: relative; display: inline-flex; align-items: center; gap: 6px; min-block-size: 32px; padding-inline: var(--pd-space-3); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); background: var(--pd-surface); font: var(--pd-body-sm); cursor: pointer; }
.ise-sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ise-sw:has(input:checked) { border-color: var(--pd-accent); background: var(--pd-accent-subtle); font-weight: 600; }
.ise-sw:has(input:focus-visible) { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.ise-tchip { display: inline-flex; align-items: center; gap: 6px; font: var(--pd-caption); color: var(--pd-text); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-full); padding: 2px 10px; }
.ise-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-3); margin-block-end: var(--pd-space-3); }
.ise-toolbar .grow { flex: 1; }
.ise-toolbar .btn { white-space: normal; text-align: center; }
.ise-count { margin: 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.ise-table th { overflow-wrap: anywhere; }
.ise-table .who-c, .ise-table .who-c > div { min-inline-size: 0; }
.ise-table .ise-order { inline-size: 1%; white-space: nowrap; }
.ise-table .acts { inline-size: 1%; white-space: nowrap; }
.ise-ord, .ise-acts { display: inline-flex; align-items: center; gap: var(--pd-space-1); }
.ise-mv:disabled { opacity: .4; cursor: not-allowed; }
.ise-table .sub { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.ise-wrap > .lvbox { margin-block-start: var(--pd-space-4); }
@media (max-width: 720px) {
  .ise-table .hide-narrow { display: none; }
  .ise-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ise-table, .ise-table tbody { display: block; }
  .ise-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-1) var(--pd-space-3); padding: var(--pd-space-3); border-block-start: 1px solid var(--pd-border); }
  .ise-table tr:first-child { border-block-start: 0; }
  .ise-table td { display: block; padding: 0; border: 0; }
  .ise-table td:first-child { flex: 1 1 100%; }
  .ise-table td.ise-order { inline-size: auto; }
  .ise-table .ise-acts { flex-wrap: wrap; }
  .ise-table td.acts { inline-size: auto; white-space: normal; }
}
.ise-sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--pd-space-2); }
.ise-why { display: flex; gap: 6px; align-items: flex-start; }
.ise-why > .i { flex: none; margin-block-start: 2px; }
.ise-h2 { font: var(--pd-heading-sm); margin-block: var(--pd-space-5) var(--pd-space-2); }
.ise-flags { display: flex; flex-wrap: wrap; gap: var(--pd-space-1); }
.ise-opts { list-style: none; margin: 0 0 var(--pd-space-3); padding: 0; display: grid; gap: var(--pd-space-2); }
.ise-opt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--pd-space-2); }
.ise-optf { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--pd-space-1); flex: 0 1 150px; min-inline-size: 0; }
.ise-optname { flex: 1 1 160px; }
.ise-optf .text { inline-size: 100%; min-inline-size: 0; }
/* The form of a row holds only hidden inputs, so it takes no place and no gap. */
.ise-opt > form { display: contents; }
@media (max-width: 720px) { .ise-optf, .ise-optname { flex: 1 1 100%; } }
.ise-opt .ise-opterr { flex: 1 1 100%; }
.ise-opt .btn-icon { flex: none; }
.ise-types { display: flex; flex-wrap: wrap; gap: var(--pd-space-2) var(--pd-space-4); padding-inline-start: 28px; }
.ise-optsec { margin-block-start: var(--pd-space-6); }
/* Only user content breaks in a word. A long name must not break the word of a kind or a count. */
.ise-table td { overflow-wrap: normal; }
.ise-table td:first-child, .ise-table td [dir="auto"] { overflow-wrap: anywhere; }
.ise-types > .check { min-inline-size: 0; max-inline-size: 100%; }
.ise-types > .check > span, .ise-opterr > span { min-inline-size: 0; overflow-wrap: anywhere; }
.spanel .chips > .chip { max-inline-size: 100%; white-space: normal; }
.spanel .chips > .chip > span { min-inline-size: 0; overflow-wrap: anywhere; }
/* The form shows only the parts of the chosen kind. A browser with no :has() shows each part, and the server function gets only those of the kind. */
.ise-fieldform:not(:has(input[name="kind"][value="select"]:checked)) .ise-if-select { display: none; }
.ise-fieldform:not(:has(input[name="kind"][value="select"]:checked, input[name="kind"][value="user"]:checked)) .ise-if-many { display: none; }
.ise-fieldform:not(:has(input[name="kind"][value="text"]:checked)) .ise-if-text { display: none; }
.ise-fieldform:not(:has(input[name="kind"][value="number"]:checked)) .ise-if-number { display: none; }

/* The pages Your projects and Your organizations. */
.yo-page { padding-block: var(--pd-space-5) var(--pd-space-8); }
.yo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--pd-space-3); margin-block-end: var(--pd-space-4); }
.yo-head h1 { margin: 0; }
.yo-tabs { max-inline-size: 100%; margin-block-end: var(--pd-space-4); }
.yo-filter { display: grid; gap: var(--pd-space-3); margin-block-end: var(--pd-space-4); }
.yo-selects { display: flex; flex-wrap: wrap; gap: var(--pd-space-3); }
.yo-sel { display: grid; gap: 2px; flex: 0 1 180px; min-inline-size: 150px; font: var(--pd-caption); color: var(--pd-text-secondary); }
.yo-sel select { inline-size: 100%; }
.yo-viewrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-3); }
.yo-loading, .yo-result { font: var(--pd-body-sm); color: var(--pd-text-secondary); margin-block: 0 var(--pd-space-3); }
.yo-result a { text-decoration: underline; }
.yo-loading { display: flex; align-items: center; gap: var(--pd-space-2); }
.yo-loading[hidden] { display: none; }
.yo-retry { margin-block: var(--pd-space-3); }
.yo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--pd-space-2); }
.yo-treebar { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); margin-block: 0 var(--pd-space-2); }
.yo-treebar[hidden] { display: none; }
.yo-group { margin-block-end: var(--pd-space-4); }
.yo-colhead { display: grid; grid-template-columns: minmax(0, 1fr) 90px 150px 150px; gap: var(--pd-space-3); padding: var(--pd-space-2) var(--pd-space-4); font: var(--pd-caption); color: var(--pd-text-secondary); }
.yo-orghead { grid-template-columns: minmax(0, 1fr) 110px 120px 120px 150px; }
.yo-oh { flex-wrap: wrap; }
.yo-oh h2 { font: var(--pd-heading-sm); margin: 0; min-inline-size: 0; overflow-wrap: anywhere; }
.yo-oh h2 a { display: inline-flex; align-items: center; min-block-size: 24px; min-inline-size: 24px; }
.yo-oh .grow { flex: 1; }
.yo-tree, .yo-kids { list-style: none; margin: 0; padding: 0; }
.yo-kids { padding-inline-start: var(--pd-space-6); margin-inline-start: 12px; border-inline-start: 1px solid var(--pd-border); }
.yo-node[data-collapsed] > .yo-kids { display: none; }
.yo-row { display: flex; align-items: center; gap: var(--pd-space-2); min-block-size: 44px; padding: var(--pd-space-2) var(--pd-space-4); border-block-start: 1px solid var(--pd-border); }
.yo-tree > li:first-child > .yo-row, .yo-tree > li.yo-row:first-child { border-block-start: 0; }
.yo-main { flex: 1; min-inline-size: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 2px; }
.yo-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0; }
.yo-line > .i { flex: none; }
.yo-who { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; min-inline-size: 0; flex: 1; }
.yo-name { display: inline-block; min-block-size: 24px; min-inline-size: 24px; max-inline-size: 100%; font-weight: 600; overflow-wrap: anywhere; }
.yo-name mark { background: var(--pd-warning-subtle); color: var(--pd-text); border-radius: 2px; padding-inline: 1px; }
.yo-pre { color: var(--pd-text-secondary); font-weight: 400; }
.yo-desc { font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.yo-hint { font: var(--pd-caption); font-style: italic; color: var(--pd-text-secondary); }
.yo-meta { flex: none; display: grid; grid-template-columns: 90px 150px 150px; gap: var(--pd-space-3); align-items: center; font: var(--pd-caption); color: var(--pd-text-secondary); }
.yo-orgrow .yo-meta { grid-template-columns: 110px 120px 120px 150px; }
.yo-role { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0; }
.yo-from { overflow-wrap: anywhere; min-inline-size: 0; }
.yo-num { display: inline-flex; align-items: center; gap: 6px; }
.yo-num a { display: inline-flex; align-items: center; min-block-size: 24px; }
.yo-ctx .yo-name { color: var(--pd-text-secondary); font-weight: 400; }
.yo-tog { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 28px; block-size: 28px; border: 0; background: none; color: var(--pd-text-secondary); border-radius: var(--pd-radius-sm); cursor: pointer; }
.yo-tog[hidden] { display: none; }
.yo-tog:hover { background: var(--pd-surface-sunken); color: var(--pd-text); }
.yo-tog[aria-expanded="false"] > .i { /* rtl: a page from right to left needs rotate(90deg) here. */ transform: rotate(-90deg); }
.yo-tog-sp { flex: none; inline-size: 28px; }
.list-foot .mcli { margin: 0; flex-wrap: wrap; }
.list-foot .mcli code { overflow-wrap: anywhere; }
.dall a { display: inline-flex; align-items: center; min-block-size: 24px; }
@media (max-width: 720px) {
  .yo-colhead { display: none; }
  .yo-row { flex-wrap: wrap; align-items: flex-start; }
  .yo-main { flex-basis: calc(100% - 36px); }
  .yo-meta, .yo-orgrow .yo-meta { grid-template-columns: minmax(0, 1fr); gap: var(--pd-space-1); padding-inline-start: 36px; inline-size: 100%; }
  .yo-flat .yo-meta, .yo-orgrow .yo-meta { padding-inline-start: 0; }
  .yo-kids { padding-inline-start: var(--pd-space-3); margin-inline-start: 6px; }
  .yo-sel { flex: 1 1 140px; }
}

/* A long project name in the breadcrumb wraps inside the page, so the page does not scroll sideways (WCAG 1.4.10). The full name stays in the link, and its title keeps it too. */
.phead > .crumbs { min-inline-size: 0; max-inline-size: 100%; }
.phead > .crumbs > a { min-inline-size: 0; overflow-wrap: anywhere; }

/* Other text with a long owner or project name also stays inside
   the page at 320 px. The command below a list, the path of a project and
   the project of a new issue are the cause. A code block keeps its own
   horizontal scroll, so these rules do not touch `pre`. */
.list-foot { flex-wrap: wrap; }
.list-foot > span { min-inline-size: 0; max-inline-size: 100%; }
.list-foot > span code { overflow-wrap: anywhere; }
.newhead > .muted { min-inline-size: 0; overflow-wrap: anywhere; }
.newhead > .muted strong { overflow-wrap: anywhere; }
.settings .mcli { min-inline-size: 0; }
.mcli > code { min-inline-size: 0; max-inline-size: 100%; }
.settings .field { min-inline-size: 0; }
.settings .field > * { max-inline-size: 100%; }
.field input.text { min-inline-size: 0; max-inline-size: 100%; }
.side .row { min-inline-size: 0; }
.side .row > a { min-inline-size: 0; overflow-wrap: anywhere; }
.lead { min-inline-size: 0; overflow-wrap: anywhere; }
.lead code { overflow-wrap: anywhere; }
.uname, .help { min-inline-size: 0; overflow-wrap: anywhere; }
.uname code { overflow-wrap: anywhere; }
.yo-page .yo-oh { min-inline-size: 0; }
.yo-oh .btn {
  flex: 0 1 auto;
  max-inline-size: 100%;
  min-inline-size: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.ssec > :is(h2, h3) { overflow-wrap: anywhere; }
.ssec > p.d { min-inline-size: 0; overflow-wrap: anywhere; }
.ssec > p.d code { overflow-wrap: anywhere; }
.card > .nothing { overflow-wrap: anywhere; }
.lv-hint > span { min-inline-size: 0; overflow-wrap: anywhere; }

/* The description and the website of an organization under its name
   on the owner page, and the picture of the profile of an organization. */
.op-about {
  display: grid;
  gap: var(--pd-space-1);
  min-inline-size: 0;
  margin-block: calc(-1 * var(--pd-space-3)) var(--pd-space-5);
}
.op-about-desc {
  margin: 0;
  max-inline-size: 72ch;
  color: var(--pd-text-secondary);
  font: var(--pd-body-sm);
  overflow-wrap: anywhere;
}
.op-about-web {
  margin: 0;
  min-inline-size: 0;
  font: var(--pd-body-sm);
  overflow-wrap: anywhere;
}
.op-about-web a { text-decoration: underline; }
.owner-pic {
  display: flex;
  align-items: center;
  gap: var(--pd-space-4);
}

/* ================================================================ Branch rules */
/* The list and the form of the branch rules of a project and of an owner.
   Logical properties and --pd-* tokens only. */
.brs .bhead, .brrule .bhead, .brcheck .bhead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--pd-space-4); flex-wrap: wrap; margin-block-end: var(--pd-space-5); }
.brs .bhead > div:first-child, .brcheck .bhead > div:first-child { flex: 1 1 360px; min-inline-size: 0; }
.brs .bhead h2, .brrule .bhead h2, .brcheck .bhead h2 { overflow-wrap: anywhere; }
.brs .bhead .actions { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); flex: 0 1 auto; min-inline-size: 0; max-inline-size: 100%; }
.bback { margin: 0 0 var(--pd-space-3); font: var(--pd-body-sm); }
.bback a { display: inline-flex; align-items: center; gap: var(--pd-space-1); min-block-size: 24px; }
.bsec { margin-block-start: var(--pd-space-6); }
.bsec:first-of-type { margin-block-start: 0; }
.bsec > h3 { font: var(--pd-heading-md); margin: 0 0 var(--pd-space-1); display: flex; align-items: center; gap: var(--pd-space-3); flex-wrap: wrap; overflow-wrap: anywhere; }
.bsec > h3 .count { font: var(--pd-caption); padding-block: 0; padding-inline: 6px; min-inline-size: 20px; line-height: 18px; text-align: center; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); color: var(--pd-text-secondary); border: 1px solid var(--pd-border); font-variant-numeric: tabular-nums; }
.bsec > p.d { margin: 0 0 var(--pd-space-4); font: var(--pd-body-sm); color: var(--pd-text-secondary); max-inline-size: 80ch; }
.blist { list-style: none; margin: 0; padding: 0; }
.brule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--pd-space-3) var(--pd-space-5); align-items: start; padding: var(--pd-space-4); border-block-start: 1px solid var(--pd-border); }
.brule:first-child { border-block-start: 0; }
.brule.off .btitle .t1 { color: var(--pd-text-secondary); }
.bmain { min-inline-size: 0; }
.btitle { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); margin: 0; font: var(--pd-body-sm); }
.btitle .t1, .btitle a.t1 { display: inline-flex; align-items: center; min-block-size: 24px; font-weight: 600; color: var(--pd-text); overflow-wrap: anywhere; min-inline-size: 0; }
.btitle a.t1:hover { color: var(--pd-link); }
.bpat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-1) var(--pd-space-2); margin: var(--pd-space-2) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.bpat .ref { max-inline-size: 100%; overflow-wrap: anywhere; white-space: normal; min-inline-size: 0; }
.bfx { display: flex; flex-wrap: wrap; gap: var(--pd-space-1); margin: var(--pd-space-2) 0 0; padding: 0; list-style: none; }
.bfx .chip { max-inline-size: 100%; overflow-wrap: anywhere; }
.bwho { margin: var(--pd-space-2) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.bacts { display: flex; gap: var(--pd-space-2); flex-wrap: wrap; justify-content: flex-end; }
.inh { display: inline-flex; align-items: center; gap: 4px; font: var(--pd-caption); color: var(--pd-text-secondary); }
.bempty { padding-block: var(--pd-space-7); }
.bempty .actions { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); justify-content: center; margin-block-start: var(--pd-space-4); }
.bempty p { margin: 0 auto var(--pd-space-2); max-inline-size: 56ch; font: var(--pd-body-sm); }
.bempty h4 { font: var(--pd-heading-sm); margin: var(--pd-space-3) 0 var(--pd-space-2); overflow-wrap: anywhere; }
.brs .mcli { margin-block-start: var(--pd-space-5); }

/* The form and the read view */
.rform { display: grid; gap: var(--pd-space-5); }
.rform > h3, .rro > h3 { font: var(--pd-heading-md); margin: var(--pd-space-4) 0 0; overflow-wrap: anywhere; }
.rform > h3:first-of-type, .rro > h3:first-of-type { margin-block-start: 0; }
.rform .field { min-inline-size: 0; }
.rform .field > * { max-inline-size: 100%; }
.rform textarea.text { min-block-size: 76px; resize: vertical; }
.rform .radio-list label, .rform .arow label { overflow-wrap: anywhere; }
.rform .radio-list label .d, .rform .arow label .d { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.rform .ferror { margin: var(--pd-space-1) 0 0; color: var(--pd-danger); font: var(--pd-body-sm); }
.rform .warn { display: block; color: var(--pd-warning); font: var(--pd-caption); }
.rform .fixed { display: flex; align-items: flex-start; gap: var(--pd-space-2); margin: 0; font: var(--pd-body-sm); }
.rform .fixed .i { flex: none; margin-block-start: 2px; }
.rform .patterns { margin-block: var(--pd-space-2); }
.rform .patterns summary { min-block-size: 24px; cursor: pointer; }
.rform .patterns dl { margin: var(--pd-space-3) 0; display: grid; gap: var(--pd-space-2); }
.rform .patterns dl > div { display: grid; grid-template-columns: minmax(0, 12ch) minmax(0, 1fr); gap: var(--pd-space-3); }
.rform .patterns dt { font: var(--pd-code-sm); overflow-wrap: anywhere; min-inline-size: 0; }
.rform .patterns dd { margin: 0; font: var(--pd-body-sm); overflow-wrap: anywhere; min-inline-size: 0; }
.arow { border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); padding: var(--pd-space-4); display: grid; gap: var(--pd-space-2); min-inline-size: 0; }
.arow legend { font: var(--pd-heading-sm); padding-inline: var(--pd-space-1); }
.rro dl { margin: 0 0 var(--pd-space-4); display: grid; gap: var(--pd-space-2); }
.rro dl > div { display: grid; grid-template-columns: minmax(0, 24ch) minmax(0, 1fr); gap: var(--pd-space-3); }
.rro dt { font: var(--pd-body-sm); color: var(--pd-text-secondary); overflow-wrap: anywhere; min-inline-size: 0; }
.rro dd { margin: 0; font: var(--pd-body-sm); overflow-wrap: anywhere; min-inline-size: 0; }
.danger-zone { border-block-start: 1px solid var(--pd-border); padding-block-start: var(--pd-space-4); margin-block-start: var(--pd-space-5); }
.brrule .mcli { margin-block-start: var(--pd-space-4); }
.events .brule { grid-template-columns: minmax(0, 1fr); }
.events .d { margin: var(--pd-space-1) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); }

/* Check a branch */
.chk { display: grid; gap: var(--pd-space-1); margin-block-end: var(--pd-space-5); max-inline-size: 40rem; }
.chk .row { display: flex; gap: var(--pd-space-2); flex-wrap: wrap; }
.chk .row .text { flex: 1 1 16rem; min-inline-size: 0; }
.chk .help { margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.brcheck .bcheck th[scope="row"] { white-space: normal; font: var(--pd-body-sm); color: var(--pd-text); background: none; padding: var(--pd-space-3) var(--pd-space-4); border-block-start: 1px solid var(--pd-border); }
.brcheck .stable td { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .brule { grid-template-columns: minmax(0, 1fr); }
  .bacts { justify-content: flex-start; }
  .rro dl > div, .rform .patterns dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* The link in the note on the events of a rule of another place is
   underlined, so it is not told by colour alone (WCAG 1.4.1). */
.brrule .nothing a { text-decoration: underline; }
/* Each link in the summary of errors is a target of at least 24 px
   (WCAG 2.5.8). */
#errors li a { display: inline-flex; align-items: center; min-block-size: 24px; }

/* ---------- Search page ---------- */
.search .qbar { flex-wrap: wrap; }
.search .qbox { min-inline-size: 0; }
.search .snip { margin-block-start: 2px; color: var(--pd-text-secondary); font: var(--pd-body-sm); overflow-wrap: anywhere; }
.search mark { background: var(--pd-warning-surface); color: var(--pd-text); border-radius: 3px; padding-inline: 1px; }
.search .srow .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--pd-text-secondary); font: var(--pd-caption); min-inline-size: 0; }
.search .srow .m { overflow-wrap: anywhere; text-align: end; }
.search .search-status { margin-block: 0 var(--pd-space-3); color: var(--pd-text-secondary); font: var(--pd-body-sm); min-block-size: 20px; }
/* The busy state: "Searching" shows in the status line. The
   line keeps its height, so nothing below it moves. The list stays,
   so its text keeps its contrast. */
.search .sr-busy { display: inline-flex; align-items: center; gap: var(--pd-space-2); vertical-align: top; block-size: 20px; }
.search .sr-busy[hidden], .search .sr-failed[hidden] { display: none; }
.search .sr-failed { margin-block-end: var(--pd-space-3); }
.search .sr-failed .banner { align-items: center; }
.search .list-foot { margin-block-start: var(--pd-space-3); }
@media (max-width: 480px) {
  .search .qbar { align-items: stretch; }
  .search .qbar > .btn { flex: 1 1 auto; }
  .search .srow .r { align-items: flex-start; }
}

.search .ilist .states { flex-wrap: wrap; }
.search .irow { min-inline-size: 0; }
.search .irow > div { min-inline-size: 0; }

/* ---------- The jump bar and the keyboard shortcuts. ---------- */
.gsearch { flex: 0 1 360px; inline-size: auto; min-inline-size: 0; }
.gsearch input { flex: 1; min-inline-size: 0; block-size: 100%; border: 0; outline: 0; background: none; color: var(--pd-text); font: inherit; }
.gsearch input::placeholder { color: var(--pd-text-secondary); opacity: 1; }
.gsearch:focus-within { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
/* With a script, the control opens the dialog. With no script, the header has
   the form. The script of the head sets data-js before the first paint. */
:root[data-js] .gsearch-form { display: none; }
:root:not([data-js]) a.gsearch { display: none; }
.kb-toast { position: fixed; z-index: 120; inset-block-end: var(--pd-space-5); inset-inline: 0; margin-inline: auto; inline-size: fit-content; max-inline-size: calc(100vw - 2 * var(--pd-space-4)); padding: var(--pd-space-2) var(--pd-space-4); background: var(--pd-surface); color: var(--pd-text); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); box-shadow: var(--pd-shadow-md); font: var(--pd-body-sm); }
.kb-toast:empty { display: none; }

.pdlg { padding: 0; border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-lg); background: var(--pd-surface); color: var(--pd-text); box-shadow: var(--pd-shadow-md); max-inline-size: calc(100vw - 2 * var(--pd-space-4)); overflow: hidden; font: var(--pd-body); }
.pdlg:not([open]) { display: none; }
.pdlg[open] { display: flex; flex-direction: column; }
.pdlg::backdrop { background: color-mix(in srgb, var(--pd-text) 42%, transparent); }
:root[data-theme="dark"] .pdlg::backdrop { background: color-mix(in srgb, var(--pd-surface-sunken) 75%, transparent); }

.kb { inline-size: min(900px, calc(100vw - 2 * var(--pd-space-4))); max-block-size: calc(100dvh - 2 * var(--pd-space-5)); margin: auto; }
.kb-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); border-block-end: 1px solid var(--pd-border); }
.kb-head h2 { margin: 0; font: var(--pd-heading-md); }
.kb-body { flex: 1; min-block-size: 0; overflow: auto; padding: var(--pd-space-4); }
.kb-switch { padding: var(--pd-space-3) var(--pd-space-4); margin-block-end: var(--pd-space-4); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); }
.kb-switch label { display: flex; align-items: center; gap: var(--pd-space-2); }
.kb-switch input { inline-size: 24px; block-size: 24px; flex: none; }
.kb-switch p { margin-block: var(--pd-space-1) 0; margin-inline-start: 32px; font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.kb-switch .kb-save { font: var(--pd-caption); min-block-size: 16px; }
.kb-switch .kb-save.err { color: var(--pd-danger); font-weight: 600; }
.kb-phone, .kb-offnote { display: none; margin: 0 0 var(--pd-space-4); padding: var(--pd-space-3); background: var(--pd-info-subtle); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); font: var(--pd-body-sm); }
.kb-offnote { background: var(--pd-warning-subtle); }
:root[data-keys="off"] .kb-offnote { display: block; }
:root[data-keys="off"] .kb-alt.is-single { text-decoration: line-through; }
:root[data-keys="off"] .gsearch kbd { display: none; }
/* The link to the list of keys in the text of the section "Keyboard
   shortcuts" of the appearance page. A link in a sentence needs a
   mark that is not only its color (WCAG 1.4.1). */
.kb-list { text-decoration: underline; text-underline-offset: 2px; }
.kb-cols { column-width: 380px; column-gap: var(--pd-space-6); }
.kb-grp { break-inside: avoid; margin-block-end: var(--pd-space-5); }
.kb-grp h2, .kb-grp h3 { margin: 0 0 var(--pd-space-1); font: var(--pd-heading-sm); }
.kb-where { margin: 0 0 var(--pd-space-1); font: var(--pd-caption); color: var(--pd-text-secondary); }
.kb-t { inline-size: 100%; border-collapse: collapse; }
.kb-t th[scope="row"], .kb-t td { padding: var(--pd-space-2) 0; border-block-start: 1px solid var(--pd-border); vertical-align: middle; font: var(--pd-body-sm); }
.kb-t tr:first-child th, .kb-t tr:first-child td { border-block-start: 0; }
.kb-t th[scope="row"] { text-align: start; font-weight: 400; }
.kb-t td { text-align: end; padding-inline-start: var(--pd-space-3); }
.kb-alt { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kb-alt kbd { min-inline-size: 24px; min-block-size: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--pd-text); box-shadow: 0 1px 0 var(--pd-border-strong); }
.kb-end { margin: var(--pd-space-3) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); }

.jb { inline-size: min(640px, calc(100vw - 2 * var(--pd-space-4))); max-block-size: min(720px, 92dvh); margin: 8vh auto auto; }
.jb-form { display: flex; flex-direction: column; flex: 1; min-block-size: 0; margin: 0; }
.jb-bar { flex: none; display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-2) var(--pd-space-3); border-block-end: 1px solid var(--pd-border-strong); }
.jb-bar:focus-within { outline: 2px solid var(--pd-focus-ring); outline-offset: -2px; }
.jb-lead { color: var(--pd-text-secondary); display: inline-flex; }
.jb-input { flex: 1; min-inline-size: 0; block-size: 40px; border: 0; background: none; color: var(--pd-text); font: var(--pd-body-lg); }
.jb-input, .jb-input:focus, .jb-input:focus-visible { outline: none; }
.jb-input::placeholder { color: var(--pd-text-secondary); opacity: 1; }
.jb-close { flex: none; }
.jb-close kbd { margin-inline-start: var(--pd-space-1); }
.jb-body { flex: 1; min-block-size: 0; overflow: auto; padding: var(--pd-space-2); }
.jb-gh { padding: var(--pd-space-2) var(--pd-space-3) var(--pd-space-1); font: var(--pd-caption); font-weight: 600; color: var(--pd-text-secondary); }
.jb-o { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: var(--pd-space-3); min-block-size: 40px; padding: 6px var(--pd-space-3); border-inline-start: 3px solid transparent; border-radius: var(--pd-radius-md); color: var(--pd-text); text-decoration: none; cursor: pointer; }
.jb-o:hover { text-decoration: none; background: var(--pd-surface-sunken); }
.jb-o.act { background: var(--pd-accent-subtle); border-inline-start-color: var(--pd-accent); }
.jb-oi { display: inline-flex; color: var(--pd-text-secondary); }
.jb-ot { display: flex; flex-direction: column; min-inline-size: 0; }
.jb-om { font: var(--pd-body-sm); font-weight: 600; overflow-wrap: anywhere; }
.jb-os { font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.jb-or { display: inline-flex; align-items: center; gap: var(--pd-space-2); font: var(--pd-caption); color: var(--pd-text-secondary); white-space: nowrap; }
.jb-o.act .jb-os, .jb-o.act .jb-or, .jb-o.act .jb-oi { color: var(--pd-text); }
.jb-enter { display: none; }
.jb-o.act .jb-enter { display: inline-flex; }
.jb-o mark { background: var(--pd-warning-subtle); color: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; border-radius: 2px; padding-inline: 1px; }
.jb-msg { padding: var(--pd-space-5) var(--pd-space-4); text-align: center; color: var(--pd-text-secondary); font: var(--pd-body-sm); overflow-wrap: anywhere; }
.jb-msg strong { display: block; color: var(--pd-text); font: var(--pd-heading-sm); margin-block-end: var(--pd-space-1); }
.jb-msg.err strong { color: var(--pd-danger); }
.jb-tips { list-style: none; margin: 0; padding: var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.jb-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--pd-space-1) var(--pd-space-3); padding: var(--pd-space-2) var(--pd-space-4); border-block-start: 1px solid var(--pd-border); background: var(--pd-surface-sunken); font: var(--pd-caption); color: var(--pd-text-secondary); }
.jb-hints { display: flex; flex-wrap: wrap; gap: var(--pd-space-1) var(--pd-space-4); }
.jb-hints kbd { margin-inline-end: 2px; }
/* The scope chip: one button with the name of the project and an X.
   A click removes the scope. The target is at least 24 px (WCAG 2.5.8). */
.jb-chip { display: inline-flex; align-items: center; gap: var(--pd-space-1); flex: none; max-inline-size: 60%; min-block-size: 28px; padding-inline: var(--pd-space-2) var(--pd-space-1); font: var(--pd-code-sm); color: var(--pd-accent); background: var(--pd-accent-subtle); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-sm); cursor: pointer; }
.jb-chip[hidden] { display: none; }
.jb-chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jb-chip svg { flex: none; color: var(--pd-text-secondary); }
.jb-chip:hover { border-color: var(--pd-border-strong); }
.jb-chip:hover svg { color: var(--pd-text); }
.jb-chip:focus-visible { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
/* The keys of a page in the group "Pages and commands". */
.jb-key { display: inline-flex; gap: 2px; }
:root[data-keys="off"] .jb-key { display: none; }
.jb-clear-recent { margin: 0; padding-inline: var(--pd-space-3); }
.jb-clear-recent[hidden] { display: none; }

/* A phone: the dialog fills the screen, and the rows are taller. 100vw would
   put the end of the dialog under the stable gutter of a classic scrollbar. */
@media (max-width: 720px) {
  .jb, .kb { inline-size: 100%; max-inline-size: 100%; block-size: 100dvh; max-block-size: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .jb-o { min-block-size: 44px; }
  .jb-foot, .jb-close kbd { display: none; }
  .jb-input { font-size: 16px; }
  .jb-bar { flex-wrap: wrap; }
  .jb-bar .jb-chip { order: 5; flex-basis: 100%; max-inline-size: 100%; }
  .jb-bar .jb-chip > span:first-child { flex: 1; min-inline-size: 0; text-align: start; }
  .kb-phone { display: block; }
  .kb-cols { column-count: 1; column-width: auto; }
}
.kb-page { padding-block: var(--pd-space-5); }
.kb-page h1 { margin-block: 0 var(--pd-space-4); }

/* The stack page, the panel and the stack block. */
.stack-crumb { margin: 0 0 var(--pd-space-2); font: var(--pd-body-sm); }
.stack-crumb a { display: inline-flex; align-items: center; min-block-size: 24px; }
.stack-acts { display: flex; flex-wrap: wrap; gap: var(--pd-space-3); margin-block: var(--pd-space-4); align-items: flex-start; }
.stack-act { display: grid; gap: var(--pd-space-1); max-inline-size: 16rem; min-inline-size: 0; }
.stack-act .btn { justify-self: start; }
.stack-off { margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.stack-rule { display: flex; gap: var(--pd-space-2); align-items: flex-start; font: var(--pd-body-sm); color: var(--pd-text-secondary); margin-block: var(--pd-space-3); }
.stack-rule > .i { flex: none; margin-block-start: 2px; }
.stack-h { font: var(--pd-heading-sm); margin: var(--pd-space-4) 0 var(--pd-space-2); }
.stack-hint { margin: 0 0 var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.stack-rows .irow { grid-template-columns: 20px minmax(0, 1fr); }
.stack-rows .irow .r { grid-column: 2; flex-wrap: wrap; gap: var(--pd-space-2); }
.stack-rows .irow .r .st { width: auto; }
.stack-rows .irow .r:not(:has(.cmt:not(.zero), .st > *, .avs > *)) { display: none; }
.stack-rows .irow .r .cmt.zero { display: none; }
.srow { position: relative; margin-block-start: var(--pd-space-2); padding-inline-end: 40px; min-inline-size: 0; }
.srow p { margin: 0 0 2px; font: var(--pd-body-sm); overflow-wrap: anywhere; }
.srow-place strong { font-weight: 600; }
.srow-branches { color: var(--pd-text-secondary); }
.srow-branches code { overflow-wrap: anywhere; white-space: normal; }
.srow-note { display: flex; gap: var(--pd-space-1); align-items: flex-start; color: var(--pd-text-secondary); }
.srow-note > .i { flex: none; margin-block-start: 3px; }
.srow-note.ok > .i { color: var(--pd-success); }
.srow-note.bad > .i { color: var(--pd-danger); }
.srow-note.wait > .i { color: var(--pd-warning); }
.srow-menu { position: absolute; inset-block-start: 0; inset-inline-end: 0; }
.srow-menu .menu { min-inline-size: 240px; max-inline-size: min(320px, 80vw); }
.stack-baseline, .sbase { display: flex; gap: var(--pd-space-2); align-items: center; margin-block: var(--pd-space-3); font: var(--pd-body-sm); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.stack-baseline code, .sbase code { overflow-wrap: anywhere; white-space: normal; min-inline-size: 0; }
.stack-facts { margin: 0; display: grid; gap: var(--pd-space-2); font: var(--pd-body-sm); }
.stack-facts > div { display: flex; justify-content: space-between; gap: var(--pd-space-3); }
.stack-facts dt { color: var(--pd-text-secondary); }
.stack-facts dd { margin: 0; overflow-wrap: anywhere; text-align: end; }
.stack-cmd { overflow-wrap: anywhere; }
.stack-cmd code { white-space: normal; overflow-wrap: anywhere; }
.stack-ask { max-inline-size: 48rem; }
.stack-ask-h { font: var(--pd-heading-lg); margin: 0 0 var(--pd-space-3); overflow-wrap: anywhere; }
.stack-steps { margin: 0 0 var(--pd-space-3); padding-inline-start: var(--pd-space-5); }
.stack-steps code { white-space: normal; overflow-wrap: anywhere; }
.stack-methods { border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); padding: var(--pd-space-3) var(--pd-space-4); margin: 0 0 var(--pd-space-3); min-inline-size: 0; }
.stack-methods legend { font-weight: 600; padding-inline: var(--pd-space-1); }
.stack-radio { display: flex; gap: var(--pd-space-2); align-items: flex-start; padding-block: var(--pd-space-1); min-block-size: 24px; overflow-wrap: anywhere; min-inline-size: 0; }
.stack-radio input { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 3px; }
.stack-radio .desc { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.stack-radio.off { color: var(--pd-text-secondary); }
.mreq h3 a, .mreq p a { text-decoration: underline; }
.srail { list-style: none; margin: var(--pd-space-3) 0 0; padding: 0; }
.srail li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--pd-space-2); padding-block: var(--pd-space-2); padding-inline: var(--pd-space-1); border-radius: var(--pd-radius-md); }
.srail li::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 14px; border-inline-start: 2px solid var(--pd-border); }
.srail li.cur { background: var(--pd-accent-subtle); }
.sdot { position: relative; display: flex; align-items: center; justify-content: center; inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--pd-surface); border: 1px solid var(--pd-border); color: var(--pd-text-secondary); }
.sbody { min-inline-size: 0; font: var(--pd-body-sm); overflow-wrap: anywhere; }
.scur { display: inline-flex; gap: 2px; align-items: center; font: var(--pd-caption); }
.stitle { display: block; }
.smeta { display: block; font: var(--pd-caption); color: var(--pd-text-secondary); }
.smeta .rstate { display: inline-flex; gap: 2px; align-items: center; }
.sbody a { display: inline-flex; align-items: center; min-block-size: 24px; }
.irow .m a.chip { color: var(--pd-text-secondary); min-block-size: 24px; }
.prhead .metarow a.chip { min-block-size: 24px; }

/* ---------- Notifications: the bell, its menu, the inbox and the watch
   block. ---------- */
:root[data-js] .bell-link { display: none; }
:root:not([data-js]) details.bell { display: none; }
.notif .nb-count { position: absolute; inset-block-start: 0; inset-inline-end: -2px; min-inline-size: 18px; block-size: 18px; padding: 0 4px; border-radius: var(--pd-radius-full); background: var(--pd-accent); color: var(--pd-on-accent, #fff); font: var(--pd-caption); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; box-sizing: border-box; border: 2px solid var(--pd-surface); }
.nmenu { inline-size: min(400px, calc(100vw - 2 * var(--pd-space-3))); }
.nmenu .nmenu-h { display: flex; align-items: center; justify-content: space-between; gap: var(--pd-space-2); }
.nmenu a.nmenu-row { align-items: flex-start; overflow-wrap: anywhere; }
.nmenu a.nmenu-row > .i { margin-block-start: 2px; flex: none; color: var(--pd-text-secondary); }
.nmenu .nmenu-more { color: var(--pd-link); }
.nmenu .nmenu-empty { display: flex; align-items: center; gap: var(--pd-space-2); padding: var(--pd-space-3); margin: 0; color: var(--pd-text-secondary); }
.nmenu div.nmenu-empty { flex-direction: column; text-align: center; }
.nmenu div.nmenu-empty p { margin: 0; }
.nmenu .nmenu-all { padding: var(--pd-space-2) var(--pd-space-3) 0; }
.nmenu .nmenu-all .btn { inline-size: auto; }
.nb-page { padding-block: var(--pd-space-6); }
.nb-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-3); }
.nb-head h1 { margin: 0; }
.nb-head form { margin: 0; }
.nb-lead { color: var(--pd-text-secondary); margin: var(--pd-space-2) 0 var(--pd-space-5); max-inline-size: 72ch; }
/* A link in a line of text has an underline, not only a color (WCAG 1.4.1). */
.nb-lead a, .nb-settings-lead a { text-decoration: underline; text-underline-offset: 2px; }
.nb-invites { margin-block-end: var(--pd-space-4); }
.nb-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--pd-space-5); align-items: start; }
.nb-filters ul { list-style: none; margin: 0 0 var(--pd-space-4); padding: 0; }
.nb-group-h { font: var(--pd-caption); font-weight: 600; color: var(--pd-text-secondary); margin: 0 0 var(--pd-space-1); padding-inline: var(--pd-space-3); }
.nb-filters a { display: flex; align-items: center; gap: var(--pd-space-2); min-block-size: 32px; padding: 4px var(--pd-space-3); border-radius: var(--pd-radius-md); color: var(--pd-text); text-decoration: none; font: var(--pd-body-sm); }
.nb-filters a:hover { background: var(--pd-surface-sunken); }
.nb-filters a[aria-current="page"] { background: var(--pd-accent-subtle); color: var(--pd-accent); font-weight: 500; }
.nb-filters .i { flex: none; color: var(--pd-text-secondary); }
.nb-filters a[aria-current="page"] .i { color: var(--pd-accent); }
.nb-flabel { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.nb-filters .count { font: var(--pd-caption); color: var(--pd-text-secondary); }
.nb-flash:focus { outline: none; }
.nb-flash:focus-visible .nb-flashbox { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.nb-flashbox { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-3); margin-block-end: var(--pd-space-3); padding: var(--pd-space-2) var(--pd-space-3); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-md); background: var(--pd-surface); }
.nb-flashbox form { margin: 0; }
.nb-flashmsg { display: inline-flex; align-items: center; gap: var(--pd-space-2); flex: 1; min-inline-size: 0; }
.nb-flashmsg .i { flex: none; color: var(--pd-success, var(--pd-accent)); }
.nb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); margin: 0 0 var(--pd-space-3); }
.nb-chip { padding-inline-end: 0; white-space: normal; }
.nb-chip-x { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 24px; min-block-size: 24px; color: var(--pd-text-secondary); }
.nb-bar { flex-wrap: wrap; }
.nb-bar .btn { white-space: nowrap; }
.nb-list { list-style: none; margin: 0; padding: 0; }
.nb-row { display: grid; grid-template-columns: auto 8px auto minmax(0, 1fr) auto; align-items: start; gap: var(--pd-space-3); padding: var(--pd-space-3) var(--pd-space-4); border-block-start: 1px solid var(--pd-border); }
.nb-row:first-child { border-block-start: 0; }
.nb-chk { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 24px; min-block-size: 24px; }
.nb-chk input { inline-size: 16px; block-size: 16px; margin: 0; accent-color: var(--pd-accent); }
.nb-dot { inline-size: 8px; block-size: 8px; margin-block-start: 8px; border-radius: var(--pd-radius-full); background: var(--pd-accent); }
.nb-dot.off { background: none; }
.nb-type { color: var(--pd-text-secondary); margin-block-start: 2px; }
.nb-body { min-inline-size: 0; }
.nb-title { overflow-wrap: anywhere; }
.nb-title a { color: var(--pd-text); text-decoration: none; }
.nb-title a:hover { text-decoration: underline; }
.nb-row.unread .nb-title a { font-weight: 600; }
.nb-ref { color: var(--pd-text-secondary); font: var(--pd-caption); font-family: var(--pd-font-mono); white-space: nowrap; }
.nb-na { color: var(--pd-text-secondary); font-style: italic; }
.nb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--pd-space-2); margin-block-start: 2px; font: var(--pd-caption); color: var(--pd-text-secondary); }
.nb-meta strong { color: var(--pd-text); font-weight: 500; }
.nb-sep { margin-inline-end: var(--pd-space-2); }
.nb-proj { color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.nb-acts { display: flex; gap: var(--pd-space-1); margin: 0; }
.nb-range { white-space: nowrap; }
@media (max-width: 720px) {
  .nb-grid { grid-template-columns: minmax(0, 1fr); }
  .nb-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 var(--pd-space-4); }
}
@media (max-width: 480px) {
  .nb-row { grid-template-columns: auto 8px minmax(0, 1fr); padding-inline: var(--pd-space-3); }
  .nb-row .nb-type { display: none; }
  .nb-acts { grid-column: 3; }
}
/* The watch block of a thread and the Watch control of a project. */
.nb-split { display: flex; align-items: stretch; margin-block-end: var(--pd-space-2); }
.nb-split form { margin: 0; }
.nb-split form .btn { border-start-end-radius: 0; border-end-end-radius: 0; }
.nb-split > .menu-wrap > summary.btn { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; }
.nb-wmenu { min-inline-size: min(300px, calc(100vw - 2 * var(--pd-space-3))); }
.nb-wmenu button.mi > span { flex: 1; min-inline-size: 0; }
.nb-wline { margin: 0; }
.nb-pwatch { flex: none; }
.nb-pwatch summary .count { font: var(--pd-caption); padding: 0 6px; border-radius: var(--pd-radius-full); background: var(--pd-surface-sunken); border: 1px solid var(--pd-border); color: var(--pd-text-secondary); }
@media (max-width: 480px) {
  .home-title { flex-wrap: wrap; align-items: flex-start; }
}

/* ---------- The merge box of a confidential pull request. A block of
   its own, so that a merge with another branch does not conflict. The line
   uses the muted text of the command above it. ---------- */
.mnote { margin-block: var(--pd-space-2) 0; font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.mnote code { font: var(--pd-code-sm); color: var(--pd-text); }
/* The forms of the merge box: the merge, the message, the close
   and the reopen. */
.mform { display: grid; gap: var(--pd-space-3); margin-block-end: var(--pd-space-3); min-inline-size: 0; }
.mform .stack-methods { margin: 0; }
.mmsg > summary { cursor: pointer; font: var(--pd-body-sm); font-weight: 600; min-block-size: 24px; }
.mmsg[open] { display: grid; gap: var(--pd-space-3); }
.mform .hint { margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.mform .row1 .check { overflow-wrap: anywhere; min-inline-size: 0; }
.mform .row1 .check code { font: var(--pd-code-sm); }
.mstate { margin-block-start: var(--pd-space-3); }
.mrefusal { margin: var(--pd-space-3) var(--pd-space-4); overflow-wrap: anywhere; }
/* The edits of a pull request: the help of the title,
   "Ready for review" in the merge box, the buttons of a reviewer row and
   "Convert to draft" under the reviewers. */
.prhead .help { margin: var(--pd-space-2) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.prhead .ferr { margin-block-start: var(--pd-space-2); }
.mready { margin-block-end: var(--pd-space-3); }
.mbox .side-saved { display: flex; align-items: center; gap: 6px; font: var(--pd-caption); margin: var(--pd-space-3) var(--pd-space-4) 0; }
.mbox .side-saved > .i { color: var(--pd-success); }
.mbox .side-saved:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.side .rv-r { display: inline-flex; align-items: center; gap: 2px; }
.side .rv-r form { display: inline-flex; margin: 0; }
.side .side-convert { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pd-space-1) var(--pd-space-2); margin-block-start: var(--pd-space-2); font: var(--pd-caption); }
.side .side-convert .empty { margin: 0; }
.side #reviewers-error:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }

/* ---------- Find a member, and the access of the members to the projects:
   the members tab of an organization and the members part of its
   settings. A block of its own, so that a merge with another branch does not
   conflict. The rules of the access popover are above, at .accc. ---------- */
.op-find { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-3); margin-block-end: var(--pd-space-2); }
.op-search { flex: 1 1 260px; min-inline-size: 0; max-inline-size: 480px; }
.op-find-h { margin-block: 0 var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); }
.op-result { margin-block-end: var(--pd-space-3); }
.op-result p { margin: 0; font: var(--pd-body-sm); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.op-result a { text-decoration: underline; display: inline-flex; align-items: center; min-block-size: 24px; }
.op-actions { display: flex; justify-content: center; margin-block-start: var(--pd-space-3); }
.mtable mark { background: var(--pd-warning-subtle); color: var(--pd-text); border-radius: 2px; padding-inline: 1px; }
.accc .t1, .accc .sub { display: block; }
.accc .accbtn { min-block-size: 28px; }
.accc .accbtn .i { margin-inline-start: var(--pd-space-1); }
.accmenu { min-inline-size: min(280px, calc(100vw - 2 * var(--pd-space-4))); white-space: normal; text-align: start; }
.accmenu .mh { margin: 0; padding: var(--pd-space-1) var(--pd-space-2); font: var(--pd-body-sm); font-weight: 600; color: var(--pd-text); overflow-wrap: anywhere; }
.accmenu .acclist { list-style: none; margin: 0; }
.accmenu .acc-name { display: flex; flex-direction: column; min-inline-size: 0; overflow-wrap: anywhere; }
.accmenu .acc-name a { display: inline-flex; align-items: center; inline-size: auto; min-block-size: 24px; padding: 0; border-radius: var(--pd-radius-sm); text-decoration: underline; text-underline-offset: 2px; }
.accmenu .acc-name a:hover { background: none; text-decoration-thickness: 2px; }
.accmenu .acc-each { font: var(--pd-body-sm); }
.accmenu .acc-name .sub { font: var(--pd-caption); color: var(--pd-text-secondary); }
@media (max-width: 720px) {
  /* The access goes on a line of its own, under the role. */
  .mtable-acc td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; padding-block-start: 0; }
}

/* ---------- A confidential issue or pull request: the chip, the
   banner, the side section of a pull request and the box of a new pull
   request. ---------- */
.conf-chip { flex: none; border-color: var(--pd-warning); background: var(--pd-warning-subtle); color: var(--pd-text); font-weight: 600; }
.conf-chip .i { color: var(--pd-warning); flex: none; }
h1 .conf-chip { font-weight: 600; vertical-align: middle; margin-inline-start: var(--pd-space-2); }
.irow .t .conf-chip { margin-inline-start: var(--pd-space-2); vertical-align: middle; }
.conf-banner { margin: 0 0 var(--pd-space-5); align-items: flex-start; }
.conf-banner .grow { line-height: 22px; min-inline-size: 0; overflow-wrap: anywhere; }
.conf-side .conf-state, .conf-side .empty { margin: var(--pd-space-2) 0 0; }
.conf-side .conf-people { font: var(--pd-caption); color: var(--pd-text-secondary); margin: var(--pd-space-2) 0 0; }
.conf-side .conf-hint { display: flex; align-items: flex-start; gap: var(--pd-space-2); margin: var(--pd-space-3) 0 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.conf-side .conf-hint .i { flex: none; margin-block-start: 1px; }
.conf-change { margin-block-start: var(--pd-space-3); }
.conf-change > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--pd-space-2); min-block-size: 28px; }
.conf-change > summary::-webkit-details-marker { display: none; }
.conf-change[open] > summary { margin-block-end: var(--pd-space-3); }
.conf-change-b { display: grid; gap: var(--pd-space-2); padding: var(--pd-space-3); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); background: var(--pd-surface-sunken); font: var(--pd-body-sm); }
.conf-change-b p { margin: 0; }
.conf-change-b .actions { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); margin-block-start: var(--pd-space-1); }
.conf-box { margin: 0; padding: var(--pd-space-4); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); background: var(--pd-surface-sunken); display: grid; gap: var(--pd-space-2); min-inline-size: 0; }
.conf-box legend { padding: 0; font: var(--pd-caption); color: var(--pd-text-secondary); }
.conf-box .check { min-block-size: 24px; }
.conf-box .help { max-inline-size: 72ch; margin: 0; font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.conf-box .conf-box-on { display: none; }
.conf-box:has(#pn-conf:checked) .conf-box-on { display: block; }
.conf-box:has(#pn-conf:checked) .conf-box-off { display: none; }
@media (max-width: 480px) {
  .conf-box { padding: var(--pd-space-3); }
  .conf-banner { flex-wrap: wrap; }
}

/* ---------- The confirm dialog of the confidential flag
   (templates/confidential-side.html). The script opens it. With no
   script, the details element of the side section has the form. ---------- */
.cfdlg { inline-size: min(560px, calc(100vw - 2 * var(--pd-space-4))); max-block-size: calc(100dvh - 2 * var(--pd-space-5)); margin: auto; }
.cfdlg-in { display: flex; flex-direction: column; gap: var(--pd-space-4); padding: var(--pd-space-5); margin: 0; overflow: auto; min-inline-size: 0; }
.cfdlg h2 { margin: 0; font: var(--pd-heading-md); overflow-wrap: anywhere; }
.cfdlg #cf-dlg-d { display: grid; gap: var(--pd-space-3); min-inline-size: 0; overflow-wrap: anywhere; }
.cfdlg #cf-dlg-d p { margin: 0; }
.cfdlg .banner { margin: 0; align-items: flex-start; }
.cfdlg-who { margin: 0; padding-inline-start: var(--pd-space-5); display: grid; gap: var(--pd-space-1); }
.cfdlg-note { display: flex; align-items: flex-start; gap: var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.cfdlg-note .i { flex: none; margin-block-start: 3px; }
.cfdlg .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--pd-space-2); }
@media (max-width: 480px) {
  .cfdlg-in { padding: var(--pd-space-4); }
}

/* The invitations to an organization: the page of the viewer, the
   page of a link, and the list in the members settings. */
.inv-page { padding-block: var(--pd-space-6); max-inline-size: 720px; }
.inv-page > .banner { margin-block-end: var(--pd-space-4); }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pd-space-3); }
.inv-card { display: grid; gap: var(--pd-space-2); padding: var(--pd-space-4); }
.inv-card > p { margin: 0; overflow-wrap: anywhere; }
.inv-who { display: flex; align-items: center; gap: var(--pd-space-2); min-inline-size: 0; }
.inv-sub { font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.inv-actions { display: flex; flex-wrap: wrap; gap: var(--pd-space-2); margin-block-start: var(--pd-space-2); }
.inv-target { overflow-wrap: anywhere; }
.inv-table td, .inv-table th { overflow-wrap: anywhere; }
.inv-table td:last-child { white-space: nowrap; }
@media (max-width: 720px) {
  /* An invitation on three lines, as a member of .mtable: the person and Cancel, the role and the state, then the sender. */
  .inv-table thead { display: none; }
  .inv-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .inv-table td { border-block-start: 0; }
  .inv-table td:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
  .inv-table td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .inv-table td:nth-child(2), .inv-table td:nth-child(3) { grid-row: 2; padding-block-start: 0; }
  .inv-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; padding-block-start: 0; }
  .inv-table tbody tr + tr { border-block-start: 1px solid var(--pd-border); }
}

/* ---- The chip of a reference to a confidential item, and the warning
   about a mention (src/issues/text.rs, src/confidential.rs) ---- */
.md .conf-ref { margin-inline-start: var(--pd-space-1); vertical-align: middle; font-weight: 600; }
.mention-warn { margin-block: var(--pd-space-3) 0; }
.mention-warn .grow { min-inline-size: 0; overflow-wrap: anywhere; }
.epre .mention-warn { margin-block: 0 var(--pd-space-3); }

/* The sign-up with the link of an invitation (signup.html). */
.su-errsum ul { margin: var(--pd-space-2) 0 0; padding-inline-start: var(--pd-space-5); }
.su-errsum li a { display: inline-block; min-block-size: 24px; padding-block: 2px; }
.su-errsum li + li { margin-block-start: 2px; }
.authpanel > .banner[tabindex="-1"]:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 2px; }
.authpanel input[readonly] { background: var(--pd-surface-sunken); }
.su-pwhelp { display: flex; flex-direction: column; gap: var(--pd-space-1); }
.su-pwhelp ul { margin: 0; padding-inline-start: var(--pd-space-5); }
.su-needed { display: flex; flex-direction: column; gap: var(--pd-space-3); }
.su-needed p { margin: 0; overflow-wrap: anywhere; }
.authcol .sub, .authpanel .banner .grow { overflow-wrap: anywhere; min-inline-size: 0; }
/* A link in a line of text needs a mark that is not only its color (WCAG 1.4.1). */
.authalt a { text-decoration: underline; }

/* The page after a sign-in with a temporary password
   (password-temporary.html). */
.authpanel .flabel .req { font-weight: 400; color: var(--pd-text-secondary); }
.authpanel .pt-out { margin-block-start: var(--pd-space-3); }

/* The page of the link in a confirm message. A long address wraps. */
.authpanel .ec-text { overflow-wrap: anywhere; min-inline-size: 0; margin: 0; margin-block-end: var(--pd-space-4); }

/* ---------- The toolbar, quote reply and suggestions of the editor ----------
   The toolbar shows only with the script (data-script, [hidden]). The
   list of suggestions opens below the text area, over the page. A name
   or a title wraps, so the list fits at 320 px. */
.editor .etools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-inline-start: auto; }
.editor .etools[hidden] { display: none; }
.editor .esep { inline-size: 1px; block-size: 20px; margin-inline: var(--pd-space-1); background: var(--pd-border); }
.editor .ewrite { position: relative; }
.editor .esg { position: absolute; z-index: 30; inset-block-start: calc(100% - var(--pd-space-2)); inset-inline: var(--pd-space-2); max-inline-size: 420px; background: var(--pd-surface); border: 1px solid var(--pd-border); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-md); font: var(--pd-body-sm); }
.editor .esg-list { max-block-size: 280px; overflow-y: auto; padding: var(--pd-space-1); }
.editor .sgo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pd-space-2); min-block-size: 32px; padding-block: var(--pd-space-1); padding-inline: var(--pd-space-2); border-radius: var(--pd-radius-md); cursor: pointer; }
.editor .sgo:hover { background: var(--pd-surface-sunken); }
.editor .sgo[aria-selected="true"] { background: var(--pd-accent-subtle); box-shadow: inset 0 0 0 1px var(--pd-accent); }
.editor .sgo .sgl { font-weight: 600; overflow-wrap: anywhere; }
.editor .sgo .sgn { flex: 1 1 8em; min-inline-size: 0; color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.editor .sgf { margin: 0; padding-block: var(--pd-space-1); padding-inline: var(--pd-space-3); border-block-start: 1px solid var(--pd-border); font: var(--pd-caption); color: var(--pd-text-secondary); }

/* ---------- The classes that replace the style attributes ----------
   The Content-Security-Policy of the pages has style-src 'self', so a page
   has no style attribute. Each class does the work of one style attribute.
   A style attribute wins over each rule, so each class is !important, as
   the utility classes of Bootstrap are. */
.u-mt-0 { margin-block-start: 0 !important; }
.u-mt-2 { margin-block-start: var(--pd-space-2) !important; }
.u-mb-3 { margin-block-end: var(--pd-space-3) !important; }
.u-mb-4 { margin-block-end: var(--pd-space-4) !important; }
.u-m-0-1 { margin-block: 0 var(--pd-space-1) !important; margin-inline: 0 !important; }
.u-m-0-4 { margin-block: 0 var(--pd-space-4) !important; margin-inline: 0 !important; }
.u-font-sm { font: var(--pd-body-sm) !important; }
.u-font-caption { font: var(--pd-caption) !important; }
.u-center { justify-content: center !important; }
.u-contents { display: contents !important; }
.u-upper { text-transform: uppercase !important; }
.u-max-320 { max-inline-size: 320px !important; }
.u-col-20 { inline-size: 20px !important; }
.u-col-52 { inline-size: 52px !important; }
.u-col-56 { inline-size: 56px !important; }
.compare-banner { margin-block: 0 var(--pd-space-4); margin-inline: var(--pd-space-4); }
/* A bar of the ahead and behind counts is an SVG element with its width in
   an attribute. */
.ab svg.bar { display: block; }

/* The link of a member to the issue settings of an organization,
   in the lists of the organizations of the account. A target of 24 px. */
.org-issues { display: inline-flex; align-items: center; min-block-size: 24px; }

/* Links in a text block of the settings. WCAG 1.4.1 needs a mark
   other than the colour, as the axe rule link-in-text-block checks. GitHub
   underlines a link in a text block in the same way. Only the running text
   (.help, .lead) gets it. A link that is a whole block, as the name of a
   branch rule or a back link, and a button stay as they are. */
.spanel :is(.help, .lead) a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }

/* The inbox: the confirm of "Mark all as read", as the confirm
   of the confidential flag, and the focus of a row after a mark. */
.nb-allconfirm .menu { inline-size: min(360px, calc(100vw - 2 * var(--pd-space-3))); }
.nb-allconfirm .menu .nb-confirm-text { margin: 0; padding: 0 var(--pd-space-3) var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.nb-allconfirm .menu .mh { overflow-wrap: anywhere; }
.nbdlg { inline-size: min(480px, calc(100vw - 2 * var(--pd-space-4))); max-block-size: calc(100dvh - 2 * var(--pd-space-5)); margin: auto; }
.nbdlg-in { display: flex; flex-direction: column; gap: var(--pd-space-4); padding: var(--pd-space-5); margin: 0; overflow: auto; min-inline-size: 0; }
.nbdlg h2 { margin: 0; font: var(--pd-heading-md); overflow-wrap: anywhere; }
.nbdlg p { margin: 0; overflow-wrap: anywhere; }
.nbdlg .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--pd-space-2); }
.nb-row:focus-visible { outline-offset: -2px; }
.nb-panel .empty-state h2:focus-visible { outline-offset: 2px; }
/* The menu of the bell on a narrow screen. The menu is 400 px wide
   and ends at the bell. Up to 1080 px it takes the width of the global bar,
   with a gutter on each side, as the menu of GitHub on a phone. Then it
   covers each tab of the project header fully, also with the tab Settings,
   so no strip of a tab stays open as a target below 24 px (WCAG 2.5.8).
   Above 1080 px it starts after the last tab. The menu starts at the bottom
   of the global bar, so it covers each link of the breadcrumb row fully. */
@media (max-width: 1080px) {
  .gbar { position: relative; }
  .gbar details.bell { position: static; }
  .gbar details.bell > .nmenu { inset-inline: var(--pd-space-3); inset-block-start: 100%; inline-size: auto; min-inline-size: 0; }
}
/* The small targets that axe does not flag: the title and the
   project link of an inbox row, and the count links of the project home.
   Each is 24 px high at least. The meta line of a row has room above it,
   so the project link is not too near the title on a phone. */
.nb-title a { padding-block: 2px; }
.nb-meta { margin-block-start: 6px; }
.nb-proj { padding-block: 4.5px; }
.side .row > a, .files-bar .links a { display: inline-flex; align-items: center; min-block-size: 24px; }
/* ---------- The file finder ----------
   The link "Go to file" of the project home, a folder and a file, as a
   button. It is a link, so it works with no
   script. The keycap hides when the single keys are off. The dialog uses the
   rules of the jump bar. The page of the finder is for a viewer with no
   script. */
.go-btn { display: inline-flex; align-items: center; gap: var(--pd-space-2); min-inline-size: 0; max-inline-size: 100%; block-size: 32px; padding-inline: var(--pd-space-3); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); background: var(--pd-surface); color: var(--pd-text-secondary); font: var(--pd-body-sm); cursor: pointer; }
.go-btn:hover { text-decoration: none; border-color: var(--pd-text-secondary); color: var(--pd-text); }
.go-btn span { flex: 1; text-align: start; overflow-wrap: anywhere; }
.files-bar .go-btn { inline-size: 220px; }
:root[data-keys="off"] .go-btn kbd { display: none; }
.finder-note { margin: 0; padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-caption); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.finder-page .finder-h { margin: 0; font: var(--pd-heading-lg); }
.finder-page .finder-where { margin-block: var(--pd-space-1) var(--pd-space-4); color: var(--pd-text-secondary); overflow-wrap: anywhere; }
.finder-page .finder-count { margin-block: 0 var(--pd-space-2); font: var(--pd-body-sm); color: var(--pd-text-secondary); }
.finder-page .finder-note { padding-inline: 0; }
.finder-list { list-style: none; margin: 0; padding: 0; }
.finder-list li + li { border-block-start: 1px solid var(--pd-border); }
.finder-list a { display: flex; align-items: center; gap: var(--pd-space-2); min-block-size: 40px; padding: var(--pd-space-2) var(--pd-space-3); font: var(--pd-code); overflow-wrap: anywhere; min-inline-size: 0; }
.finder-list a .i { flex: none; color: var(--pd-text-secondary); }
.finder-list a span { min-inline-size: 0; }
/* ---------- End of the file finder ---------- */

/* ---------- The filter box of the label menu ----------
   The menu holds the box, the count line, the list and the link to the
   settings. Only the list scrolls, so the box and the count line stay in
   view. The menu keeps the places of the other filter menus. */
.menu.imenu.lmenu { inline-size: 320px; max-inline-size: calc(100vw - 2 * var(--pd-space-4)); padding: 0; display: flex; flex-direction: column; max-block-size: 480px; overflow: hidden; }
.lmenu .lbox { margin: 0; padding-block: var(--pd-space-2) 0; padding-inline: var(--pd-space-2); }
.menu .lbox .lbl { display: block; padding-block: var(--pd-space-1) var(--pd-space-2); padding-inline: var(--pd-space-1); }
.lmenu .lfield { position: relative; display: flex; align-items: center; }
.lmenu .lfield > .i { position: absolute; inset-inline-start: 10px; color: var(--pd-text-secondary); pointer-events: none; }
.lmenu .lin { inline-size: 100%; min-block-size: 36px; padding-block: 7px; padding-inline: 34px 36px; font: var(--pd-body-sm); color: var(--pd-text); background: var(--pd-surface); border: 1px solid var(--pd-border-strong); border-radius: var(--pd-radius-md); }
.lmenu .lin:focus { outline: 2px solid var(--pd-focus-ring); outline-offset: 1px; }
.lmenu .lspin { position: absolute; inset-inline-end: 10px; display: inline-flex; color: var(--pd-text-secondary); }
.lmenu .lclear { position: absolute; inset-inline-end: 2px; min-block-size: 32px; min-inline-size: 32px; }
.lmenu .lgo { margin-block-start: var(--pd-space-2); }
.lmenu .lst { margin: 0; padding-block: var(--pd-space-2); padding-inline: var(--pd-space-3); font: var(--pd-caption); font-weight: 400; color: var(--pd-text-secondary); border-block-end: 1px solid var(--pd-border); }
.lmenu .llb { margin: 0; padding: var(--pd-space-2); overflow-y: auto; flex: 1; min-block-size: 0; overscroll-behavior: contain; scroll-padding-block: var(--pd-space-2); }
.lmenu .llb:not(:has(.lo)) { display: none; }
.menu.imenu.lmenu .lo { flex-direction: row; align-items: flex-start; gap: var(--pd-space-2); min-block-size: 40px; padding-block: 6px; padding-inline: var(--pd-space-2); }
.lmenu .lo .lcheck { flex: none; margin-block-start: 4px; visibility: hidden; }
.lmenu .lo.sel { background: none; color: var(--pd-text); }
.lmenu .lo.sel .lcheck { visibility: visible; color: var(--pd-accent); }
.lmenu .lo:hover { background: var(--pd-surface-sunken); }
.lmenu .lo.lact { background: var(--pd-surface-sunken); box-shadow: inset 0 0 0 2px var(--pd-focus-ring); }
.lmenu .lo.sel.lact, .lmenu .lo.sel:hover { background: var(--pd-accent-subtle); }
.lmenu .lot { display: grid; gap: 2px; min-inline-size: 0; }
.lmenu .lot > .lname-wrap { justify-self: start; min-inline-size: 0; }
.lmenu .lot .label { white-space: normal; overflow-wrap: anywhere; }
.lmenu .lo mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
/* A person of the Author menu or of the Assignee menu: the name,
   and the full name in the secondary color. */
.lmenu .pname { min-inline-size: 0; overflow-wrap: anywhere; }
.lmenu .pfull { color: var(--pd-text-secondary); }
.lmenu .lrule { block-size: 1px; margin-block: var(--pd-space-1); background: var(--pd-border); }
.lmenu .llb.lstale { opacity: 0.55; }
.lmenu .lempty { padding-block: var(--pd-space-5); padding-inline: var(--pd-space-4); text-align: center; color: var(--pd-text-secondary); font: var(--pd-body-sm); }
.lmenu .lempty > .i { display: block; margin-block: 0 var(--pd-space-2); margin-inline: auto; }
.lmenu .lempty p { margin-block: 0 var(--pd-space-1); }
.lmenu .lempty .let { color: var(--pd-text); font-weight: 600; }
.lmenu .lfoot { margin: 0; padding-block: var(--pd-space-2); padding-inline: var(--pd-space-3); border-block-start: 1px solid var(--pd-border); font: var(--pd-body-sm); }
.menu.imenu.lmenu .lempty a, .menu.imenu.lmenu .lfoot a { display: inline; inline-size: auto; min-block-size: 0; padding: 0; color: var(--pd-link); text-decoration: underline; }
.menu.imenu.lmenu .lempty a:hover, .menu.imenu.lmenu .lfoot a:hover { background: none; }
.menu.imenu.lmenu .lfoot a { display: inline-block; padding-block: 2px; }
/* On a phone the box and the rows are 44 px high, and the text of the box
   is 16 px, so that the phone does not zoom the page (WCAG 2.5.8). */
@media (max-width: 480px) {
  .lmenu .lin { font: var(--pd-body); min-block-size: 44px; }
  .menu.imenu.lmenu .lo { min-block-size: 44px; }
  .lmenu .lclear { min-block-size: 40px; min-inline-size: 40px; }
  .menu.imenu.lmenu .lfoot a { padding-block: 10px; }
}
@media (forced-colors: active) {
  .lmenu .lo.lact { outline: 2px solid Highlight; }
  .lmenu .lo mark { forced-color-adjust: none; }
}

/* ---------- Each open menu stays in the window ----------
   WCAG 1.4.10 (reflow): a menu must not start or end out of the window. The
   rules follow Primer CSS. A menu is never wider than the window less a
   margin (the max-width: calc(100vw - ...) of its overlays). It opens to
   the side of its button that has room (.dropdown-menu-se and
   .dropdown-menu-sw), and on a phone it takes the width of the page, as a
   Primer overlay on a narrow screen. pelladrin.js moves a menu of a row
   that wraps back into the window, because no rule knows the side of such
   a button. tests/menu_window.rs reads these rules. */
:where(details.menu-wrap) > .menu { max-inline-size: calc(100vw - 2 * var(--pd-space-4)); }
/* Up to 480 px, a menu in the page takes the width of the page (or of its
   card) below its button, as the branch picker does. The
   wrapper is a block with a block summary, so the menu starts below the
   summary and does not cover it. A menu of the stack rail and the label
   menus of a settings table keep their own place (.srow-menu, .ledit). */
@media (max-width: 480px) {
  main details.menu-wrap:not(.srow-menu, .stable .acts > details) { position: static; display: inline-block; }
  main details.menu-wrap:not(.srow-menu, .stable .acts > details) > summary { display: flex; }
  main details.menu-wrap:not(.srow-menu, .stable .acts > details) > .menu { inset-inline: var(--pd-space-4); inset-block-start: auto; margin-block-start: 6px; inline-size: auto; min-inline-size: 0; max-inline-size: none; }
  /* The create menu of the global bar ends at the end of the bar, as the
     menu of the bell. At 320 px its button ends at 192 px. */
  .gbar details.gcreate { position: static; }
  .gbar details.gcreate > .menu { inset-inline-start: auto; inset-inline-end: var(--pd-space-4); inset-block-start: 100%; }
}
/* Up to 860 px, the side panel of an issue and the actions of a branch
   rule are below the page, at its start. Their menus open to the end:
   the menu of the notifications from the start of its button group. */
@media (min-width: 481px) and (max-width: 860px) {
  .nb-watch .nb-split { position: relative; }
  .nb-watch .nb-split > details.menu-wrap { position: static; }
  .nb-watch .nb-split > details.menu-wrap > .menu, .bacts > details.menu-wrap > .menu { inset-inline-start: 0; inset-inline-end: auto; }
}
/* Up to 720 px, the Watch button of a project home is at the start. */
@media (min-width: 481px) and (max-width: 720px) {
  .nb-pwatch details.menu-wrap > .menu { inset-inline-start: 0; inset-inline-end: auto; }
}
/* From 481 to 921 px, the filter row of a list and the footer wrap, so no
   rule knows the side of a filter button or of the language button. With
   no script, a menu that opens at its button can leave the window. At
   these widths, with no script, the menu takes its place from the row, not
   from the button, as the phone rule does. A filter menu opens below the
   head of the card, at its end, and is never wider than the head. The
   language menu opens above the footer, at its center, as on the pages of
   the sign-in. The head of the list is sticky, so it is already the
   containing block. With the script, each menu keeps its place under its
   button, and pelladrin.js moves it into the window. The media
   feature scripting (Firefox 113, Chrome 120, Safari 17) needs no script
   to set a class, so the page does not change its layout when the script
   starts. */
@media (scripting: none) and (min-width: 481px) and (max-width: 921px) {
  .ilist .filters > details.menu-wrap { position: static; }
  .ilist .filters > details.menu-wrap > .menu { inset-inline-start: auto; inset-inline-end: 0; max-inline-size: 100%; }
  .foot .wrap { position: relative; }
  .foot .langmenu { position: static; }
  .foot .langmenu > .menu { inset-inline: 0; margin-inline: auto; inline-size: max-content; }
}

